/* Guides, articles and the About page. Loaded after styles.css, which supplies the colour tokens, type and buttons. */

html, body.doc { height: auto; }
body.doc { --doc-w: min(100% - 40px, 1120px); --read-w: min(100% - 40px, 720px); background: var(--bg); overflow-x: clip; }
.doc a { text-underline-offset: 3px; }
.doc em, .doc i, .doc cite { font-style: italic; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); }
.skip:focus { left: 12px; }

/* nav: the landing page's own, see styles.css */
.doc .lp-nav { margin-top: 12px; }
@media (max-width: 560px) { .doc .lp-nav { margin-top: 8px; } }

/* article head */
.post { width: var(--read-w); margin: 0 auto; padding: 72px 0 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span { color: var(--faint); }
.post-head h1 { margin-top: 20px; font-size: clamp(32px, 5.4vw, 54px); font-weight: 800; line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
.post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.post-byline a { color: var(--ink-2); font-weight: 600; }
.post-byline span { color: var(--faint); }
.post-hero { margin: 32px 0 0; }
.post-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; background: var(--fill); box-shadow: var(--shadow-card); }
.post-hero figcaption { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--faint); }
.post-hero figcaption a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.post-hero figcaption a:hover { color: var(--accent-text); }

/* answer, takeaways, contents */
.answer, .takeaways, .toc { margin-top: 28px; padding: 22px 24px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); }
.answer { margin-top: 36px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.answer h2, .takeaways h2, .toc h2 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.answer h2 { color: var(--accent-text); }
.answer p { margin-top: 10px; font-size: 18px; line-height: 1.55; letter-spacing: -0.012em; color: var(--ink); text-wrap: pretty; }
.takeaways ul, .toc ol { margin: 12px 0 0; padding-left: 20px; }
.takeaways li, .toc li { margin-top: 8px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.takeaways li::marker { color: var(--accent); }
.toc { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.toc li::marker { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent-text); text-decoration: underline; }

/* prose */
.prose { margin-top: 40px; font-size: 17.5px; line-height: 1.68; letter-spacing: -0.008em; color: var(--ink-2); }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 56px; font-size: clamp(25px, 3.4vw, 32px); font-weight: 800; line-height: 1.12; letter-spacing: -0.035em; color: var(--ink); text-wrap: balance; scroll-margin-top: 92px; }
.prose h3 { margin-top: 36px; font-size: 20px; font-weight: 750; line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); scroll-margin-top: 92px; }
.prose h2 + *, .prose h3 + * { margin-top: 14px; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose a { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 35%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose li > ul, .prose li > ol { margin-top: 8px; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 28px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--ink); }
.prose blockquote > * + * { margin-top: 12px; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--fill); font-family: var(--mono); font-size: 0.86em; }
.prose pre { padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-card); overflow-x: auto; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose hr { margin: 44px 0; border: 0; border-top: 1px solid var(--line); }
.table-wrap { margin: 28px 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font-size: 13px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); background: var(--fill-2); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 650; color: var(--ink); }

/* faq and sources */
.faq, .sources { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.faq h2, .sources h2, .related h2 { font-size: clamp(25px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.035em; scroll-margin-top: 92px; }
.faq details { margin-top: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); }
.faq details:first-of-type { margin-top: 24px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.35; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font-family: var(--mono); font-size: 20px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 20px 20px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.sources ol { margin: 20px 0 0; padding-left: 24px; }
.sources li { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.sources li::marker { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.sources a { color: var(--ink-2); }
.sources-note { margin-top: 24px; font-size: 14px; color: var(--muted); }
.sources-note a { color: var(--ink-2); }

/* call to action */
.doc-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: var(--read-w); margin: 72px auto 0; padding: 32px; border-radius: 24px; background: var(--ink); color: var(--bg); }
.doc-cta h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.doc-cta p { max-width: 34em; margin-top: 8px; font-size: 15.5px; line-height: 1.5; color: color-mix(in srgb, var(--bg) 66%, transparent); }
.doc-cta .btn { flex: none; height: 52px; padding: 0 26px; border-radius: 100px; font-size: 16px; text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .doc-cta { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
  .doc-cta p { color: var(--muted); }
}

/* cards and the index */
.related { width: var(--doc-w); margin: 88px auto 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.post-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--fill); }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.post-card .post-meta { margin-top: auto; }
.post-cat, .post-meta, .kicker { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.post-cat, .kicker { color: var(--accent-text); }
.post-card h3 { margin-top: 12px; font-size: 20px; font-weight: 800; line-height: 1.16; letter-spacing: -0.03em; text-wrap: balance; }
.post-card p { margin: 10px 0 18px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.post-meta { margin-top: auto; color: var(--faint); }

.blog-head { width: var(--doc-w); margin: 0 auto; padding: 88px 0 24px; }
.blog-head h1 { margin-top: 16px; font-size: clamp(40px, 7vw, 84px); font-weight: 800; line-height: 0.98; letter-spacing: -0.05em; }
.blog-head > p:last-child { max-width: 36em; margin-top: 24px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--ink-2); }
.blog-cat { width: var(--doc-w); margin: 72px auto 0; scroll-margin-top: 92px; }
.blog-cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.blog-cat-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.04em; }
.blog-cat-head p { font-size: 15.5px; color: var(--muted); }
.blog-cat ~ .doc-cta, .blog-head ~ .doc-cta { width: var(--doc-w); margin-top: 96px; }

/* footer */
.doc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; width: var(--doc-w); margin: 96px auto 0; padding: 32px 0 56px; border-top: 1px solid var(--line); font-size: 14px; }
.doc-foot .brand-mark svg { width: 20px; height: 20px; }
.doc-foot .brand-word { font-size: 15px; font-weight: 800; }
.doc-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.doc-foot nav a { color: var(--muted); text-decoration: none; }
.doc-foot nav a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body.doc { --doc-w: calc(100% - 32px); --read-w: calc(100% - 32px); }
  .post { padding-top: 48px; }
  .post-hero { margin-top: 24px; }
  .post-hero img { border-radius: 16px; }
  .answer, .takeaways, .toc { padding: 18px 18px; border-radius: 18px; }
  .answer p { font-size: 17px; }
  .prose { margin-top: 32px; font-size: 17px; }
  .prose h2 { margin-top: 44px; }
  .prose th, .prose td { padding: 10px 12px; }
  .prose table { font-size: 14.5px; min-width: 520px; }
  .doc-cta { flex-direction: column; align-items: stretch; margin-top: 56px; padding: 24px 20px; }
  .doc-cta .btn { justify-content: center; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-head { padding-top: 56px; }
  .blog-cat { margin-top: 56px; }
  .doc-foot { margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card { transition: none; }
  .post-card:hover { transform: none; }
}

/* ---------- rich blocks (scripts/blog-blocks.mjs) ---------- */

body.doc { --viz-1: #F0502F; --viz-2: #0E9F74; --viz-3: #7C5CF6; --viz-4: #B8860B; --viz-0: #C9C4BC; --kf: #F0502F; --ks: #0E9F74; --kl: #7C5CF6; --kx: #C9C4BC; }
@media (prefers-color-scheme: dark) {
  body.doc { --viz-1: #E8593A; --viz-2: #17997A; --viz-3: #8468F0; --viz-4: #B5872B; --viz-0: #4A4642; --kf: #E8593A; --ks: #17997A; --kl: #8468F0; --kx: #4A4642; }
}

.read-bar { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 3px; pointer-events: none; }
.read-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: 0 50%; }
.toc-rail { display: none; }
@media (min-width: 1280px) {
  .toc-rail { position: fixed; top: 128px; left: calc(50% - 360px - 264px); z-index: 5; display: block; width: 216px; max-height: calc(100dvh - 176px); overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; scrollbar-width: none; }
  .toc-rail.show { opacity: 1; visibility: visible; }
  .toc-rail p { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
  .toc-rail ol { margin: 12px 0 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
  .toc-rail a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; font-size: 13px; line-height: 1.35; color: var(--muted); text-decoration: none; }
  .toc-rail a:hover { color: var(--ink); }
  .toc-rail a.on { border-left-color: var(--accent); color: var(--ink); font-weight: 650; }
}

.prose > figure, .prose > aside, .prose > section.tool, .prose > .stats, .prose > .next-card { margin-top: 32px; margin-bottom: 32px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* charts */
.viz { padding: 22px 24px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); }
.viz > figcaption strong { display: block; font-size: 17px; font-weight: 750; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); }
.viz > figcaption span { display: block; margin-top: 4px; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend i { width: 10px; height: 10px; border-radius: 3px; }
.viz-svg { display: block; width: 100%; height: auto; margin-top: 18px; overflow: visible; font-family: var(--font); }
.viz-narrow { display: none; }
.viz-c0 { fill: var(--viz-0); background: var(--viz-0); }
.viz-c1 { fill: var(--viz-1); background: var(--viz-1); }
.viz-c2 { fill: var(--viz-2); background: var(--viz-2); }
.viz-c3 { fill: var(--viz-3); background: var(--viz-3); }
.viz-c4 { fill: var(--viz-4); background: var(--viz-4); }
.viz-kf { fill: var(--kf); background: var(--kf); }
.viz-ks { fill: var(--ks); background: var(--ks); }
.viz-kl { fill: var(--kl); background: var(--kl); }
.viz-kx { fill: var(--kx); background: var(--kx); }
.viz-svg rect { transition: opacity 0.12s; }
.viz-svg:hover rect[data-tip] { opacity: 0.55; }
.viz-svg rect[data-tip]:hover { opacity: 1; }
.viz-label { fill: var(--ink); font-size: 13.5px; font-weight: 650; }
.viz-value { fill: var(--ink-2); font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.viz-meta, .viz-tick { fill: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.viz-in { fill: #fff; font-family: var(--mono); font-size: 12px; font-weight: 600; pointer-events: none; }
.viz-grid { stroke: var(--line); stroke-width: 1; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-s1 { stroke: var(--viz-1); } .viz-s2 { stroke: var(--viz-2); } .viz-s3 { stroke: var(--viz-3); } .viz-s4 { stroke: var(--viz-4); }
.viz-dot { stroke: var(--surface); stroke-width: 2; }
.viz-hit { fill: transparent; cursor: crosshair; }
.viz-data { margin-top: 14px; }
.viz-data summary { display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.viz-data summary:hover { color: var(--ink); }
.viz-data .table-wrap { margin: 12px 0 0; box-shadow: inset 0 0 0 1px var(--line); }
.viz-source { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.01em; color: var(--faint); }
.prose .viz-source a { color: var(--muted); text-decoration-color: var(--line-2); }
.viz-tip { position: absolute; z-index: 40; max-width: 260px; padding: 7px 10px; border-radius: 9px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; line-height: 1.35; pointer-events: none; box-shadow: var(--shadow-pop); }

/* big numbers */
.stats { display: grid; gap: 12px; }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; padding: 20px 20px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); }
.stat strong { font-size: clamp(30px, 4.6vw, 40px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; color: var(--ink); }
.stat p { margin: 10px 0 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.prose .stat a { margin-top: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-decoration-color: var(--line-2); }

/* callouts */
.callout { padding: 18px 22px 20px; border-radius: 18px; background: var(--surface); box-shadow: inset 3px 0 0 var(--c, var(--line-2)), var(--shadow-card); font-size: 16.5px; line-height: 1.6; }
.callout > * + * { margin-top: 10px; }
.callout-kind { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--k, var(--muted)); }
.callout-title { font-size: 18px; font-weight: 750; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); }
.callout-tip { --c: var(--short-a); --k: var(--short-text); }
.callout-warning { --c: #E9B000; --k: var(--warn-text); }
.callout-myth { --c: var(--accent); --k: var(--accent-text); }
.callout-definition { --c: var(--long-a); --k: var(--long-text); }
@media (prefers-color-scheme: dark) { .callout-warning { --k: #F0C24A; } }

/* words to copy */
.copybox { border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.copybox figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 6px 8px 6px 18px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.prose .copybox pre { margin: 0; padding: 16px 18px 18px; border-radius: 0; background: none; box-shadow: none; font-family: var(--font); font-size: 15.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-btn, .link-btn { height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--fill); color: var(--ink); font: 600 13px var(--font); letter-spacing: 0; text-transform: none; cursor: pointer; }
.copy-btn:hover { background: var(--line); }
.copy-btn[hidden] { display: none; }
.link-btn { height: auto; padding: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* pull quote */
.pull { padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); }
.prose .pull blockquote { margin: 0; padding: 0; border: 0; }
.pull blockquote p { font-size: clamp(20px, 2.6vw, 24px); font-weight: 650; line-height: 1.38; letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.pull figcaption { margin-top: 12px; }

/* video, photo, product clip */
.yt-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; background: #000; box-shadow: var(--shadow-card); overflow: hidden; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-poster { position: absolute; inset: 0; display: block; }
.yt-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.86; transition: opacity 0.15s, transform 0.3s; }
.yt-poster:hover img { opacity: 1; transform: scale(1.015); }
.yt-play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--accent); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6); }
.yt-play::after { content: ''; position: absolute; left: 29px; top: 23px; border: 13px solid transparent; border-left: 21px solid #fff; border-right: 0; }
.yt figcaption, .shot figcaption, .clip figcaption { margin-top: 12px; }
.yt figcaption strong { color: var(--ink-2); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; background: var(--fill); box-shadow: var(--shadow-card); }
.shot figcaption span { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.prose .shot figcaption span a { color: var(--muted); text-decoration-color: var(--line-2); }
.clip-frame { border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden; }
.clip-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--fill-2); }
.clip-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.clip-bar span { margin: 0 auto; padding-right: 39px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--faint); }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: var(--fill); }

/* read next */
.prose a.next-card { display: grid; grid-template-columns: 176px minmax(0, 1fr); align-items: center; gap: 18px; padding: 10px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.prose a.next-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.next-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.next-card > span { display: flex; flex-direction: column; gap: 5px; padding-right: 12px; }
.next-kicker { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.next-card strong { font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; }
.next-why { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* tools */
.tool { padding: 24px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow-card); }
.prose .tool-title { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -0.03em; color: var(--ink); }
.tool-title::before { content: 'Try it'; display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.quiz .tool-title::before { content: 'Quick quiz'; }
.checklist .tool-title::before { content: 'Checklist'; }
.picker .tool-title::before { content: 'Browse'; }
.tool-text { margin-top: 8px; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.tool-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 20px; }
.tool-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.tool-field .input { width: 100%; height: 44px; font-size: 16px; }
.tool-field small { font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--muted); }
.tool-result { margin-top: 20px; }
.tool-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: 14px; }
.tool-out div { padding: 14px 16px; border-radius: 14px; background: var(--fill-2); }
.tool-out strong { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; color: var(--ink); }
.tool-out span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.tool-foot { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.tool-foot[hidden] { display: none; }
.tool-foot .link-btn { display: inline; margin-left: 12px; font-size: 13.5px; font-weight: 500; }
.tool .copybox { margin: 20px 0 0; box-shadow: inset 0 0 0 1px var(--line); }
.strip { display: flex; gap: 2px; height: 34px; }
.strip i { display: flex; flex: 1 1 0; align-items: center; justify-content: center; min-width: 3px; border-radius: 5px; font-style: normal; overflow: hidden; }
.strip span { font-family: var(--mono); font-size: 12px; font-weight: 600; color: #fff; }
.strip-f { background: var(--kf); } .strip-s { background: var(--ks); } .strip-l { background: var(--kl); }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.12s, box-shadow 0.12s; }
.opt:hover { background: var(--fill-2); }
.opt input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.opt:has(input:checked) { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.quiz fieldset { margin: 20px 0 0; padding: 0; border: 0; }
.quiz legend { padding: 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.quiz .opt { margin-top: 8px; }
.quiz-result { margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); font-size: 16px; line-height: 1.6; }
.quiz-result > * + * { margin-top: 8px; }
.quiz-result .callout-kind { color: var(--accent-text); }
.quiz-result h4 { font-size: 19px; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); }
.quiz.live .quiz-result:not(.on) { display: none; }
.quiz:not(.live) .quiz-result .callout-kind { display: none; }
.prose .checklist ul { margin: 18px 0 0; padding: 0; list-style: none; }
.prose .checklist li + li { margin-top: 8px; }
.checklist .opt:has(input:checked) span { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chips[hidden] { display: none; }
.chip-btn { height: 34px; padding: 0 14px; border: 0; border-radius: 100px; background: var(--fill); color: var(--ink-2); font: 600 13.5px var(--font); cursor: pointer; transition: background-color 0.12s, color 0.12s; }
.chip-btn:hover { background: var(--line); }
.chip-btn[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
.chip-dice { margin-left: auto; background: var(--accent-soft); color: var(--accent-text); }
.picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.pick { padding: 16px 18px; border-radius: 14px; background: var(--fill-2); transition: box-shadow 0.15s, background-color 0.15s; }
.pick[hidden] { display: none; }
.pick strong { display: block; font-size: 15.5px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.pick p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.pick .pick-tags { font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; color: var(--faint); }
.pick.chosen { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.timer-tool { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; margin-top: 20px; }
.dial { position: relative; flex: none; width: 176px; height: 176px; }
.dial svg { display: block; width: 100%; height: 100%; }
.dial-track { fill: none; stroke: var(--fill); stroke-width: 9; }
.dial-arc { fill: none; stroke: var(--kf); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.dial.rest .dial-arc { stroke: var(--ks); }
.dial-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.dial-time { font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dial-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.timer-side { flex: 1; min-width: 220px; }
.timer-side .chips { margin-top: 0; }
.timer-btns { display: flex; gap: 8px; margin-top: 14px; }
.timer-btns .btn { height: 42px; padding: 0 20px; border-radius: 100px; }

/* tools on the guides index */
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.tool-link { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.tool-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.tool-link strong { font-size: 15.5px; font-weight: 750; line-height: 1.25; letter-spacing: -0.015em; }
.tool-from { margin-top: auto; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.tool { scroll-margin-top: 92px; }
@media (max-width: 1000px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }

/* more in this category */
.more-in { margin-top: 56px; padding: 22px 24px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.more-in h2 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.more-in ul { margin: 12px 0 0; padding-left: 20px; }
.more-in li { margin-top: 8px; font-size: 15.5px; line-height: 1.45; }
.more-in li::marker { color: var(--accent); }
.more-in a { color: var(--ink-2); text-decoration: none; }
.more-in a:hover { color: var(--accent-text); text-decoration: underline; }
.more-in p { margin-top: 14px; font-size: 14px; font-weight: 650; }
.more-in p a { color: var(--accent-text); }

@media (max-width: 600px) {
  .viz-wide { display: none; }
  .viz-narrow { display: block; }
  .viz { padding: 18px 16px 16px; border-radius: 18px; }
  .stats-3 { grid-template-columns: minmax(0, 1fr); }
  .stats-2, .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 16px 16px 14px; }
  .callout { padding: 16px 18px 18px; font-size: 16px; }
  .tool { padding: 18px 16px; border-radius: 18px; }
  .picker-grid { grid-template-columns: minmax(0, 1fr); }
  .chip-dice { margin-left: 0; }
  .prose a.next-card { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; }
  .next-card strong { font-size: 16px; }
  .next-why { display: none; }
  .timer-tool { justify-content: center; }
  .yt-frame, .shot img { border-radius: 16px; }
  .yt-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .yt-play::after { left: 24px; top: 19px; border-width: 11px; border-left-width: 18px; }
  .more-in { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .prose a.next-card, .yt-poster img, .dial-arc { transition: none; }
  .prose a.next-card:hover { transform: none; }
}

/* ---------- standalone tools (/tools) ---------- */
.tool-page { width: min(100% - 32px, 860px); margin: 0 auto; padding: 72px 0 0; }
.tool-page .post-head h1 { font-size: clamp(34px, 5vw, 52px); }
.tool-lede { margin-top: 16px; font-size: 19px; line-height: 1.5; letter-spacing: -0.012em; color: var(--ink-2); }
.tool-main { margin-top: 32px; padding: 32px; border-radius: 28px; }
.tool-main > :first-child { margin-top: 0; }
.tool-page .prose { margin-top: 56px; }
.tool-page .faq, .tool-page .more-in { margin-top: 56px; }
.tool-field[hidden] { display: none; }
.tool-submit { justify-content: flex-end; }
.tool-submit .btn { height: 44px; border-radius: 12px; }
.tool-part { margin-top: 22px; }
.tool-label { margin: 0 0 8px; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.tool-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.tool-part .tool-checks { margin-top: 0; }
.tool-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.tool-check input, .quad li input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.tool-more { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.tool-more summary { font-size: 14.5px; font-weight: 650; color: var(--ink); cursor: pointer; }
.tool-foot.warn { padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
.tool-foot .btn { margin-right: 10px; }

.big-timer { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.big-timer .chips { margin-top: 0; justify-content: center; }
.dial-xl { width: min(280px, 72vw); height: min(280px, 72vw); }
.dial-xl .dial-track, .dial-xl .dial-arc { stroke-width: 6; }
.dial-xl .dial-time { font-size: clamp(44px, 13vw, 58px); }
.dial-xl .dial-time.long { font-size: clamp(34px, 10vw, 44px); }
.dial.long-rest .dial-arc { stroke: var(--kl); }
.big-timer .timer-btns { margin-top: 0; flex-wrap: wrap; justify-content: center; }
.big-timer .timer-btns .btn { height: 48px; padding: 0 26px; font-size: 15.5px; }
.big-timer .timer-btns .btn:disabled { opacity: 0.45; cursor: default; }
.round-dots { display: flex; gap: 8px; }
.round-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.round-dots i.on { background: var(--kf); box-shadow: none; }
.task-field { width: min(100%, 420px); text-align: left; }
.big-timer .tool-foot { margin-top: 0; }

.log-list, .date-list { margin: 16px 0 0; padding: 0; list-style: none; }
.prose .log-list li, .log-list li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.log-list li::before, .date-list li::before { content: none; }
.log-time { flex: none; width: 92px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.log-list strong { flex: none; width: 76px; font-weight: 700; color: var(--ink); }
.log-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.log-list li.past { opacity: 0.55; }
.count-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; border-radius: 20px; background: var(--fill-2); text-align: center; }
.count-hero strong { font-size: clamp(64px, 16vw, 104px); font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.count-hero span { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; color: var(--ink); }
.count-hero small { font-size: 13.5px; color: var(--muted); }
.date-list { display: grid; gap: 8px; counter-reset: review; }
.prose .date-list li, .date-list li { display: flex; align-items: baseline; gap: 14px; margin: 0; padding: 12px 16px 12px 46px; border-radius: 14px; background: var(--fill-2); position: relative; counter-increment: review; }
.date-list li::after { content: counter(review); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--kf); color: #fff; font: 600 12px/22px var(--mono); text-align: center; }
.date-list strong { flex: none; min-width: 108px; font-weight: 750; color: var(--ink); }
.date-list span { font-size: 14px; color: var(--muted); }

.rows { display: grid; gap: 8px; margin-bottom: 12px; }
.row { display: grid; gap: 8px; align-items: center; }
.row .input { width: 100%; min-width: 0; height: 44px; font-size: 16px; }
.row-2 { grid-template-columns: minmax(0, 1fr) 96px auto; }
.row-3 { grid-template-columns: minmax(0, 1fr) 96px 110px 34px; }
.row-blocks { grid-template-columns: minmax(0, 1fr) 84px 176px 102px; }
.row-zones { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr) 96px 96px 34px; }
.row-head { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.row-btns { display: inline-flex; gap: 4px; justify-content: flex-end; }
.mini-btn { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: var(--fill); color: var(--ink-2); font: 600 15px/1 var(--font); cursor: pointer; }
.mini-btn:hover { background: var(--line); color: var(--ink); }
.mini-btn.wide { width: auto; padding: 0 9px; font-size: 11.5px; }
.mini-btn[aria-pressed='true'] { background: var(--ink); color: var(--bg); }

.strip-day { height: 40px; margin-top: 4px; }
.strip-k-deep { background: var(--kf); } .strip-k-shallow { background: var(--viz-4); } .strip-k-fixed { background: var(--kl); } .strip-k-break { background: var(--ks); } .strip-k-life { background: var(--kx); }
.strip-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.strip-key span { display: inline-flex; align-items: center; gap: 6px; }
.strip-key i { width: 10px; height: 10px; border-radius: 3px; }

.matrix-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.matrix-add .input { flex: 1 1 240px; height: 44px; font-size: 16px; }
.matrix-add .tool-checks { margin-top: 0; }
.matrix-add .btn { height: 44px; border-radius: 12px; }
.matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.quad { min-height: 150px; padding: 16px; border-radius: 16px; background: var(--fill-2); box-shadow: inset 0 3px 0 var(--q, var(--line)); }
.quad-0 { --q: var(--kf); } .quad-1 { --q: var(--ks); } .quad-2 { --q: var(--viz-4); } .quad-3 { --q: var(--kx); }
.prose .quad h4, .quad h4 { margin: 0 0 10px; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.quad h4 span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.quad ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.prose .quad li, .quad li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface); font-size: 14.5px; }
.quad li::before { content: none; }
.quad li label { display: flex; align-items: center; gap: 8px; flex: 1 1 140px; min-width: 0; cursor: pointer; }
.quad li.done label span { text-decoration: line-through; color: var(--muted); }
.quad-empty { margin: 0; font-size: 13.5px; color: var(--muted); }

.live-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.live-cost { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: pre; }

.zone-wrap { margin: 4px 0 0; box-shadow: inset 0 0 0 1px var(--line); }
.zone-table { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.prose .zone-table th, .zone-table th { padding: 6px 10px 6px 8px; border: 0; background: none; text-align: left; font-size: 13.5px; font-weight: 700; white-space: nowrap; color: var(--ink); }
.zone-table th small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.prose .zone-table td, .zone-table td { min-width: 26px; padding: 8px 0; border: 0; border-radius: 6px; background: var(--fill); text-align: center; font-family: var(--mono); color: var(--muted); }
.zone-table td.free { background: color-mix(in srgb, var(--ks) 22%, var(--surface)); color: var(--ink); }
.zone-table td.free.all { background: var(--ks); color: #fff; font-weight: 600; }
.zone-all { background: var(--ks); } .zone-free { background: color-mix(in srgb, var(--ks) 22%, var(--surface)); box-shadow: inset 0 0 0 1px var(--line); }

/* tools index */
.tool-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.tool-card strong { font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; color: var(--ink); }
.tool-card p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.tool-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; margin: -8px -8px 8px; border-radius: 12px; background: var(--fill-2); overflow: hidden; }
.tool-art img { display: block; width: auto; height: 92%; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tool-card:hover .tool-art img { transform: scale(1.07) rotate(-3deg); }
@media (prefers-reduced-motion: reduce) {
  .tool-art img { transition: none; }
  .tool-card:hover .tool-art img { transform: none; }
}
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.tool-head > div { min-width: 0; }
.tool-head-art { flex: none; width: clamp(120px, 18vw, 176px); }
.tool-head-art img { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .tool-head-art { display: none; } }
.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.tools-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 22px 26px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.tools-banner h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.tools-banner p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.tools-banner .btn { text-decoration: none; }
@media (max-width: 1000px) { .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .row-blocks { grid-template-columns: minmax(0, 1fr) 76px; }
  .row-zones { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .row-zones.row-head { display: none; }
  .row-3 { grid-template-columns: minmax(0, 1fr) 76px 84px 30px; }
  .matrix { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tool-page { padding-top: 48px; }
  .tool-main { padding: 20px 16px; border-radius: 22px; }
  .tool-cards { grid-template-columns: minmax(0, 1fr); }
  .log-time { width: 72px; }
  .log-list strong { width: 64px; }
}

/* tables and copy boxes inside a tool page's widget (outside .prose) */
.tool-main .table-wrap { margin: 20px 0 0; box-shadow: inset 0 0 0 1px var(--line); }
.tool-main table:not(.zone-table) { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tool-main table:not(.zone-table) th, .tool-main table:not(.zone-table) td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tool-main table:not(.zone-table) th { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.tool-main table:not(.zone-table) tr:last-child td { border-bottom: 0; }
.tool-main table:not(.zone-table) td:first-child { white-space: nowrap; font-weight: 650; color: var(--ink); }
.tool-main .copybox pre { margin: 0; padding: 16px 18px 18px; font-family: var(--mono); font-size: 13px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-main .tool-form:first-child, .tool-main .tool-part:first-child { margin-top: 0; }
