/* site.css — rockhoundnews.today (mineral light theme). Shared by index, article.php, about, submit. */
:root {
    --bg: #fafafa;
    --ink: #1a1d24;
    --muted: #6b7280;
    --line: #e6e8ec;
    --accent: #a16207;
    --card: #ffffff;
    --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
}
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0; background: var(--bg); color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 18px 80px; }

/* ── top nav ── */
.topnav {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 12px 18px; background: rgba(250, 250, 250, .92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topnav .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.topnav .brand .mark {
    width: 48px; height: 48px; flex: 0 0 auto; border-radius: 10px;
    background: url('rocklogo.jpg') center/cover no-repeat;
}
.topnav .brand .name { font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.topnav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 8px; }
.topnav nav a:hover { color: var(--ink); background: rgba(37, 99, 235, .08); }

/* ── home: hero + grid ── */
.lead { margin: 26px 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 600; }
.featured {
    display: block; text-decoration: none; color: inherit; background: var(--card);
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 26px;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.featured:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(37, 99, 235, .1); }
.featured .ph { aspect-ratio: 21/9; background: #f0f2f5 center/cover no-repeat; border-bottom: 1px solid var(--line); }
.featured .body { padding: 22px 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card {
    display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--card);
    border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37, 99, 235, .08); }
.card .ph { aspect-ratio: 16/9; background: #f0f2f5 center/cover no-repeat; border-bottom: 1px solid var(--line); }
.card .body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.meta { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.topic { color: var(--accent); font-weight: 700; }
.meta time { font-variant-numeric: tabular-nums; }
.featured h2 { font-family: var(--serif); margin: 0 0 9px; font-size: 27px; font-weight: 700; line-height: 1.22; letter-spacing: -.3px; }
.card h3 { font-family: var(--serif); margin: 0 0 8px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.summary { margin: 0; color: #41464f; font-size: 14.5px; }
.featured .summary { font-size: 16px; }
.readmore { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .4px; }

/* ── article page ── */
.article-page { max-width: 720px; padding-top: 26px; }
.back { display: inline-block; background: none; border: 1px solid var(--line); color: var(--muted);
    border-radius: 8px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; text-decoration: none; font-family: inherit; }
.back:hover { color: var(--ink); border-color: var(--ink); }
.article-page .hero { margin: 0 0 22px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.article-page .hero img { display: block; width: 100%; height: auto; }
.article-page h1 { font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1.18; margin: 8px 0 6px; letter-spacing: -.4px; }
.deck { font-family: var(--serif); font-size: 19px; font-style: italic; line-height: 1.5; color: #41464f; margin: -2px 0 18px; }
.byline { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.byline strong { color: var(--accent); font-weight: 600; }
.article-actions { display: flex; gap: 10px; margin: -8px 0 22px; }
.action-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px;
    padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.action-btn:hover { color: var(--ink); border-color: var(--ink); }
.action-btn[data-state="speaking"] { color: var(--accent); border-color: var(--accent); }
.article-page .body p { margin: 0 0 17px; color: #2b2f37; font-size: 16.5px; line-height: 1.8; }
.article-page .body p:first-of-type { font-size: 17px; }
.article-page .body p:first-of-type::first-letter {
    float: left; font-family: var(--serif); font-size: 58px; line-height: .76; font-weight: 700; padding: 6px 12px 0 0; color: var(--accent);
}
sup.cite { font-size: .62em; line-height: 0; vertical-align: super; }
sup.cite a { color: var(--accent); text-decoration: none; font-weight: 700; padding: 0 1px; }
sup.cite a:hover { text-decoration: underline; }
.sources { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 18px; }
.sources h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0 0 10px; }
.sources ol.refs { margin: 0; padding-left: 22px; }
.sources ol.refs li { margin-bottom: 7px; font-size: 14.5px; word-break: break-word; }
.sources ol.refs li a { color: var(--accent); }

/* ── about + submit ── */
.prose { max-width: 720px; padding-top: 30px; }
.prose h1 { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -.4px; margin: 0 0 16px; }
.prose h2 { font-family: var(--serif); font-size: 20px; margin: 28px 0 8px; }
.prose p { color: #2b2f37; font-size: 16.5px; line-height: 1.75; margin: 0 0 16px; }
.form { max-width: 600px; padding-top: 30px; }
.form h1 { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -.4px; margin: 0 0 6px; }
.form .lede { color: var(--muted); margin: 0 0 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
    width: 100%; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
    padding: 11px 13px; font-size: 15px; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.btn { background: var(--accent); color: #fff; border: none; border-radius: 8px;
    padding: 12px 22px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn:disabled { opacity: .6; cursor: default; }
.form-msg { min-height: 22px; margin-top: 12px; font-size: 14px; font-weight: 600; }
.form-msg.ok { color: #15803d; } .form-msg.err { color: #dc2626; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── promo + footer + states ── */
.promo { display: flex; align-items: center; gap: 15px; text-decoration: none; margin: 30px 0 0;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px;
    transition: border-color .15s ease, box-shadow .15s ease; }
.promo:hover { border-color: var(--accent); box-shadow: 0 6px 22px rgba(37, 99, 235, .08); }
.promo img { width: 50px; height: 50px; flex: 0 0 auto; border-radius: 9px; border: 1px solid var(--line); }
.promo-text { flex: 1; min-width: 0; }
.promo-text strong { display: block; color: var(--ink); font-size: 15px; }
.promo-text span { color: var(--muted); font-size: 13.5px; }
.promo-cta { flex: 0 0 auto; font-weight: 700; font-size: 13.5px; color: #fff; white-space: nowrap;
    background: var(--accent); padding: 9px 16px; border-radius: 8px; }
.empty, .loading { text-align: center; color: var(--muted); padding: 56px 16px; font-size: 15px; }
footer.site { max-width: 920px; margin: 40px auto 0; padding: 22px 18px; border-top: 1px solid var(--line);
    color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 480px) {
    .topnav .brand .mark { width: 140px; height: 38px; }
    .featured h2 { font-size: 22px; } .article-page h1, .prose h1, .form h1 { font-size: 25px; }
    .promo { flex-wrap: wrap; } .promo-cta { width: 100%; text-align: center; }
}
