/* Glideweek app stylesheet. Ported from the funnel kit (gw-kit v3); tokens and class names are kept
   identical so the app reads as a continuation of the quiz. tests/test_design_system.py fails on drift. */
@font-face{font-family:"Nunito Sans";font-weight:400;font-style:normal;font-display:swap;src:url(/static/fonts/nunito-sans-400.woff2) format("woff2")}
@font-face{font-family:"Nunito Sans";font-weight:600;font-style:normal;font-display:swap;src:url(/static/fonts/nunito-sans-600.woff2) format("woff2")}
@font-face{font-family:"Nunito Sans";font-weight:700;font-style:normal;font-display:swap;src:url(/static/fonts/nunito-sans-700.woff2) format("woff2")}
@font-face{font-family:"Nunito Sans";font-weight:800;font-style:normal;font-display:swap;src:url(/static/fonts/nunito-sans-800.woff2) format("woff2")}
@font-face{font-family:"Newsreader";font-weight:600;font-style:normal;font-display:swap;src:url(/static/fonts/newsreader-600.woff2) format("woff2")}

:root{
--gw-bg:#F7F5F0;--gw-bg-deep:#EFEBE3;--gw-surface:#FFFFFF;
--gw-ink:#1C2430;--gw-muted:#4A5462;--gw-subtle:#5B6573;--gw-line:#E4E1D8;
--gw-accent:#2E7D78;--gw-accent-ink:#246661;--gw-accent-deep:#1F5E5A;
--gw-tint:#E3F0EE;--gw-mint:#D5E9E6;--gw-seaglass:#8CC7BF;--gw-callout:#EEF4F2;
--gw-sand:#EDE3D1;--gw-apricot:#D98E5F;
--gw-pos-bg:#E3F0EE;--gw-pos-fg:#1F5E5A;--gw-cau-bg:#F6EBD6;--gw-cau-fg:#7A5212;
--gw-warn-bg:#F8E1DC;--gw-warn-fg:#9A3324;--gw-off-bg:#DCD8CF;--gw-off-fg:#4A5462;
--gw-r-card:20px;--gw-r-box:16px;--gw-r-field:14px;--gw-r-chip:12px;
--gw-shadow-card:0 1px 2px rgba(28,36,48,.04),0 10px 28px -14px rgba(28,36,48,.16);
--gw-glow:0 10px 24px -10px rgba(46,125,120,.55);
--gw-hero:radial-gradient(120% 90% at 50% 0%,#FFFFFF 0%,#F7F5F0 62%);
--gw-ease:cubic-bezier(.22,1,.36,1);
--gw-font-ui:"Nunito Sans",var(--app-font-family,system-ui),system-ui,-apple-system,"Segoe UI",sans-serif;
--gw-font-display:"Newsreader",var(--h1-font-family,Georgia),Georgia,"Times New Roman",serif;
/* App-only tokens (design loop r1, docs/design/art-direction.md). Added, never replacing a kit token. */
--gw-nav-h:64px;
--gw-sand-soft:#F4EFE6;--gw-mint-soft:#EAF3F1;
--gw-warn-rule:#B4472F;--gw-warn-soft:#FDF3F0;--gw-danger:#9A3324;
/* Severity (r2): bg luminance strictly falls 1 -> 3 (.81/.68/.56) so order reads without hue; border = visible edge on white */
--gw-sev-1-bg:#EDE8DD;--gw-sev-1-fg:#4A5462;--gw-sev-1-border:#B9AE96;
--gw-sev-2-bg:#F2D49B;--gw-sev-2-fg:#6B4510;--gw-sev-2-border:#C99A4A;
/* Tracking r1: sev-3 moved off pink/red (#EFB8AB) to a warm clay; luminance still falls 1 -> 3 (.81/.68/.51) */
--gw-sev-3-bg:#E2B48E;--gw-sev-3-fg:#6B3A16;--gw-sev-3-border:#B98A60;
--gw-control-ring:#8F8A7C;
--gw-art-mint:#D5E9E6;--gw-art-sand:#EDE3D1;--gw-art-tint:#E3F0EE;--gw-art-paper:#EFEBE3;
--gw-garnish-apricot:#D98E5F;--gw-garnish-seaglass:#8CC7BF;
--gw-photo-radius:16px;
--gw-shadow-lift:0 1px 2px rgba(28,36,48,.05),0 18px 40px -20px rgba(28,36,48,.28);
--gw-hero-teal:radial-gradient(90% 120% at 100% 0%,#E3F0EE 0%,rgba(227,240,238,0) 62%),linear-gradient(180deg,#FFFFFF 0%,#F7F5F0 100%);
--gw-hero-sand:radial-gradient(90% 120% at 0% 0%,#F4EFE6 0%,rgba(244,239,230,0) 62%),linear-gradient(180deg,#FFFFFF 0%,#F7F5F0 100%);
--gw-paper-fade:linear-gradient(to top,#F7F5F0 55%,rgba(247,245,240,0));
--gw-ease-out:cubic-bezier(.16,1,.3,1);
/* r2 additions */
--gw-band-1:#EFEBE3;--gw-band-1-edge:#D6CFBF;--gw-band-2:#D2EAE6;--gw-band-2-edge:#A3CCC5;--gw-band-3:#F0D6C2;--gw-band-3-edge:#D6B293;
--gw-fs-caption:.8125rem;--gw-lh-caption:1rem;--gw-fs-micro:.6875rem;
--gw-shadow-1:0 1px 2px rgba(28,36,48,.08),0 2px 6px -2px rgba(28,36,48,.10);
--gw-dur-press:120ms;--gw-dur-state:200ms;--gw-dur-pop:420ms;
--gw-halo:8px;
--gw-rule-w:4px;
--gw-fade-w:32px;
/* r3 additions */
--gw-week-1:#E3F0EE;--gw-week-2:#F4EFE6;--gw-week-3:#EFEBE3;--gw-week-fg:#4A5462;--gw-week-edge:#E4E1D8;
--gw-done-bg:#D5E9E6;--gw-done-border:#2E7D78;
--gw-muted-opacity:.55;
--gw-photo-pos:50% 50%;
/* r4 additions (bands re-tuned above: band-2 mist #D2EAE6, band-3 soft clay #F0D6C2, every pair dE76 >= 10) */
--gw-hero-bleed:12px;
--gw-spot-hero-ratio:780/400;
--gw-hero-ratio:16/10;--gw-hero-ratio-wide:16/7;
--gw-tabbar-h:calc(var(--gw-nav-h) + 2px + env(safe-area-inset-bottom,0px));
--gw-tabbar-clear:calc(var(--gw-tabbar-h) + 16px);
--gw-daychip-num:clamp(14px,5cqi,20px);--gw-daychip-label:clamp(11px,3.4cqi,13px);
--gw-callout-lh:22px;--gw-callout-icon:18px;
--gw-renew-chip-bg:#EDE3D1;--gw-renew-chip-fg:#7A5212;
/* r5 additions (renew chip glyph moved to amber ink #7A5212 to match the eyebrow) */
--gw-renew-eyebrow:#7A5212;
--gw-estimate-border:#8F8A7C;
--gw-backtop-size:44px;
/* Tracking r1 additions (docs/design/art-direction.md "Tracking features"). */
/* Frequency ramp = "how often", never "how bad". Warm bark, L* 94.6/81.8/66.3/46.0 (>=12 per step, reads in grayscale).
   fg: ink on 0-2 (13.6/10+/6.1:1), paper on 3 (4.75:1). edge = cell outline on white. */
--gw-freq-0:#F3EFE8;--gw-freq-0-fg:#1C2430;--gw-freq-0-edge:#E4E1D8;
--gw-freq-1:#D8CAB0;--gw-freq-1-fg:#1C2430;--gw-freq-1-edge:#BFAE90;
--gw-freq-2:#B59E7B;--gw-freq-2-fg:#1C2430;--gw-freq-2-edge:#9A8160;
--gw-freq-3:#7D6A52;--gw-freq-3-fg:#F7F5F0;--gw-freq-3-edge:#6A5944;
/* Progress bar + row meter */
--gw-bar-h:10px;--gw-bar-r:5px;--gw-bar-track:#EFEBE3;--gw-bar-edge:#E4E1D8;--gw-bar-fill:#2E7D78;--gw-meter-h:6px;
/* Attention (calm, recoverable errors): amber ink 6.4:1 on its tint. Danger red stays for destructive confirms only */
--gw-attn-bg:#FBF6EC;--gw-attn-fg:#7A5212;--gw-attn-rule:#C99A4A;
/* Quiet surface (empty states, privacy notes): a hair whiter than paper, no shadow */
--gw-surface-2:#FBF9F5;
--gw-row-pad:10px;--gw-metric-tile:36px;--gw-spinner:16px;--gw-r-note:10px;
/* Print (report and any page printed): ink, rule and a pt type scale; grayscale-safe */
--gw-print-ink:#000000;--gw-print-muted:#333333;--gw-print-rule:#999999;--gw-print-rule-soft:#CCCCCC;
--gw-print-fs-body:10pt;--gw-print-fs-small:8.5pt;--gw-print-fs-th:8pt;--gw-print-fs-h1:18pt;--gw-print-fs-h2:14pt;--gw-print-fs-h3:11pt;
/* Tracking r2 additions (docs/design/art-direction.md "Round 2"). */
/* Low-emphasis non-text markers (range ticks, band edges): = subtle ink, 5.4:1 on paper, so also safe for text */
--gw-ink-subtle:var(--gw-subtle);
/* No-data heatmap/calendar cell: ~4% ink over paper, borderless. Never carries meaning on its own (pair with text) */
--gw-freq-none:#EDEBE6;
/* freq-3 numerals: never dim --gw-freq-3-fg with opacity (falls below AA). Secondary numerals on freq-3 use -soft (4.5:1) */
--gw-freq-3-fg-soft:#F4EFE6;
/* Status tag (Taken, Logged, Skipped…): tint + accent ink 5.7:1; quiet = dashed control-ring outline, muted ink 7:1 */
--gw-chip-bg:#E3F0EE;--gw-chip-ink:#246661;--gw-chip-quiet-edge:#8F8A7C;--gw-chip-quiet-ink:#4A5462;
/* Caption for labels and ::before data-labels: rem so it scales with user text size (fs-caption = .8125rem above) */
--gw-lh-label:1.125rem;
/* Big number + sub-line (one type scale for every number on /log and /progress) */
--gw-fs-stat:1.25rem;--gw-lh-stat:1.5rem;--gw-fs-stat-sub:.875rem;--gw-lh-stat-sub:1.125rem;
/* Select caret: one stroke chevron (glyph chevron-down, muted ink #4A5462) instead of the filled triangle */
--gw-select-caret:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5462' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
}
.gw,.gw *{box-sizing:border-box}
.gw{font-family:var(--gw-font-ui);color:var(--gw-ink);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
.gw-num{font-variant-numeric:tabular-nums}

/* Type */
.gw-display{font-family:var(--gw-font-display);font-weight:600;font-size:34px;line-height:38px;color:var(--gw-ink);margin:0}
.gw-h2{font-family:var(--gw-font-display);font-weight:600;font-size:22px;line-height:28px;margin:0}
.gw-title{font-weight:700;font-size:18px;line-height:24px;margin:0}
.gw-body{font-size:16px;line-height:24px;color:var(--gw-muted)}
.gw-label{font-size:var(--gw-fs-caption);line-height:var(--gw-lh-caption);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--gw-subtle)}
.gw-smallprint{font-size:14px;line-height:1.45;color:var(--gw-subtle)}
.gw-legal{font-size:16px;line-height:1.45;color:var(--gw-ink);text-align:left}
.gw-legal b,.gw-legal strong{font-weight:700}

/* Surfaces */
.gw-card{background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);padding:16px;box-shadow:var(--gw-shadow-card)}
.gw-card--flat{box-shadow:none}
.gw-hero{background:var(--gw-hero);border-radius:var(--gw-r-card)}

/* Icons: 24px line glyph, 1.75 stroke, round caps; chip = 40px tint tile */
.gw-icon{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.gw-icon--16{width:16px;height:16px;stroke-width:2}
.gw-icon--18{width:18px;height:18px}
.gw-icon--20{width:20px;height:20px}
.gw-chip{width:40px;height:40px;flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--gw-r-chip);background:var(--gw-tint);color:var(--gw-accent)}
.gw-chip--round{border-radius:50%}
.gw-chip img{width:24px;height:24px;display:block}

/* Feature / benefit row: chip + text */
.gw-rows{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}
.gw-row{display:flex;align-items:center;gap:12px;font-size:16px;line-height:22px;color:var(--gw-ink);text-align:left}

/* Info callout */
.gw-callout{display:flex;gap:10px;align-items:flex-start;background:var(--gw-callout);border-radius:14px;padding:12px 14px;color:var(--gw-ink);font-size:16px;line-height:var(--gw-callout-lh);text-align:left}
.gw-callout .gw-icon{width:var(--gw-callout-icon);height:var(--gw-callout-icon);margin-top:calc((var(--gw-callout-lh) - var(--gw-callout-icon)) / 2);color:var(--gw-accent)}

/* Status pill */
.gw-pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 10px;font-size:14px;line-height:18px;font-weight:700;background:var(--gw-bg-deep);color:var(--gw-ink)}
.gw-pill--positive{background:var(--gw-pos-bg);color:var(--gw-pos-fg)}
.gw-pill--caution{background:var(--gw-cau-bg);color:var(--gw-cau-fg)}
.gw-pill--warning{background:var(--gw-warn-bg);color:var(--gw-warn-fg)}

/* Week strip: 7 chips 40x56 + legend */
.gw-week{display:flex;justify-content:space-between;gap:6px}
.gw-day{flex:1 1 0;max-width:44px;min-width:36px;height:56px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:var(--gw-surface);border:1px solid var(--gw-line);color:var(--gw-ink)}
.gw-day small{font-size:var(--gw-fs-micro);line-height:1.1;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--gw-subtle)}
.gw-day b{font-size:18px;line-height:20px;font-weight:800;font-variant-numeric:tabular-nums}
.gw-day.is-shot{background:var(--gw-accent);border-color:var(--gw-accent);color:#fff;box-shadow:var(--gw-glow)}
.gw-day.is-shot small{color:rgba(255,255,255,.85)}
.gw-day.is-gentle{background:var(--gw-mint);border-color:var(--gw-mint)}
.gw-day.is-protein{background:var(--gw-sand);border-color:var(--gw-sand)}
.gw-day.is-today{outline:2px solid var(--gw-accent);outline-offset:2px}
.gw-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 14px;margin-top:12px;font-size:14px;line-height:18px;color:var(--gw-muted)}
.gw-legend span{display:inline-flex;align-items:center;gap:6px}
.gw-legend i{width:10px;height:10px;border-radius:50%;display:inline-block;background:var(--gw-line)}
.gw-legend i.is-shot{background:var(--gw-accent)}.gw-legend i.is-gentle{background:var(--gw-seaglass)}.gw-legend i.is-protein{background:#CDB98F}

/* Week curve (geometry shared by 07 and 26; markup in kit/week-curve.html) */
.gw-curve{position:relative;width:100%;max-width:358px;margin:0 auto}
.gw-curve svg{display:block;width:100%;height:auto;overflow:visible}
.gw-curve-days{display:grid;grid-template-columns:repeat(7,1fr);margin-top:6px;font-size:13px;line-height:16px;color:var(--gw-subtle);text-align:center;font-variant-numeric:tabular-nums}
.gw-curve-days .is-shot{color:var(--gw-accent-ink);font-weight:700}
/* appetite variant: y-axis legend column left of the plot (markup in kit/week-curve.html) */
.gw-curve--appetite{display:grid;grid-template-columns:auto 1fr;column-gap:8px;max-width:358px}
.gw-curve-y{display:flex;flex-direction:column;justify-content:space-between;padding:2px 0 26px;text-align:left}
.gw-curve-y b{font-size:var(--gw-fs-caption);line-height:var(--gw-lh-caption);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--gw-subtle)}
.gw-curve-y span{font-size:13px;line-height:16px;color:var(--gw-muted)}
.gw-curve-key{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:14px;line-height:18px;color:var(--gw-muted)}
.gw-curve-key i{width:10px;height:10px;border-radius:50%;background:var(--gw-apricot)}

/* Timeline / step rows (loader, result strip, final) */
.gw-steps{list-style:none;margin:0;padding:0;position:relative}
.gw-step{position:relative;display:flex;gap:12px;padding:0 0 18px 0;text-align:left}
.gw-step:last-child{padding-bottom:0}
.gw-step::before{content:"";position:absolute;left:11px;top:26px;bottom:2px;width:2px;border-radius:2px;background:var(--gw-line)}
.gw-step:last-child::before{display:none}
.gw-step.is-done::before{background:var(--gw-seaglass)}
.gw-dot{width:24px;height:24px;flex:none;border-radius:50%;border:2px solid var(--gw-line);background:var(--gw-surface);display:flex;align-items:center;justify-content:center;color:#fff;position:relative;z-index:1;transition:background-color .24s var(--gw-ease),border-color .24s var(--gw-ease)}
.gw-dot svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.gw-step.is-done .gw-dot{background:var(--gw-accent);border-color:var(--gw-accent)}
.gw-step.is-done .gw-dot svg{opacity:1}
.gw-step.is-active .gw-dot{border-color:var(--gw-accent);box-shadow:0 0 0 4px rgba(46,125,120,.16)}
.gw-step.is-active .gw-dot::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--gw-accent);animation:gw-pulse 1.2s var(--gw-ease) infinite}
.gw-step-t{font-size:16px;line-height:22px;font-weight:700;color:var(--gw-ink)}
.gw-step-s{font-size:14px;line-height:20px;color:var(--gw-subtle)}
.gw-step.is-pending .gw-step-t{color:var(--gw-muted);font-weight:600}
@keyframes gw-pulse{0%,100%{transform:scale(.7);opacity:.6}50%{transform:scale(1);opacity:1}}

/* Segmented unit toggle */
.gw-seg{display:flex;height:48px;padding:2px;border-radius:14px;background:#ECEAE3;gap:2px}
.gw-seg button{flex:1;height:44px;border:1px solid transparent;border-radius:12px;background:transparent;font:600 16px/20px var(--gw-font-ui);color:var(--gw-muted);cursor:pointer;transition:background-color .16s,color .16s}
.gw-seg button[aria-pressed="true"],.gw-seg button.is-on{background:#fff;border-color:var(--gw-line);color:var(--gw-ink);box-shadow:0 1px 2px rgba(28,36,48,.06)}

/* Drum picker */
.gw-drum{position:relative;height:280px;overflow-y:auto;scroll-snap-type:y mandatory;-webkit-overflow-scrolling:touch;mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent)}
.gw-drum::-webkit-scrollbar{display:none}
.gw-drum-band{position:absolute;left:0;right:0;top:112px;height:56px;border-radius:14px;background:#fff;border:1px solid var(--gw-line);pointer-events:none}
.gw-drum-item{height:56px;display:flex;align-items:center;justify-content:center;scroll-snap-align:center;font:600 24px/1 var(--gw-font-ui);font-variant-numeric:tabular-nums;color:var(--gw-ink);opacity:.6;position:relative}
.gw-drum-item.is-focus{font-size:40px;font-weight:700;opacity:1}

/* Sticky CTA scrim: place <div class="gw-cta-scrim"></div> in a Raw block on screens with a fixed Button.
   Token (r3): solid up to 8px above the button (~70%), then a 40px fade. Assumes Button container spacingBottom 32;
   for another offset set style="--gw-cta-bottom:24px" on the div. */
.gw-cta-scrim{--gw-cta-bottom:32px;position:fixed;left:0;right:0;bottom:0;height:calc(var(--gw-cta-bottom) + 56px + 8px + 40px + env(safe-area-inset-bottom,0px));background:linear-gradient(to top,var(--gw-bg) calc(100% - 40px),rgba(247,245,240,0));pointer-events:none;z-index:899}

/* Badge pill (r3): "Best value" etc. Text only, no icons, never price claims */
.gw-badge{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:12px;background:var(--gw-accent);color:#fff;font:600 13px/16px var(--gw-font-ui);letter-spacing:.01em;white-space:nowrap}

/* Answer echo chip (r3): plays back a quiz answer (26 result, paywall). Not tappable */
.gw-echos{display:flex;flex-wrap:wrap;gap:8px}
.gw-chip--echo{display:inline-flex;align-items:center;gap:6px;width:auto;height:36px;padding:0 14px;border-radius:18px;background:var(--gw-tint);color:var(--gw-accent-ink);font:600 16px/20px var(--gw-font-ui);white-space:nowrap}
.gw-chip--echo .gw-icon{width:16px;height:16px;stroke-width:2}

/* Form field label (r3): 16/600 ink, 8px above the input. Placeholder = theme input.placeholderColor #5B6573 at 400 */
.gw-field-label{display:block;margin:0 0 8px;font:600 16px/22px var(--gw-font-ui);color:var(--gw-ink);text-align:left}

/* In-section fill bar (r3): optional 4px bar inside a section screen; set --gw-fill:0..1 */
.gw-fill{height:4px;border-radius:2px;background:var(--gw-line);overflow:hidden}
.gw-fill::before{content:"";display:block;height:100%;width:calc(var(--gw-fill,0) * 100%);border-radius:inherit;background:var(--gw-accent);transition:width .24s var(--gw-ease)}

/* Daily focus row (r3, path B "your week"): 7 x 40px circles on a 2px rail */
.gw-focus{position:relative;display:grid;grid-template-columns:repeat(7,1fr);max-width:358px;margin:0 auto}
.gw-focus::before{content:"";position:absolute;left:calc(100% / 14);right:calc(100% / 14);top:19px;height:2px;border-radius:1px;background:var(--gw-line)}
.gw-focus-day{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.gw-focus-dot{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--gw-surface);border:1.5px solid var(--gw-line);color:var(--gw-accent)}
.gw-focus-dot .gw-icon{width:20px;height:20px}
.gw-focus-day small{font-size:13px;line-height:16px;font-weight:700;color:var(--gw-subtle);font-variant-numeric:tabular-nums}
.gw-focus-day.is-today .gw-focus-dot{background:var(--gw-accent);border-color:var(--gw-accent);color:#fff;box-shadow:var(--gw-glow)}
.gw-focus-day.is-today small{color:var(--gw-accent-ink)}
.gw-focus-day.is-mark .gw-focus-dot{border-color:var(--gw-apricot);box-shadow:0 0 0 3px rgba(217,142,95,.18)}

/* Entrance */
.gw-rise{animation:gw-rise .42s var(--gw-ease) both}
.gw-rise-2{animation-delay:.06s}.gw-rise-3{animation-delay:.12s}.gw-rise-4{animation-delay:.18s}
@keyframes gw-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.gw *,.gw-rise,.gw-fill::before,[data-element-type="Options"] button.option,[data-element-type="Options"] button.option::after{animation:none!important;transition:none!important}}

/* ---------- App-only components (same idiom as the kit) ----------
   Rules carried over from the funnel: 24px page gutter (theme app.paddingHorizontal), white surfaces with a
   1px/1.5px #E4E1D8 line, radius 16 for boxes and 12 for chips, teal only as fill/border/icon (text in accent-ink),
   glow only on the primary CTA and the shot-day chip, one gradient per screen, nothing under 13px. */
html{background:var(--gw-bg)}
body.gw{margin:0;min-height:100vh;background:var(--gw-bg)}
.gw-app{max-width:480px;margin:0 auto;padding:calc(16px + env(safe-area-inset-top,0px)) 24px calc(32px + env(safe-area-inset-bottom,0px))}
/* With the bottom nav: last content and the footer always clear the fixed bar (nav + safe area + 32px) */
body.gw-has-nav .gw-app{padding-bottom:calc(var(--gw-nav-h) + env(safe-area-inset-bottom,0px) + 32px)}
.gw-stack{display:flex;flex-direction:column;gap:16px}
.gw-stack--sm{gap:8px}
.gw-stack--lg{gap:24px}
.gw-center{text-align:center}
:where(.gw) :where(p,h1,h2,h3,ul,ol,figure){margin:0}
.gw-section-title{margin:32px 0 12px}
.gw-footer{margin-top:40px;padding-top:20px;border-top:1px solid var(--gw-line);text-align:center;font-size:14px;line-height:1.45;color:var(--gw-subtle);text-wrap:balance}
.gw-footer p+p{margin-top:6px}
.gw-footer-part{white-space:nowrap}
:where(.gw) a{color:var(--gw-accent-ink)}

/* Page head: theme h1 (Newsreader 600 28/118%) with the paywall's teal eyebrow line above it */
.gw-display,.gw-h2{text-wrap:balance}
.gw-h1{font-family:var(--gw-font-display);font-weight:600;font-size:28px;line-height:1.18;color:var(--gw-ink);text-wrap:balance}
.gw-eyebrow{font-size:15px;line-height:20px;font-weight:700;color:var(--gw-accent-ink)}
.gw-pagehead{display:flex;flex-direction:column;gap:4px;margin-bottom:20px}
.gw-pagehead .gw-body{margin-top:4px}

/* Buttons: primary = funnel CTA (56, radius 16, 17/700, glow). Secondary = white option-row surface. */
.gw-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:0 24px;border:0;border-radius:var(--gw-r-box);background:var(--gw-accent);color:#fff!important;font:700 17px/22px var(--gw-font-ui);cursor:pointer;text-decoration:none;box-shadow:var(--gw-glow);transition:transform .12s var(--gw-ease),background-color .16s}
.gw-btn:active{transform:scale(.98)}
.gw-btn--block{display:flex;width:100%}
.gw-btn--sm{min-height:44px;padding:0 18px;font-size:16px;border-radius:var(--gw-r-field)}
.gw-btn--ghost{background:var(--gw-surface);color:var(--gw-accent-ink)!important;border:1.5px solid var(--gw-line);box-shadow:none}
.gw-btn--text{background:transparent;color:var(--gw-accent-ink)!important;box-shadow:none;min-height:44px;padding:0 8px;font-size:16px;text-decoration:underline;text-underline-offset:3px}
.gw-btn:disabled,.gw-btn[aria-disabled="true"]{background:var(--gw-off-bg);color:var(--gw-off-fg)!important;box-shadow:none;cursor:default}
.gw-btn .gw-icon{width:20px;height:20px}
.gw :focus-visible{outline:3px solid var(--gw-accent);outline-offset:2px}

/* Option row link: the funnel's answer row (60 high, radius 16, 1.5px line, 17/600) reused for menus and settings */
.gw-options{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}
.gw-option{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 16px;border:1.5px solid var(--gw-line);border-radius:var(--gw-r-box);background:var(--gw-surface);color:var(--gw-ink);font:600 17px/22px var(--gw-font-ui);text-decoration:none;transition:transform .12s var(--gw-ease),background-color .16s,border-color .16s}
.gw-option:active{transform:scale(.98)}
.gw-option>span:not(.gw-chip){flex:1;min-width:0}
.gw-option small{display:block;font-size:15px;line-height:20px;font-weight:400;color:var(--gw-muted)}
.gw-option>.gw-icon:last-child{color:var(--gw-subtle);width:20px;height:20px}
.gw-option.is-on{background:var(--gw-tint);border-color:var(--gw-accent)}
.gw-option.is-on .gw-chip{background:#fff}

/* Stat strip: the paywall's "Shot day | Protein / day | Water / day" card */
.gw-stats{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);padding:12px 0}
.gw-stat{padding:0 14px;min-width:0}
.gw-stat+.gw-stat{border-left:1px solid var(--gw-line)}
.gw-stat span{display:block;font-size:14px;line-height:18px;color:var(--gw-subtle)}
.gw-stat b{display:block;margin-top:2px;font-size:17px;line-height:22px;font-weight:800;color:var(--gw-ink);font-variant-numeric:tabular-nums;white-space:nowrap}

/* Bottom nav: 5 equal cells (78x64 at 390), icon in a 56x32 indicator pill, paper ground with blur */
.gw-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:20;background:rgba(247,245,240,.92);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);border-top:1px solid var(--gw-line);padding-bottom:env(safe-area-inset-bottom,0px)}
.gw-bottom-nav ul{max-width:480px;margin:0 auto;padding:0 4px;list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.gw-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:var(--gw-nav-h);min-width:44px;padding:6px 2px 8px;text-decoration:none;color:var(--gw-subtle);font-size:13px;line-height:16px;font-weight:600;-webkit-tap-highlight-color:transparent}
.gw-bottom-nav a>.gw-icon{box-sizing:content-box;width:24px;height:24px;padding:4px 16px;border-radius:16px;transition:background-color .16s var(--gw-ease),color .16s}
.gw-bottom-nav a[aria-current="page"]{color:var(--gw-ink);font-weight:700}
/* Labels never collide at large text: capped size, one line, clipped inside their own cell */
.gw-bottom-nav a>span{display:block;max-width:100%;min-width:0;align-self:stretch;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:min(13px,3.2vw);line-height:16px}
.gw-bottom-nav a[aria-current="page"]>.gw-icon{background:var(--gw-tint);color:var(--gw-accent)}

/* Day card: <details>; the date tile reuses the week-strip chip and its phase colours. Today = open, teal border */
.gw-days{display:flex;flex-direction:column;gap:12px}
.gw-daycard{background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);box-shadow:var(--gw-shadow-card)}
.gw-daycard>summary{list-style:none;display:flex;align-items:center;gap:14px;min-height:76px;padding:12px 16px;cursor:pointer;border-radius:inherit}
.gw-daycard>summary::-webkit-details-marker{display:none}
.gw-daycard-date{width:44px;height:52px;flex:none;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;background:var(--gw-surface);border:1px solid var(--gw-line);color:var(--gw-ink)}
.gw-daycard-date small{font-size:var(--gw-fs-caption);line-height:1.08;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--gw-subtle)}
.gw-daycard-date b{font-size:18px;line-height:20px;font-weight:800;font-variant-numeric:tabular-nums}
.gw-daycard.is-shot .gw-daycard-date{background:var(--gw-accent);border-color:var(--gw-accent);color:#fff;box-shadow:var(--gw-glow)}
.gw-daycard.is-shot .gw-daycard-date small{color:rgba(255,255,255,.88)}
.gw-daycard.is-gentle .gw-daycard-date{background:var(--gw-mint);border-color:var(--gw-mint)}
.gw-daycard.is-protein .gw-daycard-date{background:var(--gw-sand);border-color:var(--gw-sand)}
.gw-daycard-head{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.gw-daycard-title{font-size:17px;line-height:22px;font-weight:700;color:var(--gw-ink)}
.gw-daycard-meta{font-size:14px;line-height:18px;color:var(--gw-subtle)}
.gw-daycard-meta b{color:var(--gw-accent-ink);font-weight:700}
.gw-daycard>summary>.gw-icon{color:var(--gw-subtle);width:20px;height:20px;transition:transform .24s var(--gw-ease)}
.gw-daycard[open]>summary>.gw-icon{transform:rotate(180deg)}
.gw-daycard-body{padding:4px 16px 16px;display:flex;flex-direction:column;gap:14px}
.gw-daycard-body::before{content:"";display:block;height:1px;background:var(--gw-line)}
.gw-daycard.is-today{border:1.5px solid var(--gw-accent)}

/* Task list inside a day: 24px tick (kit step-dot idiom) + text */
.gw-tasks{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}
.gw-task{display:flex;gap:12px;align-items:flex-start;font-size:16px;line-height:22px;color:var(--gw-ink)}
.gw-task small{display:block;font-size:14px;line-height:20px;color:var(--gw-subtle)}
.gw-tick{width:24px;height:24px;flex:none;margin-top:-1px;border-radius:50%;border:2px solid var(--gw-line);background:var(--gw-surface);display:flex;align-items:center;justify-content:center;color:#fff}
.gw-tick svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.gw-task.is-done .gw-tick{background:var(--gw-accent);border-color:var(--gw-accent)}
.gw-task.is-done .gw-tick svg{opacity:1}
.gw-task.is-done>span:last-child{color:var(--gw-muted)}

/* Quick-log row: 4 tiles in the option idiom; each tile = 40px chip + 14/700 label; logged = tint + teal border */
.gw-qlog{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.gw-qlog button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:92px;padding:10px 2px;border:1.5px solid var(--gw-line);border-radius:var(--gw-r-box);background:var(--gw-surface);color:var(--gw-ink);font:700 14px/18px var(--gw-font-ui);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .12s var(--gw-ease),background-color .16s,border-color .16s}
.gw-qlog button:active{transform:scale(.98)}
.gw-qlog button>.gw-icon{box-sizing:content-box;padding:8px;border-radius:var(--gw-r-chip);background:var(--gw-tint);color:var(--gw-accent)}
.gw-qlog button[aria-pressed="true"]{background:var(--gw-tint);border-color:var(--gw-accent)}
.gw-qlog button[aria-pressed="true"]>.gw-icon{background:#fff}

/* Locked-content teaser: a real card whose preview rows fade out (mask, not a gradient behind text) */
.gw-locked{background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);padding:16px;box-shadow:var(--gw-shadow-card)}
.gw-locked-head{display:flex;align-items:flex-start;gap:12px}
.gw-locked-head>div{flex:1;min-width:0}
.gw-locked-head .gw-pill{flex:none;font-size:13px;line-height:16px;padding:4px 8px 4px 6px}
.gw-locked-peek{margin:14px 0 4px;display:flex;flex-direction:column;gap:10px;pointer-events:none;user-select:none;-webkit-mask-image:linear-gradient(#000 20%,transparent 96%);mask-image:linear-gradient(#000 20%,transparent 96%)}
.gw-locked-peek>div{display:flex;align-items:center;gap:12px;height:48px;padding:0 12px;border:1px solid var(--gw-line);border-radius:var(--gw-r-field)}
.gw-locked-peek i{display:block;height:10px;border-radius:5px;background:var(--gw-bg-deep)}
.gw-locked-peek i:first-child{width:28px;height:28px;flex:none;border-radius:8px;background:radial-gradient(circle at 50% 50%,var(--gw-seaglass) 0 4px,var(--gw-tint) 4.5px)}
.gw-locked .gw-btn{margin-top:12px}

/* Chart frame: card + header + plot; plot geometry follows the funnel week curve (dashed grid, 2.5 line, area fade) */
.gw-chartframe{background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);padding:16px;box-shadow:var(--gw-shadow-card)}
.gw-chartframe-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.gw-chartframe-value{font-size:28px;line-height:32px;font-weight:800;color:var(--gw-ink);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.gw-chartframe-value small{font-size:16px;font-weight:700;color:var(--gw-subtle);margin-left:2px}
.gw-chartframe svg{display:block;width:100%;height:auto;overflow:visible}
.gw-chartframe .gw-curve-days{margin-top:6px}
.gw-chartframe-cap{margin-top:12px;font-size:14px;line-height:20px;color:var(--gw-subtle)}

/* Empty state: the funnel's image fallback (64px round chip over the hero fade) + title, body, one action */
.gw-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 20px 24px;text-align:center;background:var(--gw-hero);border:1px solid var(--gw-bg-deep);border-radius:var(--gw-r-card)}
.gw-empty .gw-chip{width:64px;height:64px;margin-bottom:8px;background:var(--gw-surface);box-shadow:0 0 0 8px rgba(227,240,238,.7)}
.gw-empty .gw-chip .gw-icon{width:28px;height:28px}
.gw-empty .gw-body{max-width:28ch}
.gw-empty .gw-btn{margin-top:12px}
.gw-chartframe .gw-empty{border:0;padding:16px 8px 8px}

/* Red-flag card (required content): warning pill colours, ink title */
.gw-redflag{display:flex;gap:12px;align-items:flex-start;background:var(--gw-warn-bg);color:var(--gw-warn-fg);border-radius:var(--gw-r-field);padding:14px 16px;font-size:16px;line-height:22px}
.gw-redflag .gw-icon{width:20px;height:20px;margin-top:1px}
.gw-redflag b{color:var(--gw-warn-fg)}

/* Swatches (styleguide only) */
.gw-swatches{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gw-swatch{border:1px solid var(--gw-line);border-radius:var(--gw-r-field);overflow:hidden;background:var(--gw-surface);font-size:13px;line-height:16px}
.gw-swatch i{display:block;height:40px}
.gw-swatch span{display:block;padding:6px 8px;color:var(--gw-muted);font-variant-numeric:tabular-nums}
.gw-swatch b{display:block;color:var(--gw-ink);font-weight:700}

@media (prefers-reduced-motion:reduce){.gw-btn,.gw-option,.gw-qlog button,.gw-daycard>summary>.gw-icon,.gw-bottom-nav a>.gw-icon{transition:none!important}}

/* Form controls (Task 8): select / text / date inputs on the field-label rhythm */
.gw-input{display:block;width:100%;min-height:52px;padding:12px 16px;border:1.5px solid var(--gw-line);border-radius:var(--gw-r-field);background:var(--gw-surface);color:var(--gw-ink);font:400 17px/22px var(--gw-font-ui);appearance:none;-webkit-appearance:none}
select.gw-input{background-image:var(--gw-select-caret);background-position:right 14px center;background-size:18px 18px;background-repeat:no-repeat;padding-right:44px}
.gw-input:focus{outline:2px solid var(--gw-accent);outline-offset:1px}
.gw-input[aria-invalid="true"]{border-color:var(--gw-warn-fg)}
.gw-help{margin:6px 0 0;font-size:15px;line-height:20px;color:var(--gw-muted);text-align:left}
.gw-error{margin:6px 0 0;font-size:15px;line-height:20px;font-weight:600;color:var(--gw-warn-fg);text-align:left}

/* Side-effect calendar: 4 Monday-first weeks, tint by strongest severity logged */
.gw-cal{display:flex;flex-direction:column;gap:6px}
.gw-cal-head,.gw-cal-row{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;text-align:center}
.gw-cal-head span{font-size:13px;line-height:16px;font-weight:700;color:var(--gw-subtle)}
.gw-cal-day{display:flex;align-items:center;justify-content:center;height:40px;border:1px solid var(--gw-line);border-radius:var(--gw-r-chip);background:var(--gw-surface);font-size:15px;line-height:20px;color:var(--gw-muted);font-variant-numeric:tabular-nums}
.gw-cal-day.is-future{opacity:.4}
.gw-cal-day.is-today{border:1.5px solid var(--gw-accent);color:var(--gw-ink)}
.gw-cal-day.sev-1{background:var(--gw-sev-1-bg);color:var(--gw-sev-1-fg);border-color:var(--gw-sev-1-border)}
.gw-cal-day.sev-2{background:var(--gw-sev-2-bg);color:var(--gw-sev-2-fg);border-color:var(--gw-sev-2-border)}
.gw-cal-day.sev-3{background:var(--gw-sev-3-bg);color:var(--gw-sev-3-fg);border-color:var(--gw-sev-3-border)}
.gw-option input[type=checkbox],.gw-option input[type=radio]{flex:none;width:22px;height:22px;margin:0;accent-color:var(--gw-accent)}

/* /plan (Task 10): week strip links, setup card, pill rules, day-card body, red-flag card, sources */
a.gw-day{text-decoration:none;-webkit-tap-highlight-color:transparent}
.gw-weekcard{padding:16px 14px 14px}
.gw-setup{display:flex;gap:14px;align-items:flex-start}
.gw-setup>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;align-items:flex-start}
.gw-setup .gw-btn{margin-top:10px}
.gw-rules{display:flex;flex-direction:column;gap:10px}
.gw-rules ol{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-direction:column;gap:12px}
.gw-rules li{display:flex;gap:12px;align-items:flex-start;font-size:16px;line-height:22px;font-weight:600;color:var(--gw-ink)}
.gw-rules li small{display:block;font-size:14px;line-height:20px;font-weight:400;color:var(--gw-subtle)}
.gw-rules-n{width:28px;height:28px;flex:none;border-radius:50%;background:var(--gw-tint);color:var(--gw-accent-ink);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.gw-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:28px 0 12px}
.gw-help-link{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:15px;line-height:20px;font-weight:700;text-decoration:none}
.gw-help-link .gw-icon{color:var(--gw-accent)}
.gw-expect{font-size:16px;line-height:24px;color:var(--gw-muted)}
.gw-daycard.is-past:not(.is-today) .gw-daycard-title{color:var(--gw-muted)}
.gw-daycard-foot{display:flex;flex-direction:column;gap:8px;padding-top:2px}
.gw-recipe-link{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px;border-radius:var(--gw-r-field);background:var(--gw-bg);color:var(--gw-ink)!important;font-size:15px;line-height:20px;font-weight:700;text-decoration:none}
.gw-recipe-link>span{flex:1;min-width:0}
.gw-recipe-link .gw-icon:first-child{color:var(--gw-accent)}
.gw-recipe-link .gw-icon:last-child{color:var(--gw-subtle)}
.gw-src{font-size:13px;line-height:18px;color:var(--gw-subtle)}
.gw-redflag--card{margin-top:24px;scroll-margin-top:16px}
.gw-redflag--card>div{display:flex;flex-direction:column;gap:8px;min-width:0}
.gw-redflag--card ul{margin:0;padding:0 0 0 18px;display:flex;flex-direction:column;gap:6px}
.gw-redflag--card li{color:var(--gw-ink)}
.gw-redflag-title b{font-size:17px}
.gw-sources{margin-top:16px;font-size:14px;line-height:20px;color:var(--gw-subtle)}
.gw-sources>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:700;color:var(--gw-accent-ink)}
.gw-sources ol{margin:0 0 8px;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.gw-daycard{scroll-margin-top:16px}
#gw-reminder-slot:empty{display:none}
.gw-task>span,.gw-expect,.gw-redflag--card li{text-wrap:pretty}
.gw-after-today{margin-top:16px}
.gw-after-today:not(:has(>*:not(:empty))){display:none}
/* "Tell your prescriber soon" (calmer twin of the red-flag card) + standing notes */
.gw-soon{margin-top:12px;display:flex;flex-direction:column;gap:10px;box-shadow:none}
.gw-soon ul{margin:0;padding:0 0 0 18px;display:flex;flex-direction:column;gap:6px;font-size:16px;line-height:22px;color:var(--gw-ink)}
.gw-soon li{text-wrap:pretty}
.gw-notes{margin-top:16px;display:flex;flex-direction:column;gap:6px;font-size:14px;line-height:20px;color:var(--gw-muted)}

/* Progress chart (weight by dose). Plot geometry = funnel week curve: viewBox 358x200, solid baseline 184,
   dashed grid, 2.5 line, area fade, halo on the latest point. Text sits in HTML overlays (crisp at any width). */
.gw-sr-only,.gw-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.gw-chart{position:relative}
.gw-chart svg{display:block;width:100%;height:auto;overflow:visible}
.gw-chart-band.tone-0{fill:var(--gw-tint);fill-opacity:.7}
.gw-chart-band.tone-1{fill:var(--gw-sand);fill-opacity:.55}
.gw-chart-grid line{stroke:var(--gw-line);stroke-width:1}
.gw-chart-marker{stroke:var(--gw-accent);stroke-width:1.5;stroke-dasharray:3 4;stroke-opacity:.75}
.gw-chart-line{fill:none;stroke:var(--gw-accent);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.gw-chart-line.is-approx{stroke-dasharray:1 6;stroke-opacity:.8}
.gw-chart-dot{fill:var(--gw-accent);stroke:#fff;stroke-width:1.5}
.gw-chart-dot.is-approx{fill:#fff;stroke:var(--gw-accent);stroke-width:2}
.gw-chart-y{position:absolute;left:0;transform:translateY(-50%);font-size:12px;line-height:14px;color:var(--gw-subtle);font-variant-numeric:tabular-nums;pointer-events:none}
.gw-chart-dose{position:absolute;top:4px;margin-left:4px;padding:1px 7px;border-radius:999px;background:var(--gw-surface);border:1px solid var(--gw-line);font-size:12px;line-height:16px;font-weight:700;color:var(--gw-accent-deep);white-space:nowrap;font-variant-numeric:tabular-nums}
.gw-chart-dose.tone-1{color:var(--gw-cau-fg)}
.gw-chart-approx{position:absolute;transform:translate(8px,6px);font-size:12px;line-height:14px;font-style:italic;color:var(--gw-subtle);white-space:nowrap}
.gw-chart-x{position:relative;height:16px;margin-top:6px;font-size:12px;line-height:16px;color:var(--gw-subtle);font-variant-numeric:tabular-nums}
.gw-chart-x span{position:absolute;top:0;white-space:nowrap;transform:translateX(-50%)}
.gw-chart-x span.is-start{transform:translateX(-4px)}
.gw-chart-x span.is-end{transform:translateX(calc(-100% + 4px))}
.gw-chart-when{margin:2px 0 0;font-size:14px;line-height:18px;color:var(--gw-subtle)}
.gw-chart-key{display:flex;flex-wrap:wrap;gap:6px 14px;margin:12px 0 0;padding:0;list-style:none;font-size:13px;line-height:18px;color:var(--gw-muted)}
.gw-chart-key li{display:inline-flex;align-items:center;gap:6px}
.gw-chart-key i{display:inline-block;flex:none}
.gw-chart-key .k-line{width:16px;height:3px;border-radius:2px;background:var(--gw-accent)}
.gw-chart-key .k-approx{width:9px;height:9px;border-radius:50%;border:2px solid var(--gw-accent);background:#fff}
.gw-chart-key .k-band{width:12px;height:12px;border-radius:3px;background:var(--gw-tint);box-shadow:inset 0 0 0 1px var(--gw-mint)}
.gw-chartframe-head .gw-pill{margin-top:2px;max-width:60%;text-align:right;white-space:normal}
/* Per-dose summary rows */
.gw-dosesum{margin:0;padding:0;list-style:none;background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);box-shadow:var(--gw-shadow-card)}
.gw-dosesum li{display:flex;align-items:center;gap:12px;padding:12px 16px}
.gw-dosesum li+li{border-top:1px solid var(--gw-line)}
.gw-dosesum-tag{flex:none;min-width:64px;text-align:center;padding:4px 10px;border-radius:999px;font-size:14px;line-height:18px;font-weight:800;font-variant-numeric:tabular-nums}
.gw-dosesum-tag.tone-0{background:var(--gw-tint);color:var(--gw-accent-deep)}
.gw-dosesum-tag.tone-1{background:var(--gw-sand);color:var(--gw-cau-fg)}
.gw-dosesum-main{font-size:16px;line-height:22px;font-weight:700;color:var(--gw-ink);font-variant-numeric:tabular-nums}
.gw-dosesum-main small{display:block;font-size:14px;line-height:20px;font-weight:400;color:var(--gw-subtle)}
/* Table twin */
.gw-tablecard summary{cursor:pointer;font-weight:700;color:var(--gw-accent-ink);min-height:28px;display:flex;align-items:center}
.gw-table{width:100%;margin-top:12px;border-collapse:collapse;font-size:15px;line-height:20px;font-variant-numeric:tabular-nums}
.gw-table th,.gw-table td{padding:8px 4px;text-align:left;border-top:1px solid var(--gw-line);vertical-align:top}
.gw-table thead th{border-top:0;font-size:var(--gw-fs-caption);line-height:var(--gw-lh-caption);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--gw-subtle)}
.gw-table tbody th{font-weight:600;color:var(--gw-ink)}
.gw-table small{display:block;font-size:13px;line-height:16px;font-weight:400;color:var(--gw-subtle)}
.gw-table tr.is-approx td{color:var(--gw-muted)}
.gw-task--row{align-items:center;justify-content:space-between}
.gw-task--row form{margin:0}
/* Renew card (expired plan) */
.gw-renew{display:flex;flex-direction:column;gap:10px;padding:20px;border-radius:var(--gw-r-card);background:var(--gw-hero);border:1px solid var(--gw-bg-deep);box-shadow:var(--gw-shadow-card)}
.gw-renew .gw-body{margin:0}
.gw-renew .gw-btn{margin-top:6px}

/* Recipes (Task 12): filter chips, recipe grid with vector tag-art, recipe page, pack teasers, off-ramp guide */
.gw-filters{display:flex;gap:8px;overflow-x:auto;margin:0 -24px 16px;padding:2px 24px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;scroll-padding-inline:24px;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 32px),transparent)}
.gw-filters>*{scroll-snap-align:start}
.gw-filters::-webkit-scrollbar{display:none}
.gw-filter{flex:none;display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border:1.5px solid var(--gw-line);border-radius:22px;background:var(--gw-surface);color:var(--gw-ink)!important;font:600 15px/20px var(--gw-font-ui);text-decoration:none;white-space:nowrap;-webkit-tap-highlight-color:transparent}
.gw-filter[aria-current="true"]{background:var(--gw-tint);border-color:var(--gw-accent);color:var(--gw-accent-deep)!important;font-weight:700}
.gw-filter-note{margin:-6px 0 14px}
.gw-packs{margin-bottom:4px}
.gw-recipes{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gw-rcard{display:flex;flex-direction:column;height:100%;background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);overflow:hidden;box-shadow:var(--gw-shadow-card);text-decoration:none;color:var(--gw-ink)!important;transition:transform .12s var(--gw-ease);-webkit-tap-highlight-color:transparent}
.gw-rcard:active{transform:scale(.98)}
.gw-rcard-art{position:relative;display:block;aspect-ratio:4/3;background:var(--gw-bg-deep)}
.gw-rart{display:block;width:100%;height:100%;object-fit:cover}
.gw-rcard-badge{position:absolute;left:8px;top:8px;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.92);color:var(--gw-accent-deep);font-size:13px;line-height:18px;font-weight:700}
.gw-rcard-body{display:flex;flex-direction:column;gap:4px;padding:10px 12px 12px;flex:1}
.gw-rcard-title{font-size:16px;line-height:21px;font-weight:700;text-wrap:pretty}
.gw-rcard-meta{margin-top:auto;font-size:13px;line-height:18px;color:var(--gw-subtle)}
.gw-back{display:inline-flex;align-items:center;gap:4px;min-height:44px;margin:-8px 0 4px -6px;font-size:15px;line-height:20px;font-weight:700;text-decoration:none}
.gw-back .gw-icon{width:20px;height:20px;transform:rotate(180deg);color:var(--gw-accent)}
.gw-recipe-hero{border-radius:var(--gw-r-card);overflow:hidden;box-shadow:var(--gw-shadow-card);aspect-ratio:28/15}
.gw-recipe-head{margin-bottom:0}
.gw-tagrow{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.gw-tag{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border-radius:16px;background:var(--gw-tint);color:var(--gw-accent-deep)!important;font-size:14px;line-height:18px;font-weight:700;text-decoration:none}
.gw-recipe-sub{margin-top:-6px}
.gw-allergens b{font-weight:700}
.gw-recipe-sec{display:flex;flex-direction:column;gap:12px}
.gw-ingredients{margin:0;padding:0;list-style:none;display:flex;flex-direction:column}
.gw-ingredients li{padding:10px 0 10px 18px;position:relative;font-size:16px;line-height:22px;color:var(--gw-ink);text-wrap:pretty}
.gw-ingredients li+li{border-top:1px solid var(--gw-line)}
.gw-ingredients li::before{content:"";position:absolute;left:2px;top:18px;width:7px;height:7px;border-radius:50%;background:var(--gw-seaglass)}
.gw-recipe-sec.gw-rules li{font-weight:400}
.gw-step-text{text-wrap:pretty;padding-top:3px}
.gw-locked-peek--named{list-style:none;padding:0}
.gw-locked-peek--named li{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 12px;border:1px solid var(--gw-line);border-radius:var(--gw-r-field);font-size:15px;line-height:20px;font-weight:600;color:var(--gw-ink)}
.gw-locked-peek--named i{display:block;width:28px;height:28px;flex:none;border-radius:8px;background:radial-gradient(circle at 50% 50%,var(--gw-seaglass) 0 4px,var(--gw-tint) 4.5px)}
.gw-locked-foot{margin-top:8px;text-align:center}
.gw-locked-after{margin-top:16px;text-align:center}
.gw-packlink .gw-chip{background:var(--gw-sand);color:var(--gw-cau-fg)}
.gw-safe{margin-bottom:16px}
.gw-safe .gw-icon{color:var(--gw-accent)}
.gw-guide-sec{display:flex;flex-direction:column;gap:12px}
.gw-guide-sec .gw-title{margin-bottom:-2px}
.gw-guide-p{display:flex;flex-direction:column;gap:4px}
.gw-guide-list{gap:16px}
.gw-guide-list .gw-task>span:last-child{font-weight:700}
.gw-guide-list small{font-weight:400;margin-top:2px}
.gw-guide-list small.gw-src{font-size:13px;line-height:18px}
.gw-qlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.gw-qlist li{display:flex;gap:10px;align-items:flex-start;font-size:16px;line-height:22px;color:var(--gw-ink);text-wrap:pretty}
.gw-qlist .gw-icon{color:var(--gw-accent);margin-top:2px}
.gw-guide-export{margin-top:4px}
@media (prefers-reduced-motion:reduce){.gw-rcard{transition:none!important}}
.gw-locked-peek--named span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gw-packlink{margin-bottom:16px}
/* PWA (Task 14): hidden must win over component display rules; /install steps; offline */
.gw [hidden]{display:none!important}
.gw-a2hs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.gw-a2hs-step{display:grid;grid-template-columns:28px 1fr;column-gap:12px;row-gap:14px;align-items:start}
.gw-a2hs-n{width:28px;height:28px;border-radius:50%;background:var(--gw-accent);color:#fff;font-weight:800;font-size:15px;line-height:28px;text-align:center}
.gw-a2hs-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.gw-a2hs-art{grid-column:1/-1;border-radius:var(--gw-r-field);background:var(--gw-bg);border:1px solid var(--gw-line);overflow:hidden}
.gw-a2hs-bar{display:flex;flex-direction:column;gap:10px;padding:10px 12px 12px}
.gw-a2hs-url{align-self:center;padding:6px 18px;border-radius:12px;background:var(--gw-surface);font-size:14px;line-height:18px;color:var(--gw-muted)}
.gw-a2hs-tools{display:flex;justify-content:space-around;align-items:center;height:36px}
.gw-a2hs-tools>span{width:22px;height:4px;border-radius:2px;background:var(--gw-line)}
.gw-a2hs-tools>span.is-hot{width:44px;height:36px;border-radius:12px;background:var(--gw-tint);color:var(--gw-accent);display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px var(--gw-accent)}
.gw-a2hs-sheet{display:flex;flex-direction:column;padding:6px 10px;background:var(--gw-surface)}
.gw-a2hs-row{display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:0 10px;font-size:15px;color:var(--gw-subtle);border-bottom:1px solid var(--gw-line)}
.gw-a2hs-row:last-child{border-bottom:0}
.gw-a2hs-row.is-hot{margin:2px -4px;padding:0 14px;border:0;border-radius:10px;background:var(--gw-tint);color:var(--gw-ink);font-weight:700;box-shadow:0 0 0 2px var(--gw-accent)}
.gw-a2hs-row.is-hot .gw-icon{color:var(--gw-accent)}
.gw-a2hs-home{display:grid;grid-template-columns:repeat(4,52px);justify-content:space-around;padding:14px 8px 10px;background:linear-gradient(160deg,#E3F0EE,#EDE3D1)}
.gw-a2hs-app{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;line-height:14px;color:var(--gw-ink);font-weight:600}
.gw-a2hs-app img{width:52px;height:52px;border-radius:12px;box-shadow:0 0 0 2px var(--gw-surface),0 0 0 4px var(--gw-accent)}
.gw-a2hs-app.is-ghost::before{content:"";width:52px;height:52px;border-radius:12px;background:rgba(255,255,255,.55)}
.gw-offline{margin-top:12px;gap:12px}
.gw-offline img{width:100%;max-width:280px;height:auto;border-radius:var(--gw-r-box)}
.gw-offline .gw-btn{margin-top:4px}

/* ===================== Design loop r1: shared components (docs/design/art-direction.md § Components) ===================== */
/* Wordmark: the funnel's top "Glideweek" lockup. Macro wordmark() in _glyphs.html */
.gw-wordmark{display:inline-flex;align-items:center;gap:8px;font-family:var(--gw-font-display);font-weight:600;font-size:22px;line-height:28px;color:var(--gw-accent-ink);text-decoration:none;letter-spacing:0}
.gw-wordmark>svg{width:24px;height:24px;flex:none;display:block}
.gw-wordmark--sm{font-size:18px;line-height:24px}.gw-wordmark--sm>svg{width:20px;height:20px}
.gw-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin:-4px 0 12px}

/* Field: label 8px above the control, helper/error 6px below. Wrap each label+control in .gw-field inside a .gw-stack */
.gw-field{display:flex;flex-direction:column;min-width:0}
.gw-field>.gw-field-label{margin:0 0 8px}
.gw-field>.gw-help,.gw-field>.gw-error,.gw-field>.gw-field-error{margin:6px 0 0}
.gw-field-error{display:flex;gap:6px;align-items:flex-start;margin:6px 0 0;font-size:15px;line-height:20px;font-weight:600;color:var(--gw-warn-fg);text-align:left}
.gw-field-error .gw-icon{width:16px;height:16px;stroke-width:2;margin-top:2px}
.gw-input[aria-invalid="true"]{border-color:var(--gw-warn-rule);background:var(--gw-warn-soft)}
.gw-input[aria-invalid="true"]:focus{outline-color:var(--gw-warn-rule)}

/* Identity row + avatar initial */
.gw-avatar{width:40px;height:40px;flex:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--gw-tint);color:var(--gw-accent-ink);font:600 18px/1 var(--gw-font-display);text-transform:uppercase}
.gw-avatar--lg{width:48px;height:48px;font-size:22px}
.gw-idrow{display:flex;align-items:center;gap:12px;min-width:0}
.gw-idrow>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.gw-idrow b{font-size:16px;line-height:22px;font-weight:700;color:var(--gw-ink);overflow-wrap:anywhere}
.gw-idrow small{font-size:14px;line-height:20px;color:var(--gw-subtle);overflow-wrap:anywhere}

/* Sticky bottom CTA for long forms: sticks above the nav (or the screen edge) on a paper fade */
.gw-cta-sticky{position:sticky;z-index:5;bottom:calc(env(safe-area-inset-bottom,0px) + 12px);margin-top:8px;padding-top:24px;isolation:isolate}
.gw-cta-sticky::before{content:"";position:absolute;z-index:-1;left:-24px;right:-24px;top:0;bottom:calc(-12px - env(safe-area-inset-bottom,0px));background:var(--gw-paper-fade);pointer-events:none}
body.gw-has-nav .gw-cta-sticky{bottom:calc(var(--gw-nav-h) + env(safe-area-inset-bottom,0px) + 12px)}
body.gw-has-nav .gw-cta-sticky::before{bottom:-12px}

/* Callout variants: alert (role=alert errors) and positive. The plain .gw-callout stays neutral info */
.gw-callout--alert{background:var(--gw-warn-soft);box-shadow:inset 3px 0 0 var(--gw-warn-rule);border-radius:0 14px 14px 0}
.gw-callout--alert .gw-icon{color:var(--gw-warn-fg)}
.gw-callout--positive{background:var(--gw-pos-bg);color:var(--gw-pos-fg)}
.gw-callout--positive .gw-icon{color:var(--gw-pos-fg)}
.gw-callout>span,.gw-callout>div{min-width:0}
/* Warn surface: white card with a warn rule (calmer than a full pink flood; red-flag card option) */
.gw-surface-warn{background:var(--gw-surface);border:1px solid var(--gw-line);box-shadow:inset 4px 0 0 var(--gw-warn-rule),var(--gw-shadow-card);border-radius:var(--gw-r-box);padding:16px 16px 16px 20px}
.gw-surface-warn>.gw-icon,.gw-surface-warn .gw-redflag-title .gw-icon{color:var(--gw-warn-fg)}
/* Soft secondary surfaces */
.gw-card--sand{background:var(--gw-sand-soft);border-color:transparent;box-shadow:none}
.gw-card--mint{background:var(--gw-mint-soft);border-color:transparent;box-shadow:none}
.gw-card--hero{background:var(--gw-hero-teal);border-color:var(--gw-line)}

/* Buttons: danger (destructive, no glow) */
.gw-btn--danger{background:var(--gw-danger);color:#fff!important;box-shadow:none}
.gw-btn--danger.gw-btn--ghost{background:var(--gw-surface);color:var(--gw-danger)!important;border-color:var(--gw-warn-bg)}
.gw-btn--text{text-decoration-thickness:1px}

/* Inset grouped list (settings, rest-of-week, "Still yours", log history). Rows >= 56px, 1px inset divider */
.gw-list{margin:0;padding:0;list-style:none;background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);box-shadow:var(--gw-shadow-card);overflow:hidden}
.gw-list--flat{box-shadow:none}
.gw-list>li{position:relative}
.gw-list>li+li::before{content:"";position:absolute;top:0;left:16px;right:0;height:1px;background:var(--gw-line)}
.gw-list--icons>li+li::before{left:68px}
.gw-list-row,.gw-list__row{display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 16px;color:var(--gw-ink)!important;text-decoration:none;font-size:16px;line-height:22px;background:none;border:0;width:100%;text-align:left;font-family:inherit;-webkit-tap-highlight-color:transparent}
a.gw-list-row,a.gw-list__row,button.gw-list-row,button.gw-list__row{cursor:pointer;transition:background-color .16s var(--gw-ease)}
a.gw-list-row:active,a.gw-list__row:active,button.gw-list-row:active,button.gw-list__row:active{background:var(--gw-bg)}
.gw-list-row>.gw-chip,.gw-list__row>.gw-chip{width:40px;height:40px}
.gw-list-row>.gw-chip .gw-icon,.gw-list__row>.gw-chip .gw-icon{width:20px;height:20px}
.gw-list-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.gw-list-main b{font-weight:600;overflow-wrap:anywhere}
.gw-list-main small{font-size:14px;line-height:20px;color:var(--gw-subtle);overflow-wrap:anywhere}
.gw-list-value{flex:none;font-weight:700;color:var(--gw-ink);font-variant-numeric:tabular-nums;text-align:right}
.gw-list-row>.gw-icon:last-child,.gw-list__row>.gw-icon:last-child{width:20px;height:20px;color:var(--gw-subtle)}
.gw-list-row.is-danger,.gw-list__row.is-danger{color:var(--gw-danger)!important}
.gw-list-row.is-danger .gw-chip,.gw-list__row.is-danger .gw-chip{background:var(--gw-warn-bg);color:var(--gw-danger)}
/* Settings section header: micro label, not an h2 */
.gw-list-head{margin:28px 0 8px 4px}

/* Status ring vs checkbox: .gw-tick (circle) is read-only status; real inputs are square .gw-check */
.gw-check{flex:none;width:22px;height:22px;margin:0;accent-color:var(--gw-accent);border-radius:6px;cursor:pointer}

/* Switch: <input type="checkbox" role="switch" class="gw-switch">. Thumb is a gradient, no pseudo-elements */
.gw-switch{-webkit-appearance:none;appearance:none;flex:none;width:51px;height:31px;margin:0;border-radius:16px;cursor:pointer;background:radial-gradient(circle 12.5px at 15.5px 50%,#fff 96%,transparent 100%) no-repeat,var(--gw-off-bg);background-position:0 0,0 0;box-shadow:inset 0 0 0 1px rgba(28,36,48,.06);transition:background-position .2s var(--gw-ease),background-color .2s}
.gw-switch:checked{background:radial-gradient(circle 12.5px at 35.5px 50%,#fff 96%,transparent 100%) no-repeat,var(--gw-accent)}
.gw-switch:disabled{opacity:.5;cursor:default}
.gw-switchrow{display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 16px}
.gw-switchrow>label,.gw-switchrow>.gw-list-main{flex:1;min-width:0}

/* Choice row (radio / single choice): label wraps the input; checked = accent border + tint */
.gw-choices{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;border:0}
.gw-choice{display:flex;align-items:center;gap:12px;min-height:56px;padding:12px 16px;border:1.5px solid var(--gw-line);border-radius:var(--gw-r-box);background:var(--gw-surface);color:var(--gw-ink);font:600 16px/22px var(--gw-font-ui);cursor:pointer;transition:background-color .16s,border-color .16s}
.gw-choice>span{flex:1;min-width:0}
.gw-choice small{display:block;font-weight:400;font-size:14px;line-height:20px;color:var(--gw-muted)}
.gw-choice input{flex:none;width:22px;height:22px;margin:0;accent-color:var(--gw-accent)}
.gw-choice:has(:checked){background:var(--gw-tint);border-color:var(--gw-accent)}
.gw-choice:has(:focus-visible){outline:3px solid var(--gw-accent);outline-offset:2px}

/* Toggle chips: multi-select checkboxes in a 2-column grid. <label class="gw-chip-toggle"><input type=checkbox><span>..</span></label> */
.gw-chip-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;border:0}
.gw-chip-toggle{position:relative;display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border:1.5px solid var(--gw-line);border-radius:var(--gw-r-field);background:var(--gw-surface);color:var(--gw-ink);font:600 15px/20px var(--gw-font-ui);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .16s,border-color .16s}
.gw-chip-toggle input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.gw-chip-toggle>span{min-width:0;overflow-wrap:anywhere}
.gw-chip-toggle::before{content:"";flex:none;box-sizing:border-box;width:18px;height:18px;border-radius:5px;border:2px solid var(--gw-control-ring);background:var(--gw-surface)}
.gw-chip-toggle:has(:checked){background:var(--gw-tint);border-color:var(--gw-accent-ink)}
.gw-chip-toggle:has(:checked)::before{border:0;width:18px;height:18px;background:var(--gw-accent);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cmask id='m'%3E%3Crect width='18' height='18' rx='5' fill='%23fff'/%3E%3Cpath d='M4.8 9.3l2.7 2.7L13.2 6.3' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Crect width='18' height='18' rx='5' mask='url(%23m)'/%3E%3C/svg%3E") center/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cmask id='m'%3E%3Crect width='18' height='18' rx='5' fill='%23fff'/%3E%3Cpath d='M4.8 9.3l2.7 2.7L13.2 6.3' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Crect width='18' height='18' rx='5' mask='url(%23m)'/%3E%3C/svg%3E") center/100% 100% no-repeat}
.gw-chip-toggle:has(:focus-visible){outline:3px solid var(--gw-accent);outline-offset:2px}
@media (max-width:340px){.gw-chip-toggles{grid-template-columns:1fr}}

/* Tile button pressed/done (quick-log on /plan and /log): tint + teal border + a check badge */
.gw-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:92px;padding:10px 4px;border:1.5px solid var(--gw-line);border-radius:var(--gw-r-box);background:var(--gw-surface);color:var(--gw-ink);font:700 14px/18px var(--gw-font-ui);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .12s var(--gw-ease),background-color .16s,border-color .16s}
.gw-tile:active{transform:scale(.98)}
.gw-tile>.gw-icon{box-sizing:content-box;padding:8px;border-radius:var(--gw-r-chip);background:var(--gw-tint);color:var(--gw-accent)}
.gw-tile[aria-pressed="true"],.gw-qlog button[aria-pressed="true"]{background:var(--gw-tint);border-color:var(--gw-accent)}
.gw-tile[aria-pressed="true"]>.gw-icon{background:#fff}
.gw-tile[aria-pressed="true"]::after,.gw-qlog button[aria-pressed="true"]::after{content:"";position:absolute;top:6px;right:6px;width:18px;height:18px;background:var(--gw-accent);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cmask id='m'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23fff'/%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='9' cy='9' r='9' mask='url(%23m)'/%3E%3C/svg%3E") center/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cmask id='m'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23fff'/%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='9' cy='9' r='9' mask='url(%23m)'/%3E%3C/svg%3E") center/100% 100% no-repeat}
.gw-qlog button{position:relative}

/* Severity legend (swatch + label) and chips; mild is neutral-warm, never the positive teal */
.gw-legend--start{justify-content:flex-start;margin-top:10px}
.gw-legend i.sev-1,.gw-sev-1{background:var(--gw-sev-1-bg);color:var(--gw-sev-1-fg)}
.gw-legend i.sev-2,.gw-sev-2{background:var(--gw-sev-2-bg);color:var(--gw-sev-2-fg)}
.gw-legend i.sev-3,.gw-sev-3{background:var(--gw-sev-3-bg);color:var(--gw-sev-3-fg)}
.gw-legend i.sev-1,.gw-legend i.sev-2,.gw-legend i.sev-3{width:14px;height:14px;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(28,36,48,.08)}
.gw-legend i.sev-1,.gw-sev-1{box-shadow:inset 0 0 0 1px var(--gw-sev-1-border)}.gw-legend i.sev-2,.gw-sev-2{box-shadow:inset 0 0 0 1px var(--gw-sev-2-border)}.gw-legend i.sev-3,.gw-sev-3{box-shadow:inset 0 0 0 1px var(--gw-sev-3-border)}

/* Disclosure: a card built on <details> with a styled summary + rotating chevron (same idiom as .gw-daycard) */
.gw-disclosure{background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);box-shadow:var(--gw-shadow-card)}
.gw-disclosure>summary{list-style:none;display:flex;align-items:center;gap:12px;min-height:56px;padding:12px 16px;cursor:pointer;border-radius:inherit;font-weight:700;color:var(--gw-ink)}
.gw-disclosure>summary::-webkit-details-marker{display:none}
.gw-disclosure>summary>span{flex:1;min-width:0}
.gw-disclosure>summary>.gw-icon:last-child{width:20px;height:20px;color:var(--gw-subtle);transition:transform .24s var(--gw-ease)}
.gw-disclosure[open]>summary>.gw-icon:last-child{transform:rotate(180deg)}
.gw-disclosure-body{padding:0 16px 16px;display:flex;flex-direction:column;gap:12px}
.gw-disclosure-body::before{content:"";display:block;height:1px;background:var(--gw-line)}

/* Horizontal scroller: 24px bleed, hidden scrollbar, right-edge fade, snap */
.gw-scrollrow{display:flex;gap:8px;overflow-x:auto;margin-inline:-24px;padding:2px 24px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;scroll-padding-inline:24px;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 32px),transparent)}
.gw-scrollrow::-webkit-scrollbar{display:none}
.gw-scrollrow>*{flex:none;scroll-snap-align:start}

/* Thumb: 32/48px rounded image or glyph tile with a tint fallback */
.gw-thumb{width:48px;height:48px;flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--gw-r-chip);background:var(--gw-tint);color:var(--gw-accent);overflow:hidden}
.gw-thumb--sm{width:32px;height:32px;border-radius:8px}
.gw-thumb>img{width:100%;height:100%;object-fit:cover;display:block}
.gw-thumb>.gw-icon{width:22px;height:22px}
.gw-thumb--sm>.gw-icon{width:18px;height:18px}

/* Photo treatment: recipe photos, pack heroes and spot art sit the same way on paper */
.gw-photo{display:block;width:100%;height:auto;border-radius:var(--gw-photo-radius);border:1px solid var(--gw-line);background:var(--gw-bg-deep);object-fit:cover}
.gw-photo--bleed{border:0;border-radius:0}

/* Spot illustration: vector art from the offline family; transparent ground, never framed */
.gw-spot{display:block;margin:0 auto;max-width:100%;height:auto}
.gw-spot--hero{width:calc(100% + 2 * var(--gw-hero-bleed));max-width:none;margin-inline:calc(-1 * var(--gw-hero-bleed));aspect-ratio:var(--gw-spot-hero-ratio);object-fit:contain;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--gw-hero-bleed),#000 calc(100% - var(--gw-hero-bleed)),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 var(--gw-hero-bleed),#000 calc(100% - var(--gw-hero-bleed)),transparent 100%)}
.gw-spot--md{width:200px;aspect-ratio:3/2;object-fit:contain}
.gw-spot--sm{width:120px;aspect-ratio:5/4;object-fit:contain}
.gw-spot--badge{width:96px;height:96px;object-fit:contain}
.gw-spot.is-dim{opacity:.55;filter:saturate(.4)}
.gw-empty .gw-spot{margin-bottom:4px}

/* Renew card compact (progress/log share one expired treatment) */
.gw-renew--compact{flex-direction:row;align-items:center;gap:12px;padding:14px 16px;border-radius:var(--gw-r-box)}
.gw-renew--compact>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.gw-renew--compact .gw-btn{margin:0;flex:none}

/* Chart colour hooks for inline SVG: use classes, never hex in markup */
.gw-stop-accent{stop-color:var(--gw-accent)}
.gw-stop-accent-0{stop-color:var(--gw-accent);stop-opacity:0}
.gw-fill-accent{fill:var(--gw-accent)}
.gw-stroke-accent{stroke:var(--gw-accent)}

/* Android install mock (Chrome toolbar + 3-dot menu), CSS figure in the .gw-a2hs family */
.gw-a2hs-toolbar{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 12px}
.gw-a2hs-toolbar .gw-a2hs-url{flex:1;align-self:auto;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.gw-a2hs-toolbar>span:not(.gw-a2hs-url){width:18px;height:18px;border-radius:5px;border:2px solid var(--gw-line);flex:none}
.gw-a2hs-dots{width:36px;height:36px;flex:none;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;color:var(--gw-ink)}
.gw-a2hs-dots.is-hot{background:var(--gw-tint);color:var(--gw-accent);box-shadow:0 0 0 2px var(--gw-accent)}
.gw-a2hs-menu{margin:0 10px 10px auto;width:min(220px,80%);border-radius:12px;background:var(--gw-surface);box-shadow:var(--gw-shadow-lift);padding:4px}

@media (prefers-reduced-motion:reduce){.gw-switch,.gw-choice,.gw-chip-toggle,.gw-tile,.gw-disclosure>summary>.gw-icon,.gw-list-row,.gw-list__row{transition:none!important}}

/* ---------- Round 2 shared primitives (docs/design/art-direction.md "r2") ---------- */

/* Bottom nav at large text (r5, replaces the r2/r4 icon-only mode): each cell is a size container; when the cell is
   narrower than the label needs at the user's text size, EVERY label stays visible, sized to the cell
   (11px floor, --gw-fs-micro cap, up to 2 lines) and the indicator pill slims. No tab is ever icon-only. */
.gw-bottom-nav a{container-type:inline-size;container-name:gw-tab}
@container gw-tab (max-width:4.7em){
  .gw-bottom-nav a>span{white-space:normal;text-overflow:clip;font-size:clamp(11px,19cqi,var(--gw-fs-micro))!important;line-height:1.1!important;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:normal;word-break:normal}
  .gw-bottom-nav a>.gw-icon{width:24px;height:24px;padding:4px 12px}
}

/* Sticky CTA, dock variant: full-bleed paper bar with a top hairline, no fade (long forms) */
.gw-cta-sticky--dock{margin-top:16px;padding-top:12px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));bottom:0}
.gw-cta-sticky--dock::before{left:-24px;right:-24px;top:0;bottom:0;background:var(--gw-bg);border-top:1px solid var(--gw-line)}
body.gw-has-nav .gw-cta-sticky--dock{padding-bottom:12px;bottom:calc(var(--gw-nav-h) + env(safe-area-inset-bottom,0px))}
body.gw-has-nav .gw-cta-sticky--dock::before{bottom:0}

/* Caption: 13px uppercase label in rem so it scales with user text size */
.gw-caption{font-size:var(--gw-fs-caption);line-height:var(--gw-lh-caption);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--gw-subtle)}

/* Accent-ruled card: straight 4px rule inset top/bottom (no inset box-shadow crescent on rounded corners).
   Set --gw-rule-color (default teal); warn = .gw-rule-card--warn, soon = .gw-rule-card--soon */
.gw-rule-card{position:relative;padding-left:calc(16px + var(--gw-rule-w))}
.gw-rule-card::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:var(--gw-rule-w);border-radius:0 var(--gw-rule-w) var(--gw-rule-w) 0;background:var(--gw-rule-color,var(--gw-accent))}
.gw-rule-card--warn{--gw-rule-color:var(--gw-warn-rule)}
.gw-rule-card--soon{--gw-rule-color:var(--gw-apricot)}
.gw-rule-card--muted{--gw-rule-color:var(--gw-line)}

/* Outline button: secondary / permission CTA (48px, surface, 1.5px accent edge, accent-ink text) */
.gw-btn--outline{min-height:48px;background:var(--gw-surface);color:var(--gw-accent-ink)!important;border:1.5px solid var(--gw-accent);box-shadow:none}
.gw-btn--outline:hover{background:var(--gw-callout)}

/* Pop: logged / done moments (scale .6 -> 1.12 -> 1, 420ms ease-out; r3 added the overshoot). Add .gw-pop to the element
   that appears. Segments use this keyframe instead of their own (gw-plan-pop, lp-pop, acct-pop). Off under reduced motion. */
.gw-pop{animation:gw-pop var(--gw-dur-pop) var(--gw-ease-out) both}
@keyframes gw-pop{0%{opacity:0;transform:scale(.6)}60%{opacity:1;transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}

/* Segmented control, selected = raised white segment + check glyph (mask, colour follows text) */
.gw-seg button[aria-pressed="true"],.gw-seg button.is-on{box-shadow:var(--gw-shadow-1);font-weight:700}
.gw-seg button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.gw-seg button[aria-pressed="true"]::before,.gw-seg button.is-on::before{content:"";width:16px;height:16px;flex:none;background:var(--gw-accent);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center/contain no-repeat}

/* Dose bands: chart band fills and the matching dose tag pills share one palette (cycle 1-2-3) */
.gw-band-1{background:var(--gw-band-1);box-shadow:inset 0 0 0 1px var(--gw-band-1-edge)}
.gw-band-2{background:var(--gw-band-2);box-shadow:inset 0 0 0 1px var(--gw-band-2-edge)}
.gw-band-3{background:var(--gw-band-3);box-shadow:inset 0 0 0 1px var(--gw-band-3-edge)}
.gw-fill-band-1{fill:var(--gw-band-1)}.gw-fill-band-2{fill:var(--gw-band-2)}.gw-fill-band-3{fill:var(--gw-band-3)}
.gw-dosetag{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-radius:999px;color:var(--gw-ink);font-size:.8125rem;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}

/* Edge-fade scroller: fades only on the side that has more content. pwa.js sets data-scrolled
   = none | start | mid | end on every .gw-hscroll; without JS it shows the right fade (start). */
.gw-hscroll{--fade-l:0px;--fade-r:var(--gw-fade-w);display:flex;gap:8px;overflow-x:auto;margin-inline:-24px;padding:2px 24px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;scroll-padding-inline:24px;
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--fade-l),#000 calc(100% - var(--fade-r)),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 var(--fade-l),#000 calc(100% - var(--fade-r)),transparent 100%)}
.gw-hscroll::-webkit-scrollbar{display:none}
.gw-hscroll>*{flex:none;scroll-snap-align:start}
.gw-hscroll[data-scrolled="none"]{--fade-r:0px}
.gw-hscroll[data-scrolled="mid"]{--fade-l:var(--gw-fade-w)}
.gw-hscroll[data-scrolled="end"]{--fade-l:var(--gw-fade-w);--fade-r:0px}

/* Disclosure as an inset-list row: <ul class="gw-list"><li><details class="gw-disclosure gw-disclosure--row"> */
.gw-disclosure--row{background:none;border:0;border-radius:0;box-shadow:none}
.gw-disclosure--row>summary{font-weight:600;padding:8px 16px}
.gw-disclosure>summary>.gw-chip{flex:none;width:40px;height:40px}
.gw-disclosure>summary>.gw-chip+span{flex:1;min-width:0}
.gw-disclosure>summary>.gw-chip .gw-icon{width:20px;height:20px}
.gw-disclosure>summary:focus-visible{outline-offset:-3px}

/* Profile field group: a fieldset rendered as a real card (onboarding + account) */
.gw-pf-group{margin:0 0 16px;padding:16px;border:1px solid var(--gw-line);border-radius:var(--gw-r-box);background:var(--gw-surface);box-shadow:var(--gw-shadow-card);display:flex;flex-direction:column;gap:16px;min-width:0}
.gw-pf-group>legend{float:left;width:100%;padding:0;margin:0 0 -4px;font-size:var(--gw-fs-caption);line-height:var(--gw-lh-caption);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--gw-subtle)}
.gw-pf-group>legend+*{clear:both}

/* Mark halo: marks (avatars, chips, spot badges) can sit in a paper ring of --gw-halo and offset by it */
.gw-halo{box-shadow:0 0 0 var(--gw-halo) var(--gw-bg)}
.gw-halo-offset{margin-left:calc(-1 * var(--gw-halo))}

/* Renew card, compact (shared): chip + eyebrow + one line + ghost button. Macro: _components.html renew_compact() */
.gw-renew--compact>.gw-chip{background:var(--gw-surface);box-shadow:inset 0 0 0 1px var(--gw-line)}
.gw-renew--compact .gw-eyebrow{font-size:var(--gw-fs-caption);line-height:var(--gw-lh-caption);letter-spacing:.06em;text-transform:uppercase}
.gw-renew--compact .gw-renew-line{margin:0;font-size:15px;line-height:20px;color:var(--gw-muted);overflow-wrap:anywhere}
@media (max-width:359px){.gw-renew--compact{flex-wrap:wrap}.gw-renew--compact .gw-btn{width:100%}}

/* Spot: tiny inline marks (logged pill 20-24px, moment 64px) */
.gw-spot--inline{display:inline-block;width:22px;height:22px;margin:0;vertical-align:-5px}
.gw-spot--moment{width:64px;height:64px;object-fit:contain}
.gw-spot--wide{width:240px;aspect-ratio:2/1;object-fit:contain}

@media (prefers-reduced-motion:reduce){.gw-pop{animation:none!important}.gw-hscroll{scroll-behavior:auto}}

/* ---------- Round 3 shared primitives (docs/design/art-direction.md "Round 3") ---------- */

/* Icon size for inline status marks (past-day marker, empty-state line) */
.gw-icon--14{width:14px;height:14px;stroke-width:2}

/* Done state (logged / aria-pressed tiles on /plan and /log): mint ground + teal edge, white icon chip, check badge */
.gw-tile[aria-pressed="true"],.gw-qlog button[aria-pressed="true"],.gw-done{background:var(--gw-done-bg);border-color:var(--gw-done-border)}
.gw-tile[aria-pressed="true"]>.gw-icon,.gw-qlog button[aria-pressed="true"]>.gw-icon,.gw-done>.gw-icon{background:var(--gw-surface)}

/* Week shape: neutral decorative week strips (never --gw-cau-*, which means "tell your prescriber") */
.gw-week-1,.gw-week-2,.gw-week-3{color:var(--gw-week-fg);box-shadow:inset 0 0 0 1px var(--gw-week-edge)}
.gw-week-1{background:var(--gw-week-1)}.gw-week-2{background:var(--gw-week-2)}.gw-week-3{background:var(--gw-week-3)}

/* Avatar, target: the account a link will switch TO when two identities are compared (accent fill + glyph) */
.gw-avatar--target{background:var(--gw-accent);color:#fff}
.gw-avatar--target .gw-icon{width:20px;height:20px;stroke-width:2}
.gw-avatar--lg.gw-avatar--target .gw-icon{width:24px;height:24px}

/* Muted primary: a primary action inside a paused / read-only section. Keeps the 44px target. The faded label falls
   below AA, which WCAG 1.4.3 allows only for inactive controls: use it on a disabled / aria-disabled control and keep a
   visible reason next to it. Behaviour is unchanged (no pointer-events trick). */
.gw-btn--muted{opacity:var(--gw-muted-opacity);box-shadow:none;min-height:44px;cursor:default}
.gw-btn--muted:focus-visible{opacity:1}

/* Legend swatch: 20x12 band chip for chart legends; pair with .gw-band-1/2/3 or .gw-week-1/2/3 */
.gw-legend-swatch,.gw-legend i.gw-legend-swatch{display:inline-block;flex:none;width:20px;height:12px;border-radius:3px;vertical-align:-1px;background:var(--gw-line);box-shadow:inset 0 0 0 1px rgba(28,36,48,.08)}
.gw-legend-swatch.gw-band-1,.gw-legend i.gw-legend-swatch.gw-band-1{background:var(--gw-band-1);box-shadow:inset 0 0 0 1px var(--gw-band-1-edge)}
.gw-legend-swatch.gw-band-2,.gw-legend i.gw-legend-swatch.gw-band-2{background:var(--gw-band-2);box-shadow:inset 0 0 0 1px var(--gw-band-2-edge)}
.gw-legend-swatch.gw-band-3,.gw-legend i.gw-legend-swatch.gw-band-3{background:var(--gw-band-3);box-shadow:inset 0 0 0 1px var(--gw-band-3-edge)}

/* Edge-fade on any existing scroller (keeps its own layout): .gw-hscroll--fade adds only the mask + data-scrolled
   behaviour of .gw-hscroll. pwa.js tracks data-scrolled on both classes. */
.gw-hscroll--fade{--fade-l:0px;--fade-r:var(--gw-fade-w);-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--fade-l),#000 calc(100% - var(--fade-r)),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 var(--fade-l),#000 calc(100% - var(--fade-r)),transparent 100%)}
.gw-hscroll--fade[data-scrolled="none"]{--fade-r:0px}
.gw-hscroll--fade[data-scrolled="mid"]{--fade-l:var(--gw-fade-w)}
.gw-hscroll--fade[data-scrolled="end"]{--fade-l:var(--gw-fade-w);--fade-r:0px}

/* Photo focal point: set --gw-photo-pos per image (style="--gw-photo-pos:50% 65%"); template global photo_focus[slug] */
.gw-photo{object-position:var(--gw-photo-pos)}

/* Renew card, stacked (canonical compact for read-only pages): row 1 chip + sentence-case eyebrow, row 2 one line,
   then the support email line and a full-width 44px ghost button. Macro: _components.html renew_stack() */
.gw-renew--stack{gap:12px;padding:16px;border-radius:var(--gw-r-box)}
.gw-renew--stack .gw-renew-head{display:flex;align-items:center;gap:12px;min-width:0}
.gw-renew--stack .gw-renew-head>.gw-chip{width:36px;height:36px;background:var(--gw-surface);box-shadow:inset 0 0 0 1px var(--gw-line)}
.gw-renew--stack .gw-renew-head>.gw-chip .gw-icon{width:20px;height:20px}
.gw-renew--stack .gw-renew-head>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.gw-renew--stack .gw-eyebrow{margin:0}
.gw-renew--stack .gw-renew-line{margin:0;font-size:15px;line-height:20px;color:var(--gw-muted);overflow-wrap:anywhere}
.gw-renew--stack .gw-renew-mail{display:flex;align-items:flex-start;gap:8px;margin:0;font-size:14px;line-height:20px;color:var(--gw-subtle);overflow-wrap:anywhere}
.gw-renew--stack .gw-renew-mail .gw-icon{width:18px;height:18px;margin-top:1px;color:var(--gw-accent-ink)}
.gw-renew--stack .gw-renew-mail a{color:var(--gw-accent-ink);font-weight:600}
.gw-renew--stack .gw-btn{margin:0;min-height:44px}

/* Paused spot (inline SVG macro spot_paused(), 96x72): replaces dashed-circle glyphs on paused / expired headers */
.gw-spot-paused{display:block;width:96px;height:72px;flex:none}

@media (prefers-reduced-motion:reduce){.gw-tile,.gw-qlog button{transition:none!important}}

/* ---------- Round 4 shared primitives (docs/design/art-direction.md "Round 4") ---------- */

/* Hero art frame: every entry / empty-state hero spot uses .gw-spot--hero. Full column + --gw-hero-bleed each side,
   soft edge mask, fixed --gw-spot-hero-ratio frame (366x188 at 390), any art ratio sits inside via object-fit:contain.
   Segments drop their own 280/300/366px variants. */
.gw-spot--hero{display:block;height:auto}

/* Callout: icon aligned to the first line by default (margin-top centres the icon on --gw-callout-lh).
   .gw-callout--center opts a guaranteed single-line callout into vertical centring. */
.gw-callout>.gw-chip,.gw-callout>img{flex:none}
.gw-callout--center{align-items:center}
.gw-callout--center .gw-icon{margin-top:0}

/* Note: neutral fine-print / caution-to-self surface. Paper ground, 1px line, radius 16, muted info glyph. Never a
   data-encoding fill (bands, week shapes, caution amber). Markup: <div class="gw-note">{{ icon("info") }}<p>…</p></div> */
.gw-note{display:flex;gap:10px;align-items:flex-start;background:var(--gw-bg);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);padding:12px 14px;font-size:15px;line-height:var(--gw-callout-lh);color:var(--gw-muted);text-align:left}
.gw-note>.gw-icon{width:var(--gw-callout-icon);height:var(--gw-callout-icon);margin-top:calc((var(--gw-callout-lh) - var(--gw-callout-icon)) / 2);color:var(--gw-subtle)}
.gw-note>p,.gw-note>div,.gw-note>span{margin:0;min-width:0}
.gw-note b,.gw-note strong{color:var(--gw-ink)}

/* Tab-bar clearance: --gw-tabbar-h is the fixed nav's real height (nav + hairline + safe area); --gw-tabbar-clear adds
   16px air. Anchor jumps and focus scrolling never land under the nav; .gw-above-tabbar is the scroll margin for a
   primary CTA or any element that must stay clear of the bar. */
html:has(body.gw-has-nav){scroll-padding-bottom:var(--gw-tabbar-clear)}
body.gw-has-nav .gw-above-tabbar{scroll-margin-bottom:var(--gw-tabbar-clear)}

/* Day chips in a container: week strips size their numbers from their own width, so the plan hero, /log and
   /progress strips share one large-text rule. .gw-week is a container; any other strip adds .gw-cq. */
.gw-week,.gw-cq{container-type:inline-size}
.gw-day b,.gw-daychip-num{font-size:var(--gw-daychip-num)}
.gw-day small,.gw-daychip-label{font-size:min(var(--gw-fs-micro),var(--gw-daychip-label))}

/* Content hero media: one ratio for the three states of a content page (recipe detail, locked dish, off-ramp guide).
   .gw-hero-media--wide is the owned off-ramp override (16/7). */
.gw-hero-media{display:block;width:100%;height:auto;aspect-ratio:var(--gw-hero-ratio);object-fit:cover;border-radius:var(--gw-photo-radius)}
.gw-hero-media--wide{aspect-ratio:var(--gw-hero-ratio-wide)}

/* Renew chip + eyebrow (r5): one look for _renew_card, renew_stack and renew_compact. Sand ground, amber-ink glyph and
   a sentence-case amber-ink eyebrow (--gw-renew-eyebrow). The prescriber callout keeps its own amber SURFACE, so the
   two never read as the same thing. */
.gw-renew-chip,.gw-renew--compact>.gw-chip,.gw-renew--stack .gw-renew-head>.gw-chip{background:var(--gw-renew-chip-bg);color:var(--gw-renew-chip-fg);box-shadow:none}
.gw-eyebrow--ended,.gw-renew .gw-eyebrow,.gw-renew--stack .gw-eyebrow,.gw-renew--compact .gw-eyebrow{color:var(--gw-renew-eyebrow)}

/* Type-to-confirm destructive button (visual only, the server still validates). Wrap the field and button in
   .gw-arm; mark the field data-arm with required + pattern (e.g. pattern="DELETE"). Until the field matches, the
   .gw-btn--armed-when button shows the off state. Behaviour, focus and the accessible name are unchanged. */
.gw-arm:has([data-arm]:placeholder-shown) .gw-btn--armed-when,
.gw-arm:has([data-arm]:invalid) .gw-btn--armed-when{background:var(--gw-off-bg);color:var(--gw-off-fg)!important;border-color:var(--gw-off-bg);box-shadow:none;cursor:not-allowed}

/* Estimate spot (inline SVG macro spot_estimate(), 96x72): dotted path with open dots, for approximate chart captions */
.gw-spot-estimate{display:block;width:96px;height:72px;flex:none}

/* ---------- Round 5 shared primitives (docs/design/art-direction.md "Round 5") ---------- */

/* Utility: keep a run on one line (footer "· support@…", units, short phrases). */
.gw-nowrap{white-space:nowrap}

/* Secondary button: transparent ground, 1.5px accent-ink border, accent-ink text, 44px. For a repeated or
   lower-priority CTA next to a primary .gw-btn. Combine with .gw-btn--block for full width. */
.gw-btn--secondary{min-height:44px;background:transparent;color:var(--gw-accent-ink)!important;border:1.5px solid var(--gw-accent-ink);box-shadow:none}
.gw-btn--secondary:hover{background:var(--gw-callout)}

/* Estimate pill: an approximate value (quiz-derived start weight, "about", ranges). No fill, dashed line, muted ink;
   pair the value with a word ("about", "est.") so the meaning never rests on the dash alone. */
.gw-pill--estimate{background:transparent;color:var(--gw-muted);border:1px dashed var(--gw-estimate-border);font-weight:600}

/* Back to top for long guide pages: <a class="gw-backtop" href="#top">{{ icon("chevron") }}Back to top</a>, with an
   id="top" on the page head. 44px target, text link look, chevron turned up; sits above the tab bar via scroll padding. */
.gw-backtop{display:inline-flex;align-items:center;gap:6px;min-height:var(--gw-backtop-size);padding:0 12px 0 8px;margin:8px auto 0;border-radius:var(--gw-r-field);color:var(--gw-accent-ink);font-weight:700;font-size:15px;line-height:20px;text-decoration:none}
.gw-backtop .gw-icon{width:18px;height:18px;transform:rotate(-90deg)}
.gw-backtop:hover{background:var(--gw-callout)}
.gw-backtop-row{display:flex;justify-content:center}

/* Renew art: plan-paused spot (img/art/plan-paused.webp, 240x180 display) for the head of a full renew card
   (_renew_card on 403 no_access and /account expired). Replaces the 40px refresh-card chip there. */
.gw-renew-art{display:block;width:min(240px,62%);height:auto;margin:-4px auto 2px}
/* finish pass: bottom-nav cells give the label the full cell width (Progress at large text) */
.gw-bottom-nav a{padding-inline:0}

/* ===================== Tracking features r1: shared primitives (docs/design/art-direction.md "Tracking features") ===================== */

/* Progress bar: <progress class="gw-bar" max="100" value="40" aria-label="…">40%</progress>
   or a div twin: <div class="gw-bar" style="--v:.4" role="img" aria-label="…"></div>. 10px, radius 5, token colours. */
.gw-bar{display:block;width:100%;height:var(--gw-bar-h);margin:0;border:0;border-radius:var(--gw-bar-r);overflow:hidden;background:var(--gw-bar-track);box-shadow:inset 0 0 0 1px var(--gw-bar-edge);appearance:none;-webkit-appearance:none;color:var(--gw-bar-fill)}
.gw-bar::-webkit-progress-bar{background:var(--gw-bar-track);border-radius:var(--gw-bar-r)}
.gw-bar::-webkit-progress-value{background:var(--gw-bar-fill);border-radius:var(--gw-bar-r)}
.gw-bar::-moz-progress-bar{background:var(--gw-bar-fill);border-radius:var(--gw-bar-r)}
div.gw-bar::before{content:"";display:block;height:100%;width:calc(var(--v,0) * 100%);border-radius:inherit;background:var(--gw-bar-fill)}
.gw-bar--meter{height:var(--gw-meter-h);border-radius:calc(var(--gw-meter-h) / 2)}

/* Metric row: 36px icon tile + bold value line (+ optional sub line and bar), optional aside (button / pill).
   <div class="gw-metric"><span class="gw-metric-tile" aria-hidden="true">{{ icon("meal") }}</span>
     <div class="gw-metric-main"><p class="gw-metric-value">…</p><p class="gw-metric-sub">…</p><progress class="gw-bar">…</progress></div>
     <div class="gw-metric-aside">…</div></div> */
.gw-metric{display:flex;align-items:flex-start;gap:12px;min-width:0}
.gw-metric-tile{width:var(--gw-metric-tile);height:var(--gw-metric-tile);flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:var(--gw-tint);color:var(--gw-accent-ink)}
.gw-metric-tile .gw-icon{width:20px;height:20px}
.gw-metric-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;padding-top:6px}
.gw-metric-value{margin:0;font-size:16px;line-height:22px;font-weight:700;color:var(--gw-ink);font-variant-numeric:tabular-nums;text-wrap:pretty}
.gw-metric-sub{margin:0;font-size:14px;line-height:20px;color:var(--gw-subtle)}
.gw-metric-aside{flex:none;align-self:center}
.gw-metric+.gw-metric{margin-top:14px;padding-top:14px;border-top:1px solid var(--gw-line)}

/* Compact safety note: medically reviewed caveats stay visible without dominating the controls.
   <p class="gw-note gw-note--compact">{{ icon("info") }}<span>…</span></p> */
.gw-note--compact{gap:8px;padding:8px 12px;border:0;border-radius:var(--gw-r-note);background:var(--gw-sand-soft);font-size:var(--gw-fs-caption);line-height:18px;color:var(--gw-muted)}
.gw-note--compact>.gw-icon{width:16px;height:16px;margin-top:1px;stroke-width:2;color:var(--gw-subtle)}

/* Row list: one card, rows split by hairlines, label left, muted tabular meta right, 10px vertical padding, optional
   6px meter on its own line. Shared by dose history, site history, effect frequency, "By dose", "From your signup".
   <ul class="gw-rowlist"><li><span class="gw-rowlist-label">…</span><span class="gw-rowlist-meta">…</span>
     <span class="gw-rowlist-meter" style="--v:.5" aria-hidden="true"></span></li></ul>
   .gw-rowlist--plain = same rows without the card (inside another card). */
.gw-rowlist{margin:0;padding:0 16px;list-style:none;background:var(--gw-surface);border:1px solid var(--gw-line);border-radius:var(--gw-r-box);box-shadow:var(--gw-shadow-card)}
.gw-rowlist--plain{padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.gw-rowlist>li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;column-gap:12px;row-gap:6px;min-height:44px;padding:var(--gw-row-pad) 0;align-content:center}
.gw-rowlist>li+li{border-top:1px solid var(--gw-line)}
.gw-rowlist-label{min-width:0;font-size:15px;line-height:20px;font-weight:600;color:var(--gw-ink);overflow-wrap:anywhere}
.gw-rowlist-label small{display:block;font-size:13px;line-height:18px;font-weight:400;color:var(--gw-subtle)}
.gw-rowlist-meta{font-size:14px;line-height:20px;color:var(--gw-muted);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.gw-rowlist-meta b{color:var(--gw-ink);font-weight:700}
.gw-rowlist-meter{grid-column:1/-1;display:block;height:var(--gw-meter-h);border-radius:calc(var(--gw-meter-h) / 2);background:var(--gw-bar-track);overflow:hidden}
.gw-rowlist-meter::before{content:"";display:block;height:100%;width:calc(var(--v,0) * 100%);border-radius:inherit;background:var(--gw-freq-2)}

/* Frequency ramp cells and legend ("how often"; severity keeps .gw-sev-* / .sev-*). */
.gw-freq-0{background:var(--gw-freq-0);color:var(--gw-freq-0-fg);box-shadow:inset 0 0 0 1px var(--gw-freq-0-edge)}
.gw-freq-1{background:var(--gw-freq-1);color:var(--gw-freq-1-fg);box-shadow:inset 0 0 0 1px var(--gw-freq-1-edge)}
.gw-freq-2{background:var(--gw-freq-2);color:var(--gw-freq-2-fg);box-shadow:inset 0 0 0 1px var(--gw-freq-2-edge)}
.gw-freq-3{background:var(--gw-freq-3);color:var(--gw-freq-3-fg);box-shadow:inset 0 0 0 1px var(--gw-freq-3-edge)}
.gw-legend--ramp{justify-content:flex-start;gap:6px;margin-top:10px}
.gw-legend--ramp>span{gap:4px}
.gw-legend i.gw-freq-0,.gw-legend i.gw-freq-1,.gw-legend i.gw-freq-2,.gw-legend i.gw-freq-3{width:14px;height:14px;border-radius:4px}

/* Pending primary: outlined surface version of the primary while a required choice is still open. Keeps focus and the
   accessible name (no disabled attr); the server still validates. Explicit: .gw-btn--pending. Automatic: wrap the form
   in .gw-await and give the button .gw-btn--await; it looks pending while any required control is :invalid. */
.gw-btn--pending,.gw-await:has(:invalid) .gw-btn--await{background:var(--gw-surface);color:var(--gw-accent-ink)!important;border:1.5px dashed var(--gw-accent-ink);box-shadow:none}
.gw-btn--pending:active,.gw-await:has(:invalid) .gw-btn--await:active{transform:none}

/* Quiet card: empty states and privacy notes. surface-2, hairline, no shadow, radius 20, 16px. */
.gw-card--quiet{background:var(--gw-surface-2);border:1px solid var(--gw-line);border-radius:var(--gw-r-card);padding:16px;box-shadow:none}

/* Attention callout: calm, recoverable problems (upload failed, try again). Amber ink on a sand tint + amber rule.
   Destructive confirms keep danger red; "tell your prescriber" keeps .gw-rule-card--soon. */
.gw-callout--attn{background:var(--gw-attn-bg);color:var(--gw-attn-fg);box-shadow:inset 3px 0 0 var(--gw-attn-rule);border-radius:0 14px 14px 0}
.gw-callout--attn .gw-icon{color:var(--gw-attn-fg)}
.gw-callout--attn b,.gw-callout--attn strong{color:var(--gw-attn-fg)}

/* Dropzone / file picker: the input stays a real, focusable file input, visually hidden inside a styled label.
   <label class="gw-dropzone"><input class="gw-dropzone-input" type="file" …>
     <span class="gw-dropzone-glyph">{{ icon("photo-add") }}</span><span class="gw-dropzone-title">…</span>
     <span class="gw-dropzone-hint">…</span><img class="gw-dropzone-thumb" alt="" hidden></label>
   Selected state: add .is-selected from JS (or rely on :has(:valid) for a required input); show the thumb. */
.gw-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:132px;padding:18px 16px;border:1.5px dashed var(--gw-control-ring);border-radius:var(--gw-r-box);background:var(--gw-surface-2);color:var(--gw-ink);text-align:center;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color var(--gw-dur-state) var(--gw-ease),border-color var(--gw-dur-state) var(--gw-ease)}
/* hover only where a pointer can hover: a tap must not leave the zone looking hovered at rest */
@media (hover:hover){.gw-dropzone:hover{background:var(--gw-tint);border-color:var(--gw-accent)}}
.gw-dropzone-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.gw-dropzone:has(.gw-dropzone-input:focus-visible){outline:3px solid var(--gw-accent);outline-offset:2px}
.gw-dropzone-glyph{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--gw-tint);color:var(--gw-accent-ink);pointer-events:none}
.gw-dropzone-title{font-size:16px;line-height:22px;font-weight:700;color:var(--gw-accent-ink);pointer-events:none}
.gw-dropzone-hint{font-size:14px;line-height:20px;color:var(--gw-subtle);pointer-events:none}
.gw-dropzone-thumb{display:block;width:72px;height:96px;object-fit:cover;border-radius:10px;border:1px solid var(--gw-line);pointer-events:none}
.gw-dropzone-thumb[hidden]{display:none}
.gw-dropzone.is-selected,.gw-dropzone:has(.gw-dropzone-input[required]:valid){border-style:solid;border-color:var(--gw-accent);background:var(--gw-mint-soft)}
.gw-dropzone.is-selected .gw-dropzone-glyph{display:none}
.gw-dropzone.is-error{border-color:var(--gw-attn-rule);background:var(--gw-attn-bg)}

/* Spinner for busy buttons: <span class="gw-spinner" aria-hidden="true"></span> + keep the text label.
   Reduced motion: a still ring with a gap (no spin). */
.gw-spinner{display:inline-block;flex:none;width:var(--gw-spinner);height:var(--gw-spinner);border-radius:50%;border:2px solid currentColor;border-right-color:transparent;opacity:.85;animation:gw-spin .8s linear infinite;vertical-align:-3px}
@keyframes gw-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.gw-spinner{animation:none}.gw-dropzone{transition:none}}
.gw-btn[aria-busy="true"]{cursor:progress}

/* Stacked table: below 600px each row becomes a mini card; cells label themselves from data-label.
   Markup: <table class="gw-table gw-table--stack"> … <td data-label="Week">…</td>. Keep <thead> (screen readers and
   wide screens use it). Because display changes drop table semantics in some browsers, add role="table/rowgroup/row/
   columnheader/cell" (rowheader for a tbody th) when you use the stack. */
@media (max-width:599px){
  .gw-table--stack thead{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .gw-table--stack{margin-top:4px}
  .gw-table--stack,.gw-table--stack tbody,.gw-table--stack tr,.gw-table--stack td,.gw-table--stack tbody th{display:block;width:100%}
  .gw-table--stack tr{padding:10px 0;border-top:1px solid var(--gw-line)}
  .gw-table--stack tbody tr:first-child{border-top:0}
  .gw-table--stack td,.gw-table--stack tbody th{display:grid;grid-template-columns:minmax(96px,38%) minmax(0,1fr);gap:12px;padding:3px 0;border:0;overflow-wrap:anywhere}
  .gw-table--stack td::before,.gw-table--stack tbody th::before{content:attr(data-label);font-size:var(--gw-fs-caption);line-height:20px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--gw-subtle)}
  .gw-table--stack td:not([data-label])::before,.gw-table--stack tbody th:not([data-label])::before{content:none}
  .gw-table--stack td:not([data-label]),.gw-table--stack tbody th:not([data-label]){display:block}
}

/* Segmented control: one row of equal options (range pickers, view switches). Links (aria-current) or radios.
   <nav class="gw-segmented" aria-label="…"><a href="…" aria-current="page">4 weeks</a><a href="…">12 weeks</a></nav>
   <fieldset class="gw-segmented"><legend class="gw-sr">…</legend><label><input type="radio" …><span>…</span></label></fieldset> */
.gw-segmented{display:flex;gap:2px;margin:0;padding:2px;border:1px solid var(--gw-line);border-radius:var(--gw-r-field);background:var(--gw-bg-deep);min-width:0}
.gw-segmented>a,.gw-segmented>label,.gw-segmented>button{position:relative;flex:1 1 0;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;padding:0 8px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--gw-muted)!important;font:600 15px/20px var(--gw-font-ui);text-align:center;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color var(--gw-dur-state) var(--gw-ease),color var(--gw-dur-state)}
.gw-segmented>label>input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.gw-segmented>[aria-current],.gw-segmented>[aria-pressed="true"],.gw-segmented>label:has(:checked){background:var(--gw-surface);border-color:var(--gw-accent);color:var(--gw-accent-ink)!important;font-weight:700;box-shadow:var(--gw-shadow-1)}
.gw-segmented>a:focus-visible,.gw-segmented>button:focus-visible,.gw-segmented>label:has(:focus-visible){outline:3px solid var(--gw-accent);outline-offset:1px;z-index:1}
@media (prefers-reduced-motion:reduce){.gw-segmented>*{transition:none}}

/* Document card: a section of a document-style screen (report). Card on screen, plain ruled section in print. */
.gw-card--doc{display:flex;flex-direction:column;gap:12px;min-width:0}

/* Print baseline for every page: no chrome, black on white, footer kept. Page CSS adds layout only.
   .gw-noprint hides any control; .gw-printonly shows only on paper. */
.gw-printonly{display:none}
@media print{
  html,body.gw{background:#fff!important;color:var(--gw-print-ink)}
  .gw-bottom-nav,.gw-noprint,.gw-cta-sticky,.gw-backtop-row{display:none!important}
  .gw-printonly{display:block}
  body.gw-has-nav .gw-app,.gw-app{padding:0!important;max-width:none}
  .gw{font-size:var(--gw-print-fs-body);line-height:1.4}
  .gw-h1{font-size:var(--gw-print-fs-h1);line-height:1.2;color:var(--gw-print-ink)}
  .gw-h2{font-size:var(--gw-print-fs-h2);line-height:1.25;color:var(--gw-print-ink);break-after:avoid}
  .gw-title{font-size:var(--gw-print-fs-h3);line-height:1.3;color:var(--gw-print-ink);break-after:avoid}
  .gw-eyebrow{color:var(--gw-print-muted)}
  .gw-card--doc{padding:0;background:none!important;border:0;border-top:1px solid var(--gw-print-rule);border-radius:0;box-shadow:none;padding-top:8pt;break-inside:avoid-page}
  .gw-card--doc.is-long{break-inside:auto}
  .gw-table{font-size:var(--gw-print-fs-body);line-height:1.35}
  .gw-table thead{display:table-header-group}
  .gw-table thead th{font-size:var(--gw-print-fs-th);color:var(--gw-print-muted)}
  .gw-table th,.gw-table td{border-top-color:var(--gw-print-rule-soft);color:var(--gw-print-ink)}
  .gw-table tr{break-inside:avoid}
  .gw-smallprint,.gw-note,.gw-note--compact{color:var(--gw-print-muted);background:none;border:0;padding-inline:0}
  .gw-footer{display:block!important;color:var(--gw-print-ink);border-top-color:var(--gw-print-rule);break-inside:avoid;font-size:var(--gw-print-fs-small)}
  .gw-spot,.gw-spot-fb,svg.gw-spotsvg{display:none!important}
  /* data-encoding fills must survive "background graphics off" */
  .gw-freq-0,.gw-freq-1,.gw-freq-2,.gw-freq-3,.gw-bar,div.gw-bar::before,.gw-rowlist-meter,.gw-rowlist-meter::before,.gw-sev-1,.gw-sev-2,.gw-sev-3,.gw-legend i{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Spot slot: _spots.html spot(name). Real art = inline SVG .gw-spotsvg (token colours); until the file lands, the
   fallback is a soft gradient tile with a glyph at the same size, so layout never shifts at integration. */
.gw-spotsvg{display:block;flex:none;max-width:100%;height:auto}
.gw-spot-fb{display:flex;flex:none;align-items:center;justify-content:center;max-width:100%;border-radius:var(--gw-r-box);background:radial-gradient(70% 70% at 30% 25%,var(--gw-mint-soft) 0%,rgba(234,243,241,0) 70%),linear-gradient(160deg,var(--gw-sand-soft),var(--gw-bg-deep));color:var(--gw-accent-ink)}
.gw-center .gw-spot-fb,.gw-center .gw-spotsvg,.gw-empty .gw-spot-fb,.gw-empty .gw-spotsvg{margin-inline:auto}
.gw-spot-fb .gw-icon{width:40%;height:40%;max-width:40px;max-height:40px;opacity:.85}

/* ===================== Tracking features r2: shared primitives (docs/design/art-direction.md "Round 2") ===================== */
/* Quiet disclosure: secondary "history / more" summaries. 14/600 muted text, 16px muted chevron, top hairline,
   44px target. Works on a bare <details class="gw-disclosure--quiet"> or combined with .gw-disclosure / --row.
   <details class="gw-disclosure--quiet"><summary><span>…</span>{{ icon("chevron-down") }}</summary>…</details> */
.gw-disclosure--quiet{background:none;border:0;border-top:1px solid var(--gw-line);border-radius:0;box-shadow:none}
.gw-disclosure--quiet>summary{list-style:none;display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 0;cursor:pointer;font:600 14px/20px var(--gw-font-ui);color:var(--gw-muted)}
.gw-disclosure--quiet>summary::-webkit-details-marker{display:none}
.gw-disclosure--quiet>summary>span{flex:1;min-width:0}
.gw-disclosure--quiet>summary>.gw-icon:last-child{width:16px;height:16px;color:var(--gw-muted);transition:transform var(--gw-dur-state) var(--gw-ease)}
.gw-disclosure--quiet[open]>summary>.gw-icon:last-child{transform:rotate(180deg)}
.gw-disclosure--quiet>summary:hover{color:var(--gw-ink)}
.gw-disclosure--quiet>summary:focus-visible{outline:3px solid var(--gw-accent);outline-offset:2px;border-radius:6px}
.gw-disclosure--quiet>.gw-disclosure-body{padding:0 0 8px}
.gw-disclosure--quiet>.gw-disclosure-body::before{display:none}

/* KPI: the one number style. Large value 600 20/24 tabular + muted 14/18 sub-line. Standalone (.gw-kpi > .gw-kpi-value
   + .gw-kpi-sub) or inside a metric row via .gw-metric--lg (restyles .gw-metric-value / -sub). (.gw-stat = /progress stats grid.) */
.gw-kpi{display:flex;flex-direction:column;gap:2px;min-width:0}
.gw-kpi-value,.gw-metric--lg .gw-metric-value{margin:0;font-family:var(--gw-font-ui);font-weight:600;font-size:var(--gw-fs-stat);line-height:var(--gw-lh-stat);color:var(--gw-ink);font-variant-numeric:tabular-nums;text-wrap:pretty}
.gw-kpi-sub,.gw-metric--lg .gw-metric-sub{margin:0;font-size:var(--gw-fs-stat-sub);line-height:var(--gw-lh-stat-sub);color:var(--gw-muted)}
.gw-metric--lg .gw-metric-main{padding-top:4px;gap:4px}

/* Range/band tick: low-emphasis marker on a bar (never colour alone: the range is also stated in text) */
.gw-range-tick{position:absolute;top:-3px;bottom:-3px;width:2px;border-radius:1px;background:var(--gw-ink-subtle);left:calc(var(--at,0) * 100%);transform:translateX(-1px)}

/* No-data cell for heatmaps/calendars: borderless quiet surface */
.gw-freq-none{background:var(--gw-freq-none);color:var(--gw-muted);box-shadow:none}
.gw-legend i.gw-freq-none{width:14px;height:14px;border-radius:4px}

/* Status tag: <span class="gw-status">Taken</span>; neutral states (Skipped) <span class="gw-status gw-status--quiet">.
   Never alarm colour; the word carries the meaning. (.gw-chip is the 40px icon tile, hence a separate name.) */
.gw-status{display:inline-flex;align-items:center;gap:4px;min-height:24px;padding:2px 10px;border-radius:999px;background:var(--gw-chip-bg);color:var(--gw-chip-ink);font:700 var(--gw-fs-caption)/var(--gw-lh-label) var(--gw-font-ui);white-space:nowrap;font-variant-numeric:tabular-nums}
.gw-status .gw-icon{width:14px;height:14px}
.gw-status--quiet{background:transparent;color:var(--gw-chip-quiet-ink);border:1px dashed var(--gw-chip-quiet-edge);box-shadow:none;padding:1px 9px}

/* Stacked-row ::before data-labels: rem caption (scales with user text size). Plain labels: font-size var(--gw-fs-caption) + line-height var(--gw-lh-label) */
.gw-table--stack td[data-label]::before,.gw-table--stack th[data-label]::before{font-size:var(--gw-fs-caption);line-height:var(--gw-lh-label)}

/* Boxed callout: no 4px left bar; 1px tinted border, r-box. For in-form errors on calm pages: .gw-callout--attn.gw-callout--boxed */
.gw-callout--boxed{border-radius:var(--gw-r-box);box-shadow:none;border:1px solid var(--gw-line)}
.gw-callout--attn.gw-callout--boxed{border-color:var(--gw-attn-rule)}
.gw-callout--alert.gw-callout--boxed{border-color:var(--gw-warn-rule)}

/* Notes aligned to the page heading (cancels the /plan 4px inset that leaks from seg-plan.css) */
.gw-notes.gw-notes--flush{padding-inline:0;margin-inline:0}

/* Compact button for confirms inside a tile/card: 44px target, radius 12, 14/18, balanced wrap.
   Danger confirm: .gw-btn.gw-btn--danger.gw-btn--compact (ghost twin: add .gw-btn--ghost) */
.gw-btn--compact{min-height:44px;padding:6px 14px;border-radius:var(--gw-r-chip);font-size:14px;line-height:18px;text-wrap:balance;text-align:center}
.gw-btn--compact .gw-icon{width:16px;height:16px}

@media (prefers-reduced-motion:reduce){.gw-disclosure--quiet>summary>.gw-icon{transition:none!important}}
@media print{
  .gw-status{background:none!important;color:var(--gw-print-ink);border:1px solid var(--gw-print-rule);box-shadow:none}
  .gw-status--quiet{border-style:dashed}
  .gw-disclosure--quiet>summary{color:var(--gw-print-muted)}
  .gw-freq-none{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
