/* ============================================================
   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: 'Unbounded', 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Figtree', -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: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --max-width: 1120px;
  --max-width-wide: 1180px;
  --tool-width: 880px;
  --navy: #121A45;
  --navy-raised: #1C2560;
  --navy-text: #C9C3EE;
}

html[data-theme='dark'] {
  --bg: #0D1436;
  --surface: #151E4F;
  --surface-raised: #1C2560;
  --text: #F4F3FF;
  --text-muted: #B9B4E0;
  --accent: #8B66FF;
  --accent-text: #FFFFFF;
  --accent-ink: #B9A5FF;
  --border: #2A3470;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html[data-theme='light'] {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-raised: #F6F4FF;
  --text: #141B3C;
  --text-muted: #5B6178;
  --accent: #6D3DF5;
  --accent-text: #FFFFFF;
  --accent-ink: #5428D6;
  --border: #E6E2F5;
  --shadow: 0 24px 60px rgba(40, 24, 110, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  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;
}
.modal-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-top: 14px;
}
.modal-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease-out;
}

.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;
}

/* ============================================================
   New look (Nov 2026): wide display headings, purple pill
   buttons, navy bands and a navy footer.
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header-inner { max-width: 1240px; padding: 14px 24px; gap: 20px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; letter-spacing: -0.01em; }
.wordmark svg { width: 36px; height: 36px; flex: none; }
.beta-pill {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
}
.site-nav { gap: 26px; flex-wrap: wrap; align-items: center; }
.site-nav a { font-size: 0.95rem; font-weight: 500; color: var(--text); }
.site-nav a.active { color: var(--accent-ink); font-weight: 700; }
.header-cta {
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
}
.header-cta:hover { filter: brightness(1.08); }

.hero { padding: 72px 0 56px; }
.hero-copy { max-width: 760px; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.3rem, 5.2vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--accent); }
.hero .tagline { font-size: 1.3rem; font-weight: 500; margin: 0 0 10px; }
.hero .subhead { font-size: 1.08rem; line-height: 1.75; max-width: 62ch; }

.mode-pills { gap: 10px; }
.pill { border-radius: 999px; padding: 10px 20px; font-weight: 600; }
.pill-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.paste-box,
.result-panel,
.detect-panel {
  max-width: var(--tool-width);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.paste-box { padding: 26px 28px; }
.btn { border-radius: 999px; padding: 10px 18px; font-weight: 600; }
.btn-primary { padding: 13px 28px; font-size: 1rem; font-weight: 700; }
.result-panel { padding: 30px 32px; }
.rewritten-text { border-radius: var(--radius-md); }

.why-section,
.info-section {
  border-top: none;
  padding: 88px 0 24px;
}
.why-section h2,
.info-section h2 {
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  letter-spacing: -0.03em;
  text-align: center;
}
.why-lede,
.info-lede { text-align: center; margin-left: auto; margin-right: auto; max-width: 62ch; font-size: 1.05rem; }
.why-grid { gap: 36px; margin-top: 44px; }
.why-item { background: none; border: none; padding: 0; }
.why-item h3 { font-size: 1.15rem; font-weight: 600; margin-top: 14px; }
.why-item p { font-size: 1rem; line-height: 1.75; }
.why-icon { width: 30px; height: 30px; color: var(--accent); }

/* Full-width navy band, e.g. "How to use" */
.band {
  background: var(--navy);
  color: #fff;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 88px;
  padding: 96px max(24px, calc(50vw - 560px));
}
.band h2, .band h3 { color: #fff; }
.band .info-lede, .band p { color: var(--navy-text); }
.band .step-list { max-width: 760px; margin: 48px auto 0; }
.band .step-item { border: none; background: none; padding: 0 0 26px; }
.band .step-number { background: var(--accent); color: #fff; border: none; width: 38px; height: 38px; font-family: var(--font-body); font-weight: 700; }
.band .step-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.band .step-body p { font-size: 1rem; line-height: 1.7; }
.indicator-note {
  max-width: 760px;
  margin: 12px auto 0;
  background: var(--navy-raised);
  border-radius: 16px;
  padding: 20px 22px;
}
.indicator-note strong { color: #fff; }

.audience-grid { gap: 20px; margin-top: 44px; }
.audience-card {
  background: var(--surface-raised);
  border: none;
  border-radius: 20px;
  padding: 26px;
}
.audience-card h3 { font-weight: 600; font-size: 1.05rem; }
.audience-card h3::before { display: none; }
.audience-card p { line-height: 1.7; }

/* Navy footer */
.site-footer {
  max-width: none;
  margin-top: 96px;
  padding: 0;
  border-top: none;
  background: var(--navy);
  color: var(--navy-text);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
  font-size: 0.92rem;
  line-height: 1.7;
}
.footer-title { font-family: var(--font-display); font-weight: 600; color: #fff; margin: 0 0 12px; }
.footer-inner a { color: var(--navy-text); text-decoration: none; display: block; }
.footer-inner a:hover { color: #fff; }
.footer-legal {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 32px;
  border-top: 1px solid #2A3470;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .site-nav { gap: 16px; }
  .hero { padding-top: 48px; }
  .band { padding-top: 64px; padding-bottom: 64px; }
}

/* "Sounds like you?" feedback under a Humanize result */
.feedback-row {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.feedback-row[hidden] { display: none; }
.feedback-question { margin: 0; font-weight: 700; }
.feedback-buttons { display: flex; gap: 8px; }
.feedback-btn[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.feedback-btn:disabled { cursor: default; }
.feedback-btn:disabled:not([aria-pressed='true']) { opacity: 0.5; }
.feedback-share { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; cursor: pointer; }
.feedback-share input { width: 18px; height: 18px; accent-color: var(--accent); }
.feedback-note { flex-basis: 100%; margin: 0; font-size: 0.82rem; color: var(--text-muted); }
