/* ============================================================
   Anagrams Generator — professional, mobile-first stylesheet
   ============================================================ */

:root {
  /* Emerald Grove — sage paper light theme with emerald/teal accent */
  --bg: #f4f7f1;
  --bg-soft: #fbfdf9;
  --surface: #fbfdf9;
  --surface-2: #e7eee1;
  --text: #14241a;
  --muted: #5a6b5f;
  --border: #dde6d6;
  --primary: #059669;
  --primary-2: #10b981;
  --primary-dark: #047857;
  --primary-soft: #e1f4ea;
  --accent: #0d9488;
  --focus: #047857;
  --grad: linear-gradient(120deg, #34d399 0%, #10b981 50%, #0d9488 100%);
  --grad-soft: linear-gradient(120deg, #e3f6ec 0%, #def3ef 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(60, 45, 20, 0.06);
  --shadow: 0 6px 24px rgba(60, 45, 20, 0.10);
  --shadow-lg: 0 20px 50px rgba(60, 45, 20, 0.16);
  --maxw: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* Warm dark theme — applied via system preference (unless user forced light) or explicit toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1512;
    --bg-soft: #121b16;
    --surface: #15201a;
    --surface-2: #1d2a22;
    --text: #eaf3ec;
    --muted: #9db3a4;
    --border: #283a30;
    --primary: #34d399;
    --primary-2: #6ee7b7;
    --primary-dark: #10b981;
    --primary-soft: #16301f;
    --accent: #2dd4bf;
    --grad: linear-gradient(120deg, #34d399 0%, #10b981 50%, #0d9488 100%);
    --grad-soft: linear-gradient(120deg, #16271f 0%, #142a24 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0d1512;
  --bg-soft: #121b16;
  --surface: #15201a;
  --surface-2: #1d2a22;
  --text: #eaf3ec;
  --muted: #9db3a4;
  --border: #283a30;
  --primary: #34d399;
  --primary-2: #6ee7b7;
  --primary-dark: #10b981;
  --primary-soft: #16301f;
  --accent: #2dd4bf;
  --grad: linear-gradient(120deg, #34d399 0%, #10b981 50%, #0d9488 100%);
  --grad-soft: linear-gradient(120deg, #16271f 0%, #142a24 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 0.8rem; font-weight: 750; font-weight: 700; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; font-weight: 700; }

a { color: var(--primary-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.1rem; }
.container.narrow { max-width: 740px; }
.center { text-align: center; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff;
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ----------------------------- Brand / wordmark ----------------------------- */
.brand { display: inline-flex; flex-direction: column; line-height: 1.05; text-decoration: none; gap: 2px; }
.brand-word {
  font-weight: 800; font-size: 1.62rem; letter-spacing: -0.02em; color: var(--text);
}
.brand-word .bw-a { color: var(--primary); font-style: italic; }
.brand-word .bw-dot { color: var(--primary); }
.brand-sub {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--primary);
}
.brand-word .bl { display: inline-block; will-change: transform; }

/* Playful letter shuffle on hover / click */
@keyframes blwave {
  0%   { transform: translateY(0) rotate(0); }
  25%  { transform: translateY(-8px) rotate(-13deg); }
  50%  { transform: translateY(4px) rotate(10deg); }
  75%  { transform: translateY(-3px) rotate(-5deg); }
  100% { transform: translateY(0) rotate(0); }
}
.brand-word.shaking .bl { animation: blwave 0.6s ease; }
.brand-word.shaking .bl:nth-child(1) { animation-delay: 0s; }
.brand-word.shaking .bl:nth-child(2) { animation-delay: 0.04s; }
.brand-word.shaking .bl:nth-child(3) { animation-delay: 0.08s; }
.brand-word.shaking .bl:nth-child(4) { animation-delay: 0.12s; }
.brand-word.shaking .bl:nth-child(5) { animation-delay: 0.16s; }
.brand-word.shaking .bl:nth-child(6) { animation-delay: 0.20s; }
.brand-word.shaking .bl:nth-child(7) { animation-delay: 0.24s; }
.brand-word.shaking .bl:nth-child(8) { animation-delay: 0.28s; }
.brand-word.shaking .bl:nth-child(9) { animation-delay: 0.32s; }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-soft) 86%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); display: block; border-radius: 2px; }

.nav-menu {
  list-style: none; margin: 0; padding: 0; display: none; position: absolute; right: 1rem; top: 64px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 190px; flex-direction: column; overflow: hidden;
}
.nav-menu.open { display: flex; }
.nav-menu li { border-bottom: 1px solid var(--border); }
.nav-menu li:last-child { border-bottom: 0; }
.nav-menu a { display: block; padding: 0.8rem 1.1rem; text-decoration: none; color: var(--text); font-weight: 600; }
.nav-menu a[aria-current="page"] { color: var(--primary); }

@media (min-width: 740px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex; position: static; flex-direction: row; border: 0; box-shadow: none;
    background: none; min-width: 0; gap: 0.25rem; overflow: visible;
  }
  .nav-menu li { border: 0; }
  .nav-menu a { padding: 0.5rem 0.9rem; border-radius: 999px; }
  .nav-menu a:hover { background: var(--surface-2); }
  .nav-menu a[aria-current="page"] { background: var(--primary-soft); }
}

/* ----------------------------- Theme switch ----------------------------- */
.header-actions { display: flex; align-items: center; gap: 0.65rem; }
.theme-switch {
  position: relative; width: 62px; height: 32px; flex: none; padding: 0;
  border-radius: 999px; border: 1.5px solid var(--primary);
  background: var(--primary-soft); cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.theme-switch:hover { filter: brightness(1.03); }
.ts-icon { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; line-height: 1; z-index: 1; }
.ts-sun { left: 9px; color: #f59e0b; }
.ts-moon { right: 9px; color: var(--primary); }
.ts-knob {
  position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 23px; height: 23px; border-radius: 50%; background: var(--grad);
  border: none; box-shadow: 0 2px 6px rgba(16, 185, 129, 0.55); z-index: 2;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-theme="dark"] .ts-knob { transform: translate(30px, -50%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ts-knob { transform: translate(30px, -50%); }
}

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative; text-align: center; padding: 3rem 0 1.75rem; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 480px; z-index: -1;
  background:
    radial-gradient(60% 60% at 30% 20%, rgba(139, 92, 246, 0.18), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, rgba(217, 70, 239, 0.14), transparent 70%);
}
.hero .lede {
  font-size: 1.18rem; color: var(--muted); max-width: 640px; margin: 0.5rem auto 0;
}
.hero h1 { margin-top: 0.5rem; }

/* ----------------------------- Tool ----------------------------- */
.tool { margin: 0.5rem 0 1.5rem; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); position: relative;
}
@media (min-width: 560px) { .tool-card { padding: 1.75rem; } }

.field label, .opt label, .input-lang label {
  display: block; font-weight: 650; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text);
}
.field-help { font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0 0; }

.input-row { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
.input-row .field-help { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .input-row { grid-template-columns: 1fr auto; align-items: end; }
  .input-lang select { min-width: 200px; }
}

input[type="text"], select {
  font: inherit; color: var(--text); background: var(--bg-soft);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem; width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"] { font-size: 1.2rem; font-weight: 600; }
input[type="text"]:focus, select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.modes { border: 0; padding: 0; margin: 1.1rem 0 0.5rem; }
.modes legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 0.45rem; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 5px; gap: 4px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block; padding: 0.5rem 1.15rem; border-radius: 999px; font-weight: 650; font-weight: 600;
  font-size: 0.95rem; color: var(--muted); transition: all 0.18s;
}
.seg input:checked + span { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; margin: 1.1rem 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; border-radius: var(--radius-sm); padding: 0.85rem 1.5rem;
  cursor: pointer; border: 1.5px solid transparent; text-decoration: none; text-align: center;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary {
  color: #fff; width: 100%; font-size: 1.05rem; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #34d399 0%, #10b981 35%, #0d9488 70%, #34d399 100%);
  background-size: 280% 100%;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.4);
  animation: btnFlow 7s ease infinite;
}
@keyframes btnFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); filter: saturate(1.1) brightness(1.04); box-shadow: 0 14px 30px rgba(16, 185, 129, 0.52); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled] { opacity: 0.75; cursor: progress; transform: none; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
@media (min-width: 560px) { .btn-primary { width: auto; min-width: 240px; } }

/* ----------------------------- Progress bar ----------------------------- */
.progress-wrap { margin-top: 1.5rem; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.progress-label { font-weight: 600; color: var(--text); }
.progress-pct { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--primary); }
.progress-track {
  height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; position: relative;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: 999px; background: var(--grad);
  transition: width 0.25s ease; position: relative; overflow: hidden;
}
.progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: translateX(-100%); animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ----------------------------- Results ----------------------------- */
.results-area { margin-top: 1.5rem; }
.status { color: var(--muted); font-size: 0.98rem; min-height: 1.4em; font-weight: 600; }
.status.error { color: #dc2626; }

.word-grid, .phrase-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.word-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.phrase-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.word-grid li, .phrase-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem; font-weight: 600; transition: all 0.15s; animation: pop 0.32s ease both;
}
.word-grid li.clickable { cursor: pointer; }
.word-grid li.clickable:hover, .phrase-list li:hover {
  border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }

.pagination { margin-top: 1.25rem; text-align: center; }
.server-results { margin: 1.5rem 0; }
.result-count, .notice { color: var(--muted); font-size: 0.95rem; }

/* ----------------------------- Content ----------------------------- */
.content-section { padding: 3rem 0; }
.content-section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.prose p { margin: 0 0 1.1rem; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }
.prose .lead-para { font-size: 1.18rem; color: var(--text); }

.table-wrap { overflow-x: auto; margin: 0 0 1.4rem; }
.prose table {
  width: 100%; border-collapse: collapse; font-size: 0.97rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.prose th, .prose td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); }
.prose thead th { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }

/* FAQ accordion */
.faq { margin-top: 1rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.1rem 1rem; margin-bottom: 0.6rem;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 0.85rem 0; display: flex;
  align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { display: inline; margin: 0; font-size: 1.05rem; }
.faq-item summary::after { content: "+"; color: var(--primary); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0 0 0.9rem; color: var(--muted); }

/* ----------------------------- Feedback (floating widget) ------------- */
.fb-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.1rem; border: none; border-radius: 999px; cursor: pointer;
  color: #fff; font: inherit; font-weight: 700; font-size: 0.95rem;
  background: var(--grad); box-shadow: 0 10px 26px rgba(16, 185, 129, 0.45);
  transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.fb-fab:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 14px 32px rgba(16, 185, 129, 0.55); }
.fb-fab:active { transform: translateY(0); }
.fb-fab-icon { font-size: 1.05rem; line-height: 1; }

.fb-panel {
  position: fixed; right: 20px; bottom: 78px; z-index: 81; width: 360px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 1.1rem 1.2rem 1.2rem;
  animation: fbIn 0.18s ease both;
}
@keyframes fbIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.fb-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem; }
.fb-panel-head strong { font-size: 1.1rem; }
.fb-close {
  background: none; border: none; cursor: pointer; font-size: 1.5rem; line-height: 1;
  color: var(--muted); padding: 0 0.2rem; border-radius: 6px;
}
.fb-close:hover { color: var(--text); }

.fb-form { }
.fb-cats { border: 0; padding: 0; margin: 0 0 0.9rem; }
.fb-cats legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 0.5rem; }
.fb-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.fb-cat { position: relative; }
.fb-cat input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fb-cat span {
  display: block; text-align: center; padding: 0.6rem 0.5rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-soft); color: var(--muted);
  font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.15s; height: 100%;
}
.fb-cat input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.fb-cat input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.fb-field { margin-bottom: 1rem; }
.fb-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.fb-field .req { color: #dc2626; }
.fb-field .opt { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.fb-form textarea,
.fb-form input[type="email"] {
  font: inherit; font-size: 1rem; font-weight: 400; width: 100%; box-sizing: border-box;
  color: var(--text); background: var(--bg-soft);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fb-form textarea { resize: vertical; min-height: 92px; }
.fb-form textarea:focus,
.fb-form input[type="email"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.fb-form input[type="email"]::placeholder,
.fb-form textarea::placeholder { color: var(--muted); }
.fb-status { margin: 0.85rem 0 0; font-weight: 600; min-height: 1.2em; }
.fb-status.ok { color: var(--accent); }
.fb-status.error { color: #dc2626; }

/* ----------------------------- Static pages ----------------------------- */
.page { padding: 2rem 0 3.5rem; }
.error-page { text-align: center; padding: 4rem 0; }
.link-list { list-style: none; padding: 0; display: inline-flex; flex-direction: column; gap: 0.5rem; }

.breadcrumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.85rem 1.1rem;
  margin: 0 auto; font-size: 0.85rem; color: var(--muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--border); }
.breadcrumbs a { text-decoration: none; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { margin-top: 3.5rem; background: var(--bg-soft); border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center;
  padding-top: 2.25rem; padding-bottom: 1.5rem;
}
.footer-tagline { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 0; max-width: 420px; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1rem 1.1rem; font-size: 0.85rem; color: var(--muted); }

/* ----------------------------- Dictionary stats ----------------------------- */
.section-intro { color: var(--muted); margin: -0.3rem 0 1.1rem; }
.muted { color: var(--muted); font-weight: 400; }
.muted-note { color: var(--muted); font-size: 0.95rem; margin: 1.25rem 0; }

.metrics {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; margin: 1.5rem 0 0.5rem;
}
@media (min-width: 720px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.15rem; box-shadow: var(--shadow-sm);
}
.metric-label { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.metric-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.metric-sub { font-size: 0.82rem; color: var(--primary); font-weight: 600; }

.data-table {
  width: 100%; border-collapse: collapse; font-size: 0.95rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.data-table th, .data-table td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--border); text-align: left; }
.data-table thead th { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .examples { color: var(--muted); font-size: 0.9rem; }
.data-table code { background: var(--surface-2); padding: 0.1rem 0.4rem; border-radius: 5px; font-size: 0.9rem; }

.chart-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 0.5rem; }
@media (min-width: 620px) { .chart-grid { grid-template-columns: repeat(2, 1fr); } }
.chart-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.6rem; font-size: 0.95rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 84px; }
.bars .bar {
  flex: 1; background: var(--grad); border-radius: 3px 3px 0 0; min-height: 2px;
  transition: opacity 0.15s;
}
.bars .bar:hover { opacity: 0.7; }
.bars-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
