/* Living Visual Constitution: shared materials, distinct rooms.
   Books keeps its reviewed environment; this sheet owns the surrounding house. */
:root{
  --gw-ivory:#f3eee4;--gw-ivory-soft:#d8cfbf;--gw-brass:#ddc487;
  --gw-slate:#a6b5bc;--gw-petrol:#6f9aa1;--gw-light:159,201,220;
  --gw-rule:rgba(235,225,207,.18);
  --gw-lit-type:linear-gradient(108deg,#a8b8bb,#e8dfce 30%,#fffdf8 52%,#c7e0e3 75%,#9ab9bf);
  --gw-lit-rule:linear-gradient(90deg,transparent,rgba(111,154,161,.3) 22%,rgba(159,201,220,.8) 48%,#f3eee4 56%,rgba(159,201,220,.3) 76%,transparent);
  --gw-paper:radial-gradient(ellipse at 90% 0,rgba(221,196,135,.2),transparent 65%),#f3eee4;
}
body:not(:has(.books-vnext,.books-focus-layer)){
  --ink:var(--gw-ivory);--muted:var(--gw-slate);--blue:#9fc9dc;
  --purple:#87947c;--gold:var(--gw-brass);--line:rgba(235,225,207,.12);--line2:var(--gw-rule);
}
/* Navigation is quiet architecture; selected state retains icon, label and shape. */
body .bottom-nav{background:#08131bf5;border-color:var(--gw-rule);backdrop-filter:blur(8px)}
body .bottom-nav button{color:#a6b5bc;min-height:48px}
body .bottom-nav button.active{color:#f3eee4;background:rgba(111,154,161,.14)}
body :is(button,a,input,textarea,summary,select,[tabindex]):focus-visible{outline:2px solid var(--gw-brass);outline-offset:4px}
body .brand-home .tagline{color:#9baab1}
body .meta-link-button,body .profile-btn{background:#0d1922;border-color:var(--gw-rule);color:#d8cfbf}
body .meta-link-button.active{background:#193039;border-color:#6f9aa160;color:#f3eee4}
body #labBtn.lab-btn{background:#152931!important;border-color:#6f9aa160!important;color:#c7e0e3!important}
body #dMixBtn{background:linear-gradient(110deg,#31555d,#446975);color:#fffaf0}
body #controlDock{background:#071018ed;border-color:var(--gw-rule);box-shadow:0 8px 25px #0005}
body .page-intro h2{color:var(--gw-ivory);font-size:clamp(38px,6vw,66px);letter-spacing:-.045em}
body :is(.source-row,.follow-card,.saved-status){border-color:var(--gw-rule)}
body .follow-card{border-radius:4px;background:linear-gradient(150deg,#10212a,#0a151d);padding:24px}
body .alert-card{border-radius:2px;border-left-color:#9fc9dc;background:#0d1922;padding:20px 24px}
body :is(.saved-grid,.all-grid) .story-card[data-id]{border:0;border-top:1px solid var(--gw-rule);border-radius:0;background:none;box-shadow:none}
body :is(.saved-grid,.all-grid) .story-card[data-id]>.visual{border-radius:3px;margin-top:16px}
body :is(.saved-grid,.all-grid) .story-card[data-id] .story-body{padding:20px 0}
/* Labels occupy their rules, rather than sit above another boxed component. */
body :is(.gw-scene-label,.gw-paths-head,.gw-memory-copy,.gw-more-head) .gw-section-kicker{
  display:flex;align-items:center;gap:12px;color:#d9c79e;
}
body :is(.gw-scene-label,.gw-paths-head,.gw-memory-copy,.gw-more-head) .gw-section-kicker::after{
  content:"";height:1px;width:clamp(32px,8vw,110px);background:linear-gradient(90deg,#ddc48780,transparent);
}
/* Today: luminous brass, finite editorial foreground, no prototype content. */
body[data-surface="today"]{background:radial-gradient(ellipse at 85% 8%,rgba(221,196,135,.16),transparent 38rem),radial-gradient(ellipse at 12% 35%,rgba(111,154,161,.17),transparent 42rem),#071018}
body[data-surface="today"] .gw-atmosphere{background:radial-gradient(ellipse at 79% 9%,rgba(221,196,135,.22),transparent 27rem),radial-gradient(ellipse at 18% 35%,rgba(111,154,161,.15),transparent 32rem)}
body[data-surface="today"] .gw-atmosphere::after{background:linear-gradient(115deg,transparent 18%,rgba(243,238,228,.045) 39%,transparent 58%);filter:blur(12px)}
body[data-surface="today"] .gw-cosmos{opacity:.52}
body[data-surface="today"] :is(.gw-orbits-b,.gw-constellation-south){stroke:rgba(111,154,161,.24)}
body[data-surface="today"] :is(.gw-sun-c,.gw-planet-b,.gw-planet-e,.gw-constellation-south circle){fill:#8eafb3;filter:drop-shadow(0 0 7px #6f9aa160)}
body[data-surface="today"] .gw-today-meta{color:#b9b5a9}
body[data-surface="today"] .gw-today-intro{padding-bottom:58px}
body[data-surface="today"] .gw-today-intro h1{color:#f3eee4;text-shadow:none}
body[data-surface="today"] .gw-today-intro p{color:#d8cfbf;font-size:21px;max-width:32ch}
body[data-surface="today"] .gw-hero-stage>.hero[data-id]{border-radius:5px;border-color:#ddc48745;box-shadow:0 22px 55px #0006,inset 0 1px #f3eee440}
body[data-surface="today"] :is(.gw-path,.gw-more-grid,.gw-memory-card) .story-card[data-id]>.visual{border-radius:3px;box-shadow:0 14px 28px #0005}
body[data-surface="today"] :is(.gw-path,.gw-more-grid,.gw-memory-card) .story-summary{color:#b6c0c3;line-height:1.6}
body[data-surface="today"] :is(.gw-memory-copy p,.gw-more-head>span,.gw-paths-head,.gw-scene-label){color:#a6b5bc}
body[data-surface="today"] .gw-memory{border-top:0}
body[data-surface="today"] .gw-memory::before{width:100%;opacity:1;background:var(--gw-lit-rule);box-shadow:0 0 16px #9fc9dc25}
@supports(background-clip:text){
  body[data-surface="today"] :is(.gw-today-intro h1,.gw-more-head h2,.gw-memory-copy h2){background:linear-gradient(105deg,#c6b38b,#fffdf8 48%,#ead5aa 76%,#b1c7ca);background-clip:text;-webkit-background-clip:text;color:transparent}
}
@media(max-width:650px){
  body[data-surface="today"] .gw-today-intro{padding-bottom:40px}
  body[data-surface="today"] .gw-today-intro p{font-size:19px}
  body[data-surface="today"] .gw-hero-stage>.hero[data-id]{min-height:480px}
  body .section-head{align-items:flex-start;flex-wrap:wrap;gap:16px}
}
/* Discover: images lead; the field receives their light, not another panel. */
body[data-surface="discover"]{background:radial-gradient(ellipse at 85% 0,rgba(111,154,161,.22),transparent 45rem),#071018}
body .flow-intro{padding:22px 0 32px;margin-bottom:20px;border-bottom:1px solid var(--gw-rule)}
body .flow-intro h1{font-size:clamp(42px,6vw,66px);letter-spacing:-.045em}
body .flow-intro p{color:#b8c5c7}
body .flow-card{padding-bottom:36px;margin-bottom:48px;border-image:var(--gw-lit-rule) 1}
body .flow-image{position:relative;isolation:isolate;overflow:visible;border-radius:3px;background:none}
body .flow-image img{border-radius:3px;box-shadow:0 20px 38px #0006}
body .flow-image .flow-image-light{position:absolute;inset:-24px -18px;width:calc(100% + 36px);height:calc(100% + 48px);z-index:-1;pointer-events:none;filter:blur(25px) saturate(.65);opacity:.19;box-shadow:none;mask-image:radial-gradient(ellipse,#000 35%,transparent 72%)}
body .discovery-modes{border-image:var(--gw-lit-rule) 1;padding-bottom:18px}
body .discovery-modes button[aria-pressed="true"]{color:#f3eee4;background:#193039;border-color:#6f9aa160}
body[data-surface="discover"] .story-card[data-id]{border:0;border-top:1px solid var(--gw-rule);border-radius:0;background:none;box-shadow:none}
body[data-surface="discover"] .story-card[data-id]>.visual{border-radius:3px;margin-top:18px}
body[data-surface="discover"] .story-body{padding:20px 0}
body[data-surface="discover"] .feed-grid{gap:40px 28px}
body[data-surface="discover"] .hero[data-id]{border-radius:5px;border-color:#c7e0e350;box-shadow:0 24px 50px #0006}
body .flow-meta{color:#a6b5bc}
body .flow-preview{color:#d8cfbf;line-height:1.75}
body .flow-actions button{border-radius:4px;border-color:#6f9aa145;color:#bac6c9}
/* World: dusk and space, retaining all existing geometry and object identity. */
body:has(.world-shell):not(:has(.books-vnext,.books-focus-layer)){background:radial-gradient(ellipse at 88% 9%,rgba(111,154,161,.22),transparent 42rem),radial-gradient(ellipse at 9% 70%,rgba(172,128,72,.09),transparent 38rem),#050d14}
body .world-shell:not(.books-vnext) .world-eyebrow{color:#c8b998}
body .world-shell:not(.books-vnext) .world-gateway{border-radius:4px;border-color:#9fc9dc38;background:radial-gradient(ellipse at 90% 0,rgba(111,154,161,.28),transparent 70%),#0a1821;box-shadow:0 16px 35px #0004}
body .world-shell:not(.books-vnext) .world-gateway.things{background:radial-gradient(ellipse at 90% 0,rgba(188,160,106,.23),transparent 70%),#111b20}
body .world-shell:not(.books-vnext) .world-map-wrap{border-radius:4px;border-color:#9fc9dc25;background:radial-gradient(ellipse at 50% 42%,rgba(111,154,161,.2),transparent 60%),#071018}
body .world-shell:not(.books-vnext) .world-map-glow{border-color:#9fc9dc26;box-shadow:0 0 90px #6f9aa128,inset 0 0 70px #6f9aa112}
body .world-shell:not(.books-vnext) .world-territory-books{background:radial-gradient(ellipse at 90% 0,#6f9aa140,transparent 75%),#0d1922!important;border-color:#9fc9dc55!important;box-shadow:0 24px 45px #0005,-8px -5px 40px #6f9aa128!important}
body .world-shell:not(.books-vnext) :is(.world-territory-enter,.world-territory-state,.world-invite em){color:#c8d9dd}
body .world-shell:not(.books-vnext) .world-invite{border-radius:4px;background:none;border:0;border-top:1px solid var(--gw-rule)}
body .world-shell:not(.books-vnext) .world-invite.primary{background:linear-gradient(150deg,#6f9aa118,transparent)}
body .world-commerce-hero{border-radius:4px}
/* Life: warm paper, precise divisions, state remains legible and explicit. */
body .gw-life-canvas{background:var(--gw-paper);border-radius:2px;box-shadow:0 20px 45px #0005,inset 0 1px #fffdf8;padding-top:42px;padding-bottom:44px}
body .gw-life-intro{padding-bottom:36px}
body .gw-life-intro .gw-section-kicker{display:flex;align-items:center;gap:14px;color:#756448}
body .gw-life-intro .gw-section-kicker::after{content:"";height:1px;width:130px;background:linear-gradient(90deg,#9a825b70,transparent)}
body .gw-life-link{border:0;border-top:1px solid #8f7c5b66;border-radius:0;background:none;padding:22px 2px;min-height:140px}
body .gw-life-link small{color:#5b5348;line-height:1.6}
body .gw-life-link:hover{background:#d8cfbf30}
body .gw-life-canvas :is(button,a):focus-visible{outline-color:#705a32}
/* Technical room: software remains software; brass and moss replace neon. */
body .meta-hero{border-radius:5px;background:#0a151c;border-color:#6f9aa140;box-shadow:0 20px 45px #0005}
body .meta-hero::before{background:radial-gradient(ellipse at 95% 0,#6f9aa140,transparent 65%),linear-gradient(#9fc9dc07 1px,transparent 1px),linear-gradient(90deg,#9fc9dc07 1px,transparent 1px);background-size:auto,32px 32px,32px 32px}
body .meta-hero h2{font-size:clamp(35px,5vw,56px);letter-spacing:-.04em}
body .meta-hero .lab-kicker{color:#c8b998}
body .mb-diagnosis{backdrop-filter:none;border-radius:3px;background:#12232b}
body .mb-diagnosis::after{background:linear-gradient(#ddc487,#6f9aa1,#87947c)}
body :is(.mb-command,.meta-metric,.mb-photo-health,.mb-shadow-card,.meta-section,.mb-health),body .mb-health-grid>div{border-radius:4px;border-color:var(--gw-rule)}
body .mb-shadow-card::after{color:#d8cfbf;border-color:#ddc48745;backdrop-filter:none}
body .mb-console .violet{color:#c7d6d9}
body .mb-command.deep::before{color:#c7d6d94d}
body .mb-stage::before{background:linear-gradient(90deg,transparent,#9fc9dc80,transparent);animation:none}
body .meta-hero .lab-kicker::before{animation:none;box-shadow:none;background:#87947c}
body .mb-terminal{border-radius:4px;border-color:#87947c66;box-shadow:0 16px 35px #0005}
body :is(.meta-list,.meta-empty){border-radius:4px;border-color:var(--gw-rule)}
body .lab-hero{border-radius:4px;border-color:#6f9aa150;background:radial-gradient(ellipse at 90% 0,#6f9aa12e,transparent 70%),#0a1821}
body .lab-card{border-radius:4px;border-color:#6f9aa140;background:#0b1720}
body .lab-card:hover{border-color:#9fc9dc90}
body :is(.lab-tier,.lab-score,.lab-kicker){color:#c7d6d9}
body .lab-tier{border-color:#6f9aa160}
body .lab-why{border-left-color:#6f9aa180}
body .lab-card-meta-float .lab-kicker{color:#d8cfbf;backdrop-filter:none}
body :is(.lab-visual-fallback,.lab-quick-image-fallback){background:radial-gradient(ellipse at 25% 20%,#6f9aa140,transparent 60%),#0d1922}
/* Quick Look retains source art; its reading material is warm, quiet paper. */
body .ql-destination{--ql-blue:#9fc9dc;--ql-violet:#87947c;--ql-gold:#ddc487;background:#071018;color:#f3eee4;border-radius:5px}
body .quicklook{backdrop-filter:blur(5px)}
body .ql-nav{background:#0a151df5;backdrop-filter:none;border-bottom:1px solid #9fc9dc55}
body .ql-hero{border-bottom:1px solid #d8cfbf60}
body .ql-glance{background:#0d1922;border-bottom:1px solid var(--gw-rule)}
body .ql-section-head>span{display:flex;align-items:center;gap:12px;color:#c8b998}
body .ql-section-head>span::after{content:"";height:1px;flex:1;background:linear-gradient(90deg,#ddc48770,transparent)}
body :is(.ql-evidence,.ql-evidence.ql-stretch,.ql-related button){border:0;border-top:1px solid var(--gw-rule);border-radius:0;background:linear-gradient(150deg,#6f9aa110,transparent);box-shadow:none}
body .ql-evidence.ql-stretch .ql-evidence-icon{color:#b9cbb0;background:#87947c1c}
body .ql-action-primary{background:#6f9aa120;border-color:#9fc9dc70}
body .ql-action,body .ql-feedback .action[data-id]{border-radius:4px}
body .ql-reader{border-radius:3px;border:1px solid #9fc9dc50;background:#0d1922;box-shadow:none}
body .ql-article{background:var(--gw-paper);color:#29251f;border-top:2px solid #b29a68}
body .ql-article :is(button,a):focus-visible{outline-color:#705a32}
body .ql-article-content img{border-radius:2px}
body .flow-card.is-unfolded{background:none;border-radius:0}
body .gw-unfold[data-state="ready"]{--ink:#29251f;--muted:#5b5348;--blue:#315e68;--line:#8f7c5b40;--line2:#8f7c5b66;--panel:#e8e1d4;background:var(--gw-paper);padding:28px;box-shadow:0 12px 30px #0004;border-top:2px solid #b29a68}
body .gw-unfold[data-state="ready"] :is(button,a):focus-visible{outline-color:#705a32}
@supports(background-clip:text){
  body :is(.flow-intro h1,.world-intro h2,.world-focus-intro h2,.world-commerce-hero h2,.meta-hero h2){background:var(--gw-lit-type);background-clip:text;-webkit-background-clip:text;color:transparent}
}
@media(max-width:650px){
  body .gw-life-canvas{padding-top:30px;padding-bottom:30px}
  body .gw-life-link{min-height:90px;align-items:flex-start;gap:20px}
  body .gw-life-link small{max-width:20ch;text-align:left}
  body .flow-intro{padding-top:12px;padding-bottom:24px}
  body .flow-card{margin-bottom:36px}
  body .gw-unfold[data-state="ready"]{padding:22px 16px}
  body .ql-destination{border-radius:0}
  body .world-shell:not(.books-vnext) .world-gateway{padding:24px 20px}
  body .world-shell:not(.books-vnext) .world-proofline{white-space:normal;flex-wrap:wrap;overflow:visible;line-height:1.8;row-gap:2px}
}
@media(prefers-reduced-motion:reduce){
  body :is(.gw-cosmos,.gw-solar,.mb-cursor){animation:none!important}
  body :is(.brand-home,.mb-command,.mb-stage,.mb-shadow-card,.meta-metric,.world-gateway,.flow-image){transition:none!important}
}
@media(forced-colors:active){
  body :is(.gw-today-intro h1,.gw-more-head h2,.gw-memory-copy h2,.flow-intro h1,.world-intro h2,.world-focus-intro h2,.world-commerce-hero h2,.meta-hero h2){background:none;color:CanvasText}
}
