/* ============================================================
   AI Detector — design system
   Warm / human aesthetic: paper-cream surfaces, deep ink type,
   single terracotta accent. Fraunces (display) + Inter (body).
   ============================================================ */

:root {
    /* Surfaces */
    --bg-base:      #FAF6EC;   /* warm paper */
    --bg-elevated:  #FFFCF4;   /* slightly lighter */
    --bg-sunken:    #F2ECDD;   /* card backgrounds */
    --bg-tinted:    #EDE5D2;   /* footer / muted blocks */

    /* Ink */
    --ink:          #1B1610;   /* main text */
    --ink-soft:     #4A4338;   /* secondary */
    --ink-muted:    #8C8170;   /* tertiary, captions, meta */
    --ink-faint:    #B6AB97;   /* placeholders, hairlines */

    /* Lines */
    --rule:         #E5DBC6;
    --rule-strong:  #C9BDA3;

    /* Accent (terracotta) */
    --accent:       #BF4626;
    --accent-dark:  #9A361A;
    --accent-soft:  #F4DDD0;

    /* Verdicts */
    --ok:           #4F6F3D;
    --ok-soft:      #E2E9D2;
    --warn:         #A87519;
    --warn-soft:    #F1E2C0;
    --bad:          #A8341A;
    --bad-soft:     #F0D2C2;

    /* Type scale (modular ~1.25) */
    --fs-xs:   0.75rem;
    --fs-sm:   0.875rem;
    --fs-base: 1.0625rem;   /* 17px body */
    --fs-md:   1.1875rem;
    --fs-lg:   1.4375rem;
    --fs-xl:   1.75rem;
    --fs-2xl:  2.25rem;
    --fs-3xl:  3rem;
    --fs-4xl:  4rem;

    /* Spacing scale (4px base) */
    --s-1:  0.25rem;
    --s-2:  0.5rem;
    --s-3:  0.75rem;
    --s-4:  1rem;
    --s-5:  1.5rem;
    --s-6:  2rem;
    --s-7:  3rem;
    --s-8:  4rem;
    --s-9:  6rem;

    /* Radii */
    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  16px;

    /* Shadows — soft, paper-on-paper */
    --shadow-1: 0 1px 0 rgba(27, 22, 16, 0.04);
    --shadow-2: 0 1px 2px rgba(27, 22, 16, 0.06), 0 8px 24px -12px rgba(27, 22, 16, 0.08);

    /* Layout */
    --measure: 68ch;
    --max-w:   1100px;
}

/* ----- Reset / base ----- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--fs-base);
    line-height: 1.55;
    font-feature-settings: 'cv11', 'ss01';   /* Inter alt-a, alt-l */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Subtle paper grain. Just enough to break the flat color. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle at 17% 23%, rgba(27, 22, 16, 0.022) 0, transparent 1.2px),
        radial-gradient(circle at 73% 67%, rgba(27, 22, 16, 0.022) 0, transparent 1.2px),
        radial-gradient(circle at 47% 89%, rgba(27, 22, 16, 0.022) 0, transparent 1.2px);
    background-size: 13px 13px, 17px 17px, 11px 11px;
    opacity: 0.7;
}

/* ----- Typography ----- */

h1, h2, h3, h4 {
    font-family: 'Fraunces', 'Georgia', serif;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.015em;
    margin: 0 0 var(--s-4);
    font-variation-settings: 'opsz' 144, 'SOFT' 50;
}

h1 {
    font-size: clamp(2.25rem, 3.2vw + 1rem, 4rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    font-variation-settings: 'opsz' 144, 'SOFT' 80;
}

h2 { font-size: var(--fs-2xl); margin-top: var(--s-7); }
h3 { font-size: var(--fs-xl);  margin-top: var(--s-6); }
h4 { font-size: var(--fs-lg);  margin-top: var(--s-5); font-weight: 600; }

p {
    margin: 0 0 var(--s-4);
    max-width: var(--measure);
}

p.lede {
    font-family: 'Fraunces', 'Georgia', serif;
    font-weight: 300;
    font-size: var(--fs-lg);
    line-height: 1.45;
    color: var(--ink-soft);
    font-variation-settings: 'opsz' 18, 'SOFT' 100;
}

small, .meta {
    color: var(--ink-muted);
    font-size: var(--fs-sm);
}

a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--accent-soft);
    transition: text-decoration-color 0.15s, color 0.15s;
}
a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

::selection {
    background: var(--accent-soft);
    color: var(--ink);
}

/* ----- Layout primitives ----- */

.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--s-7) var(--s-5) var(--s-9);
}

@media (max-width: 640px) {
    main { padding: var(--s-5) var(--s-4) var(--s-7); }
}

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

/* ----- Top navigation ----- */

.site-header {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--rule);
    background: linear-gradient(to bottom, var(--bg-elevated), var(--bg-base));
}

.site-header__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--s-4) var(--s-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
}

.brand {
    font-family: 'Fraunces', serif;
    font-size: var(--fs-lg);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.brand:hover { color: var(--accent); }
.brand__mark {
    width: 1.5em;
    height: 1.5em;
    flex: none;
    transition: transform 0.2s ease;
}
.brand:hover .brand__mark { transform: rotate(-6deg); }

.site-nav {
    display: flex;
    gap: var(--s-5);
    align-items: center;
}
.site-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: var(--s-2) 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.site-nav > a:hover,
.site-nav > a.active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

/* nav dropdowns (native details, no JS) */
.navdrop {
    position: relative;
}
.navdrop > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--ink-soft);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: var(--s-2) 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s;
}
.navdrop > summary::-webkit-details-marker { display: none; }
.navdrop > summary::after {
    content: '';
    width: 0.42em;
    height: 0.42em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-0.1em);
    transition: transform 0.15s;
    opacity: 0.7;
}
.navdrop[open] > summary { color: var(--ink); }
.navdrop[open] > summary::after { transform: rotate(-135deg) translateY(-0.1em); }
.navdrop > summary:hover { color: var(--ink); }

.navdrop__menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    z-index: 30;
    min-width: 13rem;
    display: flex;
    flex-direction: column;
    padding: var(--s-3);
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-2);
}
.navdrop__menu a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: var(--fs-sm);
    padding: var(--s-2) var(--s-2);
    border-radius: var(--r-sm);
}
.navdrop__menu a:hover { background: var(--bg-sunken); color: var(--ink); }
.navdrop__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding: var(--s-2) var(--s-2) var(--s-1);
}
.navdrop__label:not(:first-child) {
    margin-top: var(--s-2);
    border-top: 1px solid var(--rule);
    padding-top: var(--s-3);
}

@media (max-width: 600px) {
    .site-header__inner { flex-wrap: wrap; }
    .site-nav { gap: var(--s-4); flex-wrap: wrap; }
    .navdrop__menu { right: auto; left: 0; }
}

/* ----- Footer ----- */

.site-footer {
    margin-top: var(--s-8);
    border-top: 1px solid var(--rule);
    background: var(--bg-tinted);
    color: var(--ink-muted);
    font-size: var(--fs-sm);
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.site-footer__cols {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--s-7) var(--s-5) var(--s-6);
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 0.8fr;
    gap: var(--s-6) var(--s-5);
}
.footcol {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}
.footcol h4 {
    margin: 0 0 var(--s-2);
    font-family: 'Inter', sans-serif;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.footcol a { font-size: var(--fs-sm); }
.footcol a.active { color: var(--ink); }

.site-footer__fine {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--s-4) var(--s-5);
    border-top: 1px solid var(--rule);
    color: var(--ink-faint);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}
.site-footer__fine span { font-size: var(--fs-xs); }

@media (max-width: 640px) {
    .site-footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ----- Detector form ----- */

.detector {
    margin-top: var(--s-6);
}

/* input-mode tabs */
.inputmodes {
    display: inline-flex;
    gap: var(--s-1);
    padding: 4px;
    margin-bottom: var(--s-4);
    background: var(--bg-sunken);
    border: 1px solid var(--rule);
    border-radius: 999px;
}
.inputmode {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.5em 1.1em;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.inputmode:hover:not(:disabled):not(.is-active) { color: var(--ink); }
.inputmode.is-active {
    background: var(--bg-elevated);
    color: var(--ink);
    box-shadow: var(--shadow-1);
}
.inputmode:disabled { opacity: 0.5; cursor: not-allowed; }

/* source panels (file / url) */
.source-panel {
    margin-bottom: var(--s-4);
    padding: var(--s-5);
    background: var(--bg-sunken);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
}
.source-panel .meta { display: block; margin-top: var(--s-3); }

.filepick {
    display: inline-flex;
    align-items: center;
    gap: var(--s-4);
    flex-wrap: wrap;
    cursor: pointer;
}
.filepick input[type="file"] { display: none; }
.filepick__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.7em 1.4em;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg-elevated);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: transform 0.08s, background 0.15s;
}
.filepick:hover .filepick__btn { transform: translateY(-1px); background: var(--accent); }

.url-row {
    display: flex;
    gap: var(--s-3);
    flex-wrap: wrap;
}
.detector__url {
    flex: 1 1 280px;
    min-width: 0;
    padding: 0.7em 1em;
    background: var(--bg-elevated);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: var(--fs-base);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.detector__url::placeholder { color: var(--ink-faint); }
.detector__url:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.detector__label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--s-2);
}

.detector__label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.detector__counter {
    font-variant-numeric: tabular-nums;
    color: var(--ink-muted);
    font-size: var(--fs-sm);
}

.detector__input {
    width: 100%;
    min-height: 280px;
    padding: var(--s-5);
    background: var(--bg-elevated);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: var(--fs-base);
    line-height: 1.6;
    resize: vertical;
    box-shadow: var(--shadow-1);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.detector__input::placeholder { color: var(--ink-faint); }
.detector__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.detector__input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.detector__actions {
    margin-top: var(--s-4);
    display: flex;
    gap: var(--s-3);
    flex-wrap: wrap;
    align-items: center;
}

/* ----- Buttons ----- */

.btn {
    --btn-bg: var(--ink);
    --btn-fg: var(--bg-elevated);
    --btn-border: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 0.7em 1.4em;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1px solid var(--btn-border);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.015em;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s ease, background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn--primary {
    --btn-bg: var(--accent);
    --btn-fg: #FFFCF4;
    --btn-border: var(--accent);
}
.btn--primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--ink-soft);
    --btn-border: var(--rule-strong);
}
.btn--ghost:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }

/* spinner inside button */
.spinner {
    width: 0.9em;
    height: 0.9em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Result card ----- */

.result {
    margin-top: var(--s-6);
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    /* fade in */
    animation: fadeUp 0.35s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.result__verdict-strip {
    height: 6px;
    background: var(--rule);
}
.result[data-verdict='human']     .result__verdict-strip { background: var(--ok);   }
.result[data-verdict='uncertain'] .result__verdict-strip { background: var(--warn); }
.result[data-verdict='ai']        .result__verdict-strip { background: var(--bad);  }

.result__body {
    padding: var(--s-6) var(--s-6) var(--s-5);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--s-5) var(--s-6);
    align-items: center;
}

@media (max-width: 560px) {
    .result__body { grid-template-columns: 1fr; padding: var(--s-5); }
}

.result__score {
    font-family: 'Fraunces', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 300;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.result[data-verdict='human']     .result__score { color: var(--ok);  }
.result[data-verdict='uncertain'] .result__score { color: var(--warn); }
.result[data-verdict='ai']        .result__score { color: var(--bad);  }
.result__score-pct {
    font-size: 0.5em;
    color: var(--ink-muted);
    margin-left: 0.05em;
}

.result__copy h3 {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-xl);
    color: var(--ink);
    font-weight: 500;
}
.result__copy p {
    margin: 0;
    color: var(--ink-soft);
}

.result__meta {
    grid-column: 1 / -1;
    border-top: 1px solid var(--rule);
    padding-top: var(--s-4);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--s-4);
}
.result__meta-item {
    font-size: var(--fs-sm);
}
.result__meta-item dt {
    color: var(--ink-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: var(--fs-xs);
    margin-bottom: 2px;
}
.result__meta-item dd {
    margin: 0;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* ----- Image preview ----- */

.img-preview {
    margin-top: var(--s-4);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--bg-sunken);
    max-width: 420px;
}
.img-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
}

/* ----- Scanning loader ----- */

.scanner {
    margin-top: var(--s-6);
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: var(--s-6);
    animation: fadeUp 0.3s ease both;
}
.scanner__doc {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: var(--s-3);
    border-radius: var(--r-sm);
}
.scanner__line {
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bg-sunken) 0%, var(--rule) 50%, var(--bg-sunken) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
}
.scanner__line:nth-child(2) { width: 96%; }
.scanner__line:nth-child(3) { width: 88%; }
.scanner__line:nth-child(4) { width: 99%; }
.scanner__line:nth-child(5) { width: 72%; }
.scanner__line:nth-child(6) { width: 91%; }
@keyframes shimmer {
    to { background-position: -200% 0; }
}
.scanner__beam {
    position: absolute;
    left: -2%;
    right: -2%;
    height: 44px;
    background: linear-gradient(180deg, transparent, var(--accent-soft) 45%, var(--accent-soft) 55%, transparent);
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.85;
    animation: scan 1.9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes scan {
    0%   { top: -44px; }
    100% { top: 100%; }
}
.scanner__status {
    margin-top: var(--s-5);
    display: flex;
    align-items: center;
    gap: var(--s-3);
    color: var(--ink-soft);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.scanner__dots::after {
    display: inline-block;
    width: 1.2em;
    text-align: left;
    content: '';
    animation: dots 1.4s steps(1) infinite;
}
@keyframes dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}
@media (prefers-reduced-motion: reduce) {
    .scanner__beam, .scanner__line, .scanner__dots::after { animation: none; }
}

/* ----- Modal (Turnstile challenge) ----- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(27, 22, 16, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
    animation: fadeIn 0.15s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: var(--s-6);
    width: 100%;
    max-width: 26rem;
    text-align: center;
    animation: fadeUp 0.2s ease both;
}
.modal__title {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-xl);
}
.modal__text {
    margin: 0 auto var(--s-5);
    color: var(--ink-soft);
    font-size: var(--fs-sm);
    max-width: none;
}
.cf-turnstile-host {
    display: flex;
    justify-content: center;
    min-height: 65px;
    margin-bottom: var(--s-4);
}
.modal .alert { text-align: left; }
.modal .meta { display: inline-flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); }

/* ----- Contact form ----- */

.contact { margin-top: var(--s-6); }
.contactform {
    display: grid;
    gap: var(--s-4);
    max-width: 36rem;
}
.field {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}
.field label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-soft);
}
.contactform .detector__url { flex: none; width: 100%; }

/* ----- Alerts ----- */

.alert {
    margin-top: var(--s-4);
    padding: var(--s-4) var(--s-5);
    border-radius: var(--r-md);
    background: var(--bad-soft);
    color: var(--bad);
    border: 1px solid var(--bad);
    font-size: var(--fs-sm);
}

/* ----- Hero / intro ----- */

.hero {
    padding: var(--s-9) 0 var(--s-7);
    text-align: center;
    border-bottom: 1px solid var(--rule);
}
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85em;
    font-size: var(--fs-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: var(--s-5);
    font-weight: 600;
}
.hero__eyebrow::before,
.hero__eyebrow::after {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--accent);
}
.hero__title {
    margin: 0 auto var(--s-5);
    max-width: 22ch;
    font-size: clamp(2.5rem, 6vw + 0.5rem, 5rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    font-weight: 400;
}
.hero__title em {
    display: block;
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
    font-variation-settings: 'opsz' 144, 'SOFT' 95;
}
.hero__lede {
    max-width: 46ch;
    margin: 0 auto;
    font-size: var(--fs-xl);
    line-height: 1.4;
}
.hero__cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
    margin-top: var(--s-7);
    color: var(--ink-muted);
    text-decoration: none;
    font-size: var(--fs-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
}
.hero__cue:hover { color: var(--accent); }
.hero__cue svg {
    width: 1.15rem;
    height: 1.15rem;
    animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
    .hero__cue svg { animation: none; }
}

/* ----- Supporting content sections ----- */

.section {
    padding-top: var(--s-7);
}
.section h2 {
    margin-top: 0;
}

.faq {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: var(--s-7);
    margin-top: var(--s-5);
    border-top: 1px solid var(--rule);
}
.faq__item {
    padding: var(--s-5) 0;
    border-bottom: 1px solid var(--rule);
}
.faq__item h3 {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-md);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}
.faq__item p {
    margin: 0;
    color: var(--ink-soft);
    max-width: none;
}

@media (min-width: 760px) {
    .faq { grid-template-columns: 1fr 1fr; }
    /* keep the top rule continuous across both columns */
    .faq__item:nth-child(2) { border-top: none; }
}

/* ----- Step cards (how it works) ----- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-4);
    margin-top: var(--s-5);
}
.step {
    padding: var(--s-5);
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
}
.step__num {
    display: block;
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: var(--fs-3xl);
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.03em;
    margin-bottom: var(--s-3);
    font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.step h3 {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-md);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}
.step p {
    margin: 0;
    max-width: none;
    color: var(--ink-soft);
    font-size: var(--fs-sm);
}
@media (max-width: 720px) {
    .steps { grid-template-columns: 1fr; }
}

/* ----- Explainer (editorial two-column) ----- */

.explainer {
    margin-top: var(--s-6);
}
.explainer__block {
    padding: var(--s-6) 0;
    border-top: 1px solid var(--rule);
}
.explainer__block h2 {
    margin: 0 0 var(--s-3);
    font-size: var(--fs-xl);
}
.explainer__body > * { max-width: var(--measure); }
.explainer__body > :first-child { margin-top: 0; }
.explainer__body > :last-child { margin-bottom: 0; }

@media (min-width: 840px) {
    .explainer__block {
        display: grid;
        grid-template-columns: 14rem 1fr;
        gap: var(--s-7);
        align-items: start;
    }
    .explainer__block h2 {
        position: sticky;
        top: var(--s-5);
    }
}

/* ----- Model link cards ----- */

.models {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-4);
    margin-top: var(--s-5);
}
.model-card {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-5);
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    text-decoration: none;
    box-shadow: var(--shadow-1);
    transition: transform 0.1s ease, border-color 0.15s, box-shadow 0.15s;
}
.model-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow-2);
}
.model-card__name {
    font-family: 'Fraunces', serif;
    font-size: var(--fs-lg);
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.model-card:hover .model-card__name { color: var(--accent); }
.model-card__blurb {
    font-size: var(--fs-sm);
    color: var(--ink-muted);
}
@media (max-width: 760px) {
    .models { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
    .models { grid-template-columns: 1fr; }
}

/* ----- Release timeline (model pages) ----- */

.timeline {
    list-style: none;
    margin: var(--s-4) 0 0;
    padding: 0 0 0 var(--s-4);
    display: grid;
    gap: var(--s-2);
    border-left: 2px solid var(--rule);
    max-width: 40rem;
}
.timeline li {
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    line-height: 1.5;
}
.timeline li strong {
    display: inline-block;
    min-width: 7rem;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ----- Versus comparison table ----- */

.versus {
    margin-top: var(--s-5);
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
}
.versus__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    background: var(--bg-elevated);
}
.versus__table th,
.versus__table td {
    text-align: left;
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}
.versus__table thead th {
    font-family: 'Inter', sans-serif;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    background: var(--bg-sunken);
}
.versus__table tbody th {
    font-weight: 600;
    color: var(--ink-soft);
}
.versus__table td { color: var(--ink-soft); }
.versus__table tr:last-child th,
.versus__table tr:last-child td { border-bottom: none; }
.versus__us {
    background: var(--accent-soft);
    color: var(--ink) !important;
    font-weight: 600;
}
.versus__table thead .versus__us { color: var(--accent-dark) !important; }

/* ----- Pull quote ----- */

.pullquote {
    margin: var(--s-7) 0;
    padding: var(--s-2) 0 var(--s-2) var(--s-5);
    border-left: 3px solid var(--accent);
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    font-size: var(--fs-2xl);
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 26ch;
    font-variation-settings: 'opsz' 144, 'SOFT' 80;
}

/* ----- Score guide (tiered bands) ----- */

.tiers {
    display: grid;
    gap: var(--s-3);
    margin-top: var(--s-5);
}
.tier {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: var(--s-5);
    align-items: start;
    padding: var(--s-4) var(--s-5);
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-left-width: 4px;
    border-radius: var(--r-md);
}
.tier--human  { border-left-color: var(--ok);   }
.tier--unsure { border-left-color: var(--warn); }
.tier--ai     { border-left-color: var(--bad);  }

.tier__range {
    font-family: 'Fraunces', serif;
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-xl);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.tier--human  .tier__range { color: var(--ok);   }
.tier--unsure .tier__range { color: var(--warn); }
.tier--ai     .tier__range { color: var(--bad);  }

.tier__label {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}
.tier__desc {
    margin: 0;
    max-width: none;
    color: var(--ink-soft);
    font-size: var(--fs-sm);
}

@media (max-width: 480px) {
    .tier { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* ----- Score scale (horizontal meter) ----- */

.scale {
    margin-top: var(--s-5);
}
.scale__bar {
    display: flex;
    height: 56px;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--rule);
    box-shadow: var(--shadow-1);
}
.scale__zone {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', serif;
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-md);
    letter-spacing: -0.01em;
    color: var(--ink);
    position: relative;
}
.scale__zone + .scale__zone {
    border-left: 1px solid rgba(27, 22, 16, 0.12);
}
.scale__zone--human  { background: var(--ok-soft);   color: var(--ok);   }
.scale__zone--unsure { background: var(--warn-soft); color: var(--warn); }
.scale__zone--ai     { background: var(--bad-soft);  color: var(--bad);  }

.scale__legend {
    margin-top: var(--s-4);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-5);
}
.scale__item {
    border-top: 3px solid var(--rule);
    padding-top: var(--s-3);
}
.scale__item--human  { border-top-color: var(--ok);   }
.scale__item--unsure { border-top-color: var(--warn); }
.scale__item--ai     { border-top-color: var(--bad);  }
.scale__item h3 {
    margin: 0 0 var(--s-1);
    font-size: var(--fs-md);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}
.scale__item p {
    margin: 0;
    max-width: none;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
}

@media (max-width: 600px) {
    .scale__legend { grid-template-columns: 1fr; gap: var(--s-3); }
    .scale__bar { height: 48px; }
    .scale__zone { font-size: var(--fs-sm); }
}

.inline-cta {
    margin-top: var(--s-5);
    padding: var(--s-4) var(--s-5);
    background: var(--bg-sunken);
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    font-size: var(--fs-md);
    color: var(--ink-soft);
    max-width: none;
}

/* ----- Notes (bold-lead prose blocks) ----- */

.notes {
    margin-top: var(--s-5);
    display: grid;
    gap: var(--s-4);
    max-width: var(--measure);
}
.notes p { margin: 0; }
.notes strong { color: var(--ink); }

/* ----- Blazor error UI ----- */

#blazor-error-ui {
    background: var(--ink);
    color: var(--bg-elevated);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: var(--s-4) var(--s-5);
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: var(--fs-sm);
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1.25rem;
    top: 0.6rem;
    color: var(--bg-elevated);
}
.blazor-error-boundary {
    background: var(--bad);
    color: white;
    padding: var(--s-4);
    border-radius: var(--r-md);
}
.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ============================================================
   Mobile: hamburger navigation + touch refinements
   ============================================================ */

/* CSS-only toggle (no JS needed; nav is static-rendered) */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    margin: 0;
}

.nav-burger {
    display: none;
    width: 44px;
    height: 44px;
    margin: -6px -8px -6px 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
}
.nav-burger span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Open the desktop dropdowns on keyboard focus too */
.navdrop:focus-within > .navdrop__menu { display: flex; }

@media (max-width: 820px) {
    /* No sideways scroll; media never overflows the viewport */
    html, body { overflow-x: hidden; }
    img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

    /* ---- Hamburger nav ---- */
    .site-header__inner {
        position: relative;
        flex-wrap: nowrap;
        padding: var(--s-3) var(--s-4);
    }

    .nav-burger { display: flex; }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--s-2) var(--s-4) var(--s-4);
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--rule);
        box-shadow: var(--shadow-2);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.28s ease;
        z-index: 40;
    }

    .nav-toggle:checked ~ .site-nav {
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
    }

    .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Full-width, finger-sized rows */
    .site-nav > a,
    .navdrop > summary {
        padding: 14px 4px;
        font-size: 16px;
        border-bottom: 1px solid var(--rule);
    }
    .site-nav > a {
        border-bottom-color: transparent;
        border-top: 1px solid var(--rule);
    }

    /* Dropdowns expand inline instead of as floating menus */
    .navdrop { width: 100%; position: static; }
    .navdrop > summary::after { margin-left: auto; }
    .navdrop__menu {
        position: static;
        min-width: 0;
        padding: var(--s-1) 0 var(--s-3) var(--s-4);
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    .navdrop__menu a { padding: 11px 4px; }
    .navdrop__label:not(:first-child) { border-top: none; padding-top: var(--s-2); }

    /* ---- The detector tool: bigger targets ---- */
    .inputmodes { display: flex; width: 100%; }
    .inputmode { flex: 1 1 0; text-align: center; padding: 0.7em 0.5em; min-height: 44px; }

    .detector__input { min-height: 220px; }

    .detector__actions .btn { flex: 1 1 auto; justify-content: center; }
    .btn { min-height: 46px; }

    .url-row .btn { width: 100%; }

    /* Comparison table scrolls smoothly */
    .versus { -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
    .hero { padding: var(--s-7) 0 var(--s-5); }
    .site-footer__cols { grid-template-columns: 1fr; }
    .brand { font-size: var(--fs-md); }
    .result__score { font-size: clamp(2.6rem, 14vw, 3.4rem); }
}
