/*
  Daptis design tokens. Every color in the app comes from here.
  Neutrals: cool, neutral greys (no warm tint), slightly darker than before. Data scale: red → orange → yellow → green,
  stepped in brightness too so it still reads for red-green colorblind users.
*/
:root {
  /* Phone bezel around screenshots on the landing page: near-black in both themes */
  --device: #0D0D0D;
  /* The navy the exercise demos are drawn on (setup's welcome cover blends the page into the clip) */
  --demo-bg: #0E0F20;
  /* Safe areas. Zeroed when the host page already pads for them (see main.tsx). */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* Under a button docked to the bottom of the screen: clear of the home indicator, without the full inset under it */
  --dock-b: max(12px, calc(var(--safe-b) - 14px));
  color-scheme: light;

  /* Neutrals */
  /* Behind photos and video (the workout cover): dark in both themes, with light text on it */
  --media-bg: #1A1E28;
  --on-media: #FFFFFF;
  /* What gives a tile its shape, on every filled container (Home's tiles, Settings groups, the program tile, stats
     tiles). Light: a hairline round it and a soft lift off the tinted page. Dark: a faint light along its top. */
  --tile-edge: inset 0 1px 0 rgb(255 255 255 / 1), inset 0 -1px 0 rgb(31 33 38 / 0.07), 0 1px 2px rgb(31 33 38 / 0.07);
  --tile-fill: linear-gradient(180deg, #FBFBFC, #F2F2F4);
  /* The workout card's own edge, on its always-dark cover */
  --media-edge: inset 0 1px 0 rgb(255 255 255 / 0.12);
  /* Under the workout card on a light page: it's a dark object there, so it's lifted off the page (dark: nothing) */
  --media-lift: 0 1px 2px rgb(31 33 38 / 0.18), 0 16px 32px -14px rgb(31 33 38 / 0.55);
  /* The data scale on the always-dark cover (the dark theme's own, whatever the app's theme) */
  --media-data-0: #E5564A;
  --media-data-1: #F08A45;
  --media-data-2: #F0C75A;
  --media-data-3: #5BBF7C;
  /* Words on the green button: white on a light page, near-black on the bright green of dark surfaces */
  --go-text: #FFFFFF;
  /* The logger's set boxes (Nov 25): quiet and flat, except the set to do, which is raised like a key */
  --key-quiet: #DDDEE1;
  --key-quiet-depth: inset 0 1px 2px rgb(31 33 38 / 0.16), inset 0 0 0 1px rgb(31 33 38 / 0.03), 0 1px 0 rgb(255 255 255 / 0.9);
  --key-fill: linear-gradient(180deg, #FFFFFF, #F4F4F6);
  --key-depth: inset 0 1px 0 #FFFFFF, inset 0 -1px 0 rgb(31 33 38 / 0.14), 0 1px 2px rgb(31 33 38 / 0.2), 0 4px 8px -4px rgb(31 33 38 / 0.22);
  --bg: #E7E8EA;
  --sidebar: #DADBDE; /* the sidebar sits a step below the page, so it reads as a rail behind it */
  --surface: #F6F6F7;
  --surface-2: #E9EAEC;
  --border: #D6D7DA;
  --border-strong: #C6C7C9;
  --text: #19191A;
  --text-muted: #45464A;
  --text-faint: #6A6B6F;

  /* Brand action (near-black on light, near-white on dark) */
  --action: #19191A;
  --action-text: #F6F6F7;
  --focus: #3E9B5C; /* the brand green: focused inputs and the caret */

  /* Data scale, low → high. The same bright colours as dark mode (Nov 28: the darker light-mode set read dull). */
  --data-0: #E5564A; /* red    0–24%  */
  --data-1: #F08A45; /* orange 25–49% */
  --data-2: #F0C75A; /* yellow 50–74% */
  --data-3: #5BBF7C; /* green  75–100% */
  /* The data colours as words on a light surface: a step darker so they read. Words only, never lines, dots or fills. */
  --data-ink-0: #D94438;
  --data-ink-1: #D9701F;
  --data-ink-2: #B08A12;
  --data-ink-3: #35A35F;
  /* The green main button (Start workout, Continue…): lit from above, lifted off the page. Use all three together.
     On a light page it keeps the deeper green (--go-green) so its white words read. */
  --go-green: #3E9B5C;
  --go-fill: linear-gradient(180deg, color-mix(in srgb, var(--go-green) 90%, white), var(--go-green) 60%, color-mix(in srgb, var(--go-green) 93%, black));
  --go-fill-down: linear-gradient(180deg, color-mix(in srgb, var(--go-green) 92%, black), color-mix(in srgb, var(--go-green) 96%, black));
  --go-depth-dark: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.3), 0 3px 5px -1px rgba(0, 0, 0, 0.3), 0 8px 14px -6px rgba(0, 0, 0, 0.4);
  --go-depth: inset 0 1px 0 rgb(255 255 255 / 0.3), inset 0 -1px 0 rgb(0 0 0 / 0.14), 0 1px 2px rgb(22 78 44 / 0.28), 0 10px 20px -10px rgb(46 140 80 / 0.6);
  --go-depth-down: inset 0 1px 2px rgba(0, 0, 0, 0.28);
  --on-brand: #FFFFFF; /* icons on the red → green gradient */
  --chart: #3A6FD8; /* single-series charts (trends that aren't good/bad scales) */
  --chart-wash: rgb(58 111 216 / 0.10);
  /* Sleep stages: kinds of sleep, not good or bad, so they have their own colours (never the data scale) */
  --sleep-awake: #EE9440;
  --sleep-rem: #2FB4DA;
  --sleep-light: #5878F0;
  --sleep-deep: #5B3AD0;
  /* Two-category charts (strength vs cardio), validated for colour-blind separation on this surface */
  --series-1: #3A6FD8;
  --series-2: #D9568B;
  --series-3: #1F9A8A;

  --danger: var(--data-0);
  --muscle: #A9AAAD; /* body map, untouched muscles */

  /* Type: system font (SF Pro on iOS) so the app feels native and loads nothing */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --tile-edge: inset 0 1px 0 rgb(255 255 255 / 0.08), inset 0 -1px 0 rgb(0 0 0 / 0.3), 0 1px 2px rgb(0 0 0 / 0.3);
    --tile-fill: linear-gradient(180deg, #2E2F30, #272829);
    --media-edge: inset 0 1px 0 rgb(255 255 255 / 0.14), inset 0 0 0 1px rgb(255 255 255 / 0.07);
    --media-lift: 0 0 0 0 transparent;
    --go-text: #10141C;
    --key-quiet: #151516;
    --key-quiet-depth: inset 0 1px 2px rgb(0 0 0 / 0.6), 0 1px 0 rgb(255 255 255 / 0.06);
    --key-fill: linear-gradient(180deg, #46474A, #38393B);
    --key-depth: inset 0 1px 0 rgb(255 255 255 / 0.14), inset 0 -1px 0 rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.45), 0 4px 8px -4px rgb(0 0 0 / 0.5);
    --bg: #1C1C1D;
    --sidebar: #141415;
    --surface: #2A2B2C;
    --surface-2: #333335;
    --border: #353637;
    --border-strong: #464648;
    --text: #ECEDEE;
    --text-muted: #C2C3C6;
    --text-faint: #9A9B9E;
    --action: #ECEDEE;
    --action-text: #141415;
    --focus: #5BBF7C;
    --data-0: #E5564A;
    --data-1: #F08A45;
    --data-2: #F0C75A;
    --data-3: #5BBF7C;
    --data-ink-0: var(--data-0);
    --data-ink-1: var(--data-1);
    --data-ink-2: var(--data-2);
    --data-ink-3: var(--data-3);
    --go-fill: linear-gradient(180deg, color-mix(in srgb, var(--data-3) 90%, white), var(--data-3) 60%, color-mix(in srgb, var(--data-3) 93%, black));
    --go-fill-down: linear-gradient(180deg, color-mix(in srgb, var(--data-3) 92%, black), color-mix(in srgb, var(--data-3) 96%, black));
    --go-depth: var(--go-depth-dark);
    --chart: #7FA4F0;
    --chart-wash: rgb(127 164 240 / 0.12);
    --sleep-awake: #F5A65B;
    --sleep-rem: #5FD0F0;
    --sleep-light: #6E8BFF;
    --sleep-deep: #6A45E0;
    --series-1: #5E8EEB;
    --series-2: #D55181;
    --series-3: #43B5A8;
    --muscle: #57585B;
  }
}

:root[data-theme="dark"],
.theme-dark {
  color-scheme: dark;
  --tile-edge: inset 0 1px 0 rgb(255 255 255 / 0.08), inset 0 -1px 0 rgb(0 0 0 / 0.3), 0 1px 2px rgb(0 0 0 / 0.3);
  --tile-fill: linear-gradient(180deg, #2E2F30, #272829);
  --media-edge: inset 0 1px 0 rgb(255 255 255 / 0.14), inset 0 0 0 1px rgb(255 255 255 / 0.07);
  --media-lift: 0 0 0 0 transparent;
  --go-text: #10141C;
  --key-quiet: #151516;
  --key-quiet-depth: inset 0 1px 2px rgb(0 0 0 / 0.6), 0 1px 0 rgb(255 255 255 / 0.06);
  --key-fill: linear-gradient(180deg, #46474A, #38393B);
  --key-depth: inset 0 1px 0 rgb(255 255 255 / 0.14), inset 0 -1px 0 rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.45), 0 4px 8px -4px rgb(0 0 0 / 0.5);
  --bg: #1C1C1D;
  --sidebar: #141415;
  --surface: #2A2B2C;
  --surface-2: #333335;
  --border: #353637;
  --border-strong: #464648;
  --text: #ECEDEE;
  --text-muted: #C2C3C6;
  --text-faint: #9A9B9E;
  --action: #ECEDEE;
  --action-text: #141415;
  --focus: #5BBF7C;
  --data-0: #E5564A;
  --data-1: #F08A45;
  --data-2: #F0C75A;
  --data-3: #5BBF7C;
  --data-ink-0: var(--data-0);
  --data-ink-1: var(--data-1);
  --data-ink-2: var(--data-2);
  --data-ink-3: var(--data-3);
  --go-fill: linear-gradient(180deg, color-mix(in srgb, var(--data-3) 90%, white), var(--data-3) 60%, color-mix(in srgb, var(--data-3) 93%, black));
  --go-fill-down: linear-gradient(180deg, color-mix(in srgb, var(--data-3) 92%, black), color-mix(in srgb, var(--data-3) 96%, black));
  --go-depth: var(--go-depth-dark);
  --chart: #7FA4F0;
  --chart-wash: rgb(127 164 240 / 0.12);
  --sleep-awake: #F5A65B;
  --sleep-rem: #5FD0F0;
  --sleep-light: #6E8BFF;
  --sleep-deep: #6A45E0;
  --series-1: #5E8EEB;
  --series-2: #D55181;
  --series-3: #43B5A8;
  --muscle: #57585B;
}

:root[data-host-safe] { --safe-t: 0px; --safe-b: 0px; }

/* App Store / Google Play badges: the public pages (src/seo) and the landing page share them */
.seo__stores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seo__stores .seo__store { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 14px; border-radius: 12px; background: var(--action); color: var(--action-text); text-decoration: none; font-weight: 650; font-size: 17px; line-height: 1.05; }
.seo__stores .seo__store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.seo__stores .seo__store small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; letter-spacing: 0.01em; }
.seo__stores .seo__store--soon { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); cursor: default; }
.seo__stores .seo__store--web { background: transparent; color: var(--text); border: 1px solid var(--border-strong); padding-left: 18px; }


/* The public content pages (src/seo). Served after src/styles/tokens.css as one file; flat like the app:
   content on the page background, hairlines, fills only on controls, data colours only for data. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--text-muted); }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.seo { min-height: 100vh; display: flex; flex-direction: column; }
.seo__main { width: 100%; max-width: 860px; margin: 0 auto; padding: 8px 20px 40px; flex: 1; }

/* Header */
.seo__nav { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 20px; padding: 14px 20px; padding-top: max(14px, var(--safe-t)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.seo__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.seo__logo { display: inline-grid; grid-template-columns: repeat(4, 1fr); gap: 2px; width: 24px; }
.seo__logo span { height: 4px; border-radius: 1.5px; }
.seo__links { display: flex; gap: 18px; flex: 1; font-size: 14px; color: var(--text-muted); overflow-x: auto; scrollbar-width: none; }
.seo__links::-webkit-scrollbar { display: none; }
.seo__links a { text-decoration: none; white-space: nowrap; }
.seo__links a:hover { color: var(--text); }
.seo__signin { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 720px) {
  .seo__nav { flex-wrap: wrap; row-gap: 8px; }
  .seo__links { order: 3; flex-basis: 100%; gap: 16px; }
  .seo__signin { margin-left: auto; }
}

.seo__crumbs { font-size: 13px; color: var(--text-muted); margin: 14px 0 0; }
.seo__crumbs a { text-decoration: none; }

/* Page head */
.seo__head { padding: 36px 0 28px; border-bottom: 1px solid var(--border); }
.seo__kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.seo__head h1 { font-size: clamp(32px, 6vw, 48px); font-weight: 750; }
.seo__lede { font-size: 18px; color: var(--text-muted); margin-top: 14px; max-width: 640px; }
.seo__head .seo__stores { margin-top: 22px; }
.seo__muted { color: var(--text-muted); font-size: 14px; }
.seo__small { font-size: 13px; color: var(--text-faint); }

/* Sections */
.seo__section { padding: 28px 0; border-bottom: 1px solid var(--border); }
.seo__section > h2, .seo__proscons h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.seo__section h3 { font-size: 16px; font-weight: 650; margin-bottom: 4px; }
.seo__section p + p { margin-top: 8px; }

.seo__ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.seo__ticks li { position: relative; padding-left: 22px; }
.seo__ticks li::before { content: ""; position: absolute; left: 2px; top: 0.58em; width: 8px; height: 8px; border-radius: 50%; background: var(--data-3); }
.seo__ticks--other li::before { background: var(--text-faint); }

.seo__steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 18px; }
.seo__steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.seo__steps li::before { content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.seo__steps p { color: var(--text-muted); }

.seo__numbered { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.seo__numbered li::marker { color: var(--text-muted); font-weight: 600; }

.seo__points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 28px; }
.seo__points p { color: var(--text-muted); }

/* Screenshot and exercise media */
.seo__shot { margin: 28px auto 4px; width: min(300px, 80%); border-radius: 36px; overflow: hidden; border: 8px solid var(--device); background: var(--device); }
.seo__shot img, .seo__shot video { display: block; width: 100%; height: auto; }
.seo__video { margin: 28px 0 4px; }
.seo__video .seo__shot { margin-top: 0; }
.seo__video figcaption { margin: 12px auto 0; max-width: 34ch; text-align: center; font-size: 14px; color: var(--text-muted); }
.seo__media { margin: 24px 0 0; width: min(420px, 100%); aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--media-bg); }
.seo__media video, .seo__media img { width: 100%; height: 100%; object-fit: cover; }
.seo__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.seo__facts .seo__kicker { margin-bottom: 4px; }
@media (max-width: 560px) { .seo__facts { grid-template-columns: 1fr 1fr; } }

.seo__mistakes { margin: 0; display: grid; gap: 14px; }
.seo__mistakes dt { font-weight: 650; }
.seo__mistakes dd { margin: 2px 0 0; color: var(--text-muted); }

/* FAQ */
.seo__faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.seo__faq details:first-child { border-top: 1px solid var(--border); }
.seo__faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.seo__faq summary::-webkit-details-marker { display: none; }
.seo__faq summary::after { content: "+"; color: var(--text-muted); font-weight: 400; font-size: 20px; line-height: 1; }
.seo__faq details[open] summary::after { content: "−"; }
.seo__faq details p { margin-top: 8px; color: var(--text-muted); }

.seo__sources ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--text-muted); }
.seo__related { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seo__related a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); text-decoration: none; font-size: 14px; }

/* Sample week */
.seo__week { display: grid; gap: 0; margin-top: 16px; }
.seo__day { padding: 16px 0; border-top: 1px solid var(--border); }
.seo__day header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.seo__day h3 { font-size: 16px; min-width: 92px; }
.seo__day header p { color: var(--text-muted); font-size: 14px; }
.seo__day--rest header { margin: 0; }
.seo__day--rest h3, .seo__day--rest header p { color: var(--text-faint); }
.seo__day table, .seo__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.seo__day table { table-layout: fixed; }
.seo__day th:first-child { width: 58%; }
.seo__day th:nth-child(2) { width: 12%; }
.seo__day th { text-align: left; font-weight: 500; color: var(--text-faint); font-size: 12px; padding: 4px 8px 4px 0; }
.seo__day td { padding: 8px 8px 8px 0; border-top: 1px solid var(--border); vertical-align: top; }
.seo__day td:not(:first-child) { white-space: nowrap; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.seo__day td small, .tool__name small, .tool__dose small { display: block; color: var(--text-muted); font-size: 12px; }
.seo__daynote { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* Comparison */
.seo__verdict { padding: 24px 0; border-bottom: 1px solid var(--border); font-size: 17px; }
.seo__verdict .seo__muted { margin-top: 10px; }
.seo__tablewrap { overflow-x: auto; }
.seo__table th, .seo__table td { text-align: left; padding: 10px 10px 10px 0; border-top: 1px solid var(--border); vertical-align: top; }
.seo__table thead th { border-top: 0; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.seo__table tbody th { font-weight: 600; width: 28%; }
.seo__table td:nth-child(2) { width: 36%; }
.seo__proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.seo__apps { list-style: none; padding: 0; margin: 0; display: grid; }
.seo__apps > li { padding: 20px 0; border-top: 1px solid var(--border); }
.seo__apps h3 { font-size: 19px; }
.seo__apps .seo__proscons { margin-top: 12px; font-size: 15px; }
.seo__apps ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-muted); display: grid; gap: 4px; }
.seo__pc { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 6px; }
.seo__pc::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.seo__pc--good::before { background: var(--data-3); }
.seo__pc--bad::before { background: var(--data-1); }

/* Hubs */
.seo__cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 28px; }
.seo__cards > li { border-bottom: 1px solid var(--border); }
.seo__cards a { display: flex; gap: 14px; align-items: center; padding: 16px 0; text-decoration: none; }
.seo__cards strong { display: block; font-weight: 650; }
.seo__cards small { display: block; color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.seo__cards img { width: 64px; height: 64px; border-radius: var(--radius-md); object-fit: cover; background: var(--media-bg); flex: none; }
.seo__cards a:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* Call to action and store badges */
.seo__cta { margin: 32px 0 8px; padding: 32px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.seo__cta h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 750; }
.seo__cta p { color: var(--text-muted); margin: 10px 0 20px; max-width: 560px; }
/* Buttons */
.seo__btn { appearance: none; border: 0; border-radius: 12px; padding: 13px 18px; font: inherit; font-weight: 650; cursor: pointer; background: var(--action); color: var(--action-text); }
.seo__btn--secondary { background: var(--surface-2); color: var(--text); }
.seo__btn:disabled { opacity: 0.6; cursor: default; }

/* The free tool */
.seo__toolbox { padding-top: 8px; }
.tool__form { display: grid; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.tool__q { border: 0; margin: 0; padding: 0; min-width: 0; }
.tool__q legend { font-weight: 650; font-size: 15px; margin-bottom: 8px; padding: 0; }
.tool__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool__chip { appearance: none; border: 1px solid var(--border-strong); background: transparent; color: var(--text); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 15px; cursor: pointer; }
.tool__chip[aria-checked="true"] { background: var(--action); border-color: var(--action); color: var(--action-text); }
.tool__result { padding: 24px 0; border-bottom: 1px solid var(--border); }
.tool__result h2 { font-size: 28px; font-weight: 750; }
.tool__facts { display: flex; gap: 14px; color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.tool__facts span + span::before { content: "·"; margin-right: 14px; }
.tool__why { margin: 16px 0 0; padding-left: 18px; color: var(--text-muted); display: grid; gap: 6px; }
.tool__warm { margin-top: 16px; font-size: 15px; }
.tool__list { list-style: none; margin: 16px 0 0; padding: 0; }
.tool__ex { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--border); }
.tool__n { color: var(--text-faint); font-variant-numeric: tabular-nums; font-size: 14px; }
.tool__name a { font-weight: 600; }
.tool__name { font-weight: 600; }
.tool__dose { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tool__ai { padding: 20px 0 0; display: grid; gap: 10px; justify-items: start; }
.tool__check:empty { display: none; }
.small { font-size: 14px; }
.muted { color: var(--text-muted); }

/* Footer */
.seo__footer { border-top: 1px solid var(--border); padding: 32px 20px calc(32px + var(--safe-b)); }
.seo__footcols { max-width: 860px; margin: 0 auto 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.seo__footcols div { display: grid; gap: 6px; align-content: start; font-size: 14px; color: var(--text-muted); }
.seo__footcols a { text-decoration: none; }
.seo__footcols a:hover { color: var(--text); }
.seo__foothead { font-weight: 650; color: var(--text); margin-bottom: 4px; }
.seo__footer > .seo__small { max-width: 860px; margin: 0 auto; }

/* Blog */
.seo__prose p { max-width: 680px; }
.seo__prose p + p { margin-top: 12px; }
.seo__bullets { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; max-width: 680px; }
.seo__bullets li::marker { color: var(--text-faint); }
.seo__prose .seo__tablewrap { margin-top: 16px; }
.seo__table--data th, .seo__table--data td { font-size: 14px; }
.seo__table--data td:nth-child(2) { width: auto; }
.seo__table--data td { color: var(--text-muted); }
.seo__table--data td:first-child { color: var(--text); }
.seo__posts { list-style: none; margin: 8px 0 0; padding: 0; }
.seo__posts li { border-bottom: 1px solid var(--border); }
.seo__posts a { display: grid; gap: 4px; padding: 20px 0; text-decoration: none; }
.seo__posts small { font-size: 13px; color: var(--text-faint); }
.seo__posts strong { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.seo__posts span { color: var(--text-muted); font-size: 15px; }
.seo__posts a:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* Glossary hub */
.seo__az { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 18px 0; border-bottom: 1px solid var(--border); font-weight: 600; }
.seo__az a { text-decoration: none; color: var(--text-muted); }
.seo__az a:hover { color: var(--text); }
.seo__glossary { margin: 0; display: grid; gap: 16px; }
.seo__glossary dt { font-weight: 650; }
.seo__glossary dd { margin: 2px 0 0; color: var(--text-muted); max-width: 680px; }

/* Auto-linked terms: a dotted underline says "there's more here"; the popover floats, so it may have a shadow */
a.term { text-decoration: underline dotted; text-decoration-color: var(--text-faint); text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: help; }
a.term:hover, a.term[aria-expanded="true"] { text-decoration-color: var(--text); }
.tpop { position: absolute; z-index: 20; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 8px 28px color-mix(in srgb, var(--device) 22%, transparent); font-size: 14px; line-height: 1.45; }
.tpop img { width: 72px; height: 72px; flex: none; border-radius: var(--radius-sm); object-fit: cover; background: var(--media-bg); }
.tpop p { margin: 0; }
.tpop__k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.tpop__t { font-weight: 650; font-size: 15px; margin-top: 2px !important; }
.tpop__d { color: var(--text-muted); margin-top: 4px !important; }
.tpop__m { color: var(--text-muted); font-size: 13px; margin-top: 6px !important; }
.tpop__more { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; padding: 4px 0; }
.tpop__more:hover { text-decoration: underline; }

/* Calculators (/tools/*: src/seo/calc) */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; padding: 8px 0 28px; border-bottom: 1px solid var(--border); }
@media (max-width: 720px) { .calc { grid-template-columns: 1fr; } }
.calc__fields { display: grid; gap: 12px; }
.calc__f { display: flex; flex-direction: column; gap: 6px; }
.calc__f span { font-size: 14px; color: var(--text-muted); }
.calc__f input, .calc__f select { font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-md); padding: 11px 12px; width: 100%; box-sizing: border-box; }
.calc__f input:focus-visible, .calc__f select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.calc__out { min-width: 0; }
.calc__big { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.calc__big b { font-size: clamp(36px, 6vw, 52px); font-weight: 750; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.calc__big span { font-size: 15px; color: var(--text-muted); }
.calc__sub { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-muted); }
.calc__none { margin: 0; color: var(--text-muted); }
.calc__plates { list-style: none; margin: 8px 0 0; padding: 0; }
.calc__plates li { padding: 8px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.calc__table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.calc__table th, .calc__table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); }
.calc__table thead th { font-weight: 600; color: var(--text-muted); }
.calc__scroll { overflow-x: auto; }
.calc__chart { min-width: 560px; }
.calc__chart tbody th { font-weight: 650; }
