/* Truth Layer design system v2. Blend: TL signal/terminal 40%, Apple 20%, Coinbase 20%, Binance 20%.
   Tokens and rules: docs/DESIGN.md */
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/static/fonts/space-grotesk-var.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/static/fonts/jetbrains-mono-var.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  /* surfaces (Apple light) */
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #ebedf0;
  --card: #ffffff;
  --line: #e3e5e9;
  --line-2: #cfd3da;
  /* text */
  --text: #0b0e14;
  --text-2: #3c4250;
  --muted: #5b6475;
  /* brand */
  --brand: #b6f23a;          /* TL signal lime */
  --brand-ink: #0b0e14;
  --brand-deep: #4d7c0f;     /* lime readable on white (5.6:1) */
  --blue: #0052ff;           /* Coinbase trust blue: links, primary actions */
  --blue-hover: #0045d8;
  --yellow: #f0b90b;         /* Binance highlight */
  --up: #0ecb81;             /* Binance green */
  --down: #f6465d;           /* Binance red */
  --up-ink: #03875a;
  --down-ink: #c8243a;
  /* covers */
  --cover-bg: #f3f4f6; --cover-ink: #0b0e14; --cover-muted: #5b6475; --cover-card: #ffffff; --cover-line: #c9ced8;
  /* shape and type */
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 1px 2px rgba(11, 14, 20, 0.04), 0 8px 24px -12px rgba(11, 14, 20, 0.12);
  --shadow-lg: 0 2px 4px rgba(11, 14, 20, 0.04), 0 24px 48px -20px rgba(11, 14, 20, 0.22);
  --fs: 1;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0b0e14; --bg-2: #12161f; --bg-3: #1a1f2b; --card: #12161f; --line: #232937; --line-2: #333b4d;
  --text: #f2f4f8; --text-2: #c3c9d6; --muted: #8b93a7;
  --brand-deep: #b6f23a; --blue: #4c8dff; --blue-hover: #6ea2ff; --up-ink: #2ee59d; --down-ink: #ff6b7f;
  --cover-bg: #141925; --cover-ink: #f2f4f8; --cover-muted: #8b93a7; --cover-card: #1a2030; --cover-line: #333b4d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
:root[data-contrast='high'] { --muted: #3c4250; --line: #9aa1ad; --text-2: #1d212b; }
:root[data-theme='dark'][data-contrast='high'] { --muted: #d0d5e0; --line: #6b7386; --text-2: #e6e9f0; }
:root[data-font='dyslexia'] { --body: 'Comic Sans MS', 'Lexend', 'OpenDyslexic', Verdana, sans-serif; letter-spacing: 0.02em; word-spacing: 0.08em; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; font-size: calc(16px * var(--fs)); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background 0.2s, color 0.2s; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, li a, td a, .link { color: var(--blue); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color 0.15s; }
p a:hover, li a:hover, td a:hover, .link:hover { text-decoration-color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--brand); color: var(--brand-ink); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--text); margin: 0; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -9999px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; background: var(--blue); color: #fff; padding: 12px 16px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.up { color: var(--up-ink); } .down { color: var(--down-ink); }

/* ------------------------------------------------------------------ ticker (Binance) */
.ticker { background: var(--brand-ink); color: #e9edf5; font: 500 0.8rem/1 var(--mono); border-bottom: 1px solid #1c2230; }
.ticker-row { display: flex; align-items: center; gap: 22px; height: 36px; overflow: hidden; white-space: nowrap; }
.ticker-item { display: inline-flex; gap: 8px; align-items: center; }
.ticker-item b { color: #fff; font-weight: 600; }
.ticker .up { color: var(--up); } .ticker .down { color: var(--down); }
.ticker-live { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; }
.ticker-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(182, 242, 58, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(182, 242, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(182, 242, 58, 0); } }
.ticker-fng { margin-left: auto; color: #aab2c4; }
.ticker-fng b { color: var(--yellow); }
@media (max-width: 720px) { .ticker-hide-sm { display: none; } .ticker-row { gap: 16px; } }

/* ------------------------------------------------------------------ header (Apple glass) */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo-lockup { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font: 700 1.28rem/1 var(--display); letter-spacing: -0.04em; color: var(--text); }
.wordmark b { font-weight: 700; color: var(--brand-deep); }
.main-nav { display: flex; gap: 4px; margin-right: auto; }
.main-nav a { padding: 8px 12px; border-radius: 999px; color: var(--text-2); font-size: 0.92rem; font-weight: 500; transition: color 0.15s, background 0.15s; }
.main-nav a:hover { color: var(--text); background: var(--bg-2); }
.main-nav a[aria-current='page'] { color: var(--text); background: var(--bg-2); font-weight: 600; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; flex-shrink: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn[aria-pressed='true'] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }
.kbd { font: 500 0.72rem var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; color: var(--muted); background: var(--bg-2); }
.search-trigger { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: 500 0.88rem var(--body); cursor: pointer; min-width: 190px; }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger .kbd { margin-left: auto; }
.menu-btn { display: none; }
.mobile-nav { display: none; }
@media (max-width: 1080px) {
  .main-nav, .search-trigger { display: none; }
  .header-row { justify-content: space-between; }
  .menu-btn, .search-icon { display: inline-grid !important; }
  .header-actions .btn { display: none; }
  .mobile-nav { position: fixed; top: 101px; left: 0; right: 0; bottom: 0; background: var(--bg); padding: 16px 24px 40px; overflow-y: auto; z-index: 39; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); }
  .mobile-nav.open { display: flex; }
  .mobile-nav a { padding: 16px 12px; border-radius: 14px; font: 600 1.3rem var(--display); letter-spacing: -0.02em; display: flex; align-items: center; gap: 14px; }
  .mobile-nav a:hover { background: var(--bg-2); }
  .mobile-nav .dot { width: 12px; height: 12px; border-radius: 4px; }
  .mobile-nav .btn { margin-top: 18px; justify-content: center; font: 600 1rem var(--body); }
}
.search-icon { display: none !important; }
body.menu-open { overflow: hidden; }

/* ------------------------------------------------------------------ buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font: 600 0.95rem/1 var(--body); border: 1px solid transparent; cursor: pointer; transition: transform 0.15s var(--ease), background 0.15s, border-color 0.15s, box-shadow 0.15s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn-brand:hover { box-shadow: 0 8px 24px -10px rgba(120, 170, 20, 0.7); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text-2); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.86rem; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font: 600 0.75rem/1 var(--body); color: var(--c, var(--text)); background: color-mix(in srgb, var(--c, var(--text)) 11%, transparent); white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
:root:not([data-theme='dark']) .chip[data-cat='crypto'] { color: #8a6300; }
.chip-plain::before { display: none; }
.label { font: 500 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.label-brand { color: var(--brand-deep); }
.badge-new { font: 700 0.75rem/1 var(--body); background: var(--yellow); color: #0b0e14; padding: 4px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ------------------------------------------------------------------ hero (Apple scale + TL terminal) */
.hero { padding: 88px 0 72px; text-align: center; }
.hero h1 { font-size: clamp(2.6rem, 6.6vw, 5.4rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02; max-width: 15ch; margin: 18px auto 22px; }
.hero h1 .mark { background: linear-gradient(transparent 62%, var(--brand) 62%, var(--brand) 92%, transparent 92%); padding: 0 0.06em; }
.hero-lead { font-size: clamp(1.1rem, 1.8vw, 1.32rem); color: var(--text-2); max-width: 600px; margin: 0 auto 32px; line-height: 1.5; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-owl { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 0.88rem; color: var(--text-2); }
.hero-owl svg { width: 30px; height: 30px; }
.hero-stage { margin-top: 64px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; text-align: left; }
@media (max-width: 960px) { .hero-stage { grid-template-columns: 1fr; } .hero { padding: 56px 0 48px; } }

.terminal { background: #0b0e14; color: #e9edf5; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid #1c2230; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #1c2230; font: 500 0.78rem var(--mono); color: #8b93a7; }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #333b4d; }
.terminal-bar i:nth-child(1) { background: #ff5f57; } .terminal-bar i:nth-child(2) { background: #febc2e; } .terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: 8px; }
.terminal-body { padding: 18px; display: grid; gap: 10px; }
.t-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #12161f; font: 500 0.86rem var(--mono); color: #c3c9d6; }
.t-row b { font-weight: 600; }
.t-flag { color: var(--down); } .t-ok { color: var(--up); } .t-warn { color: var(--yellow); }
.spark { height: 92px; border-radius: 12px; background: #12161f; padding: 12px 14px; }
.spark svg { width: 100%; height: 100%; }

.market-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.market-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.price-big { font: 700 2.1rem/1 var(--display); letter-spacing: -0.03em; }
.chg { font: 600 0.9rem var(--mono); padding: 4px 8px; border-radius: 8px; }
.chg.up { background: color-mix(in srgb, var(--up) 14%, transparent); }
.chg.down { background: color-mix(in srgb, var(--down) 14%, transparent); }
.chart-box { height: 150px; }
.chart-box svg { width: 100%; height: 100%; }
.mood { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px; background: var(--bg-2); border-radius: 14px; }
.mood-meter { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--down), var(--yellow), var(--up)); position: relative; }
.mood-meter i { position: absolute; top: -5px; width: 4px; height: 18px; border-radius: 2px; background: var(--text); transform: translateX(-2px); }
.mood-owl svg { width: 52px; height: 52px; }

/* ------------------------------------------------------------------ sections */
.section { padding: 88px 0; }
.section-sm { padding: 48px 0; }
.section-alt { background: var(--bg-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.035em; margin-top: 10px; }
.section-head p { color: var(--text-2); margin: 10px 0 0; max-width: 560px; font-size: 1.05rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: 0.95rem; transition: gap 0.15s var(--ease); }
.link-arrow:hover { gap: 10px; }
.link-arrow svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ grids and cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-link { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.post-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.post-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); }
.post-cover svg { width: 100%; height: 100%; overflow: visible; transition: transform 0.6s var(--ease); }
.post-card:hover .post-cover svg { transform: scale(1.03); }
.post-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h3 { font-size: 1.24rem; font-weight: 600; line-height: 1.22; letter-spacing: -0.02em; }
.post-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.post-card p { margin: 0; color: var(--text-2); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { margin-top: auto; padding-top: 6px; display: flex; gap: 12px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.post-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.post-card .save-btn { position: absolute; top: 12px; right: 12px; z-index: 2; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px); }

.featured { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.featured-main .post-cover { aspect-ratio: 16 / 10; }
.featured-main h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.03em; }
.featured-side { display: grid; gap: 24px; }
.post-card.row { flex-direction: row; }
.post-card.row .post-cover { width: 50%; aspect-ratio: auto; flex-shrink: 0; }
.post-card.row h3 { font-size: 1.1rem; }
.post-card.row p { -webkit-line-clamp: 2; }
@media (max-width: 1080px) { .featured { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .post-card.row { flex-direction: column; } .post-card.row .post-cover { width: 100%; aspect-ratio: 16 / 9; } }

/* topic tiles: flat colour blocks (Coinbase) */
.topic-tile { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 210px; background: color-mix(in srgb, var(--c) 9%, var(--card)); border-color: color-mix(in srgb, var(--c) 20%, var(--line)); overflow: hidden; }
.topic-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; }
.topic-tile[data-cat='crypto'] .topic-icon, .topic-tile[data-cat='agents'] .topic-icon { color: #0b0e14; }
.topic-tile[data-cat='agents'] .topic-icon { background: var(--brand); }
.topic-icon svg { width: 22px; height: 22px; }
.topic-tile h3 { font-size: 1.2rem; }
.topic-tile p { margin: 0; color: var(--text-2); font-size: 0.92rem; }
.topic-count { margin-top: auto; font: 500 0.8rem var(--mono); color: var(--muted); }

.tool-card { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; height: 100%; overflow: hidden; }
.tool-card h3 { font-size: 1.35rem; }
.tool-card p { color: var(--text-2); margin: 0; }
.tool-card .link-arrow { margin-top: auto; }
.tool-card .tool-owl { position: absolute; right: 16px; bottom: 12px; opacity: 0.95; }
.tool-card .tool-owl svg { width: 72px; height: 72px; }
.tool-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--c); color: #0b0e14; }
.tool-icon svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ sponsored */
.ad-label { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.ad-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ad-slot { display: grid; gap: 10px; }
.ad-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px 26px; min-height: 108px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); }
.ad-logo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font: 700 1.15rem var(--display); background: var(--ac, var(--blue)); color: #fff; flex-shrink: 0; }
.ad-house .ad-logo { background: transparent; }
.ad-banner h4 { font-size: 1.15rem; margin-bottom: 4px; letter-spacing: -0.02em; }
.ad-banner p { margin: 0; color: var(--text-2); font-size: 0.93rem; }
@media (max-width: 720px) { .ad-banner { grid-template-columns: auto 1fr; padding: 20px; } .ad-banner .btn { grid-column: 1 / -1; } }
.ad-card { padding: 22px; display: grid; gap: 12px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); }
.ad-card h4 { font-size: 1.08rem; letter-spacing: -0.02em; }
.ad-card p { margin: 0; color: var(--text-2); font-size: 0.9rem; }

/* ------------------------------------------------------------------ newsletter */
.newsletter { position: relative; overflow: hidden; border-radius: var(--r-xl); background: #0b0e14; color: #f2f4f8; padding: 56px; display: grid; grid-template-columns: auto 1fr 1fr; gap: 40px; align-items: center; }
.newsletter h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 10px 0 10px; letter-spacing: -0.035em; }
.newsletter p { color: #aab2c4; margin: 0; }
.newsletter .label { color: var(--brand); }
.nl-owl svg { width: 120px; height: 120px; }
.nl-form { display: flex; gap: 10px; }
.nl-form input { flex: 1 1 auto; min-width: 0; height: 52px; background: #12161f; border-color: #333b4d; color: #fff; }
.nl-note { font-size: 0.84rem; color: #8b93a7; margin-top: 10px; }
@media (max-width: 960px) { .newsletter { grid-template-columns: 1fr; padding: 36px 26px; gap: 22px; } .nl-owl svg { width: 84px; height: 84px; } }
@media (max-width: 480px) { .nl-form { flex-direction: column; } .nl-form input { flex: 0 0 auto; width: 100%; } }

/* ------------------------------------------------------------------ forms */
label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0 0 8px; color: var(--text); }
.field { margin-bottom: 18px; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
input[type='text'], input[type='email'], input[type='number'], input[type='date'], input[type='search'], select, textarea { width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--card); color: var(--text); font: 400 1rem var(--body); transition: border-color 0.15s, box-shadow 0.15s; }
textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
input[type='file'] { width: 100%; padding: 22px; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: var(--bg-2); color: var(--text-2); font: inherit; cursor: pointer; }
input[type='file']::file-selector-button { margin-right: 14px; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--text); color: var(--bg); font: 600 0.88rem var(--body); cursor: pointer; }
input[type='range'] { width: 100%; height: 32px; accent-color: var(--blue); }
input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--blue); }
.form-card { padding: 30px; }
.alert { padding: 14px 16px; border-radius: var(--r-md); font-size: 0.95rem; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; }
.alert svg { width: 40px; height: 40px; flex-shrink: 0; }
.alert-error { background: color-mix(in srgb, var(--down) 10%, var(--card)); color: var(--down-ink); border: 1px solid color-mix(in srgb, var(--down) 30%, transparent); }
.alert-ok { background: color-mix(in srgb, var(--up) 10%, var(--card)); color: var(--up-ink); border: 1px solid color-mix(in srgb, var(--up) 30%, transparent); }
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--bg-2); margin-bottom: 22px; flex-wrap: wrap; }
.segmented button { height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); font: 600 0.9rem var(--body); cursor: pointer; }
.segmented button[aria-selected='true'] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
details.more { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 16px; margin: 6px 0 20px; }
details.more summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--text-2); list-style: none; display: flex; justify-content: space-between; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: '+'; font: 500 1.2rem var(--mono); color: var(--muted); }
details.more[open] summary::after { content: '\2212'; }

/* ------------------------------------------------------------------ page heads */
.page-head { padding: 72px 0 48px; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin: 14px 0 14px; letter-spacing: -0.04em; }
.page-head p { color: var(--text-2); font-size: 1.15rem; max-width: 640px; margin: 0; }
.page-head-split { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.page-head-split svg.owl { width: 150px; height: 150px; }
@media (max-width: 720px) { .page-head-split { grid-template-columns: 1fr; position: relative; } .page-head-split > svg.owl { position: absolute; top: -12px; right: 16px; width: 64px; height: 64px; } .page-head-split h1 { padding-right: 72px; } .page-head { padding: 40px 0 28px; } }
.crumbs { display: flex; gap: 8px; font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }

/* ------------------------------------------------------------------ article */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--brand); z-index: 60; }
.article-head { padding: 56px 0 28px; }
.article-head .container { max-width: 860px; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 18px 0 18px; letter-spacing: -0.04em; }
.article-head .dek { font-size: 1.24rem; color: var(--text-2); margin: 0 0 26px; line-height: 1.5; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; color: var(--text-2); flex-wrap: wrap; }
.byline svg.owl { width: 42px; height: 42px; }
.byline b { color: var(--text); font-weight: 600; }
.byline a { display: inline-block; padding: 4px 0; }
.gl-pop a { display: inline-block; padding: 4px 0; font-weight: 600; }
.byline .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.tools-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.tools-bar .btn { height: 38px; padding: 0 14px; font-size: 0.86rem; }
.tools-bar .btn[aria-pressed='true'] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.article-cover { max-width: 1120px; margin: 0 auto 48px; padding: 0 28px; }
.article-cover > div { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 21 / 9; border: 1px solid var(--line); }
.article-cover svg { width: 100%; height: 100%; }
.article-layout { display: grid; grid-template-columns: 210px minmax(0, 700px) 280px; gap: 52px; justify-content: center; max-width: 1340px; margin: 0 auto; padding: 0 28px; }
.toc { position: sticky; top: 124px; align-self: start; font-size: 0.88rem; }
.toc h2 { font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; transition: color 0.15s, border-color 0.15s; }
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--blue); }
.toc .l3 a { padding-left: 26px; }
.aside-col { align-self: start; position: sticky; top: 124px; display: grid; gap: 20px; }
@media (max-width: 1240px) { .article-layout { grid-template-columns: minmax(0, 700px) 280px; } .toc { display: none; } }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .aside-col { position: static; } }

.tldr { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 20px 22px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--brand) 22%, var(--card)); margin-bottom: 2em; }
:root[data-theme='dark'] .tldr { background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.tldr .label { color: var(--text); margin-bottom: 6px; display: block; }
.tldr p { margin: 0; font-size: 1.05rem; color: var(--text); line-height: 1.55; }
.tldr svg.owl { width: 56px; height: 56px; }

.prose { font-size: 1.12rem; line-height: 1.75; color: var(--text-2); min-width: 0; }
:root[data-reading='wide'] .prose { line-height: 1.95; letter-spacing: 0.01em; }
.prose > * + * { margin-top: 1.2em; }
.prose p { margin-bottom: 0; }
.prose > p + p { margin-top: 1.1em; }
.prose h2 { font-size: 1.85rem; margin-top: 2.1em; position: relative; letter-spacing: -0.03em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--muted); opacity: 0; font-weight: 400; text-decoration: none; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0; }
.prose li { margin: 0.5em 0; padding-left: 0.2em; }
.prose ul li::marker { color: var(--blue); }
.prose ol li::marker { color: var(--blue); font-family: var(--mono); font-weight: 600; font-size: 0.95em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--yellow); color: var(--text); font-size: 1.12rem; }
.prose blockquote p { margin: 0; }
.prose code { font: 500 0.88em var(--mono); background: var(--bg-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose table, .data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .data-table th { text-align: left; padding: 12px 16px; background: var(--bg-2); color: var(--muted); font: 600 0.75rem var(--body); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.prose td, .data-table td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--text); }
.prose tbody tr:hover, .data-table tbody tr:hover { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }

.owl-tip { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: end; margin: 1.8em 0 !important; }
.owl-tip-art svg { width: 72px; height: 72px; }
.owl-tip-bubble { position: relative; background: var(--bg-2); border-radius: 20px 20px 20px 6px; padding: 16px 20px; font-size: 1rem; line-height: 1.6; color: var(--text); }
.owl-tip-bubble p { margin: 0; }
.owl-tip-bubble p + p { margin-top: 4px; }
.owl-tip-name { font: 700 0.85rem var(--display) !important; color: var(--text) !important; letter-spacing: -0.01em; margin-bottom: 4px !important; }
.owl-tip-name span { font-weight: 500; color: var(--muted); }
.mistake { margin: 1.8em 0 !important; padding: 18px 22px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--down) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--down) 25%, transparent); font-size: 1.02rem; color: var(--text); }
.mistake p { margin: 0; }
.mistake-label { display: flex; align-items: center; gap: 8px; font: 700 0.8rem var(--body) !important; text-transform: uppercase; letter-spacing: 0.06em; color: var(--down-ink) !important; margin-bottom: 6px !important; }

.takeaways { margin-top: 2.4em !important; padding: 26px 28px; border-radius: var(--r-lg); background: var(--bg-2); }
.takeaways h2 { font-size: 1.2rem !important; margin: 0 0 14px !important; }
.takeaways ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.takeaways li { padding-left: 32px; position: relative; margin: 0; font-size: 1.02rem; color: var(--text); }
.takeaways li::before { content: ''; position: absolute; left: 0; top: 0.2em; width: 20px; height: 20px; border-radius: 6px; background: var(--brand); }
.takeaways li::after { content: ''; position: absolute; left: 6px; top: 0.42em; width: 8px; height: 5px; border-left: 2px solid var(--brand-ink); border-bottom: 2px solid var(--brand-ink); transform: rotate(-45deg); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2em !important; }
.tag { font-size: 0.85rem; color: var(--text-2); padding: 7px 12px; border-radius: 999px; background: var(--bg-2); }
.tag:hover { color: var(--text); background: var(--bg-3); }
.author-box { display: flex; gap: 18px; padding: 24px; margin-top: 2.2em !important; align-items: flex-start; }
.author-box svg.owl { width: 64px; height: 64px; flex-shrink: 0; }
.author-box h3 { font-size: 1.1rem; margin-bottom: 2px; }
.author-box p { margin: 6px 0 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }
.changelog { font-size: 0.9rem; color: var(--muted); margin-top: 1.6em !important; }
.changelog summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.disclaimer { font-size: 0.86rem; color: var(--muted); margin-top: 1.4em !important; padding-top: 1.4em; border-top: 1px solid var(--line); line-height: 1.6; }
.feedback { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); margin-top: 2em !important; font-size: 0.98rem; color: var(--text); }
.feedback .btn { height: 38px; }
.feedback[data-done] .btn { display: none; }

/* selection share popover */
.sel-pop { position: absolute; z-index: 70; display: none; gap: 2px; padding: 4px; border-radius: 12px; background: #0b0e14; box-shadow: var(--shadow-lg); }
.sel-pop.show { display: flex; }
.sel-pop button { height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #fff; font: 600 0.82rem var(--body); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.sel-pop button:hover { background: #1a1f2b; }
.sel-pop svg { width: 15px; height: 15px; }

/* glossary tooltips */
abbr.gl { text-decoration: underline dotted var(--muted); text-underline-offset: 4px; cursor: help; position: relative; }
.gl-pop { position: absolute; z-index: 65; max-width: 300px; padding: 12px 14px; border-radius: 12px; background: #0b0e14; color: #e9edf5; font: 400 0.88rem/1.5 var(--body); box-shadow: var(--shadow-lg); }
.gl-pop b { color: var(--brand); display: block; margin-bottom: 2px; font-family: var(--display); }

/* ------------------------------------------------------------------ Ask Owlgo panel */
.ask-fab { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 8px; border-radius: 999px; background: #0b0e14; color: #fff; border: 0; font: 600 0.95rem var(--body); box-shadow: var(--shadow-lg); cursor: pointer; transition: transform 0.2s var(--ease); }
.ask-fab:hover { transform: translateY(-2px); }
.ask-fab svg.owl { width: 44px; height: 44px; }
.ask-panel { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100vh - 120px)); display: none; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.ask-panel.open { display: flex; }
.ask-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ask-head svg.owl { width: 44px; height: 44px; }
.ask-head h2 { font-size: 1.05rem; letter-spacing: -0.01em; }
.ask-head p { margin: 0; font-size: 0.8rem; color: var(--muted); }
.ask-head .icon-btn { margin-left: auto; }
.ask-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 92%; padding: 12px 14px; border-radius: 18px; font-size: 0.95rem; line-height: 1.55; }
.msg p { margin: 0; } .msg p + p { margin-top: 8px; }
.msg-user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg-bot { align-self: flex-start; background: var(--bg-2); color: var(--text); border-bottom-left-radius: 6px; }
.msg-bot a { color: var(--blue); }
.msg-src { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.msg-src a { font-size: 0.78rem; padding: 4px 9px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); text-decoration: none; }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-suggest button { border: 1px solid var(--line); background: var(--card); color: var(--text-2); border-radius: 999px; padding: 8px 12px; font: 500 0.84rem var(--body); cursor: pointer; text-align: left; }
.ask-suggest button:hover { border-color: var(--blue); color: var(--blue); }
.ask-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ask-form input { height: 46px; border-radius: 999px; }
.ask-form .btn { height: 46px; width: 46px; padding: 0; flex-shrink: 0; }
.ask-note { font-size: 0.74rem; color: var(--muted); padding: 0 16px 10px; margin: 0; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 3px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; } .typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 50% { opacity: 0.25; } }
@media (max-width: 560px) { .ask-fab { right: 14px; bottom: 14px; height: 52px; padding: 0 16px 0 6px; } .ask-fab svg.owl { width: 40px; height: 40px; } .ask-panel { right: 8px; bottom: 8px; left: 8px; width: auto; height: calc(100vh - 110px); } }

/* ------------------------------------------------------------------ command palette */
.palette { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(11, 14, 20, 0.45); backdrop-filter: blur(4px); padding: 12vh 16px 16px; }
.palette.open { display: block; }
.palette-box { max-width: 640px; margin: 0 auto; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 20px; height: 20px; color: var(--muted); }
.palette-input input { border: 0; height: 60px; font-size: 1.1rem; box-shadow: none !important; padding: 0; background: transparent; }
.palette-list { max-height: 52vh; overflow-y: auto; padding: 8px; list-style: none; margin: 0; }
.palette-list a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; color: var(--text); }
.palette-list a[aria-selected='true'], .palette-list a:hover { background: var(--bg-2); }
.palette-list small { color: var(--muted); display: block; font-size: 0.82rem; }
.palette-list .kind { margin-left: auto; font: 500 0.72rem var(--mono); color: var(--muted); text-transform: uppercase; }
.palette-foot { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }

/* ------------------------------------------------------------------ settings panel (a11y) */
.settings { position: fixed; top: 110px; right: 16px; z-index: 85; width: 300px; display: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 18px; }
.settings.open { display: block; }
.settings h2 { font-size: 1rem; margin-bottom: 14px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.set-row:first-of-type { border-top: 0; }
.set-ctl { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--bg-2); }
.set-ctl button { height: 32px; min-width: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: 600 0.82rem var(--body); cursor: pointer; }
.set-ctl button[aria-pressed='true'] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ tools */
.tool-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
@media (max-width: 960px) { .tool-wrap { grid-template-columns: 1fr; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; font-size: 0.95rem; color: var(--text-2); }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 700 0.85rem var(--mono); }
.steps b { color: var(--text); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric { padding: 16px; border-radius: var(--r-md); background: var(--bg-2); }
.metric span { display: block; font: 500 0.75rem var(--body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.metric b { display: block; font: 700 1.55rem/1.3 var(--display); margin-top: 6px; letter-spacing: -0.03em; color: var(--text); }
.metric.good b { color: var(--up-ink); } .metric.bad b { color: var(--down-ink); } .metric.warn b { color: #a87800; }
:root[data-theme='dark'] .metric.warn b { color: var(--yellow); }
.finding { padding: 22px 24px; display: grid; gap: 8px; }
.finding-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.finding h3 { font: 500 0.95rem var(--body); color: var(--muted); letter-spacing: 0; }
.finding .headline { font: 600 1.28rem/1.3 var(--display); color: var(--text); letter-spacing: -0.02em; margin: 0; }
.finding p { margin: 0; color: var(--text-2); }
.finding dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; margin: 8px 0 0; font-size: 0.84rem; }
.finding dt { color: var(--muted); } .finding dd { margin: 0 0 4px; font-family: var(--mono); color: var(--text); }
.finding details summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--blue); }
.finding.flag { border-color: color-mix(in srgb, var(--down) 35%, var(--line)); }
.status-chip { --c: var(--muted); }
.status-chip.flag { --c: var(--down-ink); } .status-chip.ok { --c: var(--up-ink); } .status-chip.info { --c: var(--blue); }
.bar { height: 10px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--up), var(--yellow), var(--down)); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ pricing and stats */
.price-card { padding: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; height: 100%; }
.price-card.highlight { border: 2px solid var(--text); }
.price-card h3 { font-size: 1.2rem; }
.price { font: 700 2.1rem/1.1 var(--display); letter-spacing: -0.03em; }
.price small { display: block; margin-top: 4px; font: 500 0.78rem var(--mono); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.price-card p { margin: 0; color: var(--text-2); font-size: 0.94rem; }
.price-card ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 10px; font-size: 0.93rem; color: var(--text-2); }
.price-card li { padding-left: 26px; position: relative; }
.price-card li::before { content: ''; position: absolute; left: 2px; top: 0.42em; width: 11px; height: 6px; border-left: 2px solid var(--up-ink); border-bottom: 2px solid var(--up-ink); transform: rotate(-45deg); }
.price-card > .btn { margin-top: auto; align-self: stretch; }
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-lg); background: var(--bg-2); }
.stat-band div { padding: 28px; }
.stat-band b { display: block; font: 700 2.2rem/1.1 var(--display); letter-spacing: -0.035em; }
.stat-band span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 820px) { .stat-band { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 96px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
.footer-grid p { color: var(--text-2); font-size: 0.94rem; max-width: 340px; }
.footer-grid h2 { font: 600 0.8rem var(--body); color: var(--text); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-grid li a { display: inline-block; padding: 6px 0; color: var(--text-2); font-size: 0.92rem; text-decoration: none; }
.footer-grid li a:hover { color: var(--blue); }
.footer-owl { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 0.88rem; color: var(--muted); }
.footer-owl svg { width: 48px; height: 48px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.84rem; color: var(--muted); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

.empty { padding: 48px 24px; text-align: center; color: var(--text-2); display: grid; justify-items: center; gap: 12px; }
.empty svg.owl { width: 110px; height: 110px; }
.empty a { color: var(--blue); text-decoration: underline; }
.prose-page { max-width: 760px; }
.prose-page h2 { font-size: 1.6rem; margin: 2em 0 0.6em; }
.prose-page p, .prose-page li { color: var(--text-2); line-height: 1.75; font-size: 1.05rem; }
.prose-page ul { padding-left: 1.2em; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); z-index: 95; padding: 12px 18px; border-radius: 999px; background: #0b0e14; color: #fff; font: 600 0.9rem var(--body); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--ease); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.saved-empty { display: none; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .article-layout, .article-cover { padding: 0 20px; }
  .article-cover > div { aspect-ratio: 16 / 9; border-radius: 20px; }
  .prose { font-size: 1.06rem; }
  .prose .anchor { display: none; }
  .form-card { padding: 22px; }
  .owl-tip { grid-template-columns: 56px 1fr; }
  .owl-tip-art svg { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
:root[data-motion='off'] *, :root[data-motion='off'] *::before, :root[data-motion='off'] *::after { transition: none !important; animation: none !important; }
:root[data-motion='off'] .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ print / PDF */
@media print {
  @page { margin: 18mm 16mm; }
  :root { --bg: #fff; --text: #000; --text-2: #222; --muted: #555; --line: #ccc; --bg-2: #f3f3f3; --cover-bg: #f3f4f6; }
  .ticker, .site-header, .site-footer, .ad-slot, .aside-col, .toc, .progress, .no-print, .ask-fab, .ask-panel, .tools-bar, .feedback, .newsletter, .related, .sel-pop, .palette, .settings, .toast { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article-layout { display: block; padding: 0; }
  .article-cover { padding: 0; margin-bottom: 18px; }
  .article-cover > div { border-radius: 8px; aspect-ratio: 21 / 7; }
  .prose { font-size: 11.5pt; color: #111; }
  .prose a::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #555; word-break: break-all; }
  .prose h2 { break-after: avoid; } .owl-tip, .mistake, .tldr, .takeaways, .table-wrap { break-inside: avoid; }
  .print-head { display: flex !important; justify-content: space-between; align-items: center; border-bottom: 1px solid #ccc; padding-bottom: 8px; margin-bottom: 16px; font-size: 9pt; color: #555; }
}
.print-head { display: none; }
:root[data-theme='dark'] .ask-fab { background: var(--brand); color: var(--brand-ink); box-shadow: 0 10px 30px rgba(182, 242, 58, 0.18); }
