/* ============================================================
   Astra AI Detector — "Manuscript" design system  (v3, light-only)
   Engine class + CSS-variable contracts honored.
   ============================================================ */

:root{
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --paper:#f5f5f0;
  --surface:#ffffff;
  --surface-2:#fbfbf8;
  --ink:#1a1c20;
  --ink-soft:#3a3f47;
  --muted:#6b7079;
  --faint:#8b909a;
  --line:#e6e6dd;
  --line-soft:#efefe8;

  --green:#157f5b;
  --green-d:#0f6046;
  --green-wash:#e8f3ec;

  --ai:#e8641f;
  --ai-d:#c2530f;
  --refined:#c98a12;

  /* variables the engine (core.js) sets inline — MUST exist */
  --orange:#e8641f;
  --primary-green:#157f5b;
  --gray-200:#e6e6dd;

  /* heat scale (AI) */
  --ai-low:#fde6c8;
  --ai-mod:#fac889;
  --ai-high:#f2a05e;
  --ai-high-ink:#5a2a12;
  /* heat scale (human) */
  --hu-low:#e4f3e9;
  --hu-mod:#cbe8d6;
  --hu-high:#aaddbd;
  --hu-ink:#12432f;

  --shadow-sm:0 1px 2px rgba(30,25,15,.05);
  --shadow-md:0 18px 40px -28px rgba(30,25,15,.35);
  --shadow-lg:0 30px 60px -34px rgba(30,25,15,.42);

  --wrap:1120px;
  --radius-card:16px;
  --radius-tool:20px;
}

/* ---------- Reset / base ---------- */
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{font-family:var(--sans);background:var(--paper);color:var(--ink);line-height:1.6;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
ul,ol{list-style:none}
img,canvas{max-width:100%}
:focus-visible{outline:2px solid var(--green);outline-offset:2px;border-radius:4px}
::selection{background:var(--ai-mod);color:var(--ink)}

.skip-link{position:absolute;left:-9999px;top:0;z-index:200;background:var(--ink);color:var(--paper);padding:10px 16px;border-radius:0 0 10px 0;font-size:14px}
.skip-link:focus{left:0}

.prose-container,.detector-container{max-width:var(--wrap);margin:0 auto;padding:0 24px}

/* ---------- Nav ---------- */
.nav-container{position:sticky;top:0;z-index:100;background:var(--paper);border-top:3px solid var(--orange);border-bottom:1px solid var(--line)}
.nav-container.scrolled{box-shadow:0 1px 0 rgba(20,20,17,.04), 0 8px 24px -16px rgba(20,20,17,.18)}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  @media (min-width:761px){
    .nav-container{background:rgba(245,245,240,.72);backdrop-filter:saturate(140%) blur(12px);-webkit-backdrop-filter:saturate(140%) blur(12px)}
  }
}
.nav-content{max-width:var(--wrap);margin:0 auto;padding:14px 24px;display:flex;align-items:center;gap:20px;position:relative;z-index:2}
.nav-logo{display:flex;align-items:center;gap:10px}
.logo-icon{width:30px;height:30px;flex:none;display:inline-block;background:url("/assets/favicon.svg?v=bd01537baa") center/100% 100% no-repeat;font-size:0;color:transparent}
.logo-text{font-family:var(--serif);font-weight:400;font-size:19px;letter-spacing:-.01em;color:var(--muted)}
.logo-text b{font-weight:600;color:var(--ink)}
.nav-links{display:flex;gap:26px;margin-left:auto}
.nav-link{font-size:14.5px;color:var(--ink-soft);font-weight:500;padding:6px 2px;position:relative;transition:color .18s}
.nav-link:hover{color:var(--ink)}
.nav-link.active{color:var(--ink)}
.nav-link.active::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:2px;background:var(--orange);border-radius:2px}
.mobile-menu-btn{display:none;width:40px;height:40px;border-radius:9px;position:relative;margin-left:auto}
.mobile-menu-btn span{display:block;width:20px;height:2px;background:var(--ink);border-radius:2px;margin:4px auto;transition:transform .25s, opacity .2s}
.mobile-menu-btn.active span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.mobile-menu-btn.active span:nth-child(2){opacity:0}
.mobile-menu-btn.active span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.mobile-menu{position:fixed;inset:0;z-index:90;background:var(--paper);display:none;padding:84px 28px 40px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.mobile-menu.active{display:block}
.mobile-menu-content{display:flex;flex-direction:column}
.mobile-nav-link{padding:18px 4px;font-family:var(--serif);font-size:21px;color:var(--ink);border-bottom:1px solid var(--line-soft)}
.mobile-nav-link:last-child{border-bottom:0}

/* ---------- Hero (compact — tool sits right under it) ---------- */
.hero-section{padding:42px 0 6px;text-align:center}
.hero-content{max-width:var(--wrap);margin:0 auto;padding:0 24px}
.hero-eyebrow{font-family:var(--serif);font-style:italic;font-size:17px;color:var(--green-d);margin-bottom:8px}
.hero-title{font-family:var(--serif);font-weight:600;font-size:clamp(40px,6vw,68px);line-height:.98;letter-spacing:-.02em;color:var(--ink)}
/* Prime-keyword highlighter (yellow marker) — index hero only. Sits behind the lower ~third of the text like a hand-drawn highlight. */
.hero-title .kw{background-image:linear-gradient(180deg,transparent 58%,rgba(255,209,64,.85) 58%,rgba(255,209,64,.85) 95%,transparent 95%);padding:0 .04em;border-radius:2px;-webkit-box-decoration-break:clone;box-decoration-break:clone}
/* Tool switcher — pill row under the hero; funnels visitors into the free tools (lifts pages/visit) */
.tool-switch{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--paper)}
.tool-switch-track{max-width:var(--wrap);margin:0 auto;display:flex;align-items:center;gap:8px;padding:11px 24px;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}
.tool-switch-track::-webkit-scrollbar{display:none}
.tool-switch-label{flex:0 0 auto;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-right:4px}
.tool-switch a{flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;padding:7px 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink-soft);font-size:14px;font-weight:500;line-height:1;text-decoration:none;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}
.tool-switch a:hover{border-color:var(--green);color:var(--green)}
.tool-switch a.active{background:var(--green);border-color:var(--green);color:#fff}
.tool-switch a i{font-size:12px;opacity:.85}
@media(max-width:700px){.tool-switch-track{padding:10px 16px}.tool-switch-label{display:none}}
/* Comparison tables (vs / alternative pages) — featured-snippet friendly */
/* ===== Comparison table (Astra vs competitors) — card style, Astra column highlighted ===== */
.prose-body .cmp-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:16px 0 26px;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm)}
.prose-body .cmp-table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5;min-width:560px;background:var(--surface)}
.prose-body .cmp-table th,.prose-body .cmp-table td{text-align:left;padding:13px 16px;vertical-align:top;border-bottom:1px solid var(--line)}
.prose-body .cmp-table tbody tr:last-child td{border-bottom:0}
.prose-body .cmp-table thead th{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:12.5px;letter-spacing:.03em;text-transform:uppercase;white-space:nowrap}
.prose-body .cmp-table tbody td:first-child{font-weight:600;color:var(--ink)}
.prose-body .cmp-table tbody tr:hover td{background:rgba(21,127,91,.04)}
/* Astra brand column (2nd) — distinct green highlight so it catches the eye */
.prose-body .cmp-table th:nth-child(2),.prose-body .cmp-table td:nth-child(2){background:var(--green-wash);border-left:2px solid var(--green);border-right:2px solid var(--green)}
.prose-body .cmp-table thead th:nth-child(2){background:var(--green);color:#fff;border-color:var(--green);font-size:13px;letter-spacing:.02em}
.prose-body .cmp-table tbody td:nth-child(2){color:var(--green-d);font-weight:600}
.prose-body .cmp-table tbody tr:hover td:nth-child(2){background:#dfeee5}
.prose-body .cmp-table tbody tr:last-child td:nth-child(2){border-bottom:2px solid var(--green)}
@media(max-width:640px){.prose-body .cmp-table{font-size:13.5px;min-width:480px}.prose-body .cmp-table th,.prose-body .cmp-table td{padding:10px 12px}}
/* Comparison-table sections span the FULL section width (single column, heading on top) so the
   table has room — otherwise it's crammed into the narrow text column and phrases wrap badly. */
.prose-section:has(.cmp-table) .prose-container{display:block}
.prose-section:has(.cmp-table) .prose-head h2{margin:0 0 18px}
.prose-section:has(.cmp-table) .prose-body{max-width:none}
.prose-section:has(.cmp-table) .prose-body > p,.prose-section:has(.cmp-table) .prose-body > ul{max-width:74ch}
.prose-section:has(.cmp-table) .cmp-wrap{max-width:none}
/* Keep short value phrases on one line; the feature-name column (1st) still wraps its long text. */
.prose-body .cmp-table td:not(:first-child),.prose-body .cmp-table th:not(:first-child){white-space:nowrap}
/* Comparison table on the editorial (ed-*) humanizer page — mirrors the .prose-body cmp-table look, but cells wrap (Astra values are longer phrases). */
.ed-compare{max-width:none}
.ed-compare > p{font-size:16px;line-height:1.75;color:var(--ink-soft);margin:0 0 16px;max-width:90ch}
.ed-compare > p:last-child{margin-bottom:0}
.ed-compare > p a{color:var(--green-d);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.ed-section .cmp-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:18px 0;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm)}
.ed-section .cmp-table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5;min-width:560px;background:var(--surface)}
.ed-section .cmp-table th,.ed-section .cmp-table td{text-align:left;padding:13px 16px;vertical-align:top;border-bottom:1px solid var(--line)}
.ed-section .cmp-table tbody tr:last-child td{border-bottom:0}
.ed-section .cmp-table thead th{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:12.5px;letter-spacing:.03em;text-transform:uppercase}
.ed-section .cmp-table tbody td:first-child{font-weight:600;color:var(--ink)}
.ed-section .cmp-table tbody tr:hover td{background:rgba(21,127,91,.04)}
.ed-section .cmp-table th:nth-child(2),.ed-section .cmp-table td:nth-child(2){background:var(--green-wash);border-left:2px solid var(--green);border-right:2px solid var(--green)}
.ed-section .cmp-table thead th:nth-child(2){background:var(--green);color:#fff;border-color:var(--green);font-size:13px}
.ed-section .cmp-table tbody td:nth-child(2){color:var(--green-d);font-weight:600}
.ed-section .cmp-table tbody tr:hover td:nth-child(2){background:#dfeee5}
.ed-section .cmp-table tbody tr:last-child td:nth-child(2){border-bottom:2px solid var(--green)}
@media(max-width:640px){.ed-section .cmp-table{font-size:13.5px;min-width:480px}.ed-section .cmp-table th,.ed-section .cmp-table td{padding:10px 12px}}
.hero-tagline{font-family:var(--serif);font-weight:400;font-style:italic;font-size:clamp(18px,2.6vw,26px);color:var(--ink-soft);margin-top:8px}
.hero-chips{margin-top:18px}
.chips-track{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
/* ===== Homepage split hero (Design 2) ===== */
.hero-split{padding:48px 0 8px;text-align:left}
.hero-split .hero-inner{max-width:var(--wrap);margin:0 auto;padding:0 24px;display:grid;grid-template-columns:1.4fr .6fr;gap:44px;align-items:center}
.hero-split .hero-content{max-width:none;margin:0;padding:0;min-width:0}
.hero-preview{min-width:0}
.hero-split .hero-eyebrow{font-family:var(--sans);font-style:normal;text-transform:uppercase;letter-spacing:.2em;font-size:12px;font-weight:600;color:var(--green);margin-bottom:14px}
/* Landing hero H1 sized for ~2 lines; homepage (--home) for ~3 lines */
.hero-split .hero-title{font-size:clamp(30px,4.2vw,44px);line-height:1.07}
.hero-split .hero-title--home{font-size:clamp(30px,3.2vw,40px);line-height:1.07}
/* Home hero: wider text column so the long H1 sits on 2 lines */
.hero-split .hero-inner:has(.hero-title--home){grid-template-columns:1.55fr .45fr}
@media (max-width:900px){.hero-title .h1-break{display:none}}
.hero-split .hero-tagline{font-style:normal;font-size:clamp(18px,2vw,21px);line-height:1.5;color:var(--muted);max-width:480px;margin-top:16px}
.hero-split .hero-chips{margin-top:22px}
.hero-split .chips-track{justify-content:flex-start;flex-wrap:nowrap;gap:8px}
.hero-split .hero-chip{font-size:12px;padding:6px 11px;gap:6px;white-space:nowrap}
.hero-preview{display:flex;align-items:center;justify-content:center}
.hero-tri{width:100%;max-width:460px;height:auto;opacity:.12;display:block}
/* Per-page niche hero shapes (faded, like the home triangle) */
.hero-shape{width:100%;max-width:460px;height:auto;opacity:.14;display:block;margin:0 auto;color:var(--ink)}
/* "Sentence scan" hero illustration (Option A) — crisp, brand-colored, per-page variants */
.hero-scan{width:100%;max-width:430px;height:auto;display:block;margin:0 auto}
@media (min-width:1600px){.hero-scan{max-width:480px}}
@media (min-width:2560px){.hero-scan{max-width:600px}}
/* Smaller H1 for long headlines so they fit the split hero */
.hero-split .hero-title.hero-title--sm{font-size:clamp(28px,3.4vw,40px)}
.hp-top{display:flex;justify-content:flex-end;margin-bottom:8px}
.hp-badge{background:#fdece2;color:#b64a12;font-size:12px;font-weight:600;padding:5px 12px;border-radius:999px}
.hp-txt{font-family:var(--serif);font-size:16.5px;line-height:1.95;color:var(--ink);margin:0}
.hp-ai{background:#f6b78f;border-radius:4px;padding:.06em .2em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.hp-hu{background:#bfe0cd;border-radius:4px;padding:.06em .2em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.hp-leg{display:flex;gap:16px;margin-top:18px;font-family:var(--sans);font-size:12px;color:var(--muted)}
.hp-leg span{display:inline-flex;align-items:center;gap:6px}
.hp-k{width:11px;height:11px;border-radius:3px;display:inline-block}
.hp-kai{background:#f6b78f}.hp-khu{background:#bfe0cd}
@media (max-width:900px){
  .hero-split{text-align:center;padding-top:34px}
  .hero-split .hero-inner{display:block;padding-left:20px;padding-right:20px}
  .hero-split .hero-content{max-width:640px;margin:0 auto}
  .hero-split .hero-tagline{margin-left:auto;margin-right:auto}
  .hero-split .chips-track{justify-content:center}
  .hero-preview{display:none}
}
.hero-chips.hint-right,.sample-buttons.hint-right{-webkit-mask-image:linear-gradient(90deg,#000 84%,transparent);mask-image:linear-gradient(90deg,#000 84%,transparent)}
.hero-chip{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;color:var(--ink-soft);background:transparent;border:1px solid var(--line);padding:8px 14px;border-radius:999px;box-shadow:none}
.hero-chip i{color:var(--green)}

/* ---------- Detector ---------- */
.detector-section{padding:22px 0 64px}
.detector-tabs{display:none;scroll-margin-top:72px}
.main-container{display:grid;grid-template-columns:1.25fr .85fr;gap:22px;align-items:stretch;position:relative}

.left-panel{display:flex;flex-direction:column;gap:16px}
.sample-section{display:flex;flex-direction:column;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-tool);padding:16px 18px;box-shadow:var(--shadow-md)}
.sample-label{font-size:13px;color:var(--muted)}
.sample-buttons{display:flex;flex-wrap:wrap;gap:8px}
.sample-button{font-size:13px;color:var(--ink-soft);border:1px solid var(--line);background:var(--surface);padding:7px 13px;border-radius:999px;transition:.16s}
.sample-button:hover{border-color:var(--green);color:var(--green-d);background:var(--green-wash)}

.error-message{display:none;color:#b4531f;background:#fdeede;border:1px solid #f6d8b4;padding:10px 13px;border-radius:10px;font-size:13.5px}
.error-message:not(:empty){display:block}

.input-section{display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:0}
/* Fixed-height input: it scrolls internally instead of pushing the page down */
.text-input-container{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-tool);box-shadow:var(--shadow-md);overflow:hidden;height:400px;display:flex;flex:1 1 auto;transition:height .25s ease}
.text-area-editable{flex:1;height:100%;overflow-y:auto;overflow-x:hidden;padding:26px 28px;font-family:var(--serif);font-size:17px;line-height:1.9;color:var(--ink);outline:none;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;word-break:break-word}
/* Native-textarea editor: a real <textarea> for editing, layered over a backdrop that
   renders the colored highlights for results. Only one of the two shows text at a time
   (edit vs results-mode), so their box models never need pixel-perfect alignment. */
.editor-shell{position:relative;z-index:1;flex:1;height:100%;min-width:0}
.editor-shell .text-area-editable{position:absolute;inset:0;flex:none;width:100%;height:100%;margin:0;border:0;box-sizing:border-box;background:transparent}
.editor-shell .editor-textarea{z-index:2;display:block;color:var(--ink);caret-color:var(--ink);resize:none;-webkit-appearance:none;appearance:none;font-family:var(--serif)}
.editor-shell .highlight-backdrop{z-index:1;color:transparent;pointer-events:none;user-select:none}
.editor-shell.results-mode .editor-textarea{z-index:1;color:transparent;caret-color:transparent;pointer-events:none}
.editor-shell.results-mode .highlight-backdrop{z-index:2;color:var(--ink);pointer-events:auto;cursor:text}
/* When there is text, collapse the sample row and let the input use that space (page height stays put) */
#mainContainer.has-content .sample-section{display:none}
#mainContainer.has-content .text-input-container{height:500px}

.clear-btn{position:absolute;top:12px;right:12px;z-index:4;width:32px;height:32px;border-radius:8px;color:var(--faint);background:var(--surface-2);border:1px solid var(--line-soft);display:none;place-items:center;font-size:13px;transition:.16s}
.clear-btn.show{display:grid}
.clear-btn:hover{color:var(--ai-d);border-color:var(--ai)}
.scroll-down-btn{position:absolute;bottom:12px;right:12px;z-index:4;width:34px;height:34px;border-radius:50%;color:#fff;background:var(--ink);display:none;place-items:center;font-size:13px;opacity:.85;transition:.16s}
.scroll-down-btn.show{display:grid}
.scroll-down-btn:hover{opacity:1}

.empty-state-overlay{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(180deg,var(--surface) 60%,var(--surface-2))}
.empty-state-overlay.hidden{display:none}
.empty-state-content{text-align:center;max-width:340px}
.empty-state-text,.empty-state-buttons{pointer-events:auto}
.empty-state-text{font-size:15px;color:var(--muted);line-height:1.6;cursor:text;margin-bottom:18px}
.empty-state-buttons{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.empty-state-button,.file-upload-empty label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:13.5px;color:var(--ink-soft);border:1px solid var(--line);background:var(--surface);padding:9px 15px;border-radius:10px;transition:.16s}
.empty-state-button:hover,.file-upload-empty label:hover{border-color:var(--green);color:var(--green-d);background:var(--green-wash)}
.file-upload-empty{display:inline-flex}
.file-upload-empty input[type="file"]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}

.input-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 12px 10px 18px;box-shadow:var(--shadow-sm)}
.word-count{font-size:13px;color:var(--faint);font-variant-numeric:tabular-nums}
.detect-button{display:inline-flex;align-items:center;gap:10px;justify-content:center;background:var(--ink);color:var(--paper);font-weight:600;font-size:15px;padding:13px 22px;border-radius:11px;min-width:190px;transition:.18s;box-shadow:0 10px 24px -16px rgba(0,0,0,.55)}
.detect-button:hover:not(:disabled){background:#000;transform:translateY(-1px)}
.detect-button:disabled{opacity:.6;cursor:not-allowed;box-shadow:none}
/* Detector color legend + disclaimers (below the input) */
.detector-meta{margin-top:14px;padding:13px 16px;border:1px dashed var(--line);border-radius:12px;background:var(--surface-2)}
.detector-legend{display:flex;flex-wrap:wrap;gap:9px 18px;align-items:center}
.detector-legend .lg-item{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--ink-soft)}
.detector-legend .lg-dot{width:13px;height:13px;border-radius:50%;flex:none;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.detector-legend-note{margin:10px 0 0;font-size:12.5px;color:var(--faint);line-height:1.5}
.input-controls-text{display:flex;flex-direction:column;gap:3px}
.detector-terms{margin:0;font-size:12px;color:var(--faint)}
.detector-terms a{color:var(--green);text-decoration:underline;text-underline-offset:2px}
.result-accuracy-note{margin:2px 0 0;font-size:12.5px;color:var(--faint);line-height:1.55;border-top:1px dashed var(--line);padding-top:14px}
.result-accuracy-note strong{color:var(--ink-soft);font-weight:600}
/* First-ever-load privacy notice under the Detect button (shown once, while the model loads) */
.first-load-notice{display:flex;gap:9px;align-items:flex-start;margin-top:12px;padding:11px 14px;background:#eef3ff;border:1px solid #2563eb;border-radius:11px;color:var(--ink-soft);font-size:13px;line-height:1.55;animation:firstLoadPulse 1.5s ease-in-out infinite}
.first-load-notice i{color:#2563eb;font-size:15px;margin-top:1px;flex:none;animation:firstLoadBlink 1.5s ease-in-out infinite}
.first-load-notice strong{color:var(--ink);font-weight:600}
@keyframes firstLoadPulse{0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}50%{box-shadow:0 0 0 5px rgba(37,99,235,.22)}}
@keyframes firstLoadBlink{0%,100%{opacity:1}50%{opacity:.45}}

/* ---------- AI Humanizer tool ---------- */
.hum-section{padding:16px 0 60px}
.hum-wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}
/* Single elevated shell groups the whole tool */
.hum-shell{background:var(--surface);border:1px solid var(--line);border-radius:calc(var(--radius-tool) + 4px);box-shadow:var(--shadow-lg);overflow:hidden}
/* Toolbar: writing style + trust line */
.hum-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:13px 18px;border-bottom:1px solid var(--line-soft);background:var(--surface-2)}
.hum-toolbar-label{font-size:11.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.hum-styles{display:inline-flex;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:3px}
.hum-style{appearance:none;border:0;background:transparent;color:var(--ink-soft);font-size:13.5px;font-weight:600;padding:7px 15px;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:color .15s,background .15s,box-shadow .15s;white-space:nowrap}
.hum-style i{font-size:11.5px;opacity:.8}
.hum-style:hover:not(.is-active){color:var(--green-d)}
.hum-style.is-active{background:var(--green);color:#fff;box-shadow:0 2px 6px rgba(21,127,91,.3)}
.hum-toolbar-spacer{flex:1 1 auto}
.hum-trust{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--muted);font-weight:500}
.hum-trust i{color:var(--green)}
/* Model picker — compare output quality across Workers AI models */
.hum-model{appearance:none;-webkit-appearance:none;border:1px solid var(--line);border-radius:999px;background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center;color:var(--ink-soft);font:600 13px inherit;font-family:inherit;padding:7px 30px 7px 14px;cursor:pointer}
.hum-model:hover{border-color:var(--green)}
.hum-model:focus-visible{outline:2px solid var(--green);outline-offset:1px}
/* Panels share one surface, split by a hairline */
.hum-grid{display:grid;grid-template-columns:1fr 1fr}
/* Fixed, bounded height so long text scrolls INSIDE each panel instead of stretching the page. */
.hum-panel{display:flex;flex-direction:column;height:440px;max-height:72vh;background:var(--surface);position:relative}
.hum-panel--in{border-right:1px solid var(--line-soft)}
/* Output panel: same neutral palette as the input but faded (off-white), so the eye reads input vs
   output without a colour clash. Only the "HUMANIZED" label is green. */
.hum-panel--out{background:var(--paper)}
.hum-panel--out .hum-panel-head .lbl{color:var(--green-d)}
.hum-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px 12px;flex-wrap:wrap;padding:13px 16px 8px}
.hum-panel-head .lbl{font-size:11.5px;font-weight:700;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.1em}
.hum-mini{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;color:var(--faint);background:var(--surface-2);border:1px solid var(--line-soft);font-size:13px;cursor:pointer;transition:.15s}
.hum-mini:hover:not(:disabled){color:var(--green-d);border-color:var(--green);background:var(--green-wash)}
.hum-mini:disabled{opacity:.4;cursor:not-allowed}
/* Text tool buttons in the panel heads (Paste / Upload / Clear / Copy) */
.hum-tools{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.hum-tool{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:8px;font:600 12.5px inherit;font-family:inherit;color:var(--ink-soft);background:var(--surface-2);border:1px solid var(--line-soft);cursor:pointer;transition:color .15s,border-color .15s,background .15s;white-space:nowrap}
.hum-tool i{font-size:11px;color:var(--faint);transition:color .15s}
.hum-tool:hover:not(:disabled){color:var(--green-d);border-color:var(--green);background:var(--green-wash)}
.hum-tool:hover:not(:disabled) i{color:var(--green)}
.hum-tool:disabled{opacity:.45;cursor:not-allowed}
.hum-textarea,.hum-output{flex:1;min-height:0;width:100%;padding:4px 20px 20px;font-family:var(--serif);font-size:17px;line-height:1.85;color:var(--ink);border:0;outline:none;resize:none;background:transparent;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.hum-textarea::-webkit-scrollbar,.hum-output::-webkit-scrollbar{width:9px}
.hum-textarea::-webkit-scrollbar-thumb,.hum-output::-webkit-scrollbar-thumb{background:var(--line);border-radius:9px;border:2px solid transparent;background-clip:padding-box}
.hum-textarea::-webkit-scrollbar-thumb:hover,.hum-output::-webkit-scrollbar-thumb:hover{background:var(--faint)}
.hum-textarea::placeholder{color:var(--faint)}
.hum-output{white-space:pre-wrap;word-wrap:break-word;contain:layout paint}
.hum-output.placeholder{color:var(--faint)}
.hum-input-view{flex:1;min-height:0;width:100%;padding:4px 20px 20px;font-family:var(--serif);font-size:17px;line-height:1.85;color:var(--ink);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;contain:layout paint}
.hum-input-view::-webkit-scrollbar{width:9px}
.hum-input-view::-webkit-scrollbar-thumb{background:var(--line);border-radius:9px;border:2px solid transparent;background-clip:padding-box}
.hum-src-head{font-weight:700;margin:0 0 .6em;opacity:.5}
.hum-src-para{margin:0 0 1.05em}
.hum-src-seg{border-radius:4px;transition:background-color .35s ease,opacity .5s ease;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.hum-src-seg.done{opacity:.4}
.hum-src-seg.active{opacity:1;animation:humSegPulse 1.5s ease-in-out infinite;will-change:background-color}
@keyframes humSegPulse{0%,100%{background-color:rgba(21,127,91,.10)}50%{background-color:rgba(21,127,91,.24)}}
.hum-out-text{white-space:pre-wrap;word-wrap:break-word}
.hum-dots{display:none;vertical-align:baseline;white-space:nowrap;margin-left:2px;line-height:1}
.hum-output.thinking .hum-dots{display:inline-block}
.hum-dots i{display:inline-block;width:6px;height:6px;margin:0 2px;border-radius:50%;background:var(--green-d,#2f7d5b);opacity:.3;animation:humDot 1.1s infinite ease-in-out}
.hum-dots i:nth-child(2){animation-delay:.16s}
.hum-dots i:nth-child(3){animation-delay:.32s}
@keyframes humDot{0%,70%,100%{opacity:.25;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
.hum-panel-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 18px;border-top:1px solid var(--line-soft);font-size:12px;color:var(--muted)}
.hum-count strong{color:var(--ink-soft);font-weight:700}
.hum-count.over,.hum-count.over strong{color:#d92d20}
.hum-note{display:inline-flex;align-items:center;gap:6px}
.hum-note i{color:var(--green)}
/* Loading overlay + shimmer bar on the output panel */
.hum-progress{position:absolute;left:0;right:0;top:0;height:3px;background:var(--green-wash);overflow:hidden;display:none;z-index:4}
.hum-panel.is-loading .hum-progress{display:block}
.hum-progress::after{content:"";position:absolute;top:0;left:-40%;height:100%;width:40%;background:linear-gradient(90deg,transparent,var(--green),transparent);animation:humSlide 1.05s ease-in-out infinite}
@keyframes humSlide{0%{left:-40%}100%{left:100%}}
.hum-loading{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(251,251,248,.96));z-index:3;text-align:center;padding:24px}
.hum-panel.is-loading .hum-loading{display:flex}
.hum-spinner{width:40px;height:40px;border-radius:50%;border:3px solid var(--green-wash);border-top-color:var(--green);animation:humSpin .7s linear infinite}
@keyframes humSpin{to{transform:rotate(360deg)}}
.hum-loading-msg{font-family:var(--serif);font-size:16.5px;color:var(--green-d);min-height:1.4em;animation:humFade .4s ease}
.hum-loading-sub{font-size:12px;color:var(--muted);letter-spacing:.02em}
@keyframes humFade{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
/* Finishing pass after the rewrite, shown only as a "reload": a shine sweeps the output panel and the text
   fades back in (the punctuation step itself stays hidden — no label, no highlighted marks). */
.hum-panel.is-polishing .hum-progress{display:block}
.hum-panel--out.is-polishing::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(100deg,transparent 35%,rgba(21,127,91,.07) 45%,rgba(255,255,255,.55) 50%,rgba(21,127,91,.07) 55%,transparent 65%) no-repeat;background-size:250% 100%;animation:humShine 1.15s ease-in-out infinite}
.hum-output.is-reloaded .hum-out-text{animation:humReload .6s ease-out}
@keyframes humReload{0%{opacity:.2;filter:blur(2px)}100%{opacity:1;filter:none}}
@media (prefers-reduced-motion:reduce){.hum-output.is-reloaded .hum-out-text,.hum-panel--out.is-polishing::after{animation:none!important}}
/* Action bar: disclosure + button */
.hum-actionbar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:15px 18px;border-top:1px solid var(--line-soft);background:var(--surface-2)}
.hum-agree{flex:1 1 340px;font-size:12px;color:var(--muted);line-height:1.55;margin:0}
.hum-agree a{color:var(--green-d);text-decoration:underline;text-underline-offset:2px}
.hum-agree i{color:var(--green);margin-right:5px}
.hum-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:10px;background:var(--green);color:#fff;font-weight:600;font-size:15.5px;padding:13px 30px;border-radius:999px;box-shadow:0 3px 12px rgba(21,127,91,.3);transition:background .15s,transform .05s,box-shadow .15s;border:0;cursor:pointer;white-space:nowrap;flex:0 0 auto}
.hum-btn:hover:not(:disabled){background:var(--green-d);transform:translateY(-1px);box-shadow:0 6px 18px rgba(21,127,91,.34)}
.hum-btn:disabled{opacity:.72;cursor:not-allowed;transform:none;box-shadow:none}
.hum-btn i{font-size:14px}
.hum-btn-spin{width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;animation:humSpin .7s linear infinite;display:none}
.hum-btn.is-busy .hum-btn-spin{display:inline-block}
.hum-btn.is-busy i{display:none}
/* Notice line above the disclosure — plain red text, left-aligned (limit / non-English warnings). */
.hum-error{display:none;margin:0;text-align:left;color:#d92d20;background:transparent;border-top:1px solid var(--line-soft);padding:11px 18px;font-size:13px;line-height:1.55;font-weight:500}
.hum-disclaimer{max-width:720px;margin:18px auto 0;text-align:center;font-size:12.5px;color:var(--faint);line-height:1.55}
/* Private-AI install card (first visit): explains the one-time model download and shows it like a
   game install. JS sets [data-state] = offer · installing · preparing · done · installed · error, and
   elements marked data-show="…" appear only in those states (their display comes from --d). */
.hum-chip{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink-soft);font:600 12px/1 var(--sans);cursor:pointer;white-space:nowrap;font-variant-numeric:tabular-nums;transition:border-color .15s,background .15s,color .15s}
.hum-chip[hidden]{display:none}
.hum-chip i{font-size:11px;color:var(--faint)}
.hum-chip:hover{border-color:var(--green);color:var(--green-d)}
.hum-chip:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.hum-chip.is-installing,.hum-chip.is-preparing,.hum-chip.is-done,.hum-chip.is-installed{border-color:#bfe0cd;background:var(--green-wash);color:var(--green-d)}
.hum-chip.is-installing i,.hum-chip.is-preparing i,.hum-chip.is-done i,.hum-chip.is-installed i{color:var(--green)}
.hum-chip.is-installing i{animation:humNudge 1.2s ease-in-out infinite}
.hum-chip.is-preparing i{animation:humPulse 1.1s ease-in-out infinite}
.hum-chip.is-error{border-color:#f3c6b0;background:#fdf1ea;color:var(--ai-d)}
.hum-chip.is-error i{color:var(--ai)}
.hum-engine{position:relative;display:flex;align-items:flex-start;gap:18px;padding:22px 56px 22px 24px;border-bottom:1px solid var(--line-soft);background:linear-gradient(180deg,var(--green-wash) 0%,var(--surface) 92%);animation:humFade .35s ease both}
.hum-engine[hidden]{display:none}
.hum-engine [data-show]{display:none}
.hum-engine[data-state=offer] [data-show~=offer],
.hum-engine[data-state=installing] [data-show~=installing],
.hum-engine[data-state=preparing] [data-show~=preparing],
.hum-engine[data-state=done] [data-show~=done],
.hum-engine[data-state=installed] [data-show~=installed],
.hum-engine[data-state=error] [data-show~=error]{display:var(--d,block)}
.hum-engine[data-state=error]{background:linear-gradient(180deg,#fdf1ea 0%,var(--surface) 92%)}
.hum-engine-art{flex:none;width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:var(--green);color:#fff;font-size:21px;box-shadow:0 8px 20px -10px rgba(21,127,91,.6)}
.hum-engine[data-state=installing] .hum-engine-art i{animation:humNudge 1.2s ease-in-out infinite}
.hum-engine[data-state=preparing] .hum-engine-art i{animation:humPulse 1.1s ease-in-out infinite}
.hum-engine[data-state=done] .hum-engine-art{animation:humPop .5s cubic-bezier(.2,1.4,.4,1) both}
.hum-engine[data-state=error] .hum-engine-art{background:var(--ai);box-shadow:0 8px 20px -10px rgba(232,100,31,.6)}
.hum-engine-body{flex:1;min-width:0}
.hum-engine-kicker{margin:0 0 4px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--green-d)}
.hum-engine[data-state=error] .hum-engine-kicker{color:var(--ai-d)}
.hum-engine-title{margin:0;font-family:var(--serif);font-size:22px;font-weight:600;line-height:1.25;letter-spacing:-.01em;color:var(--ink)}
.hum-engine-lead{margin:7px 0 0;max-width:68ch;font-size:14px;line-height:1.6;color:var(--ink-soft)}
.hum-engine-perks{--d:grid;grid-template-columns:1fr 1fr;gap:9px 22px;margin:14px 0 0;padding:0;list-style:none}
.hum-engine-perks li{display:flex;align-items:flex-start;gap:9px;font-size:13.5px;line-height:1.45;color:var(--ink-soft)}
.hum-engine-perks i{flex:none;width:18px;margin-top:2px;text-align:center;font-size:13px;color:var(--green)}
.hum-engine-perks b{font-weight:600;color:var(--ink)}
.hum-engine-cta{--d:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-top:16px}
.hum-engine-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;height:44px;padding:0 22px;border:0;border-radius:999px;background:var(--green);color:#fff;font:600 14.5px var(--sans);font-variant-numeric:tabular-nums;cursor:pointer;box-shadow:0 3px 12px rgba(21,127,91,.3);transition:background .15s,transform .05s,box-shadow .15s}
.hum-engine-btn:hover{background:var(--green-d);transform:translateY(-1px);box-shadow:0 6px 18px rgba(21,127,91,.34)}
.hum-engine-btn:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.hum-engine-fine{flex:1 1 260px;margin:0;font-size:12px;line-height:1.5;color:var(--muted)}
.hum-engine-progress{max-width:640px;margin-top:14px}
.hum-engine-meter{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;margin-bottom:8px;font-variant-numeric:tabular-nums}
.hum-engine-pct{font-family:var(--serif);font-size:30px;font-weight:600;line-height:1;color:var(--green-d)}
.hum-engine-stats{font-size:13px;color:var(--muted)}
.hum-engine-bar{position:relative;height:10px;border-radius:999px;background:var(--line-soft);overflow:hidden;box-shadow:inset 0 1px 2px rgba(30,25,15,.08)}
.hum-engine-bar span{position:absolute;inset:0 auto 0 0;width:0;overflow:hidden;border-radius:inherit;background:linear-gradient(90deg,var(--green),#2fa67a);transition:width .35s ease}
.hum-engine-bar span::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.5),transparent) no-repeat;background-size:40% 100%;animation:humShine 1.6s linear infinite}
.hum-engine[data-state=preparing] .hum-engine-bar span{width:100%!important}
.hum-engine-steps{display:flex;flex-wrap:wrap;gap:6px 20px;margin:12px 0 0;padding:0;list-style:none;font-size:12.5px;color:var(--faint)}
.hum-engine-steps li{display:inline-flex;align-items:center;gap:7px}
.hum-engine-steps li::before{content:"";box-sizing:border-box;width:9px;height:9px;border-radius:50%;border:2px solid var(--line);background:var(--surface)}
.hum-engine[data-state=installing] [data-step=download],.hum-engine[data-state=preparing] [data-step=prepare]{color:var(--green-d);font-weight:600}
.hum-engine[data-state=installing] [data-step=download]::before,.hum-engine[data-state=preparing] [data-step=prepare]::before{border-color:var(--green);background:var(--green);animation:humPulse 1.1s ease-in-out infinite}
.hum-engine[data-state=preparing] [data-step=download]{color:var(--ink-soft)}
.hum-engine[data-state=preparing] [data-step=download]::before{border-color:var(--green);background:var(--green)}
.hum-engine-tip{margin:12px 0 0;padding:10px 12px;border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-2);font-size:13px;line-height:1.5;color:var(--ink-soft)}
.hum-engine-tip::before{content:"\f0eb";margin-right:8px;font:900 12px "Font Awesome 6 Free";color:var(--refined)}
.hum-engine-tip.is-in{animation:humFade .45s ease both}
.hum-engine-done{--d:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;margin-top:12px;font-size:12.5px;color:var(--muted)}
.hum-engine-link{padding:0;border:0;background:none;font:inherit;color:var(--muted);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.hum-engine-link:hover{color:var(--ai-d)}
.hum-engine-close{--d:grid;position:absolute;top:12px;right:12px;width:30px;height:30px;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--faint);font-size:14px;cursor:pointer}
.hum-engine-close:hover{background:rgba(20,25,20,.07);color:var(--ink-soft)}
@keyframes humNudge{0%,100%{transform:translateY(-2px)}50%{transform:translateY(2px)}}
@keyframes humPulse{0%,100%{opacity:1}50%{opacity:.45}}
@keyframes humPop{0%{transform:scale(.6)}100%{transform:scale(1)}}
@keyframes humShine{0%{background-position:-40% 0}100%{background-position:140% 0}}
@media (max-width:640px){
  .hum-engine{flex-direction:column;gap:12px;padding:18px 16px}
  .hum-engine-art{width:42px;height:42px;border-radius:12px;font-size:17px}
  .hum-engine-title{font-size:19px}
  .hum-engine-perks{grid-template-columns:1fr}
  .hum-engine-btn{width:100%}
}
@media (prefers-reduced-motion:reduce){.hum-engine,.hum-engine *,.hum-engine *::before,.hum-engine *::after,.hum-chip i{animation:none!important;transition:none!important}}
/* Usage & cost meter (below the tool) */
.hum-usage{max-width:940px;margin:16px auto 0;border:1px solid var(--line-soft);border-radius:14px;background:var(--surface);padding:14px 18px}
.hum-usage-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-soft)}
.hum-usage-head i{color:var(--green)}
.hum-usage-sub{font-weight:500;text-transform:none;letter-spacing:0;color:var(--faint);font-size:11.5px}
.hum-usage-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.hum-usage-col{background:var(--surface-2);border:1px solid var(--line-soft);border-radius:11px;padding:11px 14px;display:flex;flex-direction:column;gap:4px}
.hum-usage-lbl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--faint)}
.hum-usage-big{font-family:var(--serif);font-size:22px;font-weight:600;color:var(--ink);line-height:1.1;font-variant-numeric:tabular-nums}
.hum-usage-meta{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;line-height:1.5}
.hum-usage-meta b{color:var(--ink-soft);font-weight:600}
/* AI Humanizer cross-sell card (shown under the detector result) */
.hum-cta-wrap{position:relative;margin-top:16px}
.hum-cta{display:flex;align-items:center;gap:13px;padding:13px 40px 13px 15px;border:1px solid #bfe0cd;border-radius:13px;background:var(--green-wash);text-decoration:none;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .05s}
.hum-cta:hover{border-color:var(--green);box-shadow:0 6px 18px rgba(21,127,91,.16);transform:translateY(-1px)}
.hum-cta-close{position:absolute;top:8px;right:8px;width:26px;height:26px;border:0;border-radius:7px;background:transparent;color:var(--faint);font-size:13px;line-height:1;cursor:pointer;display:grid;place-items:center;transition:background .15s,color .15s;z-index:2}
.hum-cta-close:hover{background:rgba(20,25,20,.08);color:var(--ink-soft)}
.hum-cta-ic{flex:none;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:var(--green);color:#fff;font-size:16px}
.hum-cta-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.hum-cta-title{font-family:var(--serif);font-weight:600;font-size:15.5px;color:var(--green-d);line-height:1.2}
.hum-cta-sub{font-size:12.5px;color:var(--ink-soft);line-height:1.45}
.hum-cta-arrow{margin-left:auto;flex:none;color:var(--green);font-size:14px;transition:transform .15s}
.hum-cta:hover .hum-cta-arrow{transform:translateX(3px)}
.hum-cta-badge{display:inline-block;vertical-align:middle;margin-left:7px;background:#ffcc00;color:#1a1c20;font-family:var(--sans);font-weight:800;font-size:10px;letter-spacing:.05em;padding:3px 7px;border-radius:5px;text-transform:uppercase}
@media (max-width:560px){.hum-usage-grid{grid-template-columns:1fr}}
/* Mobile/tablet tab switcher (Your text ↔ Humanized) — hidden on desktop, where both panels show. */
.hum-tabs{display:none}
.hum-tab{flex:1;appearance:none;border:0;background:transparent;font:700 12px inherit;font-family:inherit;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:13px 10px;cursor:pointer;border-bottom:2px solid transparent;transition:color .15s,border-color .15s}
.hum-tab.is-active{color:var(--green-d);border-bottom-color:var(--green)}
@media (max-width:900px){
  .hum-tabs{display:flex;border-bottom:1px solid var(--line-soft);background:var(--surface-2)}
  .hum-grid{grid-template-columns:1fr}
  .hum-panel--in{border-right:0;border-bottom:0}
  .hum-panel{height:auto;min-height:300px;max-height:62vh}
  /* one panel at a time, driven by JS toggling .hum-shell.tab-out */
  .hum-shell:not(.tab-out) .hum-panel--out{display:none}
  .hum-shell.tab-out .hum-panel--in{display:none}
  .hum-trust{order:3;width:100%}
  .hum-actionbar{flex-direction:column;align-items:stretch;justify-content:flex-start}
  .hum-agree{flex:0 1 auto}
  .hum-btn{width:100%}
}
.loading-spinner{border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}
.modification-notice{margin-top:2px;font-size:13px;color:var(--ai-d);display:flex;align-items:center;gap:8px}
.modification-notice i{color:var(--ai)}

/* Right panel — analysis results (visible by default) */
.right-panel{display:flex}
.analysis-results{flex:1;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-tool);box-shadow:var(--shadow-md);padding:28px 24px;display:flex;flex-direction:column;justify-content:flex-start;gap:22px}
.ai-percentage{text-align:center;padding:2px 0}
.percentage-number{font-family:var(--serif);font-weight:600;font-size:56px;line-height:1;color:var(--ink);letter-spacing:-.02em}
.percentage-label{font-size:13px;color:var(--muted);margin-top:6px}

.prediction-bar{display:flex;flex-direction:column;gap:8px}
.prediction-bar-label{font-size:13px;color:var(--faint)}
.bar-container{height:10px;border-radius:6px;background:var(--gray-200);overflow:hidden;position:relative}
.bar-fill{height:100%;border-radius:6px;background:var(--orange);transition:width .8s cubic-bezier(.22,1,.36,1)}
.bar-labels{display:flex;justify-content:space-between;font-size:12px;color:var(--faint)}

.final-decision{display:none;border:1px solid var(--line-soft);border-radius:14px;background:var(--surface-2);padding:16px}
.final-decision.ai{background:#fdf3ea;border-color:#f6d3b4}
.final-decision.human{background:var(--green-wash);border-color:#bfe0cd}
.decision-header{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.decision-icon{width:42px;height:42px;flex:none;border-radius:11px;display:grid;place-items:center;background:var(--green-wash);color:var(--green-d);font-size:17px}
.decision-icon.ai{background:var(--orange);color:#fff}
.decision-icon.human{background:var(--green);color:#fff}
.decision-content{min-width:0}
.decision-title{font-family:var(--serif);font-weight:600;font-size:18px;color:var(--ink)}
.decision-title.ai{color:var(--ai-d)}
.decision-title.human{color:var(--green-d)}
.decision-confidence{font-size:12.5px;color:var(--muted);margin-top:2px}
.decision-description{font-size:14px;color:var(--ink-soft);line-height:1.6}

/* Breakdown chart (AI-generated / Human-written / AI-refined) */
.result-chart{display:flex;flex-direction:column;gap:15px}
.chart-row{display:flex;flex-direction:column;gap:7px}
.chart-head{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--ink-soft)}
.chart-head .dot{width:9px;height:9px;border-radius:2px;flex:none}
.chart-head .dot.ai-generated{background:var(--ai)}
.chart-head .dot.human-written{background:var(--green)}
.chart-head .dot.refined-ai{background:var(--refined)}
.chart-pct{margin-left:auto;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.chart-track{height:10px;border-radius:6px;background:var(--gray-200);overflow:hidden}
.chart-bar{height:100%;width:0;border-radius:6px;transition:width .9s cubic-bezier(.22,1,.36,1)}
.bar-ai{background:var(--ai)}
.bar-human{background:var(--green)}
.bar-refined{background:var(--refined)}

/* Standby (idle) — panel is faded grayscale until a result appears */
.analysis-results > *{transition:opacity .35s ease, filter .35s ease}
.analysis-results.is-standby > *{filter:grayscale(1);opacity:.5}

/* Animated 3-dot loader shown in the %/chart slots while a scan is running (scales with font-size) */
.streaming-text{display:inline-block;position:relative;width:.34em;height:.34em;border-radius:50%;background:currentColor;color:var(--green);vertical-align:middle;margin:0 .7em;animation:streamDot 1.05s ease-in-out infinite .18s}
.streaming-text::before,.streaming-text::after{content:"";position:absolute;top:0;width:.34em;height:.34em;border-radius:50%;background:currentColor;animation:streamDot 1.05s ease-in-out infinite}
.streaming-text::before{left:-.7em;animation-delay:0s}
.streaming-text::after{left:.7em;animation-delay:.36s}
.streaming-text.refined{color:#7C3AED}
@keyframes streamDot{0%,100%{opacity:.25;transform:scale(.7)}50%{opacity:1;transform:scale(1)}}

/* ---------- Highlight heat (engine-applied classes) ---------- */
.text-area-editable .ai-text-low,
.text-area-editable .ai-text-moderate,
.text-area-editable .ai-text-high,
.text-area-editable .human-text-low,
.text-area-editable .human-text-moderate,
.text-area-editable .human-text-high,
.text-area-editable .refined-ai-text,
.text-area-editable .special-override-text{
  border-radius:4px;padding:.08em .18em;
  -webkit-box-decoration-break:clone;box-decoration-break:clone;
  transition:background .4s ease;cursor:help;
}
.ai-text-low{background:var(--ai-low)}
.ai-text-moderate{background:var(--ai-mod)}
.ai-text-high{background:var(--ai-high);color:var(--ai-high-ink)}
.human-text-low{background:var(--hu-low)}
.human-text-moderate{background:var(--hu-mod)}
.human-text-high{background:var(--hu-high);color:var(--hu-ink)}
.refined-ai-text{background:#cabaf3;color:#33245e}
.special-override-text{background:#fbeaa0;color:#5f4a0d}
.active-sentence{outline:2px solid rgba(26,28,32,.4);outline-offset:1px;border-radius:4px}

/* Manipulation caution: when disguised text still reads as HUMAN, the green (human) highlights turn
   amber to signal "re-check this" instead of falsely reassuring the user. JS toggles body.evasion-caution. */
body.evasion-caution .text-area-editable .human-text-high,
body.evasion-caution .text-area-editable .human-text-moderate,
body.evasion-caution .text-area-editable .human-text-low{
  background:#fde68a;color:#713f12;
}

/* ---------- Confidence tooltip (tiny hover card; JS toggles inline display + position) ---------- */
.confidence-tooltip{display:none;position:absolute;z-index:120;width:188px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:12px}
.confidence-description{display:none}
.confidence-result-badge{display:inline-flex;align-items:center;gap:7px;background:var(--green-wash);border:1px solid var(--line);padding:4px 10px;border-radius:999px;margin-bottom:10px}
.result-indicator{width:8px;height:8px;border-radius:50%;background:var(--ai)}
.result-text{font-size:12px;font-weight:600;color:var(--ink)}
.confidence-header{display:flex;align-items:center;gap:11px}
.confidence-circle-container{flex:none}
.confidence-circle{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--green) 75%, var(--gray-200) 0);position:relative}
.confidence-circle::before{content:"";position:absolute;inset:4px;border-radius:50%;background:var(--surface)}
.confidence-text{position:relative;font-size:12px;font-weight:700;color:var(--ink)}
.confidence-info{min-width:0}
.confidence-level{display:flex;flex-direction:column;line-height:1.15}
.confidence-level > span:first-child{font-family:var(--serif);font-weight:600;font-size:17px;color:var(--ink)}
.confidence-type{font-size:11.5px;color:var(--muted)}

/* ---------- Update overlay (JS sets display flex/none) ---------- */
.update-overlay{position:fixed;inset:0;z-index:150;align-items:center;justify-content:center;padding:24px;background:rgba(20,18,12,.5);backdrop-filter:blur(4px);opacity:0;transition:opacity .3s ease}
.update-overlay.show{opacity:1}
.update-modal{width:100%;max-width:440px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-lg);padding:24px}
.update-header{display:flex;gap:14px;margin-bottom:16px}
.update-icon{width:44px;height:44px;flex:none;border-radius:12px;background:var(--green-wash);color:var(--green-d);display:grid;place-items:center;font-size:18px}
.update-title{font-family:var(--serif);font-weight:600;font-size:19px;color:var(--ink)}
.update-description{font-size:14px;color:var(--muted);margin-top:4px}
.update-features{display:flex;flex-direction:column;gap:9px;margin-bottom:18px}
.update-features .feature-item{display:flex;align-items:center;gap:9px;font-size:14px;color:var(--ink-soft)}
.update-features .feature-item i{color:var(--green)}
.update-actions{display:flex;gap:10px;justify-content:flex-end}
.update-btn-secondary,.update-btn-primary{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:10px;font-size:14px;font-weight:500;transition:.16s}
.update-btn-secondary{border:1px solid var(--line);color:var(--ink-soft);background:var(--surface)}
.update-btn-secondary:hover{border-color:var(--muted)}
.update-btn-primary{background:var(--green);color:#fff}
.update-btn-primary:hover{background:var(--green-d)}
.update-note{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--faint);margin-top:14px}

/* Note under the detector — left aligned */
.disclaimer{max-width:none;margin:24px 0 0;text-align:left;font-size:13px;color:var(--faint);line-height:1.6}
.disclaimer strong{color:var(--muted)}

/* Breadcrumbs */
.breadcrumbs{border-bottom:1px solid var(--line-soft);background:var(--surface)}
.breadcrumbs .prose-container{display:flex;gap:8px;align-items:center;padding-top:11px;padding-bottom:11px;font-size:13px;color:var(--muted)}
.breadcrumbs a{color:var(--muted)}
.breadcrumbs a:hover{color:var(--green-d)}
.breadcrumbs .sep{color:var(--faint)}
.breadcrumbs span[aria-current]{color:var(--ink);font-weight:500}

/* ---------- Prose / content sections ---------- */
.prose-section,.how-section,.steps-section,.who-section,.privacy-section,.faq-section{padding:68px 0;border-top:1px solid var(--line)}
.prose-container h2{font-family:var(--serif);font-weight:600;font-size:clamp(26px,3.4vw,36px);letter-spacing:-.015em;color:var(--ink);margin-bottom:16px}
.prose-container > p{font-size:16.5px;line-height:1.75;color:var(--ink-soft);max-width:70ch}
/* Two-column prose sections: heading label left, body right — fills the full detector width */
.prose-section .prose-container{display:grid;grid-template-columns:290px minmax(0,1fr);gap:22px 64px;align-items:start}
.prose-section .prose-head h2{margin:0}
.prose-body{max-width:72ch}
.prose-body p{font-size:16.5px;line-height:1.75;color:var(--ink-soft)}
.prose-body p + p{margin-top:1.05em}
.prose-body a{color:var(--green-d);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}
.prose-body a:hover{color:var(--ink)}
.prose-body ul,.prose-body ol{max-width:72ch;margin:.55em 0 1.05em;padding-left:1.35em}
.prose-body li{font-size:16.5px;line-height:1.72;color:var(--ink-soft);margin-bottom:.5em}
.prose-body li::marker{color:var(--faint)}
.prose-body li:last-child{margin-bottom:0}
.prose-body strong{color:var(--ink);font-weight:600}
.prose-body em{font-style:italic}
.prose-body code{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:.9em;background:var(--surface-2);border:1px solid var(--line);padding:1px 5px;border-radius:5px;color:var(--ink)}
/* CTA before an embedded detector */
.prose-cta .prose-head h2{color:var(--ink)}
.prose-cta .prose-body p{font-size:17px;color:var(--ink-soft)}
/* CTA button — links guide/learn pages to the main detector (selectors beat .prose-body a) */
.btn-cta,a.btn-cta,.prose-body a.btn-cta{display:inline-flex;align-items:center;gap:9px;margin-top:4px;padding:15px 30px;border-radius:999px;background:var(--green);color:#fff;font-family:var(--sans);font-weight:600;font-size:16px;line-height:1;text-decoration:none;border:0;box-shadow:0 2px 8px rgba(21,127,91,.28);transition:background .15s,transform .05s,box-shadow .15s;cursor:pointer}
.btn-cta:hover,a.btn-cta:hover,.prose-body a.btn-cta:hover{background:var(--green-d);color:#fff;text-decoration:none;box-shadow:0 4px 14px rgba(21,127,91,.34);transform:translateY(-1px)}
.btn-cta:active,.prose-body a.btn-cta:active{transform:translateY(0)}
.btn-cta i{font-size:14px}
/* Accuracy note callout (soft green) */
.accuracy-note{display:flex;gap:13px;align-items:flex-start;margin:20px 0;padding:15px 18px;background:var(--green-wash);border-left:3px solid var(--green);border-radius:10px;color:var(--ink-soft);font-size:15px;line-height:1.62;scroll-margin-bottom:16px}
.accuracy-note i{color:var(--green);font-size:18px;margin-top:2px;flex:none}
.accuracy-note p{margin:0}
.accuracy-note strong{color:var(--ink);font-weight:600}
/* Author byline (E-E-A-T) + humanizer-wedge cross-link pointer */
.hero-byline{font-size:13px;color:var(--muted);margin-top:12px;font-family:var(--sans)}
.wedge-note{max-width:var(--wrap);margin:0 auto;padding:12px 24px 0;font-size:14.5px;color:var(--ink-soft)}
.wedge-note i{color:var(--green);margin-right:6px}
.wedge-note a{color:var(--green-d);font-weight:600;text-decoration:none;border-bottom:1px solid var(--green-wash)}
.wedge-note a:hover{border-color:var(--green)}
.section-lead{font-size:16.5px;line-height:1.7;color:var(--muted);max-width:66ch;margin-bottom:26px}

.signal-list{display:flex;flex-direction:column}
.signal{display:grid;grid-template-columns:190px 1fr;gap:28px;padding:22px 0;border-top:1px solid var(--line-soft)}
.signal:first-child{border-top:0}
.signal dt{font-family:var(--serif);font-weight:600;font-size:20px;color:var(--ink)}
.signal dd{font-size:15.5px;line-height:1.7;color:var(--ink-soft);max-width:62ch}

.steps{counter-reset:step;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;margin-top:8px}
.steps li{counter-increment:step;position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:28px 24px 24px;box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s,border-color .18s}
.steps li:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#d9d9cd}
.steps li::before{content:counter(step,decimal-leading-zero);display:grid;place-items:center;width:46px;height:46px;border-radius:13px;background:var(--green-wash);border:1px solid #cfe6d8;color:var(--green-d);font-family:var(--serif);font-weight:600;font-size:20px;margin-bottom:18px}
.steps h3{font-family:var(--serif);font-weight:600;font-size:19px;color:var(--ink);margin-bottom:8px}
.steps p{font-size:14.5px;color:var(--muted);line-height:1.62}

.model-row{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);box-shadow:var(--shadow-sm)}
.model-row li{font-size:13.5px;color:var(--ink-soft);border:1px solid var(--line);background:var(--surface-2);padding:8px 15px;border-radius:999px;transition:border-color .16s,color .16s}
.model-row li:hover{border-color:var(--green);color:var(--green-d)}

.who-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:8px}
.who-card{position:relative;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:28px 26px;box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s,border-color .18s}
.who-card::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,var(--green),var(--ai));transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.who-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#d9d9cd}
.who-card:hover::before{transform:scaleX(1)}
.who-card > i{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--green-wash);border:1px solid #cfe6d8;color:var(--green-d);font-size:20px;margin-bottom:18px}
.who-card h3{font-family:var(--serif);font-weight:600;font-size:19px;color:var(--ink);margin-bottom:8px}
.who-card p{font-size:14.5px;color:var(--muted);line-height:1.62}

.privacy-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.privacy-item{position:relative;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:26px;box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s,border-color .18s}
.privacy-item::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,var(--green),var(--ai));transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.privacy-item:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#d9d9cd}
.privacy-item:hover::before{transform:scaleX(1)}
.privacy-item > i{display:grid;place-items:center;width:46px;height:46px;border-radius:13px;background:var(--green-wash);border:1px solid #cfe6d8;color:var(--green-d);font-size:18px;margin-bottom:16px}
.privacy-item h3{font-family:var(--serif);font-weight:600;font-size:17px;color:var(--ink);margin-bottom:6px}
.privacy-item p{font-size:14.5px;color:var(--muted);line-height:1.62}

.faq-list{display:block;column-count:2;column-gap:20px;max-width:none}
.faq-item{break-inside:avoid;margin-bottom:14px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm);overflow:hidden;transition:border-color .16s}
.faq-item[open]{border-color:#d5d5c8}
.faq-item summary{cursor:pointer;list-style:none;padding:17px 46px 17px 20px;position:relative;font-size:15.5px;font-weight:600;color:var(--ink);line-height:1.4}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"\f067";font-family:"Font Awesome 6 Free";font-weight:900;position:absolute;right:18px;top:19px;font-size:12px;color:var(--green);transition:transform .2s}
.faq-item[open] summary::after{content:"\f068"}
.faq-item p{padding:0 20px 20px;font-size:14.5px;color:var(--ink-soft);line-height:1.68;max-width:none}

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--line);background:var(--surface-2);padding:56px 0 26px}
.footer-inner{max-width:var(--wrap);margin:0 auto;padding:0 24px}
.footer-top{display:grid;grid-template-columns:1.5fr 3.5fr;gap:44px}
.footer-brand-col{max-width:320px}
.footer-logo{display:inline-flex;align-items:center;gap:10px}
.footer-note{font-size:14px;color:var(--muted);line-height:1.65;margin-top:14px}
.footer-cols{display:grid;grid-template-columns:repeat(5,1fr);gap:24px 20px}
.footer-col h3{font-size:11.5px;text-transform:uppercase;letter-spacing:.09em;color:var(--faint);font-weight:600;margin-bottom:14px}
.footer-col a{display:block;font-size:14px;color:var(--ink-soft);line-height:1.35;margin-bottom:11px}
.footer-col a:hover{color:var(--green-d)}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-top:44px;padding-top:22px;border-top:1px solid var(--line);font-size:12.5px;color:var(--faint)}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  /* Tabbed detector: show one panel at a time */
  .detector-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:16px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:5px}
  .detector-tab{padding:11px 10px;border:0;border-radius:8px;font-size:14.5px;font-weight:500;color:var(--muted);text-align:center;transition:background .18s, color .18s}
  .detector-tab.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
  .main-container{display:block}
  .left-panel,.right-panel{display:none}
  .main-container.tab-content .left-panel{display:flex}
  .main-container.tab-results .right-panel{display:flex}
  .signal{grid-template-columns:1fr;gap:6px}
  .who-grid{grid-template-columns:1fr}
  .prose-section .prose-container{grid-template-columns:1fr;gap:14px}
  .prose-body{max-width:100%}
  .footer-top{grid-template-columns:1fr;gap:30px}
  .footer-cols{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:760px){
  .nav-links{display:none}
  .mobile-menu-btn{display:block}
  .hero-section{padding:30px 0 4px}
  .privacy-grid{grid-template-columns:1fr}
  .prose-section,.how-section,.steps-section,.who-section,.privacy-section,.faq-section{padding:44px 0}
  /* Chips: centered when they fit, one-line scroll (from start) when they don't */
  .hero-chips{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:2px 0 4px}
  .hero-chips::-webkit-scrollbar{display:none}
  .chips-track{flex-wrap:nowrap;width:max-content;max-width:100%;margin:0 auto}
  .hero-chip{flex:none;font-size:12.5px;padding:7px 12px}
  /* Sample buttons stay on one line (scroll) */
  .sample-buttons{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}
  .sample-buttons::-webkit-scrollbar{display:none}
  .sample-button{flex:none;font-size:12.5px;padding:7px 12px}
}
@media (max-width:520px){
  .nav-content,.hero-content,.prose-container,.detector-container,.footer-inner{padding-left:18px;padding-right:18px}
  .text-area-editable{padding:20px 18px;font-size:16px}
  .analysis-results{padding:20px}
  .percentage-number{font-size:46px}
  /* Detect card: stack cleanly + full-width button on small screens */
  .input-controls{flex-direction:column;align-items:stretch;gap:10px;padding:14px}
  .word-count{text-align:center}
  .input-controls-text{align-items:center;text-align:center}
  .detect-button{width:100%;min-width:0}
  .footer-cols{grid-template-columns:repeat(2,1fr);gap:22px 16px}
  .footer-bottom{flex-direction:column;align-items:flex-start;gap:8px}
}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}

/* ---------- Large screens: widen + scale up ---------- */
@media (min-width:1600px){
  :root{--wrap:1340px}
  .hero-title{font-size:74px}
}
@media (min-width:1920px){        /* Full HD (1080p) */
  :root{--wrap:1460px}
  .hero-eyebrow{font-size:18px}
  .hero-title{font-size:84px}
  .hero-tagline{font-size:28px}
  .prose-container h2{font-size:40px}
  .prose-container > p,.section-lead,.signal dd{font-size:17.5px}
  .percentage-number{font-size:64px}
}
@media (min-width:2560px){        /* 2K / QHD */
  :root{--wrap:1820px}
  .nav-content{padding:22px 28px}
  .logo-icon{width:38px;height:38px}
  .logo-text{font-size:25px}
  .nav-link{font-size:18px}
  .hero-section{padding:70px 0 8px}
  .hero-eyebrow{font-size:23px}
  .hero-title{font-size:122px}
  .hero-tagline{font-size:38px}
  .hero-chip{font-size:17px;padding:11px 20px;gap:9px}
  .detector-section{padding:40px 0 100px}
  .sample-label{font-size:16px}
  .sample-button{font-size:16px;padding:9px 16px}
  /* Taller detector box on big screens */
  .text-input-container{height:540px}
  #mainContainer.has-content .text-input-container{height:680px}
  .text-area-editable{font-size:24px;line-height:1.85;padding:38px 40px}
  .empty-state-text{font-size:19px}
  .empty-state-button,.file-upload-empty label{font-size:16px;padding:11px 18px}
  .word-count{font-size:16px}
  .detect-button{font-size:21px;padding:17px 32px}
  .analysis-results{justify-content:center}
  .percentage-number{font-size:96px}
  .percentage-label{font-size:16px}
  .decision-icon{width:52px;height:52px;font-size:21px}
  .decision-title{font-size:25px}
  .decision-confidence{font-size:15px}
  .decision-description{font-size:18px}
  .chart-head,.chart-pct{font-size:17px}
  .prose-section,.how-section,.steps-section,.who-section,.privacy-section,.faq-section{padding:88px 0}
  .prose-container h2{font-size:56px}
  .prose-container > p,.section-lead,.signal dd{font-size:22px}
  .signal dt{font-size:27px}
  .faq-item summary{font-size:21px}
  .faq-item p{font-size:20px}
  .who-card h3,.privacy-item h3,.steps h3{font-size:22px}
  .who-card p,.privacy-item p,.steps p,.model-row li{font-size:18px}
  .prediction-bar-label{font-size:15px}
  .bar-labels{font-size:14px}
  .disclaimer{font-size:16px}
  .who-card > i,.privacy-item > i{font-size:26px}
  .steps li{padding:32px 28px 26px}
  .steps li::before{width:52px;height:52px;font-size:22px}
  .footer-note{font-size:16px}
  .footer-col a{font-size:15px}
  .footer-bottom{font-size:14px}
  .confidence-tooltip{width:232px}
  .result-text{font-size:14px}
  .confidence-level > span:first-child{font-size:20px}
  .confidence-type{font-size:13px}
}
@media (min-width:3840px){        /* 4K / UHD */
  :root{--wrap:2520px;--radius-tool:26px;--radius-card:22px}
  .nav-content{padding:30px 32px}
  .logo-icon{width:50px;height:50px}
  .logo-text{font-size:34px}
  .nav-link{font-size:24px}
  .hero-section{padding:104px 0 12px}
  .hero-eyebrow{font-size:31px}
  .hero-title{font-size:176px}
  .hero-tagline{font-size:54px}
  .hero-chip{font-size:24px;padding:16px 30px;gap:12px}
  .detector-section{padding:58px 0 140px}
  .sample-label{font-size:22px}
  .sample-button{font-size:22px;padding:13px 24px}
  /* Much taller detector box on 4K */
  .text-input-container{height:760px}
  #mainContainer.has-content .text-input-container{height:960px}
  .text-area-editable{font-size:33px;line-height:1.8;padding:52px 54px}
  .empty-state-text{font-size:26px}
  .empty-state-button,.file-upload-empty label{font-size:22px;padding:15px 26px}
  .word-count{font-size:22px}
  .detect-button{font-size:29px;padding:24px 44px;border-radius:16px}
  .percentage-number{font-size:138px}
  .percentage-label{font-size:22px}
  .decision-icon{width:66px;height:66px;font-size:28px;border-radius:16px}
  .decision-title{font-size:36px}
  .decision-confidence{font-size:20px}
  .decision-description{font-size:24px}
  .chart-head,.chart-pct{font-size:23px}
  .prose-section,.how-section,.steps-section,.who-section,.privacy-section,.faq-section{padding:130px 0}
  .prose-container h2{font-size:84px}
  .prose-container > p,.section-lead,.signal dd{font-size:31px}
  .signal dt{font-size:38px}
  .faq-item summary{font-size:30px}
  .faq-item p{font-size:28px}
  .who-card h3,.privacy-item h3,.steps h3{font-size:30px}
  .who-card p,.privacy-item p,.steps p,.model-row li{font-size:24px}
  .prediction-bar-label{font-size:21px}
  .bar-labels{font-size:19px}
  .disclaimer{font-size:22px}
  .who-card > i,.privacy-item > i{font-size:36px}
  .steps li{padding:40px 32px 30px}
  .steps li::before{width:64px;height:64px;font-size:30px}
  .footer-note{font-size:19px}
  .footer-col a{font-size:18px}
  .footer-bottom{font-size:16px}
  .confidence-tooltip{width:308px;padding:18px}
  .result-text{font-size:19px}
  .confidence-circle{width:60px;height:60px}
  .confidence-text{font-size:16px}
  .confidence-level > span:first-child{font-size:26px}
  .confidence-type{font-size:16px}
}

/* Mobile: single-column FAQ (shared .faq-list still used on non-landing pages) */
@media (max-width:900px){
  .faq-list{column-count:1}
}

/* ============================================================
   Editorial content system (.ed-*) — the approved redesign
   ============================================================ */
.ed-wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}
.ed-section{padding:72px 0;border-top:1px solid var(--line)}
.ed-section:first-of-type{border-top:0}
.ed-grid{display:grid;grid-template-columns:300px minmax(0,1fr);gap:26px 72px;align-items:start}
.ed-head{position:sticky;top:24px}
.ed-kicker{display:inline-flex;align-items:center;gap:10px;margin-bottom:16px}
.ed-kicker .num{font-family:var(--serif);font-weight:600;font-size:14px;color:var(--ai);font-variant-numeric:tabular-nums}
.ed-kicker .lbl{text-transform:uppercase;letter-spacing:.2em;font-size:11px;font-weight:600;color:var(--green)}
.ed-kicker .rule{width:26px;height:1px;background:var(--line)}
.ed-head h2{font-family:var(--serif);font-weight:600;font-size:clamp(27px,3.2vw,38px);line-height:1.08;letter-spacing:-.02em;color:var(--ink);margin:0}
.ed-head .ed-sub{margin-top:14px;font-size:15px;line-height:1.65;color:var(--muted);max-width:34ch}
.ed-body{max-width:72ch}
.ed-body > p{font-size:16.5px;line-height:1.78;color:var(--ink-soft)}
.ed-body > p + p{margin-top:1.1em}
.ed-body a{color:var(--green-d);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}
.ed-body a:hover{color:var(--ink)}
.ed-body strong{color:var(--ink);font-weight:600}
.ed-body em{font-style:italic}
.ed-body code{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:.88em;background:var(--surface-2);border:1px solid var(--line);padding:1px 6px;border-radius:5px;color:var(--ink)}
.ed-lead{font-family:var(--serif);font-weight:400;font-size:clamp(19px,2vw,22px);line-height:1.62;color:var(--ink);padding-left:22px;border-left:3px solid var(--green);margin-bottom:1.1em}
.ed-facts{display:flex;flex-wrap:wrap;gap:10px;margin-top:26px}
.ed-fact{display:inline-flex;align-items:center;gap:9px;font-size:13.5px;color:var(--ink-soft);background:var(--surface);border:1px solid var(--line);padding:9px 15px;border-radius:999px;box-shadow:var(--shadow-sm)}
.ed-fact i{color:var(--green);font-size:13px}
/* Labeled chip strip (model / format tags inside prose) */
.ed-chipstrip{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:24px}
.ed-chipstrip .cs-label{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--faint);font-weight:600;margin-right:4px}
.ed-chipstrip .cs-chip{font-size:13px;color:var(--ink-soft);border:1px solid var(--line);background:var(--surface);padding:7px 13px;border-radius:999px;box-shadow:var(--shadow-sm)}
/* Feature mini-cards (2-up) */
.ed-points{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin:24px 0}
.ed-point{display:flex;gap:13px;align-items:flex-start;padding:17px 18px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-sm)}
.ed-point > i{flex:none;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-size:15px;color:var(--green-d);background:var(--green-wash);border:1px solid #cfe6d8}
.ed-point b{display:block;font-size:14.5px;color:var(--ink);font-weight:600;margin-bottom:3px}
.ed-point span{font-size:13px;color:var(--muted);line-height:1.5}
@media (max-width:900px){.ed-points{grid-template-columns:1fr}}
.ed-section.wide .ed-grid{display:block}
.ed-section.wide .ed-head{position:static;margin-bottom:36px;max-width:760px}
.ed-section.wide .ed-head h2{font-size:clamp(28px,3.4vw,40px)}
.ed-section.wide .ed-sub{max-width:62ch;font-size:16px;color:var(--muted)}
/* Humanizer page: all content sections run full-width (head on top) to match the wide feature sections — no narrow, right-shifted prose column. Card/point/chip blocks fill the width; prose paragraphs keep a readable line length. */
.hum-page .ed-section.wide .ed-body{max-width:none}
.hum-page .ed-section.wide .ed-body > p{max-width:90ch}
/* Steps */
.ed-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;counter-reset:edstep}
.ed-step{counter-increment:edstep;position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:28px 24px 26px;box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s,border-color .18s}
.ed-step:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#d9d9cd}
.ed-step .step-num{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;font-family:var(--serif);font-weight:600;font-size:20px;color:var(--green-d);background:var(--green-wash);border:1px solid #cfe6d8;margin-bottom:18px}
.ed-step .step-num::before{content:counter(edstep,decimal-leading-zero)}
.ed-step h3{font-family:var(--serif);font-weight:600;font-size:19px;color:var(--ink);margin-bottom:8px}
.ed-step p{font-size:14.5px;line-height:1.62;color:var(--muted)}
.ed-step .step-ico{position:absolute;top:30px;right:24px;font-size:16px;color:var(--faint)}
/* Score scale */
.ed-scale{margin-top:26px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:22px 24px;box-shadow:var(--shadow-sm)}
.ed-scale-bar{height:14px;border-radius:8px;background:linear-gradient(90deg,var(--hu-high),var(--ai-low) 42%,var(--ai-mod) 70%,var(--ai-high));margin-bottom:12px}
.ed-scale-labels{display:flex;justify-content:space-between;font-size:12.5px;color:var(--muted)}
.ed-scale-labels b{color:var(--ink);font-weight:600}
/* Cards */
.ed-cards{display:grid;gap:20px}
.ed-cards.cols-3{grid-template-columns:repeat(3,1fr)}
.ed-cards.cols-2{grid-template-columns:repeat(2,1fr)}
.ed-card{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:28px 26px;box-shadow:var(--shadow-sm);overflow:hidden;transition:transform .18s,box-shadow .18s,border-color .18s}
.ed-card::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,var(--green),var(--ai));transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.ed-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#d9d9cd}
.ed-card:hover::before{transform:scaleX(1)}
.ed-card .card-badge{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;color:var(--green-d);background:var(--green-wash);border:1px solid #cfe6d8;margin-bottom:18px;font-size:20px}
.ed-card h3{font-family:var(--serif);font-weight:600;font-size:19px;color:var(--ink);margin-bottom:8px}
.ed-card p{font-size:14.5px;line-height:1.62;color:var(--muted);margin-bottom:12px}
.ed-card .card-link{display:inline-flex;align-items:center;gap:7px;font-size:14px;font-weight:600;color:var(--green-d);text-decoration:none}
.ed-card .card-link i{font-size:12px;transition:transform .18s}
.ed-card:hover .card-link i{transform:translateX(3px)}
/* Signal cards */
.ed-signals{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.ed-signal{display:flex;gap:16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:22px;box-shadow:var(--shadow-sm);transition:border-color .18s,box-shadow .18s}
.ed-signal:hover{border-color:#d9d9cd;box-shadow:var(--shadow-md)}
.ed-signal .sig-ico{flex:none;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;font-size:16px;color:var(--ai-d);background:#fdeede;border:1px solid #f6d8b4}
.ed-signal h4{font-size:15.5px;font-weight:600;color:var(--ink);margin-bottom:5px}
.ed-signal p{font-size:14px;line-height:1.6;color:var(--muted)}
.ed-signal em{font-style:italic;color:var(--ink-soft)}
.ed-signal.green .sig-ico{color:var(--green-d);background:var(--green-wash);border-color:#cfe6d8}
/* Callout */
.ed-callout{display:flex;gap:14px;align-items:flex-start;margin-top:26px;padding:18px 20px;background:var(--green-wash);border-left:3px solid var(--green);border-radius:12px}
.ed-callout > i{color:var(--green);font-size:18px;margin-top:2px;flex:none}
.ed-callout p{margin:0;font-size:15px;line-height:1.62;color:var(--ink-soft)}
.ed-callout strong{color:var(--ink);font-weight:600}
.ed-signal a,.ed-callout a,.ed-note a,.ed-point a{color:var(--green-d);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;font-weight:600}
.ed-signal a:hover,.ed-callout a:hover,.ed-note a:hover,.ed-point a:hover{color:var(--ink)}
/* Comparison table */
.ed-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-md);background:var(--surface)}
.ed-table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5;min-width:620px}
.ed-table th,.ed-table td{text-align:left;padding:15px 18px;vertical-align:middle;border-bottom:1px solid var(--line)}
.ed-table tbody tr:last-child td{border-bottom:0}
.ed-table thead th{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:12px;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
.ed-table tbody td:first-child{font-weight:600;color:var(--ink)}
.ed-table td:not(:first-child),.ed-table th:not(:first-child){white-space:nowrap}
.ed-table tbody tr:hover td{background:rgba(21,127,91,.035)}
.ed-table th:nth-child(2),.ed-table td:nth-child(2){background:var(--green-wash);border-left:2px solid var(--green);border-right:2px solid var(--green)}
.ed-table thead th:nth-child(2){background:var(--green);color:#fff}
.ed-table tbody td:nth-child(2){color:var(--green-d);font-weight:600}
.ed-table tbody tr:last-child td:nth-child(2){border-bottom:2px solid var(--green)}
.ed-table .yes{color:var(--green-d);font-weight:600}
.ed-table .no{color:var(--faint)}
.ed-table .yes i,.ed-table .no i{margin-right:5px;font-size:12px}
/* Model chips */
.ed-models{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);padding:26px 26px 28px;box-shadow:var(--shadow-sm);margin-top:24px}
.ed-models h4{font-size:12px;text-transform:uppercase;letter-spacing:.14em;color:var(--faint);font-weight:600;margin-bottom:16px}
.ed-chips{display:flex;flex-wrap:wrap;gap:9px}
.ed-chips li{font-size:13.5px;color:var(--ink-soft);border:1px solid var(--line);background:var(--surface-2);padding:8px 15px;border-radius:999px;transition:border-color .16s,color .16s}
.ed-chips li:hover{border-color:var(--green);color:var(--green-d)}
.ed-chips li.hot{background:var(--green-wash);border-color:#cfe6d8;color:var(--green-d);font-weight:600}
/* FAQ */
.ed-faq{columns:2;column-gap:26px}
.ed-faqitem{break-inside:avoid;margin-bottom:14px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm);overflow:hidden;transition:border-color .16s}
.ed-faqitem[open]{border-color:#d5d5c8}
.ed-faqitem summary{cursor:pointer;list-style:none;padding:18px 46px 18px 20px;position:relative;font-size:15.5px;font-weight:600;color:var(--ink);line-height:1.4}
.ed-faqitem summary::-webkit-details-marker{display:none}
.ed-faqitem summary::after{content:"\f067";font-family:"Font Awesome 6 Free";font-weight:900;position:absolute;right:18px;top:19px;font-size:12px;color:var(--green);transition:transform .2s}
.ed-faqitem[open] summary::after{content:"\f068"}
.ed-faqitem p{padding:0 20px 20px;font-size:14.5px;color:var(--ink-soft);line-height:1.68}
.ed-faqitem a{color:var(--green-d);text-decoration:underline;text-underline-offset:2px}
/* Closing note */
.ed-note{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-card);padding:30px 32px}
.ed-note p{font-size:15.5px;line-height:1.72;color:var(--ink-soft)}
.ed-note p + p{margin-top:1em}
.ed-note strong{color:var(--ink);font-weight:600}
@media (max-width:900px){
  .ed-section{padding:52px 0}
  .ed-grid{grid-template-columns:1fr;gap:22px}
  .ed-head{position:static}
  .ed-head .ed-sub{max-width:none}
  .ed-cards.cols-3,.ed-cards.cols-2{grid-template-columns:1fr}
  .ed-signals{grid-template-columns:1fr}
  .ed-faq{columns:1}
}
@media (max-width:520px){
  .ed-wrap{padding-left:18px;padding-right:18px}
  .ed-lead{font-size:18px}
}
