/* site.css — Your AI News (neon theme). Shared by index, article.php, about, submit. */
:root {
    --bg: #0a0a12; --ink: #e9edf7; --muted: #8b93a7; --card: #12121f; --line: #221f3a;
    --cyan: #22d3ee; --purple: #a855f7; --pink: #ec4899;
}
* { 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%;
}
body {
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(168,85,247,.16), transparent 60%),
        radial-gradient(800px 500px at -10% 0%, rgba(34,211,238,.12), transparent 55%), var(--bg);
    background-attachment: fixed;
}
a { color: var(--cyan); }
.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(10,10,18,.82); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topnav .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; font-size: 18px;
    background: linear-gradient(90deg, var(--cyan), var(--purple) 60%, var(--pink));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topnav .brand .mark { width: 120px; height: 120px; border-radius: 12px; flex: 0 0 auto;
    background: url('brand.png') center/cover no-repeat, linear-gradient(135deg, var(--cyan), var(--purple)); }
.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(168,85,247,.12); }

/* ── home: hero + grid ── */
.lead { margin: 26px 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.featured {
    display: block; text-decoration: none; color: inherit; background: var(--card);
    border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 26px;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.featured:hover { border-color: rgba(168,85,247,.6); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(168,85,247,.16); }
.featured .ph { aspect-ratio: 21/9; background: #0e0e1a 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: 14px; overflow: hidden;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.card:hover { border-color: rgba(168,85,247,.55); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(168,85,247,.13); }
.card .ph { aspect-ratio: 16/9; background: #0e0e1a 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: 12.5px; color: var(--muted); }
.topic { text-transform: uppercase; letter-spacing: .6px; font-weight: 700; font-size: 11px; color: var(--pink);
    border: 1px solid rgba(236,72,153,.4); background: rgba(236,72,153,.08); padding: 2px 9px; border-radius: 999px; }
.meta time { font-variant-numeric: tabular-nums; }
.featured h2 { margin: 0 0 9px; font-size: 27px; font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
.card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.summary { margin: 0; color: #c3cad9; font-size: 14.5px; }
.featured .summary { font-size: 16px; }
.readmore { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 700; color: var(--cyan); }

/* ── 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: 9px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; text-decoration: none; }
.back:hover { color: var(--ink); border-color: var(--purple); }
.article-page .hero { margin: 0 0 22px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.article-page .hero img { display: block; width: 100%; height: auto; }
.article-page h1 { font-size: 30px; font-weight: 800; line-height: 1.2; margin: 8px 0 6px; letter-spacing: -.4px; }
.deck { font-size: 19px; line-height: 1.5; color: #b9c1d4; margin: -2px 0 18px; }
.byline { color: var(--purple); font-weight: 700; font-size: 14px; margin-bottom: 22px; }
.article-page .body p { margin: 0 0 17px; color: #d6dbe8; font-size: 16.5px; line-height: 1.75; }
.article-page .body p:first-of-type { font-size: 17.5px; }
.article-page .body p:first-of-type::first-letter {
    float: left; font-size: 58px; line-height: .76; font-weight: 800; padding: 6px 12px 0 0;
    background: linear-gradient(180deg, var(--cyan), var(--purple));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
sup.cite { font-size: .62em; line-height: 0; vertical-align: super; }
sup.cite a { color: var(--cyan); 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: 13px; 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(--cyan); }

/* ── about + submit ── */
.prose { max-width: 720px; padding-top: 30px; }
.prose h1 { font-size: 30px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 16px; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose p { color: #d6dbe8; font-size: 16.5px; line-height: 1.75; margin: 0 0 16px; }
.form { max-width: 600px; padding-top: 30px; }
.form h1 { font-size: 30px; font-weight: 800; 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: #0e0e18; color: var(--ink); border: 1px solid var(--line); border-radius: 9px;
    padding: 11px 13px; font-size: 15px; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--purple); }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.btn { background: linear-gradient(90deg, var(--purple), var(--pink)); color: #fff; border: none; border-radius: 10px;
    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: #46d39a; } .form-msg.err { color: #f0556f; }
.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: linear-gradient(100deg, rgba(168,85,247,.14), rgba(34,211,238,.09));
    border: 1px solid rgba(168,85,247,.45); border-radius: 14px; padding: 15px 18px; }
.promo:hover { border-color: var(--cyan); box-shadow: 0 10px 30px rgba(34,211,238,.16); }
.promo img { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 50%; }
.promo-text { flex: 1; min-width: 0; }
.promo-text strong { display: block; color: var(--ink); font-size: 15.5px; }
.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: linear-gradient(90deg, var(--purple), var(--pink)); padding: 9px 16px; border-radius: 999px; }
.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) {
    .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; }
}
