:root {
    --gold: #d4a017;
    --gold-dark: #9a7200;
    --gold-pale: #f7f1dc;
    --ink: #1d1d1f;
    --muted: #676767;
    --line: #dedbd2;
    --paper: #ffffff;
    --bg: #f6f5f1;
    --danger: #9c2e2e;
    --success: #2d6a4f;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}
a { color: var(--gold-dark); }
a:hover { color: #705200; }
.wrap { width: min(1040px, calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 32px)); }

.hero {
    background: linear-gradient(135deg, #b98608 0%, #d4a017 55%, #edcc68 100%);
    color: #fff;
    border-bottom: 5px solid #8f6800;
}
.hero-inner { padding: 58px 0 54px; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 700; }
.callsign { font-size: clamp(4.8rem, 16vw, 9rem); font-weight: 900; line-height: .9; letter-spacing: -.05em; margin: 18px 0 14px; text-shadow: 0 2px 0 rgba(0,0,0,.08); }
.hero h1, .subhero h1, .admin-header h1 { margin: 0; }
.hero h1 { font-size: clamp(1.8rem, 4.2vw, 3.2rem); }
.hero-copy { width: min(760px, 100%); margin: 18px auto 0; font-size: 1.02rem; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease;
}
.button:hover { transform: translateY(-1px); opacity: .94; }
.button-gold { background: var(--gold); color: #fff; }
.button-gold:hover { color: #fff; }
.button-light { background: #fff; color: #6f5200; }
.button-light:hover { color: #4f3a00; }
.button-ghost { border: 1px solid rgba(255,255,255,.65); color: #fff; background: rgba(255,255,255,.08); }
.button-ghost:hover { color: #fff; }
.button-muted { background: #e7e5df; color: #333; }
.button-danger { background: #f7e8e8; color: var(--danger); }
.button-small { padding: 8px 13px; font-size: .84rem; }
.button-wide { width: 100%; margin-top: 8px; }

main.wrap { padding: 34px 0 54px; }
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(20px, 4vw, 34px);
    margin-bottom: 24px;
}
.card h2 { margin: 4px 0 12px; line-height: 1.25; }
.section-kicker { color: var(--gold-dark); text-transform: uppercase; font-size: .76rem; letter-spacing: .12em; font-weight: 800; }
.mission { display: grid; grid-template-columns: 1.5fr .8fr; gap: 28px; align-items: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats div { background: var(--gold-pale); border: 1px solid #ead99f; border-radius: 12px; padding: 18px 12px; text-align: center; }
.stats strong { display: block; color: var(--gold-dark); font-size: 1.7rem; }
.stats span { display: block; color: var(--muted); font-size: .76rem; margin-top: 4px; }

.search-card { border-top: 4px solid var(--gold); }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 20px 0 18px; }
input, textarea {
    width: 100%;
    border: 1px solid #cfcbbf;
    border-radius: 9px;
    padding: 12px 13px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
input:focus, textarea:focus { outline: 3px solid rgba(212,160,23,.2); border-color: var(--gold); }
label { display: block; font-size: .86rem; font-weight: 700; }
label input, label textarea { margin-top: 6px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 22px 0; }
.full { grid-column: 1 / -1; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .82rem; }
.privacy-note { color: var(--muted); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.recaptcha-note { color: var(--muted); font-size: .75rem; text-align: center; }

.notice { margin: 18px 0; padding: 13px 15px; border-radius: 9px; background: #f2f0e9; border: 1px solid #dfdbcf; }
.notice-error { background: #fff2f2; border-color: #efc3c3; color: #782727; }
.notice-success { background: #edf8f1; border-color: #b9dfc7; color: #245c42; }
.notice ul { margin-bottom: 0; }
.results-heading { margin: 20px 0 10px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 580px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid #ece9e0; font-size: .86rem; }
th { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .08em; }
.text-link { font-weight: 700; text-decoration: none; }
.status { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: .72rem; font-weight: 800; }
.status-pending { background: #fff4cf; color: #775600; }
.status-mailed { background: #e8f6ee; color: #246145; }
.status-declined { background: #f7e8e8; color: #8d2828; }

.closing { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 24px 4px 10px; }
.gold-ribbon { font-size: 3.4rem; filter: sepia(1) saturate(2); }

.subhero { background: #1c1c1c; color: #fff; border-bottom: 4px solid var(--gold); }
.subhero .wrap { padding: 30px 0; }
.subhero h1 { font-size: clamp(2rem, 6vw, 3.1rem); margin-top: 5px; }
.subhero p { margin-bottom: 0; color: #ddd; }
.back-link { display: inline-block; margin-bottom: 18px; text-decoration: none; font-size: .85rem; }
.back-link.light { color: #fff; }
.qso-confirm { text-align: center; }
.qso-call { font-size: 3rem; line-height: 1; font-weight: 900; color: var(--gold-dark); margin: 10px 0; }
.success-card { text-align: center; }
.success-mark { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: #e8f6ee; color: var(--success); font-size: 2rem; font-weight: 900; }

footer { background: #171717; color: #cfcfcf; font-size: .78rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; }

/* Admin */
.admin-body { background: #efeee9; }
.admin-header { background: #171717; color: #fff; border-bottom: 4px solid var(--gold); }
.admin-header-inner { min-height: 132px; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.admin-main { padding-top: 28px !important; }
.admin-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.summary-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center; text-decoration: none; color: var(--ink); }
.summary-box strong { display: block; color: var(--gold-dark); font-size: 1.8rem; }
.summary-box span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.summary-box.active { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.import-note { color: var(--muted); font-size: .8rem; margin-bottom: 18px; }
.admin-card { padding-bottom: 18px; }
.request-list { display: grid; gap: 14px; }
.request-item { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; }
.request-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; border-bottom: 1px solid #eee9df; padding-bottom: 12px; margin-bottom: 14px; }
.request-call { font-size: 1.65rem; font-weight: 900; }
.request-qso { color: var(--muted); font-size: .8rem; }
.request-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 22px; font-size: .86rem; }
.mini-label { display: block; color: var(--muted); text-transform: uppercase; font-size: .67rem; font-weight: 800; letter-spacing: .08em; margin-bottom: 5px; }
.request-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eee9df; }
.file-drop { display: block; border: 2px dashed #d8cfaf; background: var(--gold-pale); border-radius: 12px; padding: 24px; margin: 18px 0; }
.file-drop input { margin-top: 10px; background: #fff; }
code { background: #f1efe8; border-radius: 5px; padding: 2px 5px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
    .mission { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .full { grid-column: auto; }
    .request-grid { grid-template-columns: 1fr; gap: 14px; }
    .admin-summary { grid-template-columns: 1fr 1fr; }
    .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
    .search-form { grid-template-columns: 1fr; }
    .admin-header-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 22px 0; }
    .stats { grid-template-columns: 1fr 1fr; }
    .closing { grid-template-columns: 1fr; }
}
