/* CryptoLibrary — GitHub-inspired dark design. Tokens live in critical.css (inlined in <head>). */

/* ---------- Type scale ---------- */
:root { --fs-xs: 12px; --fs-sm: 14px; --fs-base: 16px; --fs-lg: 18px; --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 30px; --fs-4xl: 36px; --radius: 6px; --ease: cubic-bezier(.2,.7,.2,1); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .reveal { opacity: 1 !important; transform: none !important; } }
body { text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(800px 320px at 60% -10%, rgba(99, 102, 241, 0.10), transparent 70%); }
a { color: inherit; text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent-hover); }
img, svg { max-width: 100%; }
svg { flex-shrink: 0; }
::selection { background: rgba(99, 102, 241, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--text); }
p { margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-sm); }
.label { font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; z-index: 100; border-radius: var(--radius); }
.skip:focus { left: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-base); letter-spacing: -0.01em; color: var(--text); }
.wordmark__mark { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.wordmark__mark svg { display: block; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); background: var(--bg-3); white-space: nowrap; }
.tag--accent { color: var(--accent-hover); border-color: rgba(99, 102, 241, 0.4); background: rgba(99, 102, 241, 0.10); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); color: var(--text); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), color .15s; }
.btn:hover { background: var(--bg-3); border-color: var(--text-3); color: var(--text); transform: scale(1.02); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.iconbtn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.iconbtn:hover { background: var(--bg-3); color: var(--text); }
.ico-moon { display: none; }
html:not(.dark) .ico-sun { display: none; }
html:not(.dark) .ico-moon { display: inline; }

/* ---------- Progress bar ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 60; transition: width .08s linear; }
body:not(.page-article) .progress { display: none; }

/* ---------- Sidebar ---------- */
.sidebar { transition: transform .25s var(--ease); }
.sidebar.is-open { transform: none; box-shadow: 0 0 0 100vw rgba(0,0,0,.5); }
.sidebar__head { height: var(--header); display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; border-bottom: 1px solid var(--border); }
.sidebar__close { display: inline-flex; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 12px 16px; }
.sidebar__section { margin-bottom: 16px; }
.sidebar__title { display: block; padding: 8px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.navitem { position: relative; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: var(--radius); font-size: var(--fs-sm); color: var(--text-2); transition: background .15s var(--ease), color .15s var(--ease); }
.navitem::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 2px; background: var(--accent); border-radius: 2px; transform: scaleY(0); transition: transform .2s var(--ease); }
.navitem:hover { background: var(--bg-3); color: var(--text); }
.navitem:hover::before { transform: scaleY(.6); }
.navitem.is-active { color: var(--accent-hover); background: rgba(99, 102, 241, 0.10); }
.navitem.is-active::before { transform: scaleY(1); }
.navitem__icon { display: inline-flex; color: inherit; opacity: .9; }
.navitem__count { font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.sidebar__foot { padding: 12px 20px 16px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); display: flex; flex-direction: column; gap: 8px; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); }

/* ---------- Topbar ---------- */
.topbar { transition: background .2s, backdrop-filter .2s; }
.topbar.is-scrolled { background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar__row { height: var(--header); display: flex; align-items: center; gap: 12px; }
.topbar__burger { display: none; }
.topbar__brand { display: none; }
.topbar__center { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a:hover { color: var(--text); }
.crumbs__sep { color: var(--text-3); }
.crumbs__here { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.topbar__title { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1400px) { .topbar__title { display: none; } }
.topbar__right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ticker { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); padding: 0 10px; height: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); white-space: nowrap; }
.ticker__item { display: inline-flex; align-items: center; gap: 6px; }
.ticker__sym { color: var(--text); font-weight: 500; }
.ticker__chg { font-variant-numeric: tabular-nums; }
.ticker__chg.up { color: var(--success); }
.ticker__chg.down { color: var(--danger); }
.ticker.is-loading .ticker__item { opacity: .5; }
.ticker--strip { display: none; }
.searchbox { display: flex; align-items: center; height: 36px; border: 1px solid transparent; border-radius: var(--radius); color: var(--text-2); transition: width .25s var(--ease), border-color .2s, background .2s; width: 36px; overflow: hidden; }
.searchbox__btn { width: 36px; height: 36px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: inherit; cursor: pointer; }
.searchbox input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: var(--fs-sm); padding-right: 8px; opacity: 0; transition: opacity .15s; }
.searchbox.is-open, .searchbox:focus-within { width: 260px; border-color: var(--border); background: var(--bg-2); }
.searchbox.is-open input, .searchbox:focus-within input { opacity: 1; }
.searchbox kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; color: var(--text-3); margin-right: 8px; opacity: 0; }
.searchbox.is-open kbd, .searchbox:focus-within kbd { opacity: 1; }
.langswitch { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: 32px; }
.langswitch a { padding: 0 10px; height: 100%; display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); border-right: 1px solid var(--border); transition: background .15s, color .15s; }
.langswitch a:last-child { border-right: 0; }
.langswitch a:hover { background: var(--bg-3); color: var(--text); }
.langswitch a.is-active { color: var(--accent-hover); background: rgba(99, 102, 241, 0.10); }

/* ---------- Layout ---------- */
.main { flex: 1; padding-top: 40px; padding-bottom: 80px; }
.section { margin-bottom: 64px; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.section__head h2 { font-size: var(--fs-xl); }
.section__head .link { font-size: var(--fs-sm); color: var(--accent-hover); }
.empty { color: var(--text-2); padding: 48px 0; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); font-size: var(--fs-sm); }
.empty code { font-family: var(--mono); color: var(--text); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: center; padding: 24px 0 56px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.hero__kicker { margin-bottom: 16px; }
.hero h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.1; letter-spacing: -0.02em; max-width: 640px; text-wrap: balance; }
.hero__lede { margin: 20px 0 28px; font-size: var(--fs-lg); line-height: 1.6; color: var(--text-2); max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stats { display: grid; grid-template-columns: 1fr; gap: 10px; }
.stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.stat__n { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__l { font-size: var(--fs-sm); color: var(--text-2); }
.notice { padding: 12px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-2); font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 32px; }
.notice a { color: var(--accent-hover); }

/* ---------- Category index (home) ---------- */
.catgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catcard { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); color: var(--text); transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.catcard:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25), 0 0 0 1px rgba(99,102,241,.25); color: var(--text); }
.catcard__top { display: flex; align-items: center; justify-content: space-between; }
.catcard__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--bg-3); color: var(--accent-hover); }
.catcard__title { font-size: var(--fs-base); font-weight: 600; }
.catcard__desc { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; }
.catcard__count { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Article cards ---------- */
.cardgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); color: var(--text); min-height: 200px; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25), 0 0 0 1px rgba(99,102,241,.25); color: var(--text); }
.card__title { font-size: var(--fs-base); font-weight: 600; line-height: 1.35; text-wrap: balance; }
.card__excerpt { font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin-top: auto; padding-top: 8px; display: flex; gap: 10px; font-size: var(--fs-xs); color: var(--text-3); }
.card__meta span + span::before { content: "·"; margin-right: 10px; }
.featured { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.featured .card--lead { min-height: 100%; padding: 28px; }
.featured .card--lead .card__title { font-size: var(--fs-2xl); line-height: 1.25; }
.featured .card--lead .card__excerpt { -webkit-line-clamp: 5; font-size: var(--fs-base); }
.list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); overflow: hidden; }
.list__item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); transition: background .15s; }
.list__item:last-child { border-bottom: 0; }
.list__item:hover { background: var(--bg-3); color: var(--text); }
.list__title { font-size: var(--fs-sm); font-weight: 500; line-height: 1.4; }
.list__meta { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.list__item:hover .list__title { color: var(--accent-hover); }
.toolgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.toolcard__icon { color: var(--accent-hover); display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--bg-3); }

/* ---------- Category page ---------- */
.pagehead { display: flex; flex-direction: column; gap: 12px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.pagehead h1 { font-size: var(--fs-4xl); line-height: 1.15; letter-spacing: -0.02em; }
.pagehead__desc { font-size: var(--fs-lg); color: var(--text-2); max-width: 640px; line-height: 1.55; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pager__link { font-size: var(--fs-sm); padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); }
.pager__link:hover { border-color: var(--text-3); color: var(--text); }
.pager__link.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Article ---------- */
.reader { display: grid; grid-template-columns: minmax(0, 720px) 200px; gap: 56px; justify-content: center; }
.reader__body { min-width: 0; }
.reader__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.reader__title { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 14px; text-wrap: balance; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 20px; }
.article-meta span + span::before { content: "·"; margin-right: 14px; color: var(--text-3); }
.article-excerpt { font-size: var(--fs-lg); line-height: 1.6; color: var(--text-2); margin-bottom: 28px; }
.illustration { margin: 0 0 32px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.illustration img { display: block; width: 100%; height: auto; border-radius: 4px; }
.illustration figcaption { margin-top: 10px; font-size: var(--fs-xs); color: var(--text-3); }
.toc-inline { display: none; margin-bottom: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.toc-inline summary { cursor: pointer; padding: 12px 16px; font-size: var(--fs-sm); font-weight: 500; }
.toc-inline ol { margin: 0; padding: 0 16px 12px 36px; font-size: var(--fs-sm); color: var(--text-2); }
.toc-inline li { margin: 6px 0; }
.reader__aside { position: relative; }
.toc { position: sticky; top: calc(var(--header) + 24px); display: flex; flex-direction: column; gap: 10px; }
.toc__title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13px; line-height: 1.4; color: var(--text-2); transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--accent-hover); border-left-color: var(--accent); }
.reader__meta { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-2); display: flex; flex-direction: column; gap: 8px; }
.reader__meta strong { font-weight: 500; color: var(--text); }
.reader__meta a { color: var(--text-2); }
.reader__meta a:hover { color: var(--accent-hover); }

/* ---------- Prose ---------- */
.prose { font-size: 17px; line-height: 1.7; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 20px; }
.prose h2 { font-size: var(--fs-2xl); line-height: 1.3; margin: 44px 0 14px; padding-top: 20px; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header) + 20px); }
.prose h3 { font-size: var(--fs-lg); margin: 30px 0 10px; scroll-margin-top: calc(var(--header) + 20px); }
.prose h4 { font-size: var(--fs-base); margin: 22px 0 8px; }
.prose a { color: var(--accent-hover); background-image: linear-gradient(var(--accent-hover), var(--accent-hover)); background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s var(--ease); }
.prose a:hover { background-size: 100% 1px; }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--text-2); }
.prose blockquote { margin: 0 0 24px; padding: 12px 20px; border-left: 3px solid var(--border); color: var(--text-2); }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
.prose img { border-radius: var(--radius); }
.article-quote { margin: 32px 0; padding: 20px 24px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text); }
.article-quote p { margin: 0 0 10px; font-style: italic; font-size: var(--fs-lg); line-height: 1.55; }
.article-quote cite { font-style: normal; font-variant: small-caps; letter-spacing: .06em; font-size: var(--fs-sm); color: var(--accent-hover); }

/* code */
.prose code { font-family: var(--mono); font-size: .875em; background: var(--bg-3); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }
.prose pre { position: relative; margin: 0 0 24px; padding: 44px 18px 16px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--mono); font-size: 13.5px; line-height: 1.65; overflow-x: auto; color: var(--text); }
.prose pre::before { content: attr(data-lang); position: absolute; left: 0; top: 0; right: 0; height: 32px; padding: 0 16px; display: flex; align-items: center; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.prose pre:not([data-lang])::before { content: "code"; }
.prose pre code { background: transparent; border: 0; padding: 0; font-size: inherit; color: inherit; }
.copy-btn { position: absolute; top: 4px; right: 8px; height: 24px; padding: 0 8px; font: 500 11px/1 var(--sans); border-radius: 4px; background: transparent; color: var(--text-2); border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.copy-btn:hover { background: var(--bg-3); color: var(--text); }
.tok-k { color: #ff7b72; } .tok-s { color: #a5d6ff; } .tok-c { color: #8b949e; font-style: italic; } .tok-n { color: #79c0ff; } .tok-f { color: #d2a8ff; }
html:not(.dark) .tok-k { color: #cf222e; } html:not(.dark) .tok-s { color: #0a3069; } html:not(.dark) .tok-n { color: #0550ae; } html:not(.dark) .tok-f { color: #8250df; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.prose th { text-align: left; font-weight: 600; padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: var(--bg-2); }

/* article sections */
.article-section { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-section > h2 { font-size: var(--fs-xl); margin-bottom: 16px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); margin-bottom: 8px; }
.faq-item summary { cursor: pointer; padding: 14px 16px; font-size: var(--fs-sm); font-weight: 500; list-style: none; display: flex; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(-45deg); transition: transform .2s var(--ease); flex-shrink: 0; }
.faq-item[open] summary::before { transform: rotate(45deg); }
.faq-item p { padding: 0 16px 16px 36px; font-size: var(--fs-sm); line-height: 1.65; color: var(--text-2); }
.sources-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sources-list li { font-size: var(--fs-sm); line-height: 1.5; padding-left: 18px; position: relative; }
.sources-list li::before { content: "↗"; position: absolute; left: 0; color: var(--text-3); }
.sources-list a { color: var(--accent-hover); font-weight: 500; }
.source-desc { color: var(--text-2); }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.video-wrapper { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.video-thumbnail { position: relative; cursor: pointer; display: block; width: 100%; background: transparent; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; }
.video-thumbnail img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: filter .2s; }
.video-thumbnail::after { content: ""; position: absolute; inset: 0; bottom: auto; aspect-ratio: 16 / 9; background: rgba(0,0,0,0); transition: background .2s; }
.video-thumbnail:hover::after { background: rgba(0,0,0,.35); }
.play-button { position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%); width: 56px; height: 40px; border-radius: 10px; background: rgba(13, 17, 23, .85); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 1px solid rgba(255,255,255,.2); transition: background .2s, transform .2s var(--ease); z-index: 1; }
.video-thumbnail:hover .play-button { background: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.video-title { padding: 12px 14px; font-size: var(--fs-sm); font-weight: 500; line-height: 1.4; }
.video-iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.prevnext__link { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); color: var(--text); transition: border-color .2s, transform .2s var(--ease); }
.prevnext__link:hover { border-color: var(--border-accent); transform: translateY(-2px); color: var(--text); }
.prevnext__link--next { text-align: right; align-items: flex-end; }
.prevnext__title { font-size: var(--fs-sm); font-weight: 500; line-height: 1.4; }
.related { margin-top: 48px; }

/* ---------- Glossary ---------- */
.alpha { position: sticky; top: var(--header); z-index: 20; display: flex; flex-wrap: wrap; gap: 2px; padding: 10px 0; margin-bottom: 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
.alpha a, .alpha span { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 500; border-radius: 4px; }
.alpha a { color: var(--text-2); }
.alpha a:hover { background: var(--bg-3); color: var(--text); }
.alpha a.is-active { background: rgba(99,102,241,.15); color: var(--accent-hover); }
.alpha span { color: var(--text-3); opacity: .5; }
.filterbox { max-width: 400px; margin-bottom: 32px; }
.input { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font: inherit; font-size: var(--fs-sm); padding: 10px 12px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
.glossary { display: flex; flex-direction: column; gap: 40px; }
.glossary__group { scroll-margin-top: calc(var(--header) + 60px); }
.glossary__letter { font-size: var(--fs-2xl); color: var(--accent-hover); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.glossary__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.term { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); scroll-margin-top: calc(var(--header) + 60px); }
.term dt { font-size: var(--fs-base); font-weight: 600; }
.term dd { margin: 6px 0 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--text-2); }

/* ---------- Search page ---------- */
.searchpage { max-width: 760px; }
.searchpage__field { display: flex; align-items: center; gap: 12px; }
.searchpage__field .input { font-size: var(--fs-base); padding: 14px 16px; }
#search-status { display: block; margin: 12px 0 24px; font-size: var(--fs-sm); color: var(--text-2); }
.results { display: flex; flex-direction: column; gap: 8px; }
.result { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); color: var(--text); transition: border-color .15s; }
.result:hover { border-color: var(--border-accent); color: var(--text); }
.result__title { font-size: var(--fs-base); font-weight: 600; }
.result__excerpt { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result mark { background: rgba(99,102,241,.25); color: inherit; border-radius: 2px; padding: 0 2px; }

/* ---------- Tools ---------- */
.tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.panel__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.panel__body { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.field > span { font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); }
.field input[type="number"], .field input[type="text"], .field select { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font: inherit; font-size: var(--fs-sm); padding: 9px 12px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field input[type="range"] { accent-color: var(--accent); width: 100%; }
.field--check { flex-direction: row; align-items: center; gap: 10px; color: var(--text-2); }
.field--check input { accent-color: var(--accent); width: 16px; height: 16px; }
.field-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.field-row--2 { grid-template-columns: 1fr 1fr; }
.swap { margin-bottom: 2px; border-color: var(--border); }
.result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.result-row:last-of-type { border-bottom: 0; }
.result-row > span:first-child { color: var(--text-2); }
.result-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.result-row--big { flex-direction: column; align-items: flex-start; gap: 4px; padding: 4px 0 14px; }
.result-row--big strong { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -0.02em; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.warn { border: 1px solid rgba(210, 153, 34, .5); background: rgba(210, 153, 34, .10); color: var(--text); border-radius: var(--radius); padding: 12px 14px; font-size: var(--fs-sm); line-height: 1.55; }
.warn--static { margin-top: 20px; }
.warn strong { color: var(--warning); }
.tool__note { margin: 20px 0 0; font-size: var(--fs-sm); color: var(--text-2); max-width: 760px; line-height: 1.6; }
.tool__note strong { color: var(--text); font-weight: 500; }
.tool__disclaimer { margin: 24px 0 0; font-size: var(--fs-xs); color: var(--text-3); }
.tool__h3 { font-size: var(--fs-sm); font-weight: 600; margin: 12px 0 4px; }
.tool__table summary { cursor: pointer; padding: 6px 0; font-size: var(--fs-sm); color: var(--text-2); }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini th { text-align: left; font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mini td { padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini tr:last-child td { border-bottom: 0; }
.mini tr.is-you td { color: var(--accent-hover); font-weight: 500; }
.panel .table-wrap { overflow: auto; max-height: 360px; border: 1px solid var(--border); border-radius: var(--radius); }
.chart { margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .tick { fill: var(--text-2); font-family: var(--mono); font-size: 10px; }
.chart .line { fill: none; stroke: var(--accent-hover); stroke-width: 2; stroke-linejoin: round; }
.chart .line--dashed { stroke: var(--text-2); stroke-dasharray: 4 4; stroke-width: 1.5; }
.chart .area { fill: var(--accent); opacity: .12; }
.chart .dot { fill: var(--accent-hover); }
.chart figcaption { font-size: var(--fs-xs); color: var(--text-3); }
.rates-status { font-size: var(--fs-xs); color: var(--text-3); }
.rates-status.is-live::before { content: "●"; color: var(--success); margin-right: 6px; }
.rates-status.is-fallback::before { content: "●"; color: var(--warning); margin-right: 6px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 40px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer__col h4 { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.footer__col p { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.6; max-width: 360px; margin-top: 12px; }
.footer__links { display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); }
.footer__links a:hover { color: var(--text); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Scroll reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i, 0) * 50ms); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .reader { grid-template-columns: minmax(0, 720px); }
  .reader__aside { display: none; }
  .toc-inline { display: block; }
}
@media (max-width: 1023px) {
  .layout { padding-left: 0; }
  .topbar { height: auto; }
  html { scroll-padding-top: calc(var(--header) + 30px + 16px); }
  .prose h2, .prose h3, .glossary__group, .term { scroll-margin-top: calc(var(--header) + 30px + 16px); }
  .alpha { top: calc(var(--header) + 30px); }
  .sidebar { width: 280px; }
  .sidebar.is-open { box-shadow: 0 0 40px rgba(0,0,0,.5); }
  .topbar__burger { display: inline-flex; }
  .topbar__brand { display: inline-flex; }
  .topbar__center .crumbs { display: none; }
  .topbar__title { display: none; }
  .ticker { display: none; }
  .ticker--strip { display: flex; height: 30px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: var(--bg-2); padding: 0; overflow: hidden; }
  .ticker--strip .ticker__track { display: inline-flex; gap: 28px; padding-left: 100%; animation: ticker 22s linear infinite; }
  .ticker--strip .ticker__track:hover { animation-play-state: paused; }
  .searchbox.is-open, .searchbox:focus-within { width: 180px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { flex-direction: column; align-items: flex-start; gap: 2px; }
  .catgrid, .cardgrid, .toolgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .tool { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@keyframes ticker { to { transform: translateX(-100%); } }
@media (max-width: 640px) {
  .main { padding-top: 28px; padding-bottom: 56px; }
  .hero h1 { font-size: 30px; }
  .hero__lede { font-size: var(--fs-base); }
  .hero__actions .btn { width: 100%; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { flex-direction: row; align-items: baseline; }
  .catgrid, .cardgrid, .toolgrid, .glossary__list, .video-grid, .prevnext { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .pagehead h1 { font-size: var(--fs-3xl); }
  .prose { font-size: 16px; }
  .prose h2 { font-size: var(--fs-xl); }
  .prevnext__link--next { text-align: left; align-items: flex-start; }
  .langswitch a { padding: 0 8px; }
  .searchbox.is-open, .searchbox:focus-within { width: 150px; }
}

/* ---------- Print ---------- */
@media print {
  html { scroll-behavior: auto; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  body::before, .sidebar, .sidebar-overlay, .topbar, .ticker--strip, .footer, .progress, .reader__aside, .toc-inline, .prevnext, .copy-btn, .video-section, .related { display: none !important; }
  .layout { padding-left: 0; }
  .reader { display: block; }
  .prose { color: #000; }
  .prose a { color: #000; background: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
  .prose pre { background: #f4f4f4; color: #000; border: 1px solid #ccc; white-space: pre-wrap; padding-top: 16px; }
  .prose pre::before { display: none; }
  .prose h2, .prose h3 { break-after: avoid; color: #000; }
  .prose pre, .prose table, .prose blockquote { break-inside: avoid; }
}

/* ---------- Fixes after visual review ---------- */
.card .tag, .list .tag { align-self: flex-start; }
.langswitch a { white-space: nowrap; }
@media (max-width: 480px) {
  .topbar__brand span:last-child { display: none; }
  .topbar__row { gap: 6px; }
  .searchbox.is-open, .searchbox:focus-within { width: 130px; }
}

/* ---------- Collapsible sidebar (desktop) ---------- */
@media (min-width: 1024px) {
  html.sidebar-collapsed .sidebar { transform: translateX(-100%); }
  html.sidebar-collapsed .layout { padding-left: 0; }
  html.sidebar-collapsed .topbar__burger { display: inline-flex; }
  html.sidebar-collapsed .topbar__brand { display: inline-flex; }
}

/* ---------- Hero visual + sparklines ---------- */
.hero { grid-template-columns: minmax(0, 1fr) minmax(380px, 600px); gap: 56px; }
.hero__visual { display: flex; flex-direction: column; gap: 14px; }
.hero__art { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.sparks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spark { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); min-width: 0; }
.spark__head { display: flex; align-items: baseline; gap: 6px; font-family: var(--mono); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; }
.spark__sym { color: var(--text); font-weight: 500; }
.spark__px { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.spark__chg { margin-left: auto; font-variant-numeric: tabular-nums; }
.spark__chg.up { color: var(--success); } .spark__chg.down { color: var(--danger); }
.spark__svg { width: 100%; height: 44px; display: block; }
.spark__line { fill: none; stroke: var(--accent-hover); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s var(--ease) forwards; }
.spark.down .spark__line { stroke: var(--danger); }
.spark.up .spark__line { stroke: var(--success); }
.spark__area { fill: var(--accent); opacity: .12; }
.spark.down .spark__area { fill: var(--danger); } .spark.up .spark__area { fill: var(--success); }
.spark__cap { position: absolute; right: 10px; bottom: 6px; font-size: 10px; color: var(--text-3); font-family: var(--mono); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spark.is-empty .spark__svg { opacity: .3; }

/* ---------- Category page header art ---------- */
.pagehead--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 32px; align-items: center; }
.pagehead__text { display: flex; flex-direction: column; gap: 12px; }
.pagehead__art img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
@media (max-width: 1023px) { .pagehead--split { grid-template-columns: minmax(0, 1fr); } .pagehead__art { max-width: 520px; } }

/* ---------- Auto internal links ---------- */
.prose a.autolink { color: var(--text); background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
.prose a.autolink:hover { color: var(--accent-hover); }

/* ---------- Tor & leak check ---------- */
.checklist { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); }
.check__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.check.is-wait .check__dot { background: var(--accent); animation: pulse-dot 1s ease-in-out infinite; }
.check.is-ok .check__dot { background: var(--success); } .check.is-bad .check__dot { background: var(--danger); } .check.is-neutral .check__dot { background: var(--text-2); }
.check.is-ok, .check.is-bad, .check.is-neutral { color: var(--text); }
@keyframes pulse-dot { 50% { opacity: .35; } }
.verdict { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); background: var(--bg); font-size: var(--fs-sm); line-height: 1.55; }
.verdict--ok { border-left-color: var(--success); } .verdict--bad { border-left-color: var(--danger); } .verdict--warn { border-left-color: var(--warning); } .verdict--neutral, .verdict--info { border-left-color: var(--text-3); }
.verdict code { font-family: var(--mono); font-size: .9em; background: var(--bg-3); padding: 1px 6px; border-radius: 4px; }
.mini td.wrap { white-space: normal; word-break: break-all; }

/* ---------- Featured lead with illustration ---------- */
.card--lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 42%); grid-template-rows: auto auto 1fr auto; gap: 8px 24px; }
.card--lead > .tag { grid-column: 1; }
.card--lead > .card__title, .card--lead > .card__excerpt, .card--lead > .card__meta { grid-column: 1; }
.card__art { grid-column: 2; grid-row: 1 / -1; align-self: center; display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
@media (max-width: 640px) { .card--lead { grid-template-columns: minmax(0, 1fr); } .card__art { grid-column: 1; grid-row: auto; } }

/* ---------- New tools ---------- */
.field textarea.input { resize: vertical; min-height: 96px; font-family: var(--sans); }
.field textarea.mono { font-family: var(--mono); font-size: 12.5px; }
.field-row--pw { grid-template-columns: 1fr auto; }
.meter { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; margin: -4px 0 8px; }
.meter__bar { height: 100%; width: 0; background: var(--danger); transition: width .3s var(--ease), background .3s; }
.meter__bar.lv1 { background: var(--danger); } .meter__bar.lv2 { background: var(--warning); } .meter__bar.lv3, .meter__bar.lv4 { background: var(--success); }
.hints { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.hints li { padding-left: 18px; position: relative; color: var(--text-2); }
.hints li::before { content: "•"; position: absolute; left: 4px; }
.hints li.is-bad::before { color: var(--danger); } .hints li.is-ok::before { color: var(--success); }
.hints code { font-family: var(--mono); font-size: 12px; background: var(--bg-3); padding: 1px 6px; border-radius: 4px; }
.wrap-all { word-break: break-all; text-align: left !important; }
.result-row--big strong.wrap-all { font-size: var(--fs-base); font-weight: 500; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text-2); text-align: center; font-size: var(--fs-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: rgba(99,102,241,.06); }
.preview { display: block; max-width: 100%; max-height: 260px; border-radius: var(--radius); border: 1px solid var(--border); margin-top: 8px; }
.authrow { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); }
.pill--ok { color: var(--success); border-color: rgba(63,185,80,.5); } .pill--bad { color: var(--danger); border-color: rgba(248,81,73,.5); } .pill--warn { color: var(--warning); border-color: rgba(210,153,34,.5); }
.qgroup { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.qgroup legend { padding: 0 6px; font-size: var(--fs-sm); font-weight: 600; }
.opt { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; padding: 4px 0; }
.opt input { accent-color: var(--accent); width: 15px; height: 15px; }
.opt:hover { color: var(--text); }
.planlist { margin: 0 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.planlist a { color: var(--accent-hover); }
.planlist .tag { margin-left: 6px; height: 18px; font-size: 10px; }


/* ---------- Home tools section: featured worksheet + compact list ---------- */
.toolhero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 28px 32px; border: 1px solid rgba(99,102,241,.45); border-radius: var(--radius); background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(99,102,241,.04) 60%, transparent), var(--bg-2); color: var(--text); overflow: hidden; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s var(--ease); }
.toolhero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); }
.toolhero:hover { border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.3), 0 0 0 1px rgba(99,102,241,.3); color: var(--text); }
.toolhero__icon { position: relative; width: 64px; height: 64px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(99,102,241,.35); }
.toolhero__icon svg { width: 30px; height: 30px; }
.toolhero__icon::after { content: ""; position: absolute; inset: -6px; border-radius: 18px; border: 1px solid rgba(99,102,241,.5); animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.25); opacity: 0; } }
.toolhero__text { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.toolhero__kicker { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-hover); }
.toolhero__title { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.01em; }
.toolhero__desc { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; max-width: 560px; }
.toolhero .btn { position: relative; white-space: nowrap; }
.toollist { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); overflow: hidden; }
.toolrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); transition: background .15s; }
.toolrow:nth-child(odd) { border-right: 1px solid var(--border); }
.toolrow:nth-last-child(-n+2) { border-bottom: 0; }
.toolrow:hover { background: var(--bg-3); color: var(--text); }
.toolrow__icon { width: 40px; height: 40px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; background: var(--bg-3); color: var(--accent-hover); }
.toolrow__title { font-size: var(--fs-sm); font-weight: 600; }
.toolrow__desc { font-size: 13px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toolrow__arrow { color: var(--text-3); transition: transform .15s, color .15s; }
.toolrow:hover .toolrow__arrow { transform: translateX(3px); color: var(--accent-hover); }

/* ---------- Micro-animations: value tick, loading shimmer ---------- */
.tick { animation: tick .35s var(--ease); }
@keyframes tick { 0% { opacity: .35; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }
.ticker.is-loading .ticker__px, .spark.is-empty .spark__px, .rates-status:empty { position: relative; color: transparent; }
.ticker.is-loading .ticker__px::after, .spark.is-empty .spark__px::after { content: ""; position: absolute; inset: 2px 0; border-radius: 3px; background: linear-gradient(90deg, var(--bg-3) 25%, var(--border) 50%, var(--bg-3) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }


/* ---------- View transitions (cross-document) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms ease-out both vt-out; }
::view-transition-new(root) { animation: 220ms ease-out both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
.vt-title { view-transition-name: article-title; }
::view-transition-old(article-title), ::view-transition-new(article-title) { animation-duration: 260ms; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---------- Cursor glow on card borders ---------- */
.glow > .card, .glow > .catcard, .glow > .toolrow, .glow > .list, .glow .card--lead { position: relative; }
.glow > .card::after, .glow > .catcard::after, .glow > .toolrow::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(129, 140, 248, .75), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.glow.is-active > .card::after, .glow.is-active > .catcard::after, .glow.is-active > .toolrow::after { opacity: 1; }
.glow > .toolrow::after { border-radius: 0; }

/* ---------- Command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.palette__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .15s ease-out; }
.palette__panel { position: relative; width: 100%; max-width: 640px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(99,102,241,.15); overflow: hidden; animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.palette__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.palette__head input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font: inherit; font-size: var(--fs-base); color: var(--text); }
.palette__head kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; color: var(--text-3); }
.palette__results { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette__results li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); cursor: pointer; color: var(--text); }
.palette__results li.is-active, .palette__results li:hover { background: rgba(99,102,241,.14); }
.palette__results li .p-ico { color: var(--accent-hover); display: inline-flex; }
.palette__results li .p-title { font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__results li .p-sub { font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__results li .p-kind { font-size: var(--fs-xs); color: var(--text-3); }
.palette__results .p-group { padding: 8px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); cursor: default; }
.palette__results .p-group:hover { background: transparent; }
.palette__empty { padding: 24px; text-align: center; color: var(--text-2); font-size: var(--fs-sm); }
.palette__foot { padding: 8px 16px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); }
body.palette-open { overflow: hidden; }

/* ---------- Live Bitcoin blocks (hero) + sidebar ---------- */
.live { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; min-height: 250px; }
.live__head { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--text-2); }
.live__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.live-side__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(63,185,80,.6); animation: beat 2s ease-out infinite; display: inline-block; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(63,185,80,.6); } 70% { box-shadow: 0 0 0 7px rgba(63,185,80,0); } 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); } }
.live.is-error .live-side__dot, .live-side.is-error .live-side__dot { background: var(--text-3); animation: none; box-shadow: none; }
.live__chain { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: stretch; }
.live__mempool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px dashed rgba(99,102,241,.6); border-radius: var(--radius); background: rgba(99,102,241,.08); padding: 10px 6px; text-align: center; animation: mp 3s ease-in-out infinite; }
@keyframes mp { 50% { background: rgba(99,102,241,.16); } }
.live__mp-label { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-hover); }
.live__mempool strong { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.live__mp-sub { font-size: 10px; color: var(--text-2); }
.live__blocks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; min-height: 120px; position: relative; }
.lblock { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; padding: 10px 8px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); min-width: 0; position: relative; overflow: hidden; }
.lblock::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); opacity: .7; }
.lblock__h { font-family: var(--mono); font-size: 11px; color: var(--text); font-weight: 500; }
.lblock__tx { font-size: 11px; color: var(--text-2); }
.lblock__fee { font-family: var(--mono); font-size: 10px; color: var(--accent-hover); }
.lblock__ago { font-size: 10px; color: var(--text-3); }
.lblock.is-new { animation: land .9s var(--ease); }
.lblock.is-new::before { background: var(--success); opacity: 1; box-shadow: 0 0 14px rgba(63,185,80,.6); }
@keyframes land { 0% { transform: translateX(-40px) scale(.9); opacity: 0; } 60% { transform: translateX(4px) scale(1.02); opacity: 1; } 100% { transform: none; } }
.live__fees { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.live__fees strong { color: var(--text); }
.live__fallback { margin-top: 4px; }
.live-side { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.live-side strong { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Explainers ---------- */
.explainer { margin: 0 0 32px; padding: 18px 20px 16px; border: 1px solid rgba(99,102,241,.35); border-radius: var(--radius); background: linear-gradient(180deg, rgba(99,102,241,.08), transparent 40%), var(--bg-2); }
.explainer__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.explainer__head h3 { font-size: var(--fs-base); }
.explainer__head p { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; }
.explainer .btnrow { margin-top: 12px; }
.hashchain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hblock { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; transition: border-color .25s, box-shadow .25s; }
.hblock + .hblock::before { content: "→"; position: absolute; left: -12px; top: 12px; color: var(--text-3); font-size: 12px; }
.hblock.is-valid { border-color: rgba(63,185,80,.5); }
.hblock.is-broken { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248,81,73,.15); }
.hblock__n { font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.hblock__f { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-3); }
.hblock__f input { width: 100%; min-width: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font: 12px var(--mono); padding: 5px 6px; outline: 0; }
.hblock__f input:focus { border-color: var(--accent); }
.hblock__f code { font-family: var(--mono); font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hblock.is-broken .hblock__hash { color: var(--danger); } .hblock.is-valid .hblock__hash { color: var(--success); }
.torroute { position: relative; padding: 8px 0 4px; }
.torroute__nodes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tnode { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: var(--fs-xs); color: var(--text-2); }
.tnode__dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-3); transition: border-color .25s, box-shadow .25s; }
.tnode.is-on .tnode__dot { border-color: var(--accent-hover); box-shadow: 0 0 0 5px rgba(99,102,241,.18); }
.tnode__k { font-family: var(--mono); font-size: 10px; color: var(--text-3); min-height: 26px; line-height: 1.3; }
.torroute__track { position: relative; height: 40px; margin: 22px 10% 0; border-top: 1px dashed var(--border); }
.tpacket { position: absolute; top: -20px; left: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; transform: translateX(-50%); transition: left 1s cubic-bezier(.4,0,.2,1); }
.tpacket__layer { position: absolute; inset: 0; border-radius: 50%; border: 2px solid; transition: opacity .35s, transform .35s; }
.tpacket__layer.l1 { inset: 6px; border-color: var(--success); } .tpacket__layer.l2 { inset: 3px; border-color: var(--accent-hover); } .tpacket__layer.l3 { inset: 0; border-color: var(--accent); }
.tpacket__layer.is-off { opacity: 0; transform: scale(1.6); }
.tpacket__core { font-size: 14px; }
.dcaex__controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.dcaex__legend { margin-right: 14px; }
.sw { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 6px; }
.sw--accent { background: var(--accent-hover); } .sw--muted { background: var(--text-2); }
.chart .buy { fill: var(--accent-hover); }
.chart .avg { stroke: var(--accent-hover); stroke-width: 1.5; stroke-dasharray: 4 3; fill: none; }
.chart .avgp { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 2 3; fill: none; }
.chart .price { stroke: var(--text); stroke-width: 1.5; fill: none; }

/* ---------- Glossary constellation ---------- */
.constellation { margin-bottom: 28px; }
.constellation__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.constellation__head h2 { font-size: var(--fs-lg); }
.constellation__wrap { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: radial-gradient(600px 300px at 50% 40%, rgba(99,102,241,.10), transparent 70%), var(--bg-2); overflow: hidden; }
.constellation__wrap canvas { display: block; width: 100%; height: 460px; cursor: grab; }
.constellation__wrap canvas.is-dragging { cursor: grabbing; }
.constellation__tip { position: absolute; max-width: 280px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: var(--fs-xs); color: var(--text-2); pointer-events: none; z-index: 2; }
.constellation__tip strong { display: block; color: var(--text); font-size: var(--fs-sm); margin-bottom: 4px; }

/* ---------- Hero v3: text + footprint, live band, sparks row ---------- */
.hero { grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); gap: 48px; align-items: stretch; padding: 24px 0 32px; margin-bottom: 20px; border-bottom: 0; }
.hero__text { display: flex; flex-direction: column; justify-content: center; }
.footprint { position: relative; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.footprint::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 200px at 100% 0%, rgba(99,102,241,.16), transparent 70%); }
.footprint__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; font-size: var(--fs-xs); color: var(--text-2); }
.footprint__kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.footprint__time { white-space: nowrap; font-size: 10px; }
.footprint__time { font-family: var(--mono); color: var(--text-3); }
.footprint__title { font-size: var(--fs-lg); position: relative; }
.footprint__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-family: var(--mono); font-size: 12.5px; position: relative; }
.footprint__lines li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); opacity: 0; transform: translateX(-6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.footprint__lines li.is-in { opacity: 1; transform: none; }
.footprint__lines li:last-child { border-bottom: 0; }
.footprint__k { color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; padding-top: 2px; }
.footprint__v { color: var(--text); overflow-wrap: anywhere; }
.footprint__v.is-bad { color: var(--danger); } .footprint__v.is-ok { color: var(--success); } .footprint__v.is-wait { color: var(--text-3); }
.footprint__v.typing::after { content: ""; display: inline-block; width: 6px; height: 12px; margin-left: 3px; vertical-align: -2px; background: var(--accent-hover); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.footprint__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; position: relative; padding-top: 4px; }
.footprint__cta { font-size: var(--fs-sm); font-weight: 600; color: var(--accent-hover); }
.liveband { border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(180deg, rgba(99,102,241,.06), transparent 60%), var(--bg-2); padding: 16px 20px 14px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.liveband .live__chain { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
.liveband .live__mempool { padding: 16px 10px; gap: 4px; }
.liveband .live__mempool strong { font-size: var(--fs-2xl); }
.liveband .live__mp-fee { font-family: var(--mono); font-size: 10.5px; color: var(--text-2); margin-top: 4px; }
.liveband .live__blocks { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; min-height: 132px; }
.liveband .lblock { padding: 14px 12px 12px; gap: 6px; }
.liveband .lblock__h { font-size: 13px; }
.liveband .lblock__tx { font-size: 12px; }
.liveband .lblock__sz { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.liveband .lblock__fee { font-size: 11px; }
.liveband .live__fees { font-size: var(--fs-sm); }
.sparks--row { margin-bottom: 44px; }
.sparks--row .spark { padding: 12px 14px 10px; }
.sparks--row .spark__svg { height: 56px; }

.notfound { max-width: 560px; padding: 48px 0; display: flex; flex-direction: column; gap: 16px; }
.notfound h1 { font-size: var(--fs-4xl); }

/* ---------- Responsive, consolidated (must stay last) ---------- */
@media (max-width: 1279px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 32px; }
}
@media (max-width: 1023px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 16px 0 24px; }
  .liveband .live__blocks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .liveband .live__blocks .lblock:nth-child(n+5) { display: none; }
  .hero__visual { max-width: 640px; }
  .card--lead { grid-template-columns: minmax(0, 1fr) minmax(160px, 38%); }
  .toollist { grid-template-columns: minmax(0, 1fr); }
  .toolrow:nth-child(odd) { border-right: 0; }
  .toolrow:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .toolrow:last-child { border-bottom: 0; }
  .toolhero { grid-template-columns: auto minmax(0, 1fr); }
  .toolhero .btn { grid-column: 2; justify-self: start; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .liveband .live__chain { grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
  .liveband .live__blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .liveband .live__blocks .lblock:nth-child(n+3) { display: none; }
  .liveband .live__fees { flex-direction: column; gap: 4px; }
  .footprint__lines li { grid-template-columns: 80px minmax(0, 1fr); }
  .hashchain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hblock + .hblock::before { display: none; }
  .tnode__k { display: none; }
  .torroute__nodes { gap: 4px; }
  .tnode { font-size: 11px; }
  .torroute__track { margin: 34px 10% 0; }
  #tor-status { margin-top: 10px; font-family: var(--mono); font-size: 12px; min-height: 18px; }
  .footprint__kicker { white-space: normal; }
  .footprint__lines li { grid-template-columns: 72px minmax(0, 1fr); font-size: 12px; }
  .constellation__wrap canvas { height: 300px; }
  .dcaex__controls { grid-template-columns: 1fr; }
  .constellation__wrap canvas { height: 320px; }
  .palette { padding: 8vh 8px 8px; }
  .hero { padding: 8px 0 32px; gap: 24px; }
  .hero h1 { font-size: 30px; }
  .hero__visual { max-width: none; }
  .sparks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .spark { padding: 8px 8px 6px; }
  .spark__head { font-size: 10.5px; gap: 4px; }
  .spark__cap { display: none; }
  .card--lead { grid-template-columns: minmax(0, 1fr); }
  .card__art { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .pagehead--split { gap: 16px; }
  .pagehead__art { max-width: none; }
  .toolhero { padding: 20px; gap: 14px; grid-template-columns: auto minmax(0, 1fr); }
  .toolhero__icon { width: 48px; height: 48px; border-radius: 12px; }
  .toolhero__icon svg { width: 24px; height: 24px; }
  .toolhero__title { font-size: var(--fs-lg); }
  .toolhero .btn { grid-column: 1 / -1; width: 100%; }
  .tool { gap: 12px; }
  .panel__body { padding: 14px 12px; }
  .field-row { grid-template-columns: 1fr; }
  .field-row .swap { justify-self: start; }
  .field-row--2 { grid-template-columns: 1fr 1fr; }
  .result-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .result-row > span:last-child { text-align: left; }
  .result-row--big strong { font-size: var(--fs-2xl); }
  .mini { font-size: 12px; }
  .mini th, .mini td { padding: 6px 8px; }
  .video-grid { grid-template-columns: minmax(0, 1fr); }
  .prose pre { font-size: 12.5px; padding: 40px 12px 14px; }
  .prose .table-wrap { margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .prose table { min-width: 480px; }
  .article-quote { padding: 14px 16px; margin: 24px 0; }
  .article-quote p { font-size: var(--fs-base); }
  .illustration { padding: 10px; }
  .reader__title { font-size: 26px; }
  .article-meta { font-size: var(--fs-xs); }
  .footer { padding: 28px 0 24px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .glossary__list { grid-template-columns: minmax(0, 1fr); }
  .alpha a, .alpha span { width: 28px; height: 28px; }
  .langswitch a { padding: 0 8px; font-size: 11px; }
  .checklist { gap: 6px; }
  .qgroup { padding: 10px 12px; }
  .planlist { padding-left: 18px; }
}
@media (max-width: 440px) {
  .hashchain { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .sparks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spark__chg { display: none; }
  .btn { padding: 0 12px; }
}

/* ---------- Exposure report ---------- */
.xr { display: flex; flex-direction: column; gap: 14px; }
.xr__top { display: flex; align-items: center; gap: 22px; }
.xr__ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.xr__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.xr__track { fill: none; stroke: var(--bg-3); stroke-width: 10; }
.xr__arc { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.xr__arc.is-good { stroke: var(--success); } .xr__arc.is-warn { stroke: var(--warning); } .xr__arc.is-bad { stroke: var(--danger); }
.xr__num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.xr__num strong { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.xr__num span { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.xr__meta { display: flex; flex-direction: column; gap: 4px; }
.xr__grade { font-size: var(--fs-xl); font-weight: 600; }
.xr__cats { display: flex; flex-direction: column; gap: 8px; }
.xr__cat { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; align-items: center; gap: 12px; font-size: var(--fs-sm); }
.xr__cat strong { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.xr__bar { height: 8px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.xr__bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .8s var(--ease); }
.xr__bar i.is-good { background: var(--success); } .xr__bar i.is-warn { background: var(--warning); } .xr__bar i.is-bad { background: var(--danger); }
.xr__findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.xr__f { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); line-height: 1.5; }
.xr__f:last-child { border-bottom: 0; }
.xr__f-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--text-3); }
.xr__f.is-good .xr__f-dot { background: var(--success); } .xr__f.is-warn .xr__f-dot { background: var(--warning); } .xr__f.is-bad .xr__f-dot { background: var(--danger); }
@media (max-width: 640px) { .xr__cat { grid-template-columns: 96px minmax(0, 1fr) 40px; } .xr__top { gap: 14px; } .xr__ring { width: 108px; height: 108px; } .xr__num strong { font-size: 32px; } }
