/* WrittenCheck design v4 "Clean" (2 Oct 2026): one typeface, one accent, flat colours. */
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --card: #ffffff;
  --card-2: #f9fafb;
  --text: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --border: #e2e8f0;
  --border-2: #cbd5e1;
  --accent: #2552e8;
  --accent-hover: #1d42c4;
  --accent-soft: #eef2ff;
  --on-accent: #ffffff;
  --human: #0f8a6e;
  --human-soft: #d9f3ec;
  --human-ink: #0b6b55;
  --mixed: #ca8a04;
  --mixed-soft: #fdf1c9;
  --mixed-ink: #8a5a00;
  --ai: #dc2626;
  --ai-soft: #fde2e2;
  --ai-ink: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .05), 0 24px 48px -12px rgba(15, 23, 42, .14);
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-soft: #0f141d;
  --card: #131a25;
  --card-2: #18202d;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --border: #243042;
  --border-2: #334155;
  --accent: #6b8cff;
  --accent-hover: #8aa4ff;
  --accent-soft: #1a2442;
  --on-accent: #0b0f17;
  --human: #16a085;
  --human-soft: #10302b;
  --human-ink: #5fd3b8;
  --mixed: #c08a12;
  --mixed-soft: #33280f;
  --mixed-ink: #f0c060;
  --ai: #e54b7a;
  --ai-soft: #3a1725;
  --ai-ink: #ff8fb0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .3s, color .3s; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { color: var(--text); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); letter-spacing: -.03em; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(800px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -80px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { top: 8px; }
[dir="rtl"] .skip { left: auto; right: 8px; }
.accent { color: var(--accent); white-space: nowrap; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head.scrolled { border-bottom-color: var(--border); }
.site-head .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand b { color: var(--accent); font-weight: 700; }
.head-right { display: flex; align-items: center; gap: 8px; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 8px; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text-2); cursor: pointer; transition: border-color .15s, color .15s; }
.icon-btn:hover { border-color: var(--border-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-btn { display: none !important; }
@media (max-width: 760px) {
  .menu-btn { display: inline-grid !important; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .97rem var(--font); padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary[disabled] { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-2); color: var(--text); }
.btn.small { padding: 9px 16px; font-size: .93rem; }
.btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; display: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .arrow-ico { display: none; }
.btn svg.arrow-ico { width: 16px; height: 16px; transition: transform .2s; }
.btn:hover svg.arrow-ico { transform: translateX(2px); }
@keyframes rot { to { transform: rotate(360deg); } }

/* hero */
.hero { padding: 30px 0 0; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); max-width: 980px; margin: 0 auto .3em; }
.hero .lede { font-size: 1.06rem; color: var(--text-2); max-width: 720px; margin: 0 auto; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.facts li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-2); font-size: .87rem; font-weight: 500; }
.facts svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* tool */
.tool { margin: 26px 0 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); height: clamp(600px, 76vh, 720px); text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pane + .pane { border-left: 1px solid var(--border); }
.pane-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); min-height: 60px; }
.pane-title { font-weight: 600; font-size: .98rem; color: var(--text); }
.select-wrap { position: relative; }
select#wcLanguage { -webkit-appearance: none; appearance: none; font: 500 .9rem var(--font); padding: 7px 32px 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); cursor: pointer; max-width: 100%; }
select#wcLanguage:hover { border-color: var(--border-2); }
.select-wrap::after { content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select#wcLanguage option { background: var(--card); color: var(--text); }
.pane-body { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: auto; }
.pane-body.scroll-lock, textarea#wcText.scroll-lock { overscroll-behavior: contain; }
textarea#wcText { display: block; width: 100%; height: 100%; resize: none; overscroll-behavior: auto; border: 0; outline: 0; margin: 0; padding: 18px 20px; font: 16px/1.75 var(--font); color: var(--text); background: transparent; }
textarea#wcText::placeholder { color: var(--text-3); }
.marked { display: none; padding: 18px 20px; font-size: 16px; line-height: 1.95; color: var(--text); }
.is-marked textarea#wcText { display: none; }
.is-marked .marked { display: block; }
.marked span { cursor: pointer; border-radius: 4px; padding: 2px 1px; transition: background-color .4s, box-shadow .4s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.marked span.s-high { background: var(--ai-soft); box-shadow: inset 0 -2px 0 var(--ai); }
.marked span.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 40% { outline: 3px solid var(--accent); outline-offset: 2px; } 100% { outline: 3px solid transparent; } }
.marked span.s-medium { background: var(--mixed-soft); box-shadow: inset 0 -2px 0 var(--mixed); }
.marked span.is-picked { outline: 2px solid var(--accent); outline-offset: 1px; }
.marked.pending span { background: transparent !important; box-shadow: none !important; }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: 0; pointer-events: none; }
.is-scanning .scan { opacity: 1; animation: scan 1.1s var(--ease) infinite; }
.is-scanning textarea#wcText { opacity: .6; }
@keyframes scan { from { top: 0; } to { top: calc(100% - 2px); } }
.sent-tip { flex: none; margin: 0; padding: 10px 20px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--text-3); background: var(--card-2); display: none; }
.is-marked .sent-tip { display: block; }
.pane-foot { flex: none; border-top: 1px solid var(--border); padding: 12px 20px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .87rem; color: var(--text-3); width: 100%; }
.chip-btn { font: 500 .85rem var(--font); padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); cursor: pointer; transition: border-color .15s, color .15s; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.foot-actions { display: flex; align-items: center; gap: 8px; width: 100%; }
.count { margin-right: auto; font-size: .9rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.count.is-short { color: var(--mixed-ink); } .count.is-long { color: var(--ai-ink); }
.notice { margin: 0; width: 100%; padding: 9px 12px; border-radius: 8px; background: var(--ai-soft); color: var(--ai-ink); font-size: .9rem; font-weight: 500; }
.notice[hidden] { display: none; }

/* result */
.result { padding: 22px 22px 24px; min-height: 100%; display: flex; flex-direction: column; }
.result-empty { margin: auto; text-align: center; max-width: 320px; color: var(--text-3); }
.empty-ring { width: 120px; height: 120px; margin: 0 auto 16px; display: block; }
.empty-ring circle { fill: none; stroke: var(--border); stroke-width: 10; }
.result-empty h2 { font-size: 1.12rem; margin-bottom: 6px; letter-spacing: -.01em; }
.result-empty p { font-size: .94rem; margin: 0; }
.grade { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring .track { fill: none; stroke: var(--border); stroke-width: 11; }
.ring .arc { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.ring .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .num b { font-size: 2.3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.ring .num b small { font-size: .5em; font-weight: 700; color: var(--text-3); }
/* Score ring with its label underneath. Only the number sits inside the ring, so labels of any length
   (French, Italian, Arabic, Tagalog...) fit, wrapping onto a second balanced line when needed. */
.gauge { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 150px; }
.gauge-cap { font-size: .72rem; font-weight: 700; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); text-align: center; text-wrap: balance; }
.grade-side { flex: 1; min-width: 180px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ai { color: var(--ai-ink); background: var(--ai-soft); }
.pill.mixed { color: var(--mixed-ink); background: var(--mixed-soft); }
.pill.human { color: var(--human-ink); background: var(--human-soft); }
.grade-side .summary { margin: 10px 0 0; color: var(--text-2); font-size: .95rem; line-height: 1.6; }
.scale { margin: 22px 0 4px; }
.scale-wrap { position: relative; }
.scale-track { display: grid; grid-template-columns: 45fr 25fr 30fr; gap: 3px; height: 8px; }
.scale-track i { border-radius: 4px; }
.scale-track i:nth-child(1) { background: var(--human); } .scale-track i:nth-child(2) { background: var(--mixed); } .scale-track i:nth-child(3) { background: var(--ai); }
.scale-pin { position: absolute; top: -5px; left: 0; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--card); border: 3px solid var(--text); transition: left 1.1s var(--ease); }
.scale-labels { position: relative; height: 1.4em; margin-top: 8px; font-size: .76rem; color: var(--text-3); }
.scale-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scale-labels span:first-child { transform: none; } .scale-labels span:last-child { transform: translateX(-100%); }
.ledger { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ledger li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); font-size: .82rem; color: var(--text-3); }
.ledger li b { display: block; font-size: 1rem; color: var(--text); font-weight: 600; margin-top: 1px; }
.res-h { font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin: 20px 0 10px; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reasons li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: .93rem; color: var(--text-2); line-height: 1.55; }
.reasons .arr { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.reasons .up { color: var(--ai-ink); background: var(--ai-soft); } .reasons .down { color: var(--human-ink); background: var(--human-soft); }
.reasons b { color: var(--text); font-weight: 600; }
.reasons .ex { display: block; color: var(--text-3); font-size: .86rem; }
.disclaimer { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); font-size: .86rem; color: var(--text-3); line-height: 1.55; }
.anim-in > * { animation: rise .45s var(--ease) both; }
.anim-in > *:nth-child(2) { animation-delay: .06s; } .anim-in > *:nth-child(3) { animation-delay: .12s; } .anim-in > *:nth-child(4) { animation-delay: .18s; } .anim-in > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--text-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }


/* result v5: cards + charts */
.result { padding: 16px 18px 20px; gap: 12px; }
.r-card { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 16px; }
.r-card.tint { background: var(--card-2); }
.r-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.r-head h3 { margin: 0; font-size: .92rem; font-weight: 600; letter-spacing: 0; }
.r-head small { font-size: .8rem; color: var(--text-3); }
.grade { gap: 18px; }
.ring { width: 120px; height: 120px; }
.ring .num b { font-size: 2.15rem; }
.ring .arc { transition: stroke-dashoffset 1.3s var(--ease); }
.conf { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .84rem; color: var(--text-3); }
.conf .bars { display: inline-flex; gap: 3px; align-items: flex-end; }
.conf .bars i { width: 5px; border-radius: 2px; background: var(--border-2); }
.conf .bars i:nth-child(1) { height: 7px; } .conf .bars i:nth-child(2) { height: 11px; } .conf .bars i:nth-child(3) { height: 15px; }
.conf .bars i.on { background: var(--text); }
.conf b { color: var(--text); font-weight: 600; }
.range-viz { position: relative; height: 26px; margin-top: 4px; }
.range-viz .track { position: absolute; left: 0; right: 0; top: 9px; height: 8px; display: grid; grid-template-columns: 45fr 25fr 30fr; gap: 2px; }
.range-viz .track i { border-radius: 4px; opacity: .28; }
.range-viz .track i:nth-child(1) { background: var(--human); } .range-viz .track i:nth-child(2) { background: var(--mixed); } .range-viz .track i:nth-child(3) { background: var(--ai); }
.range-viz .win { position: absolute; top: 5px; height: 16px; left: 0; width: 0; border-radius: 8px; background: var(--text); opacity: .16; transition: left 1.1s var(--ease), width 1.1s var(--ease); }
.range-viz .pin { position: absolute; top: 3px; left: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--card); border: 4px solid var(--text); box-shadow: 0 0 0 2px var(--card); transition: left 1.1s var(--ease); }
.range-axis { position: relative; height: 1.3em; font-size: .75rem; color: var(--text-3); margin-top: 4px; }
.range-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.range-axis span:first-child { transform: none; } .range-axis span:last-child { transform: translateX(-100%); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis text { fill: var(--text-3); font-size: 10px; font-family: var(--font); }
.chart .col { transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; cursor: pointer; }
.chart .col:hover, .chart .col.hot { opacity: .8; }
.chart .hit { fill: transparent; cursor: pointer; }
@keyframes grow { from { transform: scaleY(0); } }
.tip { position: absolute; z-index: 5; pointer-events: none; max-width: 240px; padding: 8px 10px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: .8rem; line-height: 1.4; box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.show { opacity: 1; transform: none; }
.tip b { display: block; font-size: .86rem; }
.mix { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; background: var(--border); }
.mix i { display: block; height: 100%; width: 0; transition: width 1s var(--ease); }
.mix i.h { background: var(--ai); } .mix i.m { background: var(--mixed); } .mix i.l { background: var(--human); }
.mix-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .84rem; color: var(--text-2); }
.mix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mix-legend i { width: 10px; height: 10px; border-radius: 3px; }
.mix-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.sig { display: grid; gap: 10px; }
.sig-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 4px 10px; align-items: center; font-size: .86rem; color: var(--text-2); }
.sig-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.sig-row .bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width 1s var(--ease); }
.sig-row b { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.tiles4 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles4 li { padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); font-size: .78rem; color: var(--text-3); }
.tiles4 li b { display: block; font-size: .98rem; color: var(--text); font-weight: 600; margin-top: 1px; }
.disclaimer { margin: 0; }
.result.anim-in > * { animation: rise .5s var(--ease) both; }
.result.anim-in > *:nth-child(2) { animation-delay: .08s; } .result.anim-in > *:nth-child(3) { animation-delay: .16s; } .result.anim-in > *:nth-child(4) { animation-delay: .24s; } .result.anim-in > *:nth-child(5) { animation-delay: .32s; } .result.anim-in > *:nth-child(n+6) { animation-delay: .4s; }
.skeleton { display: grid; gap: 12px; padding: 4px 0; }
.skeleton i { display: block; height: 14px; border-radius: 7px; background: var(--border); animation: pulse 1.1s ease-in-out infinite alternate; }
.skeleton i.big { height: 120px; border-radius: 14px; }
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 0; }
.stat { text-align: center; padding: 20px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.stat b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--text); }
.stat span { font-size: .9rem; color: var(--text-3); }

/* sections */
.section { padding: 96px 0 0; }
.section.soft { margin-top: 96px; padding: 80px 0; background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.soft + .section { padding-top: 96px; }
.sec-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.sec-head p { color: var(--text-2); font-size: 1.06rem; margin: 0; }
.eyebrow { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; padding: 26px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--text-2); font-size: .97rem; margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .9rem; margin-bottom: 16px; }
.icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }
.bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.band { padding: 26px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); border-top: 4px solid var(--c, var(--ai)); }
.band.h { --c: var(--human); } .band.m { --c: var(--mixed); } .band.a { --c: var(--ai); }
.band .range-n { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
.band p { color: var(--text-2); margin: 12px 0 0; font-size: .97rem; }
.note { max-width: 760px; margin: 28px auto 0; text-align: center; color: var(--text-2); }

.runs { display: grid; gap: 22px; }
.run { display: grid; grid-template-columns: 1.5fr 1fr; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.run-text { padding: 26px; }
.run-text h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.run-text p { color: var(--text-2); margin: 0; font-size: .97rem; }
.run blockquote { margin: 16px 0 0; padding: 14px 16px; max-height: 190px; overflow: auto; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); color: var(--text-2); font-size: .93rem; line-height: 1.65; }
.run-out { padding: 26px; border-left: 1px solid var(--border); background: var(--card-2); display: flex; flex-direction: column; gap: 12px; }
.run-grade { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.run-grade .score { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.run-out dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: .92rem; }
.run-out dt { color: var(--text-3); } .run-out dd { margin: 0; color: var(--text); font-weight: 500; }
.run-note { margin: 0; font-size: .92rem; color: var(--text-2); line-height: 1.6; }
.run-out .chip-btn { align-self: flex-start; }
.tag { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.tag.ok { background: var(--human-soft); color: var(--human-ink); } .tag.miss { background: var(--ai-soft); color: var(--ai-ink); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sheet { padding: 30px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.sheet h2 { font-size: 1.6rem; }
.sheet p { color: var(--text-2); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; color: var(--text-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--human-soft); }
.checklist li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 5px; height: 9px; border-right: 2px solid var(--human); border-bottom: 2px solid var(--human); transform: rotate(45deg); }
.checklist b { color: var(--text); }
.langs { display: flex; flex-wrap: wrap; gap: 8px; }
.langs span { padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; font-size: .92rem; color: var(--text-2); background: var(--card-2); }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; transition: border-color .2s; }
.faq details[open] { border-color: var(--border-2); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 20px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-2); }

.cta { margin-top: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px 44px; border-radius: 18px; background: var(--accent); color: var(--on-accent); }
.cta h2 { color: var(--on-accent); margin: 0 0 .2em; }
.cta p { margin: 0; opacity: .9; }
.cta .btn { background: var(--on-accent); color: var(--accent); }
.cta .btn:hover { color: var(--accent-hover); }

/* inner pages */
.page-hero { padding: 64px 0 8px; text-align: center; }
.page-hero .lede { color: var(--text-2); font-size: 1.15rem; max-width: 680px; margin: 0 auto; }
.prose { padding: 28px 0 0; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 8px 36px 32px; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin: 1.6em 0 .5em; }
.prose p, .prose li { color: var(--text-2); }
.prose li { margin-bottom: .45em; }
.prose b { color: var(--text); }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); background: var(--card-2); }
td { color: var(--text-2); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.meter-cell { display: flex; align-items: center; gap: 10px; }
.meter-cell i { position: relative; width: 90px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; flex: none; }
.meter-cell i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--human); border-radius: 3px; }
.meter-cell.red i::after { background: var(--ai); }
.updated { color: var(--text-3); font-size: .9rem; margin-top: 18px; }
.contact-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-2); margin: 18px 0 10px; }
.contact-card .icon { margin: 0; }
.contact-card a { font-weight: 600; font-size: 1.05rem; word-break: break-all; }
.center { text-align: center; }

/* footer */
.site-foot { margin-top: 96px; border-top: 1px solid var(--border); padding: 48px 0 36px; color: var(--text-2); font-size: .94rem; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 28px 32px; }
.foot-grid p.foot-made { margin-top: 10px; color: var(--text-2); font-size: .9rem; }
.foot-grid p.foot-mail { margin-top: 6px; }
.foot-grid p.foot-mail a { color: var(--accent); }
.foot-grid p { max-width: 36ch; margin: 12px 0 0; color: var(--text-3); }
.foot-grid h3 { font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--text-2); text-decoration: none; }
.foot-grid a:hover { color: var(--accent); }
.foot-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .86rem; color: var(--text-3); }
.foot-tm { margin: 10px 0 0; font-size: .78rem; line-height: 1.5; color: var(--text-3); max-width: 70ch; }

/* motion */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .06s; } .js .reveal.d2 { transition-delay: .12s; } .js .reveal.d3 { transition-delay: .18s; }
.enter { animation: rise .7s var(--ease) both; }
.enter.e2 { animation-delay: .06s; } .enter.e3 { animation-delay: .12s; } .enter.e4 { animation-delay: .18s; } .enter.e5 { animation-delay: .26s; }

/* responsive */
@media (max-width: 960px) {
  .tool { grid-template-columns: 1fr; height: auto; }
  .result-pane .pane-body { max-height: none; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--border); }
  .pane-body { flex: none; height: 360px; }
  .result-pane .pane-body { height: auto; min-height: 320px; }
  .cards, .bands, .cards.four { grid-template-columns: 1fr 1fr; }
  .run { grid-template-columns: 1fr; }
  .run-out { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; }
  .pane-head, .pane-foot { padding-left: 16px; padding-right: 16px; }
  textarea#wcText, .marked { padding: 16px; }
  .pane-body { height: 300px; }
  .foot-actions { flex-wrap: wrap; }
  .foot-actions .count { width: 100%; }
  .foot-actions .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
  .result { padding: 18px 16px 20px; }
  .ring { width: 112px; height: 112px; }
  .ring .num b { font-size: 2rem; }
  .gauge { max-width: 118px; }
  .gauge-cap { font-size: .66rem; letter-spacing: .04em; }
  .cards, .bands, .two, .cards.four { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .section { padding-top: 72px; }
  .section.soft { margin-top: 72px; padding: 60px 0; }
  .cta { padding: 30px 24px; }
  .panel { padding: 4px 20px 24px; }
  .sheet, .card, .band { padding: 22px; }
  .run-text, .run-out { padding: 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.mix i[data-w="0.0"] { display: none; }

/* at-a-glance box and two-column text */
.facts-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: center; padding: 30px; border: 1px solid var(--border); border-radius: 18px; background: var(--card-2); }
.facts-box h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.facts-box p { color: var(--text-2); margin: 0; }
.fb-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fb-list div { padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.fb-list dt { font-size: .8rem; color: var(--text-3); font-weight: 500; }
.fb-list dd { margin: 2px 0 0; font-weight: 600; color: var(--text); font-size: .97rem; line-height: 1.4; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.split-2 h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.split-2 p { color: var(--text-2); }
@media (max-width: 860px) { .facts-box, .split-2 { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 480px) { .fb-list { grid-template-columns: 1fr; } .facts-box { padding: 22px; } }

/* Language menu (header) and language list (footer) */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu[open] > summary { border-color: var(--border-2); color: var(--text); }
.lang-menu ul { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; margin: 0; padding: 6px; list-style: none; width: 220px; max-height: min(70vh, 520px); overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); display: grid; gap: 1px; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: .94rem; }
.lang-menu a:hover { background: var(--bg-soft); color: var(--text); }
.lang-menu a[aria-current="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.foot-langs { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--border); }
.foot-langs h3 { font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text); margin: 0 0 12px; }
.foot-langs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-langs a { color: var(--text-2); text-decoration: none; }
.foot-langs a:hover { color: var(--accent); }
.foot-langs a[aria-current="true"] { color: var(--text); font-weight: 600; }

/* Scripts Inter doesn't cover: use good system fonts and give tall scripts more line height */
:lang(ja) { --font: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", system-ui, sans-serif; }
:lang(ko) { --font: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; word-break: keep-all; }
:lang(zh-Hant) { --font: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
:lang(th) { --font: "Inter", Thonburi, "Leelawadee UI", Tahoma, "Noto Sans Thai", system-ui, sans-serif; line-height: 1.8; }
:lang(hi) { --font: "Inter", "Kohinoor Devanagari", "Nirmala UI", Mangal, "Noto Sans Devanagari", system-ui, sans-serif; line-height: 1.8; }
:lang(ar) { --font: "Inter", "Geeza Pro", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; }
:lang(ur) { --font: "Inter", "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; line-height: 2; }
:lang(ur) h1, :lang(ur) h2, :lang(ur) h3 { line-height: 1.7; }

/* Right-to-left pages: keep charts and number scales left to right */
[dir="rtl"] .range-viz, [dir="rtl"] .range-axis, [dir="rtl"] .chart, [dir="rtl"] .mix, [dir="rtl"] .ring, [dir="rtl"] .sig-row .bar { direction: ltr; }
[dir="rtl"] .arrow-ico { transform: scaleX(-1); }
[dir="rtl"] .eyebrow, [dir="rtl"] .foot-grid h3, [dir="rtl"] .foot-langs h3 { letter-spacing: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Per-language test runs table */
.runs { width: 100%; border-collapse: collapse; font-size: .95rem; }
.runs th, .runs td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.runs th { font-size: .82rem; color: var(--text-3); font-weight: 600; }
.runs td b { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
[dir="rtl"] .tool, [dir="rtl"] th, [dir="rtl"] td { text-align: right; }
[dir="rtl"] .select-wrap::after { right: auto; left: 13px; }
[dir="rtl"] select#wcLanguage { padding: 7px 12px 7px 32px; }
[dir="rtl"] .count { margin-right: 0; margin-left: auto; }
[dir="rtl"] .legend i { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .sig-row b { text-align: left; }
[dir="rtl"] .checklist li { padding-left: 0; padding-right: 32px; }
[dir="rtl"] .checklist li::before { left: auto; right: 0; }
[dir="rtl"] .checklist li::after { left: auto; right: 7px; }
[dir="rtl"] .faq summary::after { right: auto; left: 22px; }
[dir="rtl"] .faq summary { padding: 18px 20px 18px 54px; }
[dir="rtl"] .btn:hover svg.arrow-ico { transform: scaleX(-1) translateX(2px); }

/* Paste and upload (input pane) */
.head-tools { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; font: 500 .88rem var(--font); color: var(--text-2); background: var(--card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s, background-color .15s; }
.tool-btn svg { width: 16px; height: 16px; flex: none; }
.tool-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tool-btn:disabled { opacity: .45; cursor: not-allowed; }
.tool-btn:focus-visible, .ie-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.input-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 96px 20px 24px; pointer-events: none; transition: opacity .2s; }
.has-text .input-empty, .is-marked .input-empty, .is-busy .input-empty { opacity: 0; visibility: hidden; }
.ie-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ie-btn { pointer-events: auto; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: start; min-width: 200px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .15s, box-shadow .2s, transform .15s, background-color .15s; }
.ie-btn svg { grid-row: 1 / 3; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.ie-btn b { font-size: .97rem; font-weight: 600; line-height: 1.3; }
.ie-btn small { font-size: .82rem; color: var(--text-3); line-height: 1.3; }
.ie-btn:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 6px 18px rgba(37, 82, 232, .12); transform: translateY(-1px); }
.ie-btn:disabled { cursor: not-allowed; opacity: .5; }
.ie-btn:disabled svg { background: var(--bg-soft); color: var(--text-3); }
.ie-drop { margin: 0; font-size: .85rem; color: var(--text-3); }

.drop-veil { position: absolute; inset: 10px; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 2px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 88%, transparent); color: var(--accent); font-weight: 600; opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.drop-veil svg { width: 40px; height: 40px; }
.is-dragover .drop-veil { opacity: 1; visibility: visible; }
.is-busy textarea#wcText { opacity: .5; }

.status { margin: 0; width: 100%; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--text); font-size: .88rem; display: flex; align-items: center; gap: 8px; }
.status[hidden] { display: none; }
.status.is-loading::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: rot .8s linear infinite; }

@media (max-width: 640px) {
  .tool-btn { padding: 0 9px; }
  .tool-btn span { display: none; }
  .pane-head .pane-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .pane-head { gap: 8px; }
  select#wcLanguage { max-width: 150px; text-overflow: ellipsis; }
  .input-empty { padding-top: 72px; gap: 10px; }
  .ie-actions { flex-wrap: nowrap; width: 100%; max-width: 340px; gap: 10px; }
  .ie-btn { flex: 1 1 0; min-width: 0; padding: 11px 12px; column-gap: 9px; grid-template-rows: auto; }
  .ie-btn b { font-size: .92rem; }
  .ie-btn small { display: none; }
  .ie-btn svg { width: 30px; height: 30px; padding: 6px; grid-row: auto; }
  .ie-drop { display: none; }
}
@media (max-width: 380px) { .pane-head .pane-title { font-size: .92rem; } }
@media (min-width: 961px) { [dir="rtl"] .pane + .pane { border-left: 0; border-right: 1px solid var(--border); } }

.btn[hidden], .tool-btn[hidden] { display: none; }

/* ---------- App-style tabs for phones, tablets and portrait screens ---------- */
.tool-tabs { display: none; }
@media (max-width: 960px), (orientation: portrait) {
  .tool { display: flex; flex-direction: column; grid-template-columns: none; height: calc(100vh - 84px); height: calc(100svh - 84px); min-height: 460px; max-height: 980px; scroll-margin-top: 72px; }
  .tool-tabs { position: relative; flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 10px 10px 0; padding: 4px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
  .tt-btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: 600 .95rem var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .2s; }
  .tt-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tt-btn svg { width: 18px; height: 18px; flex: none; }
  .tt-btn.is-on { color: var(--accent); }
  .tt-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .tt-ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); border-radius: 9px; background: var(--card); box-shadow: var(--shadow-sm); transition: transform .28s var(--ease); }
  .tool.tab-result .tt-ind { transform: translateX(calc(100% + 4px)); }
  [dir="rtl"] .tt-ind { left: auto; right: 4px; }
  [dir="rtl"] .tool.tab-result .tt-ind { transform: translateX(calc(-100% - 4px)); }
  .tt-badge { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 22px; padding: 0 7px; border-radius: 999px; font: 700 .78rem var(--font); font-style: normal; color: #fff; background: var(--human); }
  .tt-badge[hidden] { display: none; }
  .tt-badge.ai { background: var(--ai); }
  .tt-badge.mixed { background: var(--mixed); }
  .tt-badge.busy { min-width: 22px; width: 22px; padding: 0; background: transparent; border: 2px solid var(--accent); border-right-color: transparent; animation: rot .8s linear infinite; }
  .tt-badge.pop { animation: pop .45s var(--ease); }
  @keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

  .tool > .pane { flex: 1; min-height: 0; }
  .tool > .pane + .pane { border: 0; }
  .tool:not(.tab-result) > .result-pane, .tool.tab-result > #wcInputPane { display: none; }
  .tool > .pane.tab-in { animation: tabInR .28s var(--ease); }
  .tool.tab-result > .pane.tab-in { animation-name: tabInL; }
  @keyframes tabInR { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
  @keyframes tabInL { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
  .tool .pane-body, .tool .result-pane .pane-body { flex: 1; height: auto; min-height: 0; max-height: none; }
  #wcInputPane .pane-head { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  #wcInputPane .pane-head .pane-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #wcInputPane .head-tools { flex: 1; }
  #wcInputPane .head-tools .select-wrap { margin-inline-start: auto; }
  .result-pane .pane-head { min-height: 0; padding-top: 10px; padding-bottom: 10px; justify-content: center; }
  .result-pane .pane-head .pane-title { display: none; }
  .tool .pane-foot { flex: none; }
}
@media (max-width: 960px) and (min-width: 420px), (orientation: portrait) and (min-width: 420px) {
  #wcInputPane .tool-btn span { display: inline; }
  #wcInputPane .tool-btn { padding: 0 11px; }
}
@media (max-height: 520px) and (orientation: landscape) and (max-width: 960px) {
  .site-head { position: relative; }
  .tool { min-height: 300px; height: calc(100vh - 16px); height: calc(100svh - 16px); scroll-margin-top: 8px; }
  .tool-tabs { margin: 6px 6px 0; }
  .tt-btn { min-height: 36px; padding: 4px 10px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 18px; }
  .hero h1 { font-size: 1.62rem; line-height: 1.2; }
  .hero .lede { font-size: .97rem; line-height: 1.55; }
  .facts { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 12px -20px 0; padding: 0 20px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .facts::-webkit-scrollbar { display: none; }
  .facts li { flex: none; font-size: .82rem; padding: 4px 10px; }
  .tool { margin-top: 16px; border-radius: 16px; }
  .tool .pane-foot { padding-top: 10px; padding-bottom: 12px; }
  .tool .samples { font-size: .86rem; }
  .tool .foot-actions .count { font-size: .82rem; }
}
@media (max-width: 380px) { .tt-btn svg { display: none; } .tt-btn { gap: 6px; padding: 8px 6px; } }
@media (prefers-reduced-motion: reduce) { .tt-ind { transition: none; } }
@media (pointer: coarse) {
  .chip-btn { min-height: 34px; padding: 6px 13px; }
  .foot-grid ul { gap: 2px; }
  .foot-grid a { display: inline-block; padding: 7px 0; }
  .foot-langs a { display: inline-block; padding: 6px 2px; }
}
@media (max-width: 480px) { :lang(ar) .range-axis span:nth-child(3) { display: none; } }

/* ---------- Mobile: action bar always in reach ---------- */
@media (max-width: 960px), (orientation: portrait) {
  .tool { overflow: hidden; overflow: clip; }
  #wcInputPane .pane-foot { position: sticky; bottom: 0; z-index: 5; background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -10px 22px -14px rgba(15, 23, 42, .35); padding-bottom: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  #wcInputPane .foot-actions { flex-wrap: wrap; }
  #wcInputPane .foot-actions .count { width: 100%; }
  #wcInputPane .foot-actions .btn { min-height: 48px; font-size: 1rem; padding-left: 12px; padding-right: 12px; }
  #wcInputPane .foot-actions #wcClear, #wcInputPane .foot-actions #wcEdit { flex: 1 1 0; }
  #wcInputPane .foot-actions #wcRun { flex: 1.7 1 0; box-shadow: 0 8px 18px -8px rgba(37, 82, 232, .7); }
  #wcInputPane .foot-actions #wcRun[disabled] { box-shadow: none; }
}
.btn.nudge { animation: nudge 1.4s var(--ease) 2; }
@keyframes nudge { 0% { box-shadow: 0 0 0 0 rgba(37, 82, 232, .55); } 70% { box-shadow: 0 0 0 12px rgba(37, 82, 232, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 82, 232, 0); } }
@media (hover: none) and (pointer: coarse) {
  textarea#wcText, .pane-body, textarea#wcText.scroll-lock, .pane-body.scroll-lock { overscroll-behavior: auto; }
}
@media (prefers-reduced-motion: reduce) { .btn.nudge { animation: none; } }
@media (max-width: 960px), (orientation: portrait) {
  #wcInputPane .samples { gap: 6px; }
  #wcInputPane .samples .chip-btn { flex: none; min-height: 32px; padding: 4px 11px; font-size: .84rem; }
  #wcInputPane .pane-foot { gap: 8px; padding-top: 10px; }
}
@media (max-width: 380px) { #wcInputPane .samples { font-size: .8rem; gap: 5px; } #wcInputPane .samples .chip-btn { padding: 4px 9px; font-size: .8rem; } }
/* Phones: detector card runs edge to edge */
@media (max-width: 640px) {
  .tool { margin-left: -20px; margin-right: -20px; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .tool-tabs { margin: 8px 8px 0; }
}

/* Blog guides on the detector page and How it works (filled by the CMS). */
.tool-guides-slot:empty { display: none; }
.tool-guides { margin-top: 8px; }
.tool-guides h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 0; }
.tool-guides > p { color: var(--text-2); margin: 8px 0 18px; }
.tool-guides ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-guides a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.tool-guides a:hover { border-color: var(--border-2); transform: translateY(-2px); }
.tool-guides img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--card-2); }
.tool-guides span { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.tool-guides strong { font-size: 1rem; line-height: 1.35; }
.tool-guides small { color: var(--text-2); font-size: .88rem; line-height: 1.5; }

.tool-guides-wrap:has(.tool-guides-slot:empty) { display: none; }
.page-guides:has(.tool-guides-slot:empty) { display: none; }
.page-guides { margin-top: 40px; }
/* Cookie consent banner */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 16px 20px; padding: 16px 18px; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .35); font-size: .92rem; line-height: 1.5; }
.consent[hidden] { display: none; }
.consent p { margin: 0; color: var(--text-2); }
.consent a { color: var(--accent); }
.consent-actions { display: flex; gap: 8px; flex: none; }
.consent .btn { padding: 9px 16px; font-size: .92rem; }
.consent .btn:not(.btn-primary) { background: var(--card); border-color: var(--border); color: var(--text); }
.consent .btn:not(.btn-primary):hover { border-color: var(--border-2); }
.foot-link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); cursor: pointer; text-align: start; }
.foot-link-btn:hover { color: var(--accent); }
@media (max-width: 640px) {
  .consent { left: 8px; right: 8px; bottom: 8px; flex-direction: column; align-items: stretch; padding: 14px; font-size: .88rem; }
  .consent-actions .btn { flex: 1; }
  .foot-link-btn { padding: 7px 0; }
}
