/* The Autonomic Wheel companion site.
   Palette from the cover: paper ground, dark-wood ink, stone-grey neutrals, twine ochre, indigo cloth accent,
   vine green and coral for the score bands. Ghost wheels are stone grey on purpose. */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --ground: #EFE4CE;
  --surface: #F8F1E2;
  --surface-2: #E6D9C0;
  --line: #D6C6A6;
  --line-strong: #A89777;
  --ink: #2B221A;
  --ink-2: #5C4E3E;
  --ink-3: #8A7A65;
  --accent: #3E5A8E;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(62, 90, 142, 0.14);
  --twine: #B8862B;
  --wood: #7A4F2A;
  --stone: #8C8A84;
  --coral: #D1705F;
  --ghost: #8C8A84;
  --ghost-fill: rgba(140, 138, 132, 0.12);
  --nail: #9B4A2C;
  --crisis: #B4463A;
  --fragile: #B8862B;
  --patchy: #7E8F3A;
  --solid: #3E5A8E;
  --thriving: #2A7A6B;
  --focus: #3E5A8E;
  --primary: #C4553F;
  --primary-ink: #FFFFFF;
  --sky: linear-gradient(100deg, #C9BFD9 0%, #A9C3C8 45%, #D9C8A8 100%);
  /* One hue per spoke, from the cover's materials: earth, twine, vine, teal, coral, indigo, berry, lavender, wood, sky. */
  --sp-safety: #B5533C; --sp-body: #C08A2B; --sp-sensory: #6B8E3F; --sp-emotion: #2E8B84; --sp-relationships: #D1705F;
  --sp-purpose: #3E5A8E; --sp-play: #C4467A; --sp-learning: #7B5EA7; --sp-habits: #8A6A3C; --sp-authenticity: #3A8FB7;
  --shadow: 0 1px 2px rgba(43, 34, 26, 0.08), 0 10px 28px rgba(43, 34, 26, 0.08);
  --radius: 10px;
  --font-display: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.2 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1B1611; --surface: #251E17; --surface-2: #31291F; --line: #40352A; --line-strong: #6A5B49;
    --ink: #EFE4D0; --ink-2: #C4B49C; --ink-3: #93846F; --accent: #8FA7DA; --accent-ink: #14192A; --accent-soft: rgba(143, 167, 218, 0.16);
    --twine: #D5A24A; --wood: #B07A4C; --stone: #8C8A84; --coral: #E08A78; --ghost: #7F7B74; --ghost-fill: rgba(127, 123, 116, 0.14); --nail: #D07A55;
    --crisis: #E07A70; --fragile: #E0B04C; --patchy: #B0C25A; --solid: #8FA7DA; --thriving: #5FB8A8; --focus: #8FA7DA;
    --primary: #E0705A; --primary-ink: #1B1611; --sky: linear-gradient(100deg, #3A3350 0%, #24413F 45%, #4A3A26 100%);
    --sp-safety: #E07A62; --sp-body: #E0B04C; --sp-sensory: #A6C463; --sp-emotion: #5FC4BA; --sp-relationships: #F09A88;
    --sp-purpose: #8FA7DA; --sp-play: #EE7DAE; --sp-learning: #B49BE0; --sp-habits: #C9A070; --sp-authenticity: #6FBBE0;
    --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 10px 28px rgba(0,0,0,0.35);
    --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.8 0 0 0 0 0.6 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #1B1611; --surface: #251E17; --surface-2: #31291F; --line: #40352A; --line-strong: #6A5B49;
  --ink: #EFE4D0; --ink-2: #C4B49C; --ink-3: #93846F; --accent: #8FA7DA; --accent-ink: #14192A; --accent-soft: rgba(143, 167, 218, 0.16);
  --twine: #D5A24A; --wood: #B07A4C; --stone: #8C8A84; --coral: #E08A78; --ghost: #7F7B74; --ghost-fill: rgba(127, 123, 116, 0.14); --nail: #D07A55;
  --crisis: #E07A70; --fragile: #E0B04C; --patchy: #B0C25A; --solid: #8FA7DA; --thriving: #5FB8A8; --focus: #8FA7DA;
  --primary: #E0705A; --primary-ink: #1B1611; --sky: linear-gradient(100deg, #3A3350 0%, #24413F 45%, #4A3A26 100%);
  --sp-safety: #E07A62; --sp-body: #E0B04C; --sp-sensory: #A6C463; --sp-emotion: #5FC4BA; --sp-relationships: #F09A88;
  --sp-purpose: #8FA7DA; --sp-play: #EE7DAE; --sp-learning: #B49BE0; --sp-habits: #C9A070; --sp-authenticity: #6FBBE0;
  --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 10px 28px rgba(0,0,0,0.35);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.8 0 0 0 0 0.6 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); background-image: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; padding-inline: 16px; padding-block: 0 56px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.eyebrow { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); font-weight: 700; }
.muted { color: var(--ink-2); }
.small { font-size: 0.9rem; }
.num { font-variant-numeric: tabular-nums; }
.measure { max-width: 62ch; }
.display-quote { font-family: var(--font-display); font-size: 1.25rem; font-style: italic; }
[hidden] { display: none !important; }

/* Shell */
.shell { max-width: 1240px; margin: 0 auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin-inline: -16px; border-bottom: 1px solid var(--line); background: var(--sky); position: relative; }
.masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: linear-gradient(90deg, var(--sp-safety), var(--sp-body), var(--sp-sensory), var(--sp-emotion), var(--sp-relationships), var(--sp-purpose), var(--sp-play), var(--sp-learning), var(--sp-habits), var(--sp-authenticity)); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand .cover-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; box-shadow: var(--shadow); }
.brand .title { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: 0.01em; }
.brand .sub { display: block; font-size: 0.78rem; color: var(--ink-3); }
.masthead-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stone); display: inline-block; margin-right: 6px; }
.sync-dot.synced { background: var(--thriving); } .sync-dot.pending { background: var(--twine); } .sync-dot.error { background: var(--crisis); }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 1px solid transparent; background: transparent; border-radius: 999px; padding: 8px 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tab:hover { background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tab[data-view="now"] { color: var(--primary); }
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.subtab { border: 0; background: transparent; padding: 8px 12px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }

.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 20px; }
.view-head { display: grid; gap: 6px; max-width: 72ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); padding: 9px 14px; cursor: pointer; line-height: 1.2; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--surface-2); }
.btn.danger { color: var(--crisis); }
.btn.sm { padding: 6px 10px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.done { background: color-mix(in srgb, var(--thriving) 16%, transparent); border-color: var(--thriving); color: var(--thriving); }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel.lift { box-shadow: var(--shadow); border-color: var(--line-strong); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.callout { border-left: 3px solid var(--accent); padding: 10px 14px; background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.callout.example { border-left-color: var(--stone); background: var(--ghost-fill); }
.example-note { font-size: 0.85rem; color: var(--ink-3); margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.site-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; font-size: 0.78rem; color: var(--ink-3); border-top: 1px solid var(--line); margin-top: 40px; padding-block: 16px 8px; }
.site-foot a { color: var(--ink-2); }
.notice { border: 1px dashed var(--line-strong); padding: 10px 14px; border-radius: 8px; color: var(--ink-2); }

/* Wheel */
.wheel-layout { display: grid; grid-template-columns: minmax(300px, 1.15fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.today-layout { display: grid; grid-template-columns: minmax(300px, 1.3fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.checkin-layout { display: grid; grid-template-columns: minmax(300px, 1.3fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 880px) { .wheel-layout, .today-layout, .checkin-layout { grid-template-columns: minmax(0, 1fr); } .wheel-layout > *, .today-layout > *, .checkin-layout > * { min-width: 0; } .wheel-stage { position: static !important; } }
.wheel-stage { position: sticky; top: 12px; }
.wheel-figure { width: 100%; max-width: 720px; margin: 0 auto; aspect-ratio: 800 / 660; }
.wheel-figure.compact { max-width: 360px; aspect-ratio: 1; }
.wheel-figure svg { width: 100%; height: 100%; display: block; touch-action: none; }
.wheel-figure svg text { font-family: var(--font-body); }
.wheel-figure .spoke-label { font-size: 15px; fill: var(--ink-2); cursor: pointer; font-weight: 700; }
.wheel-figure .spoke-label.active { text-decoration: underline; }
.wheel-figure .spoke-label.compact { font-size: 17px; }
.wheel-figure.compact { max-width: 440px; aspect-ratio: 684 / 552; }
.wheel-figure .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.wheel-figure .rim-seg { fill: none; stroke: var(--stone); stroke-width: 7; stroke-linecap: butt; opacity: 0.8; }
.wheel-figure .spoke { stroke: var(--wood); stroke-width: 2.5; opacity: 0.85; }
.wheel-figure .wedge { opacity: 0.09; }
.wheel-figure .spoke-hit { stroke: transparent; stroke-width: 30; cursor: pointer; }
.wheel-figure .ring-num { font-size: 10px; fill: var(--ink-3); }
.wheel-figure .hub { fill: var(--coral); stroke: var(--surface); stroke-width: 2; }
.wheel-figure .hub-text { font-family: var(--font-display); font-size: 13px; fill: #fff; text-anchor: middle; font-style: italic; }
.wheel-figure .ghost { fill: var(--ghost-fill); stroke: var(--ghost); stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linejoin: round; }
.wheel-figure .ghost-dot { fill: var(--surface); stroke: var(--ghost); stroke-width: 1.5; }
.wheel-figure .shape { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.wheel-figure .handle { stroke: var(--surface); stroke-width: 2.5; cursor: grab; }
.wheel-figure .handle.active { stroke: var(--ink); }
.wheel-figure .handle.dragging { cursor: grabbing; }
.wheel-figure .handle-hit { fill: transparent; cursor: grab; }
.wheel-figure .nail-mark { stroke: var(--nail); stroke-width: 2.5; stroke-linecap: round; }
.wheel-figure .nail-head { fill: var(--nail); }
.wheel-figure .drop { stroke: var(--crisis); stroke-width: 2; stroke-dasharray: 2 3; opacity: 0.8; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 0.85rem; color: var(--ink-2); margin-top: 8px; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.legend .sw.ghost { border: 1.5px dashed var(--ghost); }
.legend .sw.now { background: var(--accent); }

/* Score bands */
.band-crisis { --band: var(--crisis); } .band-fragile { --band: var(--fragile); } .band-patchy { --band: var(--patchy); } .band-solid { --band: var(--solid); } .band-thriving { --band: var(--thriving); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: var(--band, var(--ink-2)); background: color-mix(in srgb, var(--band, var(--ink-3)) 14%, transparent); letter-spacing: 0.02em; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--band, var(--ink-3)); }
.chip.plain { --band: var(--ink-3); } .chip.accent { --band: var(--accent); } .chip.nail { --band: var(--nail); } .chip.twine { --band: var(--twine); }

/* Sliders with live readout */
.slider { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.slider input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; height: 28px; }
.slider .readout { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; min-width: 3ch; text-align: right; color: var(--band, var(--ink)); font-variant-numeric: tabular-nums; line-height: 1; }
.slider .readout small { font-size: 0.7rem; font-family: var(--font-body); font-weight: 700; display: block; letter-spacing: 0.06em; text-transform: uppercase; color: var(--band, var(--ink-3)); }
.scale-ends { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }

/* Spoke rows */
.spoke-list { display: grid; gap: 8px; }
.spoke-row { border: 1px solid var(--line); border-left: 5px solid var(--sp, var(--line)); border-radius: 8px; background: var(--surface); padding: 10px 12px; display: grid; gap: 6px; }
.spoke-row .name { color: var(--sp, var(--ink)); }
.spoke-row.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.spoke-row .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.spoke-row .name { font-weight: 700; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; color: var(--ink); }
.spoke-row .delta { font-size: 0.8rem; color: var(--ink-3); }
.delta.up { color: var(--thriving); } .delta.down { color: var(--crisis); }
.spoke-row .detail { display: grid; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 0.92rem; color: var(--ink-2); }
.spoke-row .detail .q { color: var(--ink); font-style: italic; font-family: var(--font-display); font-size: 1.05rem; }
.spoke-row .ends { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.85rem; }
.spoke-row .ends b { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.spoke-row .flags { display: flex; gap: 6px; flex-wrap: wrap; }

.savebar { display: grid; gap: 10px; }
.savebar .fields { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
@media (max-width: 520px) { .savebar .fields { grid-template-columns: 1fr; } }
input[type="text"], input[type="date"], input[type="email"], input[type="password"], input[type="search"], textarea, select { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
textarea { min-height: 70px; resize: vertical; }
label.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 0.85rem; color: var(--ink-2); }
label.field > span, .field > span { font-weight: 700; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 0.85rem; color: var(--ink-2); }

/* Reading the shape */
.shape-read { display: grid; gap: 14px; }
.ranked { display: grid; gap: 6px; }
.ranked .r { display: grid; grid-template-columns: 9rem 1fr auto; gap: 10px; align-items: center; font-size: 0.92rem; }
@media (max-width: 480px) { .ranked .r { grid-template-columns: 7rem 1fr auto; } }
.bar { height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--band); border-radius: 4px; }
.bar > b { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--ghost); }
.profile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.profile .n { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.questions { display: grid; gap: 10px; }

/* Today */
.today-card .q { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.3; }
.panel.tinted { border-top: 6px solid var(--sp); background: linear-gradient(180deg, color-mix(in srgb, var(--sp) 10%, var(--surface)) 0, var(--surface) 140px); }
#today-title { color: var(--sp, var(--ink)); }
.step { border-left: 5px solid var(--sp, var(--line)); }
.step .sh h3 { color: var(--sp, var(--ink)); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.week-strip .d { text-align: center; font-size: 0.72rem; padding: 6px 2px; border-radius: 6px; background: color-mix(in srgb, var(--sp, var(--stone)) 16%, transparent); color: var(--ink-2); display: grid; gap: 2px; border-bottom: 3px solid var(--sp, var(--stone)); }
.week-strip .d b { font-family: var(--font-display); font-size: 0.95rem; color: var(--sp, var(--ink)); }
.week-strip .d.today { outline: 2px solid var(--accent); }
.week-strip .d.done { background: color-mix(in srgb, var(--thriving) 18%, transparent); }
.tool-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); display: grid; gap: 6px; }
.tool-card .h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tool-card .t { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.tool-card .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 700; }
.tool-card dl { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 0.9rem; }
.tool-card dd { overflow-wrap: anywhere; }
.tool-card dt { color: var(--ink-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; padding-top: 3px; }
.tool-card dd { margin: 0; }
.tool-card .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.filters { gap: 12px; }
.stat-line { font-size: 0.95rem; }
.stat-line b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }

/* Timeline */
.timeline { display: grid; gap: 12px; margin-top: 12px; }
.scrub { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.scrub input[type="range"] { width: 100%; accent-color: var(--accent); }
.snap-list { display: grid; gap: 8px; }
.snap { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); }
.snap.current { border-color: var(--accent); }
.snap .d { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.snap .n { color: var(--ink-2); font-size: 0.92rem; }
.snap .avg { font-size: 0.8rem; color: var(--ink-3); }
.spark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.spark { border: 1px solid var(--line); border-top: 4px solid var(--sp, var(--line)); border-radius: 8px; padding: 10px; background: var(--surface); display: grid; gap: 4px; }
.spark .t b { color: var(--sp, var(--ink)); }
.spark .t { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9rem; }
.spark svg { width: 100%; height: 48px; display: block; }
.spark .path { fill: none; stroke: var(--sp, var(--accent)); stroke-width: 2; }
.spark .area { fill: var(--sp, var(--accent)); opacity: 0.12; }
.spark .pt { fill: var(--sp, var(--accent)); }
.spark .daily { fill: var(--twine); opacity: 0.7; }
.spark .g { stroke: var(--line); stroke-width: 1; }

/* Nails */
.nail-card { border: 1px solid var(--line); border-left: 3px solid var(--nail); border-radius: 8px; padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; }
.nail-card .h { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.nail-card .t { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 0.88rem; background: var(--surface); position: relative; }
.checks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.checks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checks.nails label:has(input:checked) { background: color-mix(in srgb, var(--nail) 14%, transparent); border-color: var(--nail); color: var(--nail); }

/* Plan */
.keystones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.keystone { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface); display: grid; gap: 6px; }
.keystone .l { font-weight: 700; }
.keystone .hint { font-size: 0.85rem; color: var(--ink-2); }
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.month { border-top: 2px solid var(--twine); padding-top: 8px; font-size: 0.92rem; }
.month b { font-family: var(--font-display); font-size: 1.1rem; }
.checkin { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); display: grid; gap: 4px; font-size: 0.92rem; }
.checkin .d { font-weight: 700; }
.checkin b { color: var(--ink-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Check-in steps */
.step { display: grid; gap: 10px; }
.step .sh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.step .sh h3 { font-size: 1.3rem; }
.step .qq { display: grid; gap: 4px; }
.step .qq .qt { font-family: var(--font-display); font-size: 1.1rem; }

/* States / emergency */
.states { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.state-btn { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface); cursor: pointer; display: grid; gap: 4px; }
.state-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.state-btn .n { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.state-btn[data-state="overdrive"] { border-top: 5px solid var(--sp-safety); } .state-btn[data-state="underdrive"] { border-top: 5px solid var(--sp-purpose); } .state-btn[data-state="falseokay"] { border-top: 5px solid var(--sp-body); }
.state-btn .tag { font-size: 0.78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.tool-steps { display: grid; gap: 10px; counter-reset: tool; }
.tool-step { display: grid; grid-template-columns: 2.2rem 1fr; gap: 10px; align-items: start; }
.tool-step::before { counter-increment: tool; content: counter(tool); font-family: var(--font-display); font-size: 1.7rem; color: var(--twine); line-height: 1; }
.tool-step b { display: block; }
.protocol { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.crisis-line { border: 1px solid var(--crisis); border-radius: 8px; padding: 12px 14px; background: color-mix(in srgb, var(--crisis) 8%, transparent); }
.crisis-line b { color: var(--crisis); }
.crisis-list { margin: 0; padding-left: 1.2em; font-size: 0.92rem; display: grid; gap: 4px; }
.crisis-list b { color: var(--ink); }
.breath { display: grid; place-items: center; gap: 10px; padding: 12px; }
.breath .orb { width: 120px; height: 120px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent); transform: scale(0.7); transition: transform 4s ease-in-out; }
.breath .orb.in { transform: scale(1); transition-duration: 4s; }
.breath .orb.out { transform: scale(0.7); transition-duration: 8s; }
.breath .phase { font-family: var(--font-display); font-size: 1.2rem; }

/* Library */
.glossary { display: grid; gap: 8px; margin-top: 12px; }
.glossary .g { border-bottom: 1px solid var(--line); padding-block: 8px; }
.glossary .g b { font-family: var(--font-display); font-size: 1.15rem; }
.book-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 800px) { .book-layout { grid-template-columns: 1fr; } }
.toc { display: grid; gap: 2px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.toc button { text-align: left; border: 0; background: transparent; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); cursor: pointer; font-size: 0.9rem; }
.toc button[aria-current="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.toc button:hover { background: var(--surface-2); }
.reader { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 48px); font-family: var(--font-display); font-size: 1.15rem; line-height: 1.6; max-width: 72ch; }
.reader h1 { font-size: 2rem; margin-block: 0 0.6em; }
.reader h2 { font-size: 1.5rem; margin-block: 1.4em 0.5em; }
.reader h3 { font-size: 1.25rem; margin-block: 1.2em 0.4em; }
.reader h4 { font-size: 1.1rem; margin-block: 1em 0.3em; font-style: italic; }
.reader p { margin-block: 0 1em; }
.reader blockquote { margin: 1em 0; padding: 0.5em 1em; border-left: 3px solid var(--twine); color: var(--ink-2); font-style: italic; }
.reader hr { border: 0; border-top: 1px solid var(--line); margin-block: 1.5em; }
.reader ul, .reader ol { padding-left: 1.4em; margin-block: 0 1em; }
.reader .table-wrap { overflow-x: auto; margin-block: 1em; font-family: var(--font-body); font-size: 0.9rem; }
.reader table { border-collapse: collapse; min-width: 100%; }
.reader th, .reader td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.reader th { background: var(--surface-2); }
.reader-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; font-family: var(--font-body); }
.reader-meta { font-family: var(--font-body); font-size: 0.8rem; color: var(--ink-3); margin-bottom: 1em; }
.emergency { font-size: 1rem; }
.emergency h1 { font-size: 1.7rem; } .emergency h2 { font-size: 1.3rem; margin-top: 1.2em; }
.emergency .table-wrap { overflow-x: auto; }
.emergency table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.emergency th, .emergency td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }

/* Rolling wheel */
.roll-panel { display: grid; gap: 10px; }
.roll-wrap { border: 1px solid var(--line-strong); border-radius: 10px; overflow-x: auto; overflow-y: hidden; background: var(--surface); }
.roll-wrap canvas { display: block; width: 100%; min-width: 680px; height: auto; }
.road-edit { display: grid; gap: 8px; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.road-form { flex-wrap: wrap; } .road-form input[type=text] { flex: 1 1 220px; min-width: 0; } .road-form select, .road-form .btn { flex: 0 0 auto; width: auto; }
.road-chips .chip { --band: var(--sp, var(--ink-3)); font-size: 0.82rem; gap: 8px; }
.road-chips .chip button { all: unset; cursor: pointer; opacity: 0.7; font-weight: 700; padding: 0 2px; } .road-chips .chip button:hover { opacity: 1; }
.road-chips .chip.hill { border: 1px dashed var(--nail); }
#road-suggest .linkish { margin-right: 8px; }

/* Daily session */
.session { position: fixed; inset: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(4px); overflow: auto; padding: 16px; }
.ses-shell { max-width: 720px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 16px; }
.ses-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.ses-dots { display: flex; gap: 6px; }
.ses-dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); }
.ses-dots i.on { background: var(--sp, var(--accent)); }
.ses-body { display: grid; gap: 14px; min-height: 260px; }
.ses-nav { display: flex; justify-content: space-between; }
.ses-q { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.35; }
.ses-why { font-size: 0.92rem; color: var(--ink-2); }
.breath-stage { display: grid; place-items: center; gap: 10px; padding: 12px; }
.breath-stage .orb { width: 160px; height: 160px; border-radius: 50%; background: color-mix(in srgb, var(--sp, var(--accent)) 25%, transparent); border: 3px solid var(--sp, var(--accent)); transform: scale(0.6); transition: transform 1s linear; }
.breath-stage .phase { font-family: var(--font-display); font-size: 1.4rem; }
.breath-stage .count { font-size: 2.2rem; font-family: var(--font-display); color: var(--sp, var(--accent)); font-variant-numeric: tabular-nums; }
.breath-stage .round { font-size: 0.8rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.med-line { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.4; min-height: 4em; text-align: center; padding: 20px 10px; transition: opacity 0.6s; }
.med-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; } .med-bar i { display: block; height: 100%; width: 0; background: var(--sp, var(--accent)); transition: width 0.5s linear; }
.pick { display: grid; gap: 8px; }
.pick label { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.pick label:has(input:checked) { border-color: var(--sp, var(--accent)); background: color-mix(in srgb, var(--sp, var(--accent)) 8%, var(--surface)); }
.pick b { display: block; } .pick small { color: var(--ink-2); }
.session-launch { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border-left: 5px solid var(--sp, var(--accent)); }
.session-launch .t { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.session-launch .streak { font-size: 0.85rem; color: var(--ink-2); }
.streak-days { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
.streak-days i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); } .streak-days i.on { background: var(--thriving); }
.btn.google { background: #fff; color: #1b1b1b; border-color: #dadce0; }
@media (max-width: 560px) { .session-launch { grid-template-columns: 1fr; } }

/* Listen / watch */
.player .np { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.track-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.track { text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--twine); border-radius: 8px; background: var(--surface); padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; }
.track:hover { background: var(--surface-2); }
.track.current { border-color: var(--primary); border-left-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent); }
.track .tt { font-weight: 700; }
.track.missing { opacity: 0.55; }
.track-h { margin-top: 6px; }
.video-wrap { aspect-ratio: 16 / 9; max-width: 100%; }
.video-card h3 { font-size: 1.1rem; } .video-wrap iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }
/* The book, front and center */
.book-band { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--sky); box-shadow: var(--shadow); }
.book-band img { width: 108px; height: 108px; object-fit: cover; border-radius: 6px; box-shadow: 0 6px 18px rgba(43,34,26,0.3); }
.book-band .bt { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.book-band .bs { font-family: var(--font-display); font-style: italic; color: var(--ink-2); }
.book-band .bq { font-size: 0.95rem; color: var(--ink-2); max-width: 60ch; margin-top: 6px; }
.book-band .row { margin-top: 10px; }
@media (max-width: 560px) {
  .book-band { gap: 14px; padding: 13px 14px; }
  .book-band img { width: 76px; height: 76px; }
  .book-band .bt { font-size: 1.22rem; }
  .book-band .bs { font-size: 0.92rem; }
  .book-band .bq { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.88rem; margin-top: 4px; }
  .book-band .row { margin-top: 8px; gap: 6px; }
  .book-band .row .btn { padding: 6px 11px; font-size: 0.85rem; }
}
.from-book { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 0.82rem; color: var(--ink-3); }
.from-book a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.quote-card { border-left: 3px solid var(--twine); background: color-mix(in srgb, var(--twine) 8%, var(--surface)); }
.quote-card .q { font-family: var(--font-display); font-size: 1.25rem; font-style: italic; line-height: 1.35; }
.author { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.author-cover { width: 180px; max-width: 40vw; border-radius: 6px; box-shadow: var(--shadow); }
@media (max-width: 600px) { .author { grid-template-columns: 1fr; } }
.story-card { display: grid; gap: 4px; text-decoration: none; color: inherit; background: var(--sky); border-color: var(--line-strong); }
.story-card .t { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.story-card:hover { filter: brightness(1.03); }
a.tab { text-decoration: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.92rem; margin: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); font-size: 0.92rem; opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 10; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; }

/* ------------------------------------------------- affirmation, Today tab */
.affirm { border-left: 4px solid var(--sp, var(--twine)); background: linear-gradient(120deg, color-mix(in srgb, var(--sp, var(--twine)) 10%, var(--surface)), var(--surface) 70%); display: grid; gap: 8px; }
.affirm .af { font-family: var(--font-display); font-size: 1.32rem; line-height: 1.38; margin: 0; color: var(--ink); }
.affirm .af-foot { gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------- spoke materials */
.wheel-figure .materials { pointer-events: none; }
.wheel-figure .materials .weathered { opacity: 0.55; filter: saturate(0.45); }
.wheel-figure.has-materials .spoke, .wheel-figure svg.has-materials .spoke { opacity: 0.16; }
.mat-swatch { flex: 0 0 auto; overflow: visible; }
.mat-panel { display: grid; gap: 12px; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.mat-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; border: 1px solid var(--line); border-left: 4px solid var(--sp, var(--line)); border-radius: 8px; background: var(--surface); padding: 10px 12px; }
.mat-row.weathered { opacity: 0.82; }
.mat-row .mi { display: grid; gap: 4px; min-width: 0; }
.mat-row .n { font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mat-row .mm { font-size: 0.78rem; font-weight: 600; color: var(--sp, var(--ink-3)); text-transform: lowercase; }
.mbar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink-3) 28%, transparent); overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--sp, var(--accent)); border-radius: 3px; }
.warn-line { color: var(--fragile); }
.mat-ladder summary { cursor: pointer; font-weight: 700; font-size: 0.92rem; color: var(--accent); }
.mat-ladder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; padding-top: 10px; }
.mat-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.ses-mat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 10px 12px; margin-top: 12px; text-align: left; }
.ses-mat .t { font-weight: 700; }

/* ------------------------------------------------------------- milestones */
.ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.ms { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: var(--surface); opacity: 0.55; }
.ms.done { opacity: 1; border-color: color-mix(in srgb, var(--solid) 45%, var(--line)); background: color-mix(in srgb, var(--solid) 6%, var(--surface)); }
.ms .mk { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; background: color-mix(in srgb, var(--ink-3) 16%, transparent); color: var(--ink-3); }
.ms.done .mk { background: var(--solid); color: #fff; }

/* ---------------------------------------------------------------- journal */
.journal-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.journal-layout > * { min-width: 0; }
.jr-write { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.jr-kind { gap: 6px; flex-wrap: wrap; } .jr-kind .btn { flex: 1 1 auto; min-width: 0; }
.jr-prompt { font-family: var(--font-display); font-size: 1.2rem; font-style: italic; color: var(--ink-2); margin: 0; }
.jr-write textarea { width: 100%; min-width: 0; resize: vertical; }
.jr-read { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; border-left: 3px solid var(--accent); }
.jr-hit { display: grid; gap: 6px; border: 1px solid var(--line); border-left: 4px solid var(--sp, var(--accent)); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.jr-hit p { margin: 0; font-size: 0.94rem; }
.jr-hit.dream { border-left-color: var(--twine); }
.jr-quote { font-style: italic; color: var(--ink-3); font-size: 0.9rem !important; }
.jr-terms { font-size: 0.78rem !important; font-variant: small-caps; letter-spacing: 0.03em; }
.jr-nudge { border-top: 1px dashed var(--line); padding-top: 7px; display: grid; gap: 2px; }
.jr-ask { margin: 2px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.94rem; }
.jr-dreams { display: grid; gap: 4px; }
.jr-up { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 10px 12px; }
.jr-entry { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.jr-entry summary { cursor: pointer; padding: 9px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.jr-entry summary .small { flex: 1 1 140px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-body { padding: 0 12px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; font-size: 0.95rem; }
.jr-body p { margin: 0; white-space: pre-wrap; }
.jr-dream-text { border-left: 3px solid var(--twine); padding-left: 10px; color: var(--ink-2); font-style: italic; display: grid; gap: 2px; }
.jr-spokes { display: grid; gap: 6px; }
.jr-sp { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 1.6rem; gap: 8px; align-items: center; font-size: 0.88rem; }
.jr-sp .b { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink-3) 14%, transparent); overflow: hidden; }
.jr-sp .b i { display: block; height: 100%; background: var(--sp, var(--accent)); border-radius: 4px; }
.linkish.danger { color: var(--crisis); margin-left: auto; }
.linkish.sm { font-size: 0.82rem; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 880px) { .journal-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .mat-grid, .ms-grid, .mat-ladder-grid { grid-template-columns: 1fr; }
  .affirm .af { font-size: 1.15rem; }
  .jr-prompt { font-size: 1.06rem; }
  .jr-kind { display: grid; grid-template-columns: minmax(0, 1fr); }
  .jr-sp { grid-template-columns: 4.6rem minmax(0, 1fr) 1.5rem; }
  .ses-mat, .jr-up { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

/* ------------------------------------------------------- welcome / intake */
.intake { position: fixed; inset: 0; z-index: 20; background: var(--ground); background-image: var(--paper); overflow-y: auto; padding: 16px; }
.in-shell { max-width: 940px; margin: 0 auto; display: grid; gap: 14px; padding-block: 8px 40px; }
.in-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.in-top h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); }
.in-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.in-nav { display: flex; gap: 10px; }
.in-lede { color: var(--ink-2); max-width: 64ch; }
.in-q { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.in-foot { max-width: 64ch; }
.in-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.in-choices.row-choices { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.in-choice { display: grid; gap: 3px; text-align: left; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); cursor: pointer; color: inherit; font: inherit; transition: border-color 0.15s, background 0.15s; }
.in-choice b { font-size: 1.05rem; }
.in-choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.in-choice.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.in-choice.crisis { border-color: var(--crisis); border-style: dashed; }
.in-choice.crisis:hover { background: color-mix(in srgb, var(--crisis) 10%, var(--surface)); border-color: var(--crisis); }
.in-wheel-layout { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.in-wheel-layout > * { min-width: 0; }
.in-wheel-side { position: sticky; top: 12px; display: grid; gap: 10px; justify-items: center; }
.in-readout { text-align: center; }
.in-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.in-row { border: 1px solid var(--line); border-left: 4px solid var(--sp, var(--line)); border-radius: 9px; background: var(--surface); padding: 11px 13px; display: grid; gap: 6px; }
.in-row .h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.in-row .h b { color: var(--sp, var(--ink)); }
.in-row .v { margin-left: auto; font-size: 1.2rem; font-weight: 700; color: var(--band, var(--ink-2)); }
.in-ask { font-size: 0.88rem; color: var(--ink-2); margin: 0; }
.in-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 0.74rem; }
.in-ends span { flex: 1 1 0; } .in-ends span:last-child { text-align: right; }
.in-read { display: grid; gap: 10px; }
.in-of-course { font-family: var(--font-display); font-size: 1.45rem; font-style: italic; line-height: 1.3; color: var(--ink); }
.in-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 4px 0 0; font-size: 0.92rem; }
.in-facts dt { color: var(--ink-3); } .in-facts dd { margin: 0; font-weight: 700; }
.in-next { border: 1px solid var(--line-strong); border-left: 5px solid var(--sp, var(--accent)); border-radius: 10px; background: var(--surface); padding: 14px 16px; display: grid; gap: 5px; }
.in-next .t { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--sp, var(--ink)); }
.in-keep { border-top: 1px dashed var(--line-strong); padding-top: 14px; display: grid; gap: 8px; }
@media (max-width: 760px) {
  .in-wheel-layout { grid-template-columns: minmax(0, 1fr); }
  .in-wheel-side { position: static; }
  .in-wheel-side .wheel-figure { max-width: 300px; }
  .in-of-course { font-size: 1.22rem; }
}

/* ------------------------------------------------------------- membership */
.mb-status { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border-left: 4px solid var(--line-strong); }
.mb-status.on { border-left-color: var(--thriving); background: color-mix(in srgb, var(--thriving) 6%, var(--surface)); }
.mb-status .t { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.mb-list, .mb-grid { display: grid; gap: 8px; }
.mb-grid { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.mb-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.mb-item .mk { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.76rem; font-weight: 700;
  background: color-mix(in srgb, var(--ink-3) 16%, transparent); color: var(--ink-3); }
.mb-item.on .mk { background: var(--thriving); color: #fff; }
.mb-code { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px dashed var(--line); padding: 6px 0; }
.mb-code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: 0.04em; }
.mb-code.off code { text-decoration: line-through; opacity: 0.55; }
.mb-mint { flex-wrap: wrap; align-items: flex-end; }
.mb-mint .field { flex: 0 0 auto; } .mb-mint .field.grow { flex: 1 1 200px; }
.mb-mint input { width: 100%; }
#mb-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.locked { border: 1px dashed var(--line-strong); border-radius: 10px; background: color-mix(in srgb, var(--twine) 6%, var(--surface)); padding: 16px 18px; display: grid; gap: 8px; }
.locked.sm { padding: 12px 14px; }
.lk-head { display: flex; gap: 9px; align-items: center; }
.lk-mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--twine); color: #fff; font-size: 0.72rem; }
.ok-line { color: var(--thriving); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .tabs, .masthead-actions, .savebar, .btn, .subtabs { display: none !important; } body { background: white; color: black; } }
