/* LegalTechHub — design tokens & base
   ----------------------------------------------------------------
   Calm catalog × restrained editorial.
   Light-first, navy accent, serif for display only (no terminal theatre).
   ---------------------------------------------------------------- */

:root {
  --ink:           #e8edf3;
  --bg:            #f5f7fa;
  --surface:       #ffffff;
  --surface-2:     #eef2f6;
  --surface-3:     #e4eaf1;
  --surface-hover: #e8eef5;
  --line:          rgba(20, 36, 56, 0.10);
  --line-soft:     rgba(20, 36, 56, 0.06);
  --line-strong:   rgba(20, 36, 56, 0.18);

  --fg:            #142438;
  --fg-2:          #3a4a5c;
  --muted:         #667789;
  --muted-2:       #94a0ae;

  --accent:        #1a3a5c;
  --accent-2:      #2a5278;
  --accent-soft:   rgba(26, 58, 92, 0.08);
  --accent-ring:   rgba(26, 58, 92, 0.28);

  --ok:            #1f8a5b;
  --warn:          #b7791f;
  --bad:           #c23b4f;

  --hue-judicial:  #3d6ea8;
  --hue-ai:        #1a3a5c;
  --hue-docs:      #8a7348;
  --hue-kyc:       #5a6a9a;
  --hue-corp:      #3a8a7a;
  --hue-ref:       #7a8490;

  --font-sans:    'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:   'Newsreader', 'Source Serif 4', Georgia, serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 4px;
  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --container: 1200px;
  --gutter: clamp(16px, 3.2vw, 36px);
  --row: 44px;
  --shadow-sm: 0 1px 2px rgba(20, 36, 56, 0.04);
  --shadow: 0 8px 28px rgba(20, 36, 56, 0.08);
}

[data-theme="dark"] {
  --ink:           #0b0d10;
  --bg:            #0f1419;
  --surface:       #161b22;
  --surface-2:     #1c232c;
  --surface-3:     #262e38;
  --surface-hover: #1f2730;
  --line:          rgba(255,255,255,0.09);
  --line-soft:     rgba(255,255,255,0.05);
  --line-strong:   rgba(255,255,255,0.16);

  --fg:            #f2f5f8;
  --fg-2:          #c5ced8;
  --muted:         #8b97a6;
  --muted-2:       #5f6b78;

  --accent:        #7eb0db;
  --accent-2:      #9bc4e6;
  --accent-soft:   rgba(126, 176, 219, 0.12);
  --accent-ring:   rgba(126, 176, 219, 0.32);

  --ok:            #3dd68c;
  --warn:          #ffb84d;
  --bad:           #ff5577;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ink:           #0b0d10;
    --bg:            #0f1419;
    --surface:       #161b22;
    --surface-2:     #1c232c;
    --surface-3:     #262e38;
    --surface-hover: #1f2730;
    --line:          rgba(255,255,255,0.09);
    --line-soft:     rgba(255,255,255,0.05);
    --line-strong:   rgba(255,255,255,0.16);

    --fg:            #f2f5f8;
    --fg-2:          #c5ced8;
    --muted:         #8b97a6;
    --muted-2:       #5f6b78;

    --accent:        #7eb0db;
    --accent-2:      #9bc4e6;
    --accent-soft:   rgba(126, 176, 219, 0.12);
    --accent-ring:   rgba(126, 176, 219, 0.32);
  }
}

/* base reset */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26, 58, 92, 0.06), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(58, 138, 122, 0.04), transparent 50%),
    var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01','tnum';
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

/* base hierarchy */
.serif    { font-family: var(--font-serif); font-weight: 500; font-style: normal; letter-spacing: -0.015em; }
.mono     { font-family: var(--font-mono); font-feature-settings: 'zero','ss01'; }
.tnum     { font-variant-numeric: tabular-nums; }
.eyebrow  {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.eyebrow .dot {
  display:inline-block; width:6px; height:6px; border-radius:50%;
  background: var(--accent); margin-right: 8px; vertical-align: 1px;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}

/* container */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* hairlines */
.hr { height: 1px; background: var(--line); border: 0; }
.hr-strong { background: var(--line-strong); }

/* header */
.lth-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.lth-ticker { display: none; }
.lth-ticker.is-enabled {
  display: flex;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  overflow: hidden;
  height: 28px;
  align-items: center;
  position: relative;
}
.lth-ticker__track {
  display: inline-flex; gap: 36px;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 60s linear infinite;
}
.lth-ticker__item { display: inline-flex; align-items: center; gap: 8px; }
.lth-ticker__kind {
  font-size: 10px;
  letter-spacing: 0.16em;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.lth-ticker__kind.launch    { color: var(--accent); border-color: var(--accent-ring); }
.lth-ticker__kind.funding   { color: var(--ok); border-color: rgba(61,214,140,.35); }
.lth-ticker__kind.benchmark { color: var(--warn); border-color: rgba(255,184,77,.35); }
.lth-ticker__kind.problem   { color: var(--hue-kyc); border-color: rgba(183,148,255,.35); }
.lth-ticker__kind.article   { color: var(--muted); }
.lth-ticker__time { color: var(--muted-2); }
.lth-ticker:hover .lth-ticker__track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.lth-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 14px 0;
}
.lth-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.lth-logo__mark {
  width: 30px; height: 30px;
  display:grid; place-items:center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
}
.lth-logo .reg { display: none; }
.lth-logo .acc { color: var(--accent); font-style: normal; }
.lth-nav__menu {
  display: flex; gap: 4px;
  justify-self: center;
}
.lth-nav__menu a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: var(--r);
  transition: color .15s ease;
}
.lth-nav__menu a:hover { color: var(--fg); }
.lth-nav__menu a.is-active { color: var(--fg); }
.lth-nav__menu a.is-active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: -15px;
  height: 2px; background: var(--accent);
}
.lth-nav__menu a .num { display: none; }

.lth-nav__actions { display: flex; gap: 8px; align-items: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn--primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { border-color: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--fg); background: var(--surface-2); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--icon { padding: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--font-sans);
  background: var(--surface);
}
.chip.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip--solid { background: var(--surface-2); border-color: transparent; color: var(--fg-2); }

/* language switch */
.lang-switch {
  display:inline-flex; padding: 2px;
  border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--font-sans); font-size: 11px; font-weight: 600;
}
.lang-switch button {
  appearance:none; background: transparent; color: var(--muted);
  border: 0; padding: 4px 10px; border-radius: 6px; cursor: pointer;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.lang-switch button.is-active { background: var(--accent); color: #fff; }

/* generic surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card--bare { background: transparent; box-shadow: none; }
.divider { height: 1px; background: var(--line); }
.section { padding: clamp(48px, 6vw, 80px) 0; }
.section--tight { padding: clamp(28px, 4vw, 48px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
}
.section-head h2 .ord { display: none; }
.section-head p {
  color: var(--muted);
  max-width: 520px;
  margin: 0;
  font-size: 15px;
}

/* badges & status */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--ai      { color: var(--accent); border-color: var(--accent-ring); background: var(--accent-soft); }
.status--ok      { color: var(--ok);     border-color: rgba(61,214,140,.32); }
.status--wrapper { color: var(--warn);   border-color: rgba(255,184,77,.32); }
.status--ext     { color: var(--muted);  border-color: var(--line); }

/* loading shimmer */
.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* utility */
.flex { display: flex; }
.col  { display: flex; flex-direction: column; }
.gap-1{ gap: 4px; } .gap-2{ gap: 8px; } .gap-3{ gap: 12px; } .gap-4{ gap: 16px; } .gap-6{ gap: 24px; } .gap-8{ gap: 32px; }
.between { justify-content: space-between; } .center { align-items: center; }
.grow { flex: 1; }
.tabular { font-variant-numeric: tabular-nums; }
.tc-muted { color: var(--muted); }
.tc-fg2 { color: var(--fg-2); }
.fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; }
.upper { text-transform: uppercase; letter-spacing: 0.12em; }
.right { text-align: right; }

/* row hover */
.row-hover { cursor: pointer; transition: background .12s ease; }
.row-hover:hover { background: var(--surface-2); }

/* footer */
.lth-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  margin-top: 64px;
}
.lth-footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}
.lth-footer h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.lth-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lth-footer a { color: var(--fg-2); font-size: 13.5px; }
.lth-footer a:hover { color: var(--accent); }
.lth-footer__legend {
  font-family: var(--font-sans);
  font-size: 14.5px; color: var(--muted); max-width: 300px; line-height: 1.55;
}
.lth-footer__bottom {
  display:flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--muted-2); font-family: var(--font-mono); font-size: 11px;
}

/* === Hero (live feed) === */
.hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 6vw, 80px);
  position: relative;
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
.hero__title {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 12px 0 20px;
  color: var(--fg);
}
.hero__title .acc {
  color: var(--accent);
}
.hero__title .strike {
  text-decoration: none;
  color: inherit;
}
.hero__title em {
  font-style: normal;
  font-weight: 500;
}
.hero__lead {
  font-size: 17px;
  color: var(--fg-2);
  max-width: 520px;
  margin: 0 0 28px;
  line-height: 1.6;
}
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero__meta > div { padding-right: 16px; }
.hero__meta > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.hero__meta .v {
  font-family: var(--font-serif); font-style: normal; font-weight: 500;
  font-size: 32px; line-height: 1;
}
.hero__meta .l {
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.01em; text-transform: none;
  color: var(--muted); margin-top: 8px;
}
.hero__meta .acc { color: var(--accent); }

/* live feed panel */
.feed {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 560px;
  box-shadow: var(--shadow);
}
.feed__head {
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.feed__head h3 {
  margin: 0; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.feed__pulse {
  position: relative;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.feed__list { overflow-y: auto; flex: 1; }
.feed__item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: flex-start;
  transition: background .12s ease;
  cursor: pointer;
}
.feed__item:hover { background: var(--surface-2); }
.feed__item:last-child { border-bottom: 0; }
.feed__time {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted-2); padding-top: 2px;
}
.feed__copy { font-size: 13.5px; color: var(--fg-2); line-height: 1.45; }
.feed__copy strong { color: var(--fg); font-weight: 600; }
.feed__kind {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
  color: var(--muted);
}
.feed__kind.launch    { color: var(--accent); border-color: var(--accent-ring); }
.feed__kind.funding   { color: var(--ok);     border-color: rgba(61,214,140,.32); }
.feed__kind.benchmark { color: var(--warn);   border-color: rgba(255,184,77,.32); }
.feed__kind.problem   { color: var(--hue-kyc);border-color: rgba(183,148,255,.32); }
.feed__kind.article   { color: var(--muted); }

/* index marks */
.indexline {
  display: grid;
  grid-template-columns: 64px 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  gap: 24px;
}
.indexline:last-child { border-bottom: 1px solid var(--line); }
.indexline .ord {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  letter-spacing: 0.18em;
}
.indexline .name {
  font-family: var(--font-serif); font-style: normal; font-weight: 500;
  font-size: 24px; line-height: 1.1;
}
.indexline .meta { color: var(--muted); font-size: 13px; }
.indexline .num {
  font-family: var(--font-mono); font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.indexline .num small { color: var(--muted); font-size: 11px; margin-left: 2px; }
.indexline .delta-up { color: var(--ok); }
.indexline .delta-dn { color: var(--bad); }

/* sparkline */
.spark {
  display: flex; align-items: flex-end; gap: 2px; height: 28px;
}
.spark span {
  display: block; width: 3px; background: var(--muted-2); border-radius: 1px;
}
.spark.is-up span:nth-child(n) { background: var(--accent); }

/* tool card (catalog grid card) */
.tcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  cursor: pointer;
  min-height: 220px;
  position: relative;
}
.tcard:hover { border-color: var(--line-strong); background: var(--surface-2); }
.tcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tcard__logo {
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--surface-3);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: normal; font-weight: 500; font-size: 20px;
  flex-shrink: 0;
}
.tcard__name { font-size: 17px; font-weight: 600; margin: 0; }
.tcard__dev  { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.tcard__tag  { color: var(--muted); font-size: 13px; line-height: 1.45; flex: 1; }
.tcard__row  {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.tcard__score {
  font-family: var(--font-mono); font-size: 13px;
}
.tcard__score b { font-size: 18px; color: var(--fg); font-weight: 600; }
.tcard__score small { color: var(--muted); margin-left: 4px; font-size: 11px; }

/* catalog table */
.ctable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ctable thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg);
}
.ctable thead th.r { text-align: right; }
.ctable tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.ctable tbody td.r { text-align: right; }
.ctable tbody tr { transition: background .12s ease; cursor: pointer; }
.ctable tbody tr:hover { background: var(--surface-2); }
.ctable .tname { display: flex; align-items: center; gap: 12px; }
.ctable .tname b { font-weight: 600; font-size: 15px; }
.ctable .tname small { display: block; color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.ctable .tlogo {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--surface-3); display: grid; place-items: center;
  font-family: var(--font-serif); font-style: normal; font-weight: 500; font-size: 16px;
  flex-shrink: 0;
}
.ctable .score-bar {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.ctable .score-bar__track {
  width: 60px; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden;
}
.ctable .score-bar__fill {
  height: 100%; background: var(--accent);
}

/* tool detail layout */
.tdetail__hero {
  border-bottom: 1px solid var(--line);
  padding: 40px 0 36px;
}
.tdetail__top { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.tdetail__logo {
  width: 80px; height: 80px; border-radius: 14px;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: normal; font-weight: 500; font-size: 40px;
  flex-shrink: 0;
  overflow: hidden;
}
.tdetail__logo--img { padding: 0; background: var(--surface); border: 1px solid var(--line); }
.tdetail__logo--img img { width: 100%; height: 100%; object-fit: contain; }
.tcard__logo img, .ctable .tlogo img {
  width: 100%; height: 100%; object-fit: contain; border-radius: inherit;
  background: var(--surface);
}
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.shot {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  color: inherit;
}
.shot img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2);
}
.shot span {
  padding: 0 12px 12px;
  font-size: 13px; color: var(--muted);
}
.tdetail__name {
  font-family: var(--font-serif); font-style: normal; font-weight: 500;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.05; letter-spacing: -0.025em;
  margin: 0;
}
.tdetail__meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 0; align-items: center; }
.tdetail__lead { font-size: 18px; color: var(--fg-2); max-width: 760px; line-height: 1.55; }

.tdetail__stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 32px;
}
.tdetail__stats > div { padding: 22px 0; border-left: 1px solid var(--line); padding-left: 24px; }
.tdetail__stats > div:first-child { border-left: 0; padding-left: 0; }
.tdetail__stats .v {
  font-family: var(--font-serif); font-style: normal; font-weight: 500;
  font-size: 34px; line-height: 1;
}
.tdetail__stats .v.mono {
  font-family: var(--font-mono); font-style: normal; font-size: 32px;
  font-variant-numeric: tabular-nums;
}
.tdetail__stats .l {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px;
}

.tdetail__body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  padding: 48px 0;
}
.tdetail__section { margin-bottom: 48px; }
.tdetail__section h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.tdetail__section p { color: var(--fg-2); font-size: 15.5px; line-height: 1.7; }
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feat {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start;
}
.feat .ix {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.feat b { font-size: 14px; }
.feat p { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.45; }

.tdetail__side {
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 80px; align-self: start;
}
.side-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; background: var(--surface); }
.side-card h4 {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; margin: 0 0 14px;
}
.side-card dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.side-card dt { font-size: 12px; color: var(--muted); }
.side-card dd { margin: 0; font-size: 14px; color: var(--fg); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.side-card dd.serif { font-family: var(--font-serif); font-style: normal; font-weight: 500; font-size: 22px; }

/* review row */
.review { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.review:last-child { border-bottom: 0; }
.review__head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.review__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-3); color: var(--fg-2);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.review__author b { font-size: 14px; }
.review__author small { color: var(--muted); font-size: 12px; font-family: var(--font-mono); margin-left: 8px; }
.review__rating { margin-left: auto; font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.review__body { color: var(--fg-2); font-size: 14.5px; line-height: 1.6; }

/* benchmark */
.bench {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.bench__head {
  display: grid;
  grid-template-columns: 32px 1.4fr repeat(4, 1fr) 90px 90px;
  gap: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.bench__head > div {
  padding: 12px 16px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.bench__head > div.r { text-align: right; }
.bench__row {
  display: grid;
  grid-template-columns: 32px 1.4fr repeat(4, 1fr) 90px 90px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  transition: background .12s ease;
}
.bench__row:hover { background: var(--surface-2); }
.bench__row:last-child { border-bottom: 0; }
.bench__row > div { padding: 18px 16px; }
.bench__row > div.r { text-align: right; }
.bench__rank {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted-2);
}
.bench__rank.top { color: var(--accent); }
.bench__name { display: flex; align-items: center; gap: 12px; }
.bench__name b { font-size: 15px; font-weight: 600; }
.bench__name .ext {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 5px; border: 1px solid var(--line); color: var(--muted);
  border-radius: 3px; letter-spacing: 0.08em;
}
.bench__score {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.bench__bar {
  display: block; height: 3px; background: var(--surface-3); border-radius: 2px;
  margin-top: 6px; overflow: hidden;
}
.bench__bar > i {
  display: block; height: 100%; background: var(--accent-2);
}
.bench__overall {
  font-family: var(--font-serif); font-style: normal; font-weight: 500; font-size: 26px; line-height: 1;
}
.bench__trend {
  font-family: var(--font-mono); font-size: 12px;
}
.bench__trend.up { color: var(--ok); }
.bench__trend.flat { color: var(--muted); }

/* benchmark task tabs */
.btasks {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
}
.btask {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s ease, background .15s ease;
  color: inherit;
}
.btask:hover { border-color: var(--line-strong); }
.btask.is-active { border-color: var(--accent); background: var(--accent-soft); }
.btask__ord { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.16em; }
.btask b { font-size: 15.5px; font-weight: 600; }
.btask p { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; line-height: 1.4; }

/* radar chart container */
.bench__chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}

/* article cards */
.art-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.art {
  grid-column: span 4;
  display: flex; flex-direction: column; gap: 16px;
  cursor: pointer;
  text-decoration: none; color: inherit;
}
.art--big   { grid-column: span 8; }
.art--wide  { grid-column: span 6; }
.art__cover {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.art--big .art__cover { aspect-ratio: 16 / 9; }
.art__cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(26,58,92,.55), rgba(26,58,92,.25) 55%, rgba(20,36,56,.45));
}
.art__num {
  position: absolute; top: 18px; left: 20px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; color: rgba(255,255,255,.7);
}
.art__cover .glyph {
  position: absolute; right: 18px; bottom: 12px;
  font-family: var(--font-serif); font-style: normal; font-weight: 500;
  font-size: clamp(48px, 9vw, 120px); color: rgba(255,255,255,.94);
  line-height: 0.9; pointer-events: none;
}
.art__tag {
  display: inline-flex;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; text-transform: none;
  color: var(--accent);
}
.art__title {
  font-family: var(--font-serif); font-style: normal;
  font-weight: 500; font-size: 24px; line-height: 1.2;
  letter-spacing: -0.015em; margin: 0;
  color: var(--fg);
}
.art--big .art__title { font-size: 34px; }
.art__excerpt { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }
.art__foot {
  display: flex; gap: 14px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.art:hover .art__title { color: var(--accent); }

/* compact / comfy density */
[data-density="compact"] .tcard { min-height: 180px; padding: 14px; }
[data-density="compact"] .ctable tbody td { padding: 12px 14px; }
[data-density="compact"] .bench__row > div { padding: 12px 14px; }
[data-density="compact"] .section { padding: 32px 0; }

[data-density="comfy"] .tcard { padding: 24px; min-height: 260px; }
[data-density="comfy"] .ctable tbody td { padding: 20px; }

/* responsive */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .lth-nav { grid-template-columns: auto auto; }
  .lth-nav__menu { display: none; }
  .tdetail__body { grid-template-columns: 1fr; }
  .tdetail__stats { grid-template-columns: repeat(2, 1fr); }
  .btasks { grid-template-columns: 1fr 1fr; }
  .bench__head, .bench__row { grid-template-columns: 32px 1.4fr repeat(2, 1fr) 80px; }
  .bench__head > div:nth-child(5), .bench__head > div:nth-child(6),
  .bench__row > div:nth-child(5),  .bench__row > div:nth-child(6) { display: none; }
  .bench__chart { grid-template-columns: 1fr; }
  .art { grid-column: span 12; }
  .art--big, .art--wide { grid-column: span 12; }
  .hero__meta { grid-template-columns: repeat(2, 1fr); }
  .hero__meta > div + div { padding-left: 16px; }
  .hero__meta > div:nth-child(3) { border-left: 0; padding-left: 0; padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--line); }
  .hero__meta > div:nth-child(4) { padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--line); }
  .lth-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* === Modals === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  overflow-y: auto;
  padding: 24px;
}
.modal[style*="display: block"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.modal__content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
  animation: modalIn .2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s ease;
}
.modal__close:hover {
  background: var(--surface-2);
  color: var(--fg);
}
.modal__title {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0 0 24px;
}

/* forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-size: 13px;
  color: var(--fg-2);
  font-weight: 500;
}
.input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px;
  color: var(--fg);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color .15s ease;
  width: 100%;
  outline: none;
}
.input:focus {
  border-color: var(--accent);
}

.message {
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.message.success { background: rgba(61, 214, 140, 0.1); border: 1px solid rgba(61, 214, 140, 0.2); color: var(--ok); }
.message.error { background: rgba(255, 85, 119, 0.1); border: 1px solid rgba(255, 85, 119, 0.2); color: var(--bad); }
.message.info { background: var(--surface-3); border: 1px solid var(--line); color: var(--fg); }

/* profile inside modal */
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.profile-field {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.profile-field:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.profile-field label {
  font-size: 13px;
  color: var(--muted);
}
.profile-field span {
  font-size: 14.5px;
  color: var(--fg);
}
.user-type-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.user-type-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--fg-2);
}
.user-type-badge.admin { color: var(--warn); border-color: rgba(255,184,77,.32); }
.profile-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* === Tables === */
.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14.5px;
}
.table th, .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.table th {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface-2);
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: var(--surface-hover);
}

/* === Dropdown in Header === */
.lth-nav__dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.lth-nav__dropdown-wrapper > a {
  display: flex;
}
.lth-nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}
.lth-nav__dropdown-wrapper:hover .lth-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lth-nav__dropdown a {
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--fg-2) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.15s ease;
}
.lth-nav__dropdown a:hover {
  background: var(--surface-2);
  color: var(--fg) !important;
}
.lth-nav__dropdown a.is-active {
  color: var(--fg) !important;
  background: var(--surface-3);
  font-weight: 500;
}
.lth-nav__dropdown a .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.lth-nav__dropdown a.is-active .num {
  color: var(--accent);
}
.lth-nav__dropdown a.is-active::after {
  display: none;
}

/* ── utilities ─────────────────────────────────────────────── */
.is-hidden { display: none !important; }

/* ── admin tabs ────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
.tabs__btn {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  margin-bottom: -1px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.tabs__btn:hover { color: var(--fg-2); }
.tabs__btn.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

