/* ============================================================
   Humanizer Bench — theme tokens
   Accent is kept off the green/red axis on purpose, so it never
   fights the gauge's own red=AI / green=human meaning.
   ============================================================ */

:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --success: #3ED598;
  --danger: #F2555A;
  --mixed: #F2A94C;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 760px;
  --max-width-wide: 980px;
}

html[data-theme='dark'] {
  --bg: #0E0F12;
  --surface: #17181D;
  --surface-raised: #1D1F26;
  --text: #F2F1ED;
  --text-muted: #8B8D95;
  --accent: #E8B34C;
  --accent-text: #17181D;
  --border: #24262C;
}

html[data-theme='light'] {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-raised: #F3F1EA;
  --text: #17181D;
  --text-muted: #6B6D75;
  --accent: #B8790C;
  --accent-text: #FFFFFF;
  --border: #E7E5DF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme='dark'] body { background-color: var(--bg); opacity: 1; }
html[data-theme='light'] body { background-color: var(--bg); }

a { color: inherit; }

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

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header ---------------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav {
  display: flex;
  gap: 18px;
}
.site-nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); font-weight: 600; }

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:focus-visible,
button:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle svg { width: 18px; height: 18px; }
html[data-theme='dark'] .icon-sun { display: block; }
html[data-theme='dark'] .icon-moon { display: none; }
html[data-theme='light'] .icon-sun { display: none; }
html[data-theme='light'] .icon-moon { display: block; }

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

.hero {
  padding: 68px 0 44px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 14px;
}

.hero .subhead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 54ch;
  margin: 0 0 30px;
}

.paste-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.paste-box textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.6;
}
.paste-box textarea::placeholder { color: var(--text-muted); }
.paste-box textarea:focus { outline: none; }

.paste-box-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 4px;
}

.word-counter {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: default;
}
.word-counter.over-limit { color: var(--danger); }

.utility-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.btn:hover { border-color: var(--text-muted); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  margin-left: auto;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  font-weight: 600;
  padding: 11px 22px;
  font-size: 0.92rem;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Row that pairs the primary action button with a status message */
.paste-box-actionrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.paste-box-actionrow .status { margin: 0; }

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- Result panel ---------------- */

.result-panel {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  display: none;
}
.result-panel.visible { display: block; }

.result-grid {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.gauge-wrap { flex-shrink: 0; text-align: center; }
.gauge-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 200px;
  margin: 8px auto 0;
}

.stat-rows { flex: 1; min-width: 200px; }
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-row .stat-label { color: var(--text-muted); }
.stat-row .stat-value { font-family: var(--font-mono); }

.rewritten-box {
  margin-top: 20px;
  position: relative;
}
.rewritten-text {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  padding-right: 90px;
  font-size: 0.95rem;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* ---------------- Why-humanize section ---------------- */

.why-section {
  padding: 56px 0 12px;
  border-top: 1px solid var(--border);
}
.why-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.why-lede {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 58ch;
  margin: 0 0 32px;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.why-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
}
.why-item h3 { font-size: 1.02rem; margin: 0 0 8px; font-family: var(--font-display); }
.why-item p { color: var(--text-muted); font-size: 0.9rem; margin: 0; line-height: 1.55; }
@media (max-width: 640px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ---------------- How-to / who-for / uses / caveat ---------------- */

.info-section {
  padding: 52px 0 8px;
  border-top: 1px solid var(--border);
}
.info-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.info-lede {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 58ch;
  margin: 0 0 30px;
}

/* Numbered step list */
.step-list {
  display: grid;
  gap: 14px;
}
.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 3px 0 5px;
}
.step-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.55;
}

/* Who it's for */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.audience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px;
}
.audience-card h3 {
  font-family: var(--font-display);
  font-size: 0.96rem;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.audience-card h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.audience-card p {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .audience-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .audience-grid { grid-template-columns: 1fr; }
}

/* Uses checklist */
.uses-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.uses-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 4px 0;
}
.uses-list li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--success);
}
@media (max-width: 640px) {
  .uses-list { grid-template-columns: 1fr; }
}

/* University ownership / integrity caveat */
.caveat-box {
  margin-top: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}
.caveat-box p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.caveat-box p:last-child { margin-bottom: 0; }
.caveat-box strong { color: var(--text); font-weight: 600; }
.caveat-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 600;
}

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

.site-footer {
  padding: 32px 0 52px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.site-footer p { margin: 0 0 4px; }

@media (max-width: 640px) {
  .result-grid { flex-direction: column; align-items: stretch; }
}

/* ---------------- Loading modal ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  width: 320px;
  text-align: center;
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-label {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0 0 6px;
}
.modal-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.detector-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.detector-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.25s ease, filter 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.detector-logo {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.detector-chip.active {
  opacity: 1;
  filter: grayscale(0);
  border-color: var(--accent);
  color: var(--text);
}
.detector-chip.done {
  opacity: 1;
  filter: grayscale(0);
  border-color: var(--success);
  color: var(--success);
}
.detector-chip.done::after { content: ' ✓'; }

.modal-simulated-tag {
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modal-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--border); }
  .detector-chip { transition: none; }
}

/* ---------------- Detect page ---------------- */

.hero-narrow { padding-bottom: 24px; }

.hidden { display: none !important; }

.status {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2em;
  margin: 10px 0 0;
}

.result-grid-solo { justify-content: center; }

.detect-panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
}
.detect-panel.hidden { display: none; }

/* Mode toggle pills (Check for AI / Humanize) */
.mode-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.pill {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pill:hover { border-color: var(--text-muted); }
.pill-active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}

/* Verdict gauge + legend */
.verdict-grid {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.gauge-wrap { position: relative; flex-shrink: 0; text-align: center; }
.gauge-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.15;
}
.gauge-center span {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.gauge-center small {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#detect-gauge-arc { transition: stroke 0.3s ease; }

.verdict-legend { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.legend-row:last-child { border-bottom: none; }
.legend-value { margin-left: auto; font-family: var(--font-mono); font-weight: 600; }
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-ai { background: var(--danger); }
.dot-mixed { background: var(--mixed); }
.dot-human { background: var(--success); }

/* Verdict box */
.verdict-box { padding: 24px 0; border-bottom: 1px solid var(--border); }
.verdict-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.verdict-heading-row .icon-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.verdict-heading-row .icon-badge svg { width: 12px; height: 12px; }
.verdict-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.also-checked-heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.verdict-list {
  margin: 0;
  padding-left: 4px;
  list-style: none;
  border-left: 1px solid var(--border);
}
.verdict-list li {
  position: relative;
  padding: 7px 0 7px 22px;
  font-size: 0.92rem;
  color: var(--text);
}
.verdict-list li::before {
  content: '';
  position: absolute;
  left: -4.5px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid var(--surface);
}

/* Also-checked + model breakdown */
.also-checked,
.model-breakdown {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.model-breakdown { border-bottom: none; padding-bottom: 4px; }

.also-checked-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.also-checked-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
}
.also-checked-chevron {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.15s ease;
}
.also-checked-chevron:hover { border-color: var(--text-muted); }
.also-checked-chevron svg { width: 13px; height: 13px; }
.also-checked-chevron.open { transform: rotate(180deg); }

.detector-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 24px;
  margin-top: 14px;
}
.detector-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  padding: 6px 0;
}
.detector-list-item.detector-extra { display: none; }
.detector-list.expanded .detector-list-item.detector-extra { display: flex; }
.detector-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.modal-simulated-tag-small {
  margin-top: 14px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin-top: 14px;
}
.model-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  padding: 12px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.model-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.model-name { color: var(--text); flex: 1; }
.model-value { font-family: var(--font-mono); font-weight: 600; margin-left: auto; }

.info-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  cursor: default;
  margin-left: 6px;
}

.export-btn {
  margin-top: 22px;
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-weight: 600;
}

/* Brand-ish colors for illustrative model/detector icons (decorative only) */
.model-icon.icon-chatgpt, .detector-icon.icon-turnitin { background: #10A37F; }
.model-icon.icon-claude, .detector-icon.icon-originality { background: #CC785C; }
.model-icon.icon-gemini, .detector-icon.icon-copyleaks { background: #4285F4; }
.model-icon.icon-grok, .detector-icon.icon-winston { background: #6B6D75; }
.model-icon.icon-deepseek, .detector-icon.icon-zerogpt { background: #4D6BFE; }
.detector-icon.icon-gptzero { background: #7C5CFC; }

.detect-footnote {
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .detect-panel { padding: 22px 18px; }
  .verdict-grid { flex-direction: column; align-items: center; text-align: center; }
  .verdict-legend { width: 100%; }
  .detector-list { grid-template-columns: 1fr; }
  .model-grid { grid-template-columns: 1fr; }
  .verdict-list { border-left: none; padding-left: 0; }
  .verdict-list li { padding-left: 20px; }
}

@media print {
  .site-header, .site-footer, .mode-pills, .paste-box, .status, .export-btn,
  .also-checked-chevron { display: none !important; }
  .detector-list { display: grid !important; }
  .detector-list-item.detector-extra { display: flex !important; }
}

/* ---------------- Result reveal animations ---------------- */

.fade-section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.verdict-list li.bullet-item {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.verdict-list li.bullet-item.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-section,
  .verdict-list li.bullet-item {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  #detect-gauge-arc { transition: stroke 0.3s ease !important; }
}

/* ---------------- Admin dashboard ---------------- */

.admin-hero { padding: 48px 0 28px; }
.admin-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.admin-hero .subhead {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin: 0;
}

.admin-section-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.stat-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

.tier-wins-row { margin-bottom: 36px; }
.tier-wins-bars { display: grid; gap: 10px; }
.tier-win-item {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}
.tier-win-name { font-family: var(--font-mono); color: var(--text-muted); }
.tier-win-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  overflow: hidden;
}
.tier-win-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.tier-win-count { font-family: var(--font-mono); text-align: right; }

.admin-table-section { margin-bottom: 28px; }
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  white-space: nowrap;
}
.admin-table th, .admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.admin-table thead th {
  background: var(--surface-raised);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-raised); }
.admin-table .mono { font-family: var(--font-mono); }

.badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: uppercase;
}
.badge-humanize { color: var(--accent); border-color: var(--accent); }
.badge-detect { color: var(--text-muted); }

.capped-flag { color: var(--mixed); cursor: help; }
.admin-subtle { color: var(--text-muted); font-size: 0.78rem; }

.admin-detail-toggle summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}
.admin-detail-json {
  max-width: 480px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.74rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 24px 0;
}

.admin-api-note {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 16px 0 40px;
}
.admin-api-note code {
  font-family: var(--font-mono);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---------------- Paraphrase: style picker ---------------- */
.style-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.style-chip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.style-chip:hover { border-color: var(--text-muted); }
.style-chip[aria-checked="true"] {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}
.style-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.style-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: -6px 0 16px;
  min-height: 1.2em;
}
.paraphrase-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.paraphrase-stats .stat-row {
  border-bottom: none;
  padding: 0;
  gap: 8px;
  justify-content: flex-start;
}
