/* Shared design system — calm, easy-on-the-eyes theme.
   Warm paper background, muted accents, generous whitespace. No frameworks. */
/* Self-hosted display font for Hub 2 (jobsite). Loads lazily, only when used. */
@font-face{
  font-family:"Barlow Condensed";font-style:normal;font-weight:600;font-display:swap;
  src:url("fonts/barlow-condensed-600.woff2") format("woff2");
}
@font-face{
  font-family:"Barlow Condensed";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/barlow-condensed-700.woff2") format("woff2");
}
/* Self-hosted fonts for Hub 3 (Lumen): Cormorant Garamond (display serif) + Inter (body). */
@font-face{
  font-family:"Cormorant Garamond";font-style:normal;font-weight:500;font-display:swap;
  src:url("fonts/cormorant-garamond-500.woff2") format("woff2");
}
@font-face{
  font-family:"Cormorant Garamond";font-style:normal;font-weight:600;font-display:swap;
  src:url("fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face{
  font-family:"Cormorant Garamond";font-style:italic;font-weight:500;font-display:swap;
  src:url("fonts/cormorant-garamond-italic-500.woff2") format("woff2");
}
@font-face{
  font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/inter-400.woff2") format("woff2");
}
@font-face{
  font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;
  src:url("fonts/inter-600.woff2") format("woff2");
}
@font-face{
  font-family:"Pinyon Script";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/pinyon-script-400.woff2") format("woff2");
}
*,*::before,*::after{box-sizing:border-box}
:root{
  --accent:#3e8266;
  --accent-deep:#2c5f4a;
  --ink:#2b2f33;
  --muted:#6f747c;
  --line:#e9e4dc;
  --bg:#fbfaf7;
  --soft:#f3f0ea;
  --card:#ffffff;
  --radius:16px;
}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:17px;line-height:1.7;
}
.wrap{max-width:860px;margin:0 auto;padding:0 22px}
h1{font-size:clamp(1.65rem,4vw,2.3rem);line-height:1.25;margin:0.7em 0 0.35em;letter-spacing:-0.01em;font-weight:750}
h2{font-size:1.3rem;margin:2.6em 0 0.7em;letter-spacing:-0.01em;font-weight:700}
.lede{font-size:1.08rem;color:var(--muted);margin:0 0 2em;max-width:58ch}
a{color:var(--accent-deep);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{text-decoration-thickness:2px}

/* header */
.site-header{background:rgba(251,250,247,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:15px 22px}
.brand{font-weight:800;font-size:1.22rem;color:var(--ink);text-decoration:none;letter-spacing:-0.02em}
.brand::before{content:"";display:inline-block;width:11px;height:11px;border-radius:50%;background:var(--accent);margin-right:10px;vertical-align:baseline}
.site-nav a{margin-left:24px;color:var(--muted);text-decoration:none;font-weight:600;font-size:0.95rem}
.site-nav a:hover{color:var(--ink)}
.crumbs{font-size:0.83rem;color:var(--muted);margin:20px 0 0}
.crumbs a{color:var(--muted);text-decoration:none}
.hazard{display:none}

/* tool card */
.tool-card{background:var(--card);border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:var(--radius);padding:32px;margin:0 0 10px;box-shadow:0 1px 3px rgba(60,50,40,.05),0 8px 24px rgba(60,50,40,.05)}
.field{margin-bottom:20px}
.field label{display:block;font-weight:700;margin-bottom:8px;font-size:0.97rem}
.field .hint{font-weight:400;color:var(--muted);font-size:0.85rem;margin-top:7px;line-height:1.5}
.input-row{display:flex;align-items:stretch}
.input-prefix{
  display:flex;align-items:center;padding:0 15px;background:var(--soft);border:1px solid var(--line);
  border-right:0;border-radius:12px 0 0 12px;color:var(--muted);font-weight:700;
}
input[type=number],input[type=text],input[type=date],select{
  width:100%;font-size:1.06rem;padding:14px 16px;border:1px solid var(--line);border-radius:12px;
  background:var(--bg);color:var(--ink);font-family:inherit;transition:border-color .15s,box-shadow .15s;
}
.input-row input{border-radius:0 12px 12px 0}
input:focus,select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
input.invalid{border-color:#b35548;box-shadow:0 0 0 3px rgba(179,85,72,.14)}
.field-error{color:#a34a3e;font-size:0.85rem;margin-top:7px;display:none}
.field-error.show{display:block}
.check-row{display:flex;align-items:center;gap:11px;font-weight:600;cursor:pointer}
.check-row input{width:20px;height:20px;accent-color:var(--accent);cursor:pointer}

/* dynamic line items (invoice-style tools) */
.line-rows{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.line-row{display:grid;grid-template-columns:1fr 64px 96px 40px;gap:8px;align-items:center}
.line-row input{padding:12px 10px;font-size:0.98rem}
.btn-add-item{display:inline-block;padding:11px 20px;border:1.5px dashed var(--line);border-radius:12px;background:transparent;color:var(--accent-deep);font-weight:700;font-size:0.95rem;cursor:pointer;font-family:inherit}
html[data-hub="hub2"] .btn-add-item{color:var(--accent)}
.btn-add-item:hover{border-color:var(--accent)}
.btn-rm-item{width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--muted);font-size:1.3rem;line-height:1;cursor:pointer}
.btn-rm-item:hover{color:#b35548;border-color:#b35548}
@media(max-width:480px){.line-row{grid-template-columns:1fr 56px 84px 36px}}

/* result */
.result{background:color-mix(in srgb,var(--accent) 7%,var(--soft));border:1px solid var(--line);border-radius:14px;padding:26px;margin-top:24px}
.result-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.result-label{font-size:0.78rem;text-transform:uppercase;letter-spacing:0.09em;color:var(--muted);font-weight:700}
.result-headline{font-size:clamp(1.7rem,5vw,2.3rem);font-weight:800;letter-spacing:0.02em;text-transform:uppercase;color:var(--accent-deep);margin-top:4px}
.result-actions{display:flex;gap:8px;flex-shrink:0}
.btn-ghost{
  border:1px solid var(--line);background:var(--card);border-radius:10px;padding:9px 16px;font-size:0.9rem;
  font-weight:700;color:var(--muted);cursor:pointer;white-space:nowrap;transition:all .15s;
}
.btn-ghost:hover{color:var(--ink);border-color:var(--muted)}
.result-rows{margin:20px 0 0;padding:0;display:grid;gap:0}
.result-rows>div{display:flex;justify-content:space-between;gap:18px;padding:11px 0;border-top:1px solid var(--line)}
.result-rows dt{color:var(--muted);text-transform:capitalize}
.result-rows dd{margin:0;font-weight:700;text-align:right}
.result-note{font-size:0.9rem;color:var(--muted);margin:16px 0 0;line-height:1.6}
.privacy-note{font-size:0.82rem;color:var(--muted);margin:18px 0 0;text-align:center}

/* explainer + faq */
.explainer p,.explainer li{max-width:66ch}
.explainer code{background:var(--soft);border:1px solid var(--line);border-radius:7px;padding:2px 8px;font-size:0.9em}
.explainer .data-table{width:100%;max-width:640px;border-collapse:collapse;margin:18px 0;font-size:0.92rem}
.explainer .data-table th,.explainer .data-table td{padding:9px 12px;border-bottom:1px solid var(--line);text-align:left}
.explainer .data-table th{font-size:0.78rem;text-transform:uppercase;letter-spacing:0.06em;color:var(--muted)}
.explainer .data-table td:last-child,.explainer .data-table th:last-child{text-align:right;font-weight:700}
.explainer .data-table tr:hover td{background:var(--soft)}
.explainer .fine{font-size:0.82rem;color:var(--muted)}
.faqs details{border:1px solid var(--line);border-radius:12px;margin-bottom:10px;background:var(--card)}
.faqs summary{padding:16px 20px;font-weight:700;cursor:pointer;list-style:none}
.faqs summary::-webkit-details-marker{display:none}
.faqs summary::after{content:"+";float:right;color:var(--accent);font-size:1.25rem;line-height:1.2;font-weight:400}
.faqs details[open] summary::after{content:"–"}
.faqs details p{padding:0 20px 18px;margin:0;color:var(--muted);line-height:1.65}

/* homepage category sections */
.cat-section{margin-bottom:8px}
.cat-section h2{display:flex;align-items:center;gap:12px}
.cat-section h2::after{content:"";flex:1;height:1px;background:var(--line)}
.tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.tool-grid a{
  display:block;border:1px solid var(--line);border-radius:12px;padding:17px 19px;text-decoration:none;
  color:var(--ink);font-weight:700;background:var(--card);transition:border-color .15s,box-shadow .15s,transform .15s;
}
.tool-grid a span{display:block;font-weight:400;color:var(--muted);font-size:0.86rem;margin-top:4px;line-height:1.5}
.tool-grid a:hover{border-color:var(--accent);box-shadow:0 4px 14px rgba(60,50,40,.07);transform:translateY(-1px)}

/* hero (hub index) */
.hero{padding:52px 0 12px;text-align:center}
.hero h1{margin-bottom:0.25em}
.hero .lede{margin:0 auto 2em}
.search-box{max-width:520px;margin:0 auto 10px}
.search-box input{border-radius:999px;padding:16px 24px;font-size:1.05rem;background:var(--card);box-shadow:0 2px 14px rgba(60,50,40,.07)}

/* footer */
.site-footer{border-top:1px solid var(--line);margin-top:64px;background:var(--soft)}
.footer-inner{display:flex;justify-content:space-between;gap:30px;padding:38px 22px;flex-wrap:wrap}
.footer-inner p{color:var(--muted);font-size:0.92rem;max-width:44ch;margin:10px 0 0;line-height:1.65}
.footer-nav{display:flex;gap:22px;flex-wrap:wrap;align-content:flex-start}
.footer-nav a{color:var(--muted);text-decoration:none;font-size:0.92rem;font-weight:600}
.footer-nav a:hover{color:var(--ink)}
.footer-base{padding:0 22px 30px;color:var(--muted);font-size:0.82rem}

/* static legal pages */
.legal h1{margin-top:0.8em}
.legal p,.legal li{max-width:66ch;color:#33373c}

@media (max-width:560px){
  .tool-card{padding:24px 18px}
  .result-head{flex-direction:column}
  body{font-size:16px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---- per-hub accents (light) ---- */
html[data-hub="hub1"]{--accent:#00a651;--accent-deep:#007a3d}
html[data-hub="hub2"]{--accent:#a86a3c;--accent-deep:#7d4e28}
html[data-hub=""]{--accent:#3e8266;--accent-deep:#2c5f4a}

/* ---- dark mode: follows the visitor's system setting, zero UI to maintain ---- */
@media (prefers-color-scheme:dark){
  :root{
    --ink:#e9e6e0;
    --muted:#a6abb3;
    --line:#2c3136;
    --bg:#16181b;
    --soft:#1d2125;
    --card:#1c2024;
  }
  html[data-hub="hub1"]{--accent:#4ade80;--accent-deep:#9ff0bd}
  html[data-hub="hub2"]{--accent:#cf9260;--accent-deep:#e5b183}
  html[data-hub=""]{--accent:#7fb894;--accent-deep:#a9d9bc}
  body{background:var(--bg)}
  .site-header{background:rgba(22,24,27,.92)}
  .tool-card,.faqs details,.tool-grid a,.search-box input{box-shadow:none}
  .tool-card{box-shadow:0 1px 2px rgba(0,0,0,.3)}
  input[type=number],input[type=text],input[type=date],select{background:#141619}
  .input-prefix{background:#141619}
  .explainer code{background:#141619}
  .legal p,.legal li{color:#c9cdc9}
  ::selection{background:color-mix(in srgb,var(--accent) 35%,transparent)}
}

/* ================= HUB 2 — JOBSITE THEME (safety yellow on charcoal) ================= */
html[data-hub="hub2"]{
  --accent:#ffd100;
  --accent-deep:#ffd100;
  --ink:#f4f1e8;
  --muted:#b3ac9c;
  --line:#3a352b;
  --bg:#141311;
  --soft:#1d1b17;
  --card:#1a1815;
  --display:"Barlow Condensed","Arial Narrow","Helvetica Neue",sans-serif;
}
html[data-hub="hub2"] body{
  background-color:#0c0b0a;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px),
    linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);
  background-size:220px 220px,220px 220px,44px 44px,44px 44px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
html[data-hub="hub2"] .hazard{
  display:block;height:10px;
  background:repeating-linear-gradient(-45deg,var(--accent) 0 18px,#0e0d0b 18px 36px);
}
html[data-hub="hub2"] .site-header{background:#0e0d0b;border-bottom:0}
html[data-hub="hub2"] .brand{
  color:var(--accent);font-family:var(--display);font-weight:700;
  text-transform:uppercase;letter-spacing:.05em;font-size:1.55rem;
}
html[data-hub="hub2"] .brand::before{
  background:var(--accent);border-radius:2px;transform:rotate(45deg);
  width:12px;height:12px;
}
html[data-hub="hub2"] .site-nav a{
  color:var(--muted);text-transform:uppercase;letter-spacing:.07em;
  font-size:.83rem;font-weight:700;
}
html[data-hub="hub2"] .site-nav a:hover{color:var(--accent)}
html[data-hub="hub2"] a{color:var(--accent)}
html[data-hub="hub2"] h1{
  font-family:var(--display);font-weight:700;text-transform:uppercase;
  letter-spacing:.015em;color:#fff;
}
html[data-hub="hub2"] h1::after{
  content:"";display:block;width:76px;height:6px;
  background:var(--accent);margin-top:14px;
}
html[data-hub="hub2"] h2{
  font-family:var(--display);font-weight:700;text-transform:uppercase;
  letter-spacing:.04em;color:#fff;
}
html[data-hub="hub2"] .crumbs{color:var(--muted)}
html[data-hub="hub2"] .crumbs a{color:var(--muted)}
html[data-hub="hub2"] .tool-card{
  border:2px solid var(--accent);border-top:2px solid var(--accent);
  background:var(--card);box-shadow:0 4px 22px rgba(0,0,0,.45);
}
html[data-hub="hub2"] .field label{
  color:var(--accent);font-family:var(--display);font-weight:700;
  text-transform:uppercase;letter-spacing:.05em;font-size:1.08rem;
}
html[data-hub="hub2"] .field .hint{color:var(--muted)}
html[data-hub="hub2"] input[type=number],
html[data-hub="hub2"] input[type=text],
html[data-hub="hub2"] select{
  background:#0f0e0c;border-color:var(--line);color:var(--ink);
}
html[data-hub="hub2"] .input-prefix{background:#0f0e0c;border-color:var(--line);color:var(--accent)}
html[data-hub="hub2"] input:focus,
html[data-hub="hub2"] select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(255,209,0,.22);
  outline:none;
}
html[data-hub="hub2"] .check-row input{accent-color:var(--accent)}
html[data-hub="hub2"] .result{border:2px solid var(--accent);background:#14120e}
html[data-hub="hub2"] .result-label{color:var(--muted)}
html[data-hub="hub2"] .result-headline{
  font-family:var(--display);font-weight:700;text-transform:uppercase;
  color:var(--accent);font-size:clamp(2.3rem,7vw,3.4rem);letter-spacing:.01em;
}
html[data-hub="hub2"] .result-rows dt{color:var(--muted)}
html[data-hub="hub2"] .result-rows dd{color:var(--ink)}
html[data-hub="hub2"] .btn-ghost{
  border:2px solid var(--accent);color:var(--accent);background:transparent;
  font-family:var(--display);font-weight:700;text-transform:uppercase;
  letter-spacing:.06em;border-radius:8px;
}
html[data-hub="hub2"] .btn-ghost:hover{background:var(--accent);color:#141414;border-color:var(--accent)}
html[data-hub="hub2"] .privacy-note{color:var(--muted)}
html[data-hub="hub2"] .explainer p,
html[data-hub="hub2"] .explainer li{color:#d8d2c2}
html[data-hub="hub2"] .explainer code{background:#0f0e0c;border-color:var(--line);color:var(--accent)}
html[data-hub="hub2"] .explainer strong{color:#fff}
html[data-hub="hub2"] .faqs details{background:var(--card);border-color:var(--line)}
html[data-hub="hub2"] .faqs summary{
  color:#fff;font-family:var(--display);font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;font-size:1.12rem;
}
html[data-hub="hub2"] .faqs details p{color:var(--muted)}
html[data-hub="hub2"] .tool-grid a{
  border:2px solid var(--line);background:var(--card);color:var(--accent);
  font-family:var(--display);font-weight:700;text-transform:uppercase;
  letter-spacing:.04em;font-size:1.15rem;
}
html[data-hub="hub2"] .tool-grid a span{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  text-transform:none;letter-spacing:0;color:var(--muted);font-weight:400;
}
html[data-hub="hub2"] .tool-grid a{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
html[data-hub="hub2"] .tool-grid a:hover{border-color:var(--accent);transform:translateY(-4px);box-shadow:0 10px 30px rgba(0,0,0,.55),0 0 24px rgba(255,209,0,.22)}
html[data-hub="hub2"] .tool-grid a .tool-icon{transition:transform .18s ease,box-shadow .18s ease}
html[data-hub="hub2"] .tool-grid a:hover span.tool-icon{transform:scale(1.08) rotate(-4deg);box-shadow:0 0 20px rgba(255,209,0,.35)}
html[data-hub="hub2"] .hero{padding:60px 0 14px}
html[data-hub="hub2"] .hero h1{font-size:clamp(2.6rem,8vw,4.2rem);text-align:center}
html[data-hub="hub2"] .hero h1::after{margin:16px auto 0}
html[data-hub="hub2"] .hero .lede{text-align:center;color:var(--muted)}
html[data-hub="hub2"] .search-box input{
  border:2px solid var(--accent);background:#0f0e0c;color:var(--ink);
  box-shadow:0 4px 18px rgba(0,0,0,.4);
}
html[data-hub="hub2"] .site-footer{background:#0e0d0b;border-top:0;margin-top:72px}
html[data-hub="hub2"] .site-footer::before{
  content:"";display:block;height:10px;
  background:repeating-linear-gradient(-45deg,var(--accent) 0 18px,#0e0d0b 18px 36px);
}
html[data-hub="hub2"] .footer-inner strong{
  color:var(--accent);font-family:var(--display);text-transform:uppercase;
  letter-spacing:.05em;font-size:1.2rem;
}
html[data-hub="hub2"] ::selection{background:var(--accent);color:#141414}
html[data-hub="hub2"] .diagram{color:var(--accent);text-align:center;margin:4px 0 10px}
html[data-hub="hub2"] .diagram svg{max-width:100%;height:auto}
html[data-hub="hub2"] .legal p,html[data-hub="hub2"] .legal li{color:#c9c3b4}
html[data-hub="hub2"] .legal strong{color:#fff}

/* ============ HUB 2 — BOLD PASS (match the jobsite mockups) ============ */
html[data-hub="hub2"] .hazard{height:14px}
html[data-hub="hub2"] .header-inner{padding-top:18px;padding-bottom:18px}
html[data-hub="hub2"] .brand{font-size:1.9rem}
html[data-hub="hub2"] h1{font-size:clamp(2.8rem,9vw,4.6rem);line-height:.95}
html[data-hub="hub2"] h1::after{width:110px;height:8px;margin-top:16px}
html[data-hub="hub2"] .lede{
  color:var(--accent);font-family:var(--display);font-weight:700;
  text-transform:uppercase;letter-spacing:.09em;font-size:1.02rem;
}
html[data-hub="hub2"] .tool-card{border-width:3px}
html[data-hub="hub2"] .field label{font-size:1.25rem}
html[data-hub="hub2"] input[type=number],
html[data-hub="hub2"] input[type=text],
html[data-hub="hub2"] select{border-width:2px;font-size:1.05rem;padding:13px 14px}
html[data-hub="hub2"] .result{border-width:3px}
html[data-hub="hub2"] .result-label{
  color:var(--accent);font-family:var(--display);font-weight:700;
  text-transform:uppercase;letter-spacing:.1em;font-size:1rem;
}
html[data-hub="hub2"] .result-headline{font-size:clamp(3rem,11vw,4.8rem);line-height:1}
html[data-hub="hub2"] .btn-ghost{
  background:var(--accent);border-color:var(--accent);color:#141414;
  font-size:1.05rem;padding:13px 22px;
}
html[data-hub="hub2"] .btn-ghost:hover{background:#ffe14d;border-color:#ffe14d;color:#141414}
html[data-hub="hub2"] .faqs summary{list-style:none;position:relative;padding-right:52px}
html[data-hub="hub2"] .faqs summary::-webkit-details-marker{display:none}
html[data-hub="hub2"] .faqs summary::after{
  content:"+";position:absolute;right:16px;top:50%;transform:translateY(-50%);
  width:30px;height:30px;border-radius:50%;background:var(--accent);color:#141414;
  font-family:var(--display);font-weight:700;font-size:1.35rem;line-height:30px;text-align:center;
}
html[data-hub="hub2"] .faqs details[open] summary::after{content:"–"}
html[data-hub="hub2"] .tool-grid a{border-width:3px}
html[data-hub="hub2"] .hero{padding:72px 0 18px}
html[data-hub="hub2"] .hero h1{font-size:clamp(3rem,10vw,5.2rem)}
html[data-hub="hub2"] .search-box input{border-width:3px;font-size:1.05rem;padding:16px 18px}
/* Hub 2 tool-card line icons */
html[data-hub="hub2"] .tool-grid a span.tool-icon{display:flex;align-items:center;justify-content:center;width:88px;height:88px;border:3px solid var(--accent);border-radius:50%;color:var(--accent);margin:0 auto 14px}
html[data-hub="hub2"] .tool-grid a span.tool-icon svg{width:52px;height:52px;display:block}
html[data-hub="hub2"] .tool-grid a{text-align:center}

/* ============ HUB 2 — TOOL PAGE LAYOUT (B3: diagram + inputs side by side, banner result) ============ */
html[data-hub="hub2"] .tool-top{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:30px;align-items:start;margin:26px 0 8px}
html[data-hub="hub2"] .tool-top .diagram{margin:0;align-self:center;grid-column:1;grid-row:1}
html[data-hub="hub2"] .tool-top .tool-card{grid-column:2;grid-row:1;margin:0}
/* result: dark card, only the headline block is yellow */
html[data-hub="hub2"] .tool-top .result{grid-column:1/-1;background:var(--card);border:3px solid var(--accent);border-radius:16px;padding:0;margin-top:4px;overflow:hidden;box-shadow:0 6px 26px rgba(0,0,0,.4)}
html[data-hub="hub2"] .tool-top .result-head{display:block;background:var(--accent);padding:20px 26px 16px;text-align:center}
html[data-hub="hub2"] .tool-top .result-label{display:none}
html[data-hub="hub2"] .tool-top .result-subline{color:#141414;font-family:var(--display);font-weight:700;text-transform:uppercase;letter-spacing:.05em;font-size:1.02rem;margin-top:10px;opacity:.82}
html[data-hub="hub2"] .tool-top .result-headline{color:#141414;text-wrap:balance;margin-left:auto;margin-right:auto;font-size:clamp(2rem,6vw,3rem);line-height:1.05}
html[data-hub="hub2"] .tool-top .result-actions{display:flex;justify-content:center;margin-top:16px}
html[data-hub="hub2"] .tool-top .result .btn-ghost{background:#141414;border-color:#141414;color:var(--accent)}
html[data-hub="hub2"] .tool-top .result .btn-ghost:hover{background:#000;border-color:#000;color:#ffe14d}
html[data-hub="hub2"] .tool-top .result-rows{margin:0;padding:6px 28px 4px}
html[data-hub="hub2"] .tool-top .result-note{margin:0;padding:14px 28px 26px}
html[data-hub="hub2"] .tool-top .privacy-note{grid-column:1/-1;text-align:center;margin:6px 0 0}
/* CALCULATE button */
html[data-hub="hub2"] .btn-calc{display:block;width:100%;margin-top:22px;padding:16px;border:none;border-radius:10px;background:var(--accent);color:#141414;cursor:pointer;font-family:var(--display);font-weight:700;font-size:1.35rem;text-transform:uppercase;letter-spacing:.07em}
html[data-hub="hub2"] .btn-calc:hover{background:#ffe14d}
html[data-hub="hub2"] .btn-calc:active{transform:translateY(1px)}
/* related cards: smaller icons */
html[data-hub="hub2"] .related .tool-grid a span.tool-icon{width:60px;height:60px;border-width:2px;margin-bottom:10px}
html[data-hub="hub2"] .related .tool-grid a span.tool-icon svg{width:34px;height:34px}
/* portrait / narrow: stack everything, diagram stays visible on top */
@media (max-width:860px){
  html[data-hub="hub2"] .tool-top{grid-template-columns:1fr;gap:22px}
  html[data-hub="hub2"] .tool-top .diagram{grid-column:1;grid-row:1;max-width:420px;width:100%;margin:0 auto;display:block}
  html[data-hub="hub2"] .tool-top .tool-card{grid-column:1;grid-row:2}
  html[data-hub="hub2"] .tool-top .result{grid-column:1;grid-row:3}
  html[data-hub="hub2"] .tool-top .privacy-note{grid-column:1;grid-row:4}
}

/* ================= HUB 3 — LUMEN THEME (midnight celestial, always dark) ================= */
html[data-hub="hub3"]{
  --accent:#d4af7a;
  --accent-deep:#e8c98f;
  --ink:#ece9f7;
  --muted:#a79fd0;
  --line:#2e2c58;
  --bg:#14142b;
  --soft:#1d1d3a;
  --card:#1a1a33;
  --display:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --body:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --script:"Pinyon Script","Snell Roundhand",cursive;
  color-scheme:dark;
}
html[data-hub="hub3"] body{
  background-color:#14142b;
  /* Starfield: layered 1-1.5px radial-gradient dots, each layer on its own
     tile size so the stars never fall into a visible grid. All alphas stay
     low — the #14142b base (and AA contrast on it) is unchanged. */
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%,rgba(236,233,247,.55) 50%,transparent 51%),
    radial-gradient(1px 1px at 34% 8%,rgba(212,175,122,.5) 50%,transparent 51%),
    radial-gradient(1px 1px at 57% 22%,rgba(236,233,247,.4) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 79% 10%,rgba(184,169,217,.45) 50%,transparent 51%),
    radial-gradient(1px 1px at 92% 30%,rgba(236,233,247,.5) 50%,transparent 51%),
    radial-gradient(1px 1px at 18% 42%,rgba(212,175,122,.4) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 38%,rgba(236,233,247,.35) 50%,transparent 51%),
    radial-gradient(1px 1px at 66% 48%,rgba(236,233,247,.45) 50%,transparent 51%),
    radial-gradient(1px 1px at 88% 58%,rgba(212,175,122,.5) 50%,transparent 51%),
    radial-gradient(1px 1px at 6% 66%,rgba(184,169,217,.4) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 28% 74%,rgba(236,233,247,.4) 50%,transparent 51%),
    radial-gradient(1px 1px at 52% 82%,rgba(212,175,122,.45) 50%,transparent 51%),
    radial-gradient(1px 1px at 74% 88%,rgba(236,233,247,.5) 50%,transparent 51%),
    radial-gradient(1px 1px at 96% 92%,rgba(184,169,217,.35) 50%,transparent 51%),
    radial-gradient(1px 1px at 12% 18%,rgba(236,233,247,.5) 50%,transparent 51%),
    radial-gradient(1px 1px at 68% 34%,rgba(212,175,122,.55) 50%,transparent 51%),
    radial-gradient(1px 1px at 32% 62%,rgba(184,169,217,.45) 50%,transparent 51%),
    radial-gradient(1px 1px at 84% 74%,rgba(236,233,247,.4) 50%,transparent 51%),
    radial-gradient(1px 1px at 52% 88%,rgba(212,175,122,.4) 50%,transparent 51%);
  background-size:240px 240px,310px 310px,275px 275px,360px 360px,225px 225px,330px 330px,290px 290px,250px 250px,380px 380px,265px 265px,345px 345px,235px 235px,305px 305px,420px 420px,260px 260px,340px 340px,300px 300px,380px 380px,320px 320px;
  font-family:var(--body);
  color:var(--ink);
}
/* Tool-page header band: celestial banner art, page title overlaid.
   The image is set inline per page (build.mjs); this is the frame. */
html[data-hub="hub3"] .tool-banner{
  display:flex;align-items:center;justify-content:center;text-align:center;
  min-height:168px;margin:18px 0 4px;padding:34px 22px;border-radius:18px;
  background-size:cover;background-position:center 38%;background-color:#1d1d3a;
  border:1px solid var(--line);
  box-shadow:inset 0 0 90px rgba(10,10,26,.55),0 12px 34px rgba(0,0,0,.35);
}
html[data-hub="hub3"] .tool-banner h1{
  margin:0;font-size:clamp(2rem,5.6vw,3.1rem);
  text-shadow:0 2px 20px rgba(0,0,0,.85),0 0 42px rgba(0,0,0,.6);
}
@media (max-width:640px){
  html[data-hub="hub3"] .tool-banner{min-height:128px;padding:26px 16px}
}
html[data-hub="hub3"] a{color:var(--accent-deep)}
html[data-hub="hub3"] h1,
html[data-hub="hub3"] h2,
html[data-hub="hub3"] .brand,
html[data-hub="hub3"] .result-headline,
html[data-hub="hub3"] .faqs summary{
  font-family:var(--display);
}
html[data-hub="hub3"] h1{color:var(--accent-deep);font-weight:600;letter-spacing:.01em}
html[data-hub="hub3"] h2{color:var(--accent-deep);font-weight:600;letter-spacing:.015em}
html[data-hub="hub3"] .lede{color:var(--muted)}
html[data-hub="hub3"] .site-header{background:rgba(20,20,43,.92);border-bottom:1px solid var(--line)}
html[data-hub="hub3"] .brand{color:var(--accent-deep);font-weight:600;letter-spacing:.18em;text-transform:uppercase;font-size:1.3rem}
html[data-hub="hub3"] .brand::before{background:none;margin:0;width:0;height:0}
html[data-hub="hub3"] .site-nav a{color:var(--muted);font-weight:600}
html[data-hub="hub3"] .site-nav a:hover{color:var(--accent-deep)}
html[data-hub="hub3"] .crumbs,html[data-hub="hub3"] .crumbs a{color:var(--muted)}
html[data-hub="hub3"] .hazard{display:none}
html[data-hub="hub3"] .tool-card{
  background:var(--card);border:1px solid var(--line);border-top:2px solid var(--accent);
  box-shadow:0 10px 34px rgba(0,0,0,.45);
}
html[data-hub="hub3"] .field label{color:var(--accent-deep)}
html[data-hub="hub3"] .field .hint{color:var(--muted)}
html[data-hub="hub3"] input[type=number],
html[data-hub="hub3"] input[type=text],
html[data-hub="hub3"] input[type=date],
html[data-hub="hub3"] input[type=email],
html[data-hub="hub3"] select{
  background:#12122b;border:1px solid var(--line);color:var(--ink);
}
html[data-hub="hub3"] input[type=date]::-webkit-calendar-picker-indicator{filter:invert(1);opacity:.7}
html[data-hub="hub3"] .input-prefix{background:#12122b;border-color:var(--line);color:var(--accent-deep)}
html[data-hub="hub3"] input:focus,html[data-hub="hub3"] select:focus{
  border-color:var(--accent);box-shadow:0 0 0 3px rgba(212,175,122,.22);outline:none;
}
html[data-hub="hub3"] .check-row input{accent-color:var(--accent)}
html[data-hub="hub3"] .result{
  background:linear-gradient(160deg,rgba(212,175,122,.1),rgba(29,29,58,.4));
  border:1px solid var(--accent);
}
html[data-hub="hub3"] .result-label{color:var(--muted)}
html[data-hub="hub3"] .result-headline{color:var(--accent-deep);font-weight:600;letter-spacing:.09em;line-height:1.2;font-size:clamp(2.1rem,6vw,3rem)}
html[data-hub="hub3"] .result-rows dt{color:var(--muted)}
html[data-hub="hub3"] .result-rows dd{color:var(--ink)}
html[data-hub="hub3"] .result-note{color:var(--muted)}
html[data-hub="hub3"] .btn-ghost{
  border:1px solid var(--accent);color:var(--accent-deep);background:transparent;border-radius:999px;
}
html[data-hub="hub3"] .btn-ghost:hover{border-color:var(--accent-deep);color:var(--ink)}
html[data-hub="hub3"] .privacy-note{color:var(--muted)}
html[data-hub="hub3"] .explainer p,html[data-hub="hub3"] .explainer li{color:#dcd8ef}
html[data-hub="hub3"] .explainer code{background:#12122b;border-color:var(--line);color:var(--accent-deep)}
html[data-hub="hub3"] .explainer strong{color:var(--ink)}
html[data-hub="hub3"] .faqs details{background:var(--card);border-color:var(--line)}
html[data-hub="hub3"] .faqs summary{color:var(--accent-deep);font-size:1.18rem;font-weight:600}
html[data-hub="hub3"] .faqs summary::after{color:var(--accent)}
html[data-hub="hub3"] .faqs details p{color:var(--muted)}
/* Celestial FAQ: star markers instead of +/- toggles; an open answer glows
   like starlight. Hub3-only — hubs 1 & 2 keep the classic toggles. */
html[data-hub="hub3"] .faqs details{
  background:linear-gradient(160deg,rgba(29,29,58,.78),rgba(18,18,43,.78));
  border:1px solid rgba(212,175,122,.30);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  overflow:hidden;
  transition:border-color .35s,box-shadow .35s;
}
html[data-hub="hub3"] .faqs summary{
  font-family:var(--display);
  padding-left:54px;
  position:relative;
}
html[data-hub="hub3"] .faqs summary::before{
  content:"\2726";
  position:absolute;left:20px;top:50%;
  transform:translateY(-50%);
  color:var(--accent);
  font-size:1.05rem;line-height:1;
  transition:transform .45s cubic-bezier(.2,.7,.3,1.4),text-shadow .45s;
}
html[data-hub="hub3"] .faqs summary::after{display:none}
html[data-hub="hub3"] .faqs details[open]{
  border-color:rgba(212,175,122,.60);
  box-shadow:0 0 34px rgba(212,175,122,.13),0 10px 30px rgba(0,0,0,.35);
}
html[data-hub="hub3"] .faqs details[open] summary::before{
  transform:translateY(-50%) rotate(144deg);
  text-shadow:0 0 14px rgba(232,201,143,.9);
}
@media (prefers-reduced-motion:reduce){
  html[data-hub="hub3"] .faqs details,
  html[data-hub="hub3"] .faqs summary::before{transition:none}
}
/* Artwork picker: thumbnail strip under the affirmation card. */
html[data-hub="hub3"] .bg-picker{
  display:flex;gap:10px;align-items:center;justify-content:center;
  margin:20px 0 6px;flex-wrap:wrap;
}
html[data-hub="hub3"] .bg-picker-label{
  font-family:var(--script);color:var(--accent);font-size:1.45rem;line-height:1;
  margin-right:2px;
}
html[data-hub="hub3"] .bg-thumb{
  width:46px;height:74px;border-radius:10px;padding:0;cursor:pointer;
  border:2px solid rgba(212,175,122,.25);
  background-size:cover;background-position:center;background-color:#12122b;
  transition:transform .25s,border-color .25s,box-shadow .25s;
}
html[data-hub="hub3"] .bg-thumb:hover{transform:translateY(-3px);border-color:rgba(212,175,122,.6)}
html[data-hub="hub3"] .bg-thumb[aria-pressed="true"]{
  border-color:var(--accent);
  box-shadow:0 0 18px rgba(212,175,122,.55);
  transform:translateY(-3px);
}
@media (prefers-reduced-motion:reduce){
  html[data-hub="hub3"] .bg-thumb{transition:none}
}
html[data-hub="hub3"] .tool-grid a{
  background:var(--card);border:1px solid var(--line);color:var(--ink);
  position:relative;overflow:hidden;
  transition:transform .28s,box-shadow .28s,border-color .28s;
}
/* A hairline of starlight appears along the card's top edge on hover. */
html[data-hub="hub3"] .tool-grid a::before{
  content:"";position:absolute;top:0;left:12%;right:12%;height:2px;border-radius:2px;
  background:linear-gradient(90deg,transparent,var(--accent),transparent);
  box-shadow:0 0 12px rgba(212,175,122,.8);
  opacity:0;transition:opacity .35s;
}
html[data-hub="hub3"] .tool-grid a:hover{
  border-color:var(--accent);transform:translateY(-3px);
  box-shadow:0 14px 34px rgba(212,175,122,.2),0 8px 26px rgba(0,0,0,.42);
}
html[data-hub="hub3"] .tool-grid a:hover::before{opacity:1}
@media (prefers-reduced-motion:reduce){
  html[data-hub="hub3"] .tool-grid a{transition:none}
  html[data-hub="hub3"] .tool-grid a::before{transition:none}
}
html[data-hub="hub3"] .tool-grid a span{color:var(--muted)}
html[data-hub="hub3"] .hero{padding:64px 0 18px;text-align:center}
html[data-hub="hub3"] .hero h1{font-size:clamp(2.4rem,7vw,3.6rem)}
html[data-hub="hub3"] .hero .lede{color:var(--muted)}
html[data-hub="hub3"] .search-box input{background:#12122b;border:1px solid var(--line);color:var(--ink)}
html[data-hub="hub3"] .site-footer{background:#0f0f24;border-top:1px solid var(--line);margin-top:72px}
html[data-hub="hub3"] .footer-inner strong{color:var(--accent-deep);font-family:var(--display);letter-spacing:.12em;text-transform:uppercase}
html[data-hub="hub3"] .footer-nav a{color:var(--muted)}
html[data-hub="hub3"] .footer-nav a:hover{color:var(--accent-deep)}
html[data-hub="hub3"] ::selection{background:var(--accent);color:#14142b}
html[data-hub="hub3"] .diagram{color:var(--accent);text-align:center;margin:4px 0 10px}
html[data-hub="hub3"] .diagram svg{max-width:100%;height:auto}
html[data-hub="hub3"] .legal p,html[data-hub="hub3"] .legal li{color:#dcd8ef}
html[data-hub="hub3"] .legal strong{color:var(--ink)}

/* ---- Lumen custom classes (tool pages + hub3 homepage) ---- */
html[data-hub="hub3"] .btn-lumen{
  display:inline-block;border:none;cursor:pointer;font-family:var(--body);
  font-weight:600;font-size:1rem;color:#14142b;border-radius:999px;
  padding:14px 30px;background:linear-gradient(135deg,#e8c98f,#d4af7a);
  text-decoration:none;position:relative;overflow:hidden;
  transition:transform .25s,box-shadow .25s,filter .25s;
}
/* Starlight sweep: a diagonal streak of light crosses the button on hover. */
html[data-hub="hub3"] .btn-lumen::after{
  content:"";position:absolute;top:0;bottom:0;left:0;width:45%;pointer-events:none;
  background:linear-gradient(105deg,transparent,rgba(255,255,255,.55),transparent);
  transform:translateX(-170%) skewX(-18deg);
  transition:transform .65s ease;
}
html[data-hub="hub3"] .btn-lumen:hover{
  filter:brightness(1.06);transform:translateY(-2px);
  box-shadow:0 0 44px rgba(212,175,122,.6),0 12px 30px rgba(0,0,0,.5);
}
html[data-hub="hub3"] .btn-lumen:hover::after{transform:translateX(330%) skewX(-18deg)}
html[data-hub="hub3"] .btn-lumen:active{transform:translateY(0)}
html[data-hub="hub3"] .btn-lumen-ghost{
  display:inline-block;cursor:pointer;font-family:var(--body);font-weight:600;
  font-size:1rem;color:var(--accent-deep);background:transparent;
  border:1px solid var(--muted);border-radius:999px;padding:13px 28px;text-decoration:none;
  position:relative;isolation:isolate;
  transition:transform .25s,color .25s,border-color .25s,box-shadow .25s;
}
/* Moonrise fill: a soft gold wash rises behind the label on hover. */
html[data-hub="hub3"] .btn-lumen-ghost::before{
  content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;
  background:linear-gradient(180deg,rgba(212,175,122,.22),rgba(212,175,122,.07));
  opacity:0;transition:opacity .3s;
}
html[data-hub="hub3"] .btn-lumen-ghost:hover{
  border-color:var(--accent);color:var(--accent);transform:translateY(-2px);
  box-shadow:0 0 26px rgba(212,175,122,.3),0 8px 22px rgba(0,0,0,.4);
}
html[data-hub="hub3"] .btn-lumen-ghost:hover::before{opacity:1}
html[data-hub="hub3"] .btn-lumen-ghost:active{transform:translateY(0)}
@media (prefers-reduced-motion:reduce){
  html[data-hub="hub3"] .btn-lumen::after{transition:none}
  html[data-hub="hub3"] .btn-lumen,
  html[data-hub="hub3"] .btn-lumen-ghost{transition:none}
}
.capture-band{
  margin:56px 0 0;padding:52px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,rgba(212,175,122,.08),transparent);
  text-align:center;
}
.capture-inner{display:flex;flex-direction:column;align-items:center;gap:10px}
.capture-inner h2{margin:0}
.capture-inner>p{color:var(--muted);max-width:52ch;margin:0 0 12px}
.capture-form{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;width:100%;max-width:520px}
.capture-form input[type=email]{flex:1;min-width:220px}
.capture-msg{color:var(--muted);font-size:.95rem;min-height:1.6em;margin:6px 0 0}
.capture-inner small{color:var(--muted);font-size:.8rem}
.lumen-stage{display:flex;flex-direction:column;align-items:center;gap:16px;margin:30px auto;text-align:center;max-width:520px}
.affirm-layout{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:44px;align-items:center;margin:8px 0}
.affirm-layout .affirm-card{margin:0 auto}
.print-layout{display:grid;grid-template-columns:minmax(0,6fr) minmax(0,5fr);gap:44px;align-items:center;margin:8px 0}
.print-layout img{width:100%;height:auto;display:block;border-radius:18px;border:1px solid var(--line)}
@media(max-width:820px){.affirm-layout,.print-layout{grid-template-columns:1fr}}
.affirm-card{
  width:100%;max-width:420px;aspect-ratio:4/5;background-size:cover;background-position:center;
  background-color:var(--card);border:1px solid var(--accent);border-radius:18px;
  display:flex;align-items:center;justify-content:center;padding:40px 34px;
  box-shadow:0 14px 44px rgba(0,0,0,.5);
}
.affirm-card p{
  font-family:var(--display);font-size:clamp(1.55rem,4.4vw,2rem);line-height:1.45;
  color:#ece9f7;margin:0;text-shadow:0 2px 14px rgba(0,0,0,.65);
}
/* Readability scrim: keeps affirmation text legible over bright artworks. */
html[data-hub="hub3"] .affirm-card{position:relative;overflow:hidden}
html[data-hub="hub3"] .affirm-card::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(ellipse 78% 58% at 50% 50%,
    rgba(12,12,30,.64),rgba(12,12,30,.30) 58%,rgba(12,12,30,0) 80%);
}
html[data-hub="hub3"] .affirm-card p{
  position:relative;z-index:1;
  text-shadow:0 2px 20px rgba(0,0,0,.9),0 0 36px rgba(0,0,0,.65);
}
.streak-line{color:var(--muted);font-size:.95rem;letter-spacing:.04em}
.streak-line b{color:var(--accent-deep)}
.stat-strip{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  padding:28px 0;margin:44px 0;text-align:center;
}
.stat-strip b{display:block;font-family:var(--display);font-size:1.9rem;font-weight:600;color:var(--accent-deep)}
.stat-strip span{color:var(--muted);font-size:.85rem;letter-spacing:.06em;text-transform:uppercase}
.lumen-hero{
  text-align:center;background-size:cover;background-position:center;
  padding:96px 22px;margin:0 auto;border-radius:0;
  display:flex;flex-direction:column;align-items:center;gap:16px;
  background-color:#14142b;max-width:none;
}
.lumen-hero .kicker{color:var(--accent-deep);font-weight:600;letter-spacing:.24em;font-size:.85rem;text-transform:uppercase}
.lumen-hero h1{font-size:clamp(2.4rem,7vw,4rem);margin:0;text-shadow:0 2px 18px rgba(0,0,0,.7)}
.lumen-hero p{color:#dcd8ef;max-width:56ch;margin:0;text-shadow:0 1px 10px rgba(0,0,0,.6)}
.lumen-hero .cta-row{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:8px}
.moon-divider{
  display:flex;align-items:center;justify-content:center;gap:16px;
  color:var(--accent);font-size:1.1rem;margin:44px auto;
}
.moon-divider svg{display:block;height:20px;width:132px;flex:0 0 auto}
.moon-divider::before,.moon-divider::after{
  content:"";flex:0 0 80px;height:1px;
  background:linear-gradient(90deg,transparent,var(--accent));
}
.moon-divider::after{background:linear-gradient(90deg,var(--accent),transparent)}
.pdf-actions{display:flex;flex-direction:column;align-items:center;gap:12px;margin:26px auto;text-align:center}
.pdf-actions p{color:var(--muted);font-size:.92rem;margin:0;max-width:56ch}
@media (max-width:640px){
  .stat-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lumen-hero{padding:64px 18px}
  .moon-divider::before,.moon-divider::after{flex-basis:48px}
}

/* ================= HUB 3 — atmosphere pass: dreamier ================= */
/* Full-bleed hero: home.mjs renders it as a direct child of <body>, so it
   spans the viewport edge-to-edge with no side gutters. */
html[data-hub="hub3"] .lumen-hero{
  min-height:82vh;
  justify-content:center;
  padding:110px 22px 150px;
  position:relative;
  overflow:hidden;
}
/* Nebula washes drifting over the hero art (the art URL stays inline per
   page, so the washes live on an overlay instead of background-image). */
html[data-hub="hub3"] .lumen-hero::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(920px 540px at 12% 16%,rgba(184,169,217,.20),transparent 62%),
    radial-gradient(1020px 640px at 88% 82%,rgba(150,130,205,.16),transparent 62%),
    radial-gradient(760px 460px at 62% 6%,rgba(212,175,122,.10),transparent 62%);
}
html[data-hub="hub3"] .lumen-hero > *{position:relative;z-index:1}
/* Dreamy fade: the hero melts into the page base at its foot. */
html[data-hub="hub3"] .lumen-hero::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:190px;pointer-events:none;
  background:linear-gradient(180deg,transparent,#14142b);
}
@media (max-width:640px){
  html[data-hub="hub3"] .lumen-hero{min-height:74vh;padding:88px 18px 120px}
}

/* Gold glow on headlines. The tool banner keeps its own darker legibility
   shadow (its rule is more specific and wins there). */
html[data-hub="hub3"] h1,
html[data-hub="hub3"] h2,
html[data-hub="hub3"] .result-headline{
  text-shadow:0 0 26px rgba(232,201,143,.32);
}
/* Gentle outer glow on the primary button. */
html[data-hub="hub3"] .btn-lumen{
  box-shadow:0 0 28px rgba(212,175,122,.35),0 8px 22px rgba(0,0,0,.45);
}

/* Twinkle: two sparse star layers that breathe slowly, staggered.
   body::before/::after are free in this theme (no other use). Content
   paints above via the body > * stacking rule below. */
html[data-hub="hub3"] body::before,
html[data-hub="hub3"] body::after{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:1;
}
html[data-hub="hub3"] body::before{
  background-image:
    radial-gradient(2px 2px at 12% 22%,rgba(236,233,247,.9) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 64%,rgba(212,175,122,.85) 50%,transparent 51%),
    radial-gradient(2px 2px at 66% 14%,rgba(236,233,247,.8) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 44%,rgba(184,169,217,.85) 50%,transparent 51%),
    radial-gradient(2px 2px at 52% 86%,rgba(236,233,247,.75) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 24% 46%,rgba(212,175,122,.8) 50%,transparent 51%);
  background-size:520px 520px,640px 640px,580px 580px,700px 700px,480px 480px,610px 610px;
  animation:lumen-twinkle 6.5s ease-in-out infinite;
}
html[data-hub="hub3"] body::after{
  background-image:
    radial-gradient(1.5px 1.5px at 22% 12%,rgba(236,233,247,.85) 50%,transparent 51%),
    radial-gradient(2px 2px at 58% 38%,rgba(212,175,122,.8) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 72%,rgba(184,169,217,.85) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 78%,rgba(236,233,247,.8) 50%,transparent 51%),
    radial-gradient(2px 2px at 40% 56%,rgba(236,233,247,.75) 50%,transparent 51%);
  background-size:560px 560px,660px 660px,600px 600px,540px 540px,620px 620px;
  animation:lumen-twinkle 4.6s ease-in-out -2.2s infinite;
}
@keyframes lumen-twinkle{0%,100%{opacity:.18}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){
  html[data-hub="hub3"] body::before,
  html[data-hub="hub3"] body::after{animation:none}
}
html[data-hub="hub3"] body > *{position:relative;z-index:2}

/* (Nebula wash behind the tool sections lives on body::before/::after and
   the constellation heroes — nothing on main, so the page reads as one
   continuous night sky with no band edges.) */

/* Frosted-glass tool panels: translucent indigo + blur + gold hairline.
   Effective panel fill stays very dark, so AA contrast is preserved
   (body text #ece9f7, gold #e8c98f, muted #a79fd0 all >= 6:1 on it). */
html[data-hub="hub3"] .tool-card{
  background:rgba(26,26,51,.62);
  -webkit-backdrop-filter:blur(16px) saturate(1.25);
  backdrop-filter:blur(16px) saturate(1.25);
  border:1px solid rgba(212,175,122,.38);
  box-shadow:0 18px 50px rgba(0,0,0,.5),0 0 44px rgba(212,175,122,.07);
}
html[data-hub="hub3"] .result{
  background:rgba(29,29,58,.6);
  -webkit-backdrop-filter:blur(14px) saturate(1.2);
  backdrop-filter:blur(14px) saturate(1.2);
  border:1px solid var(--accent);
  box-shadow:0 14px 40px rgba(0,0,0,.45),0 0 34px rgba(212,175,122,.10);
}

/* Soft-halo moon motif in the tool-page header band. */
html[data-hub="hub3"] .tool-banner{position:relative;overflow:hidden}
html[data-hub="hub3"] .tool-banner::before{
  content:"";position:absolute;top:-40%;right:5%;width:360px;height:360px;pointer-events:none;
  background:radial-gradient(circle,rgba(232,201,143,.30) 0%,rgba(232,201,143,.12) 34%,transparent 66%);
}
html[data-hub="hub3"] .tool-banner h1{position:relative;z-index:1}

/* ================= HUB 3 — living constellation rollout ================= */
/* The user-picked design direction: an interactive star chart where inputs
   light stars and draw constellation lines, wrapped in the dreamy
   nebula/twinkle/gold-glow atmosphere. All rules are hub3-scoped. */

/* Full-bleed sky section. The engine template places the hero where the
   <h1> was; the breakout keeps it edge-to-edge inside the constrained
   main column (100vw can exceed the viewport when a scrollbar is present,
   hence overflow-x:clip on the hub3 body). */
html[data-hub="hub3"] body{overflow-x:clip}
html[data-hub="hub3"] .const-sky,
html[data-hub="hub3"] .const-band{
  position:relative;overflow:hidden;
  width:100vw;max-width:100vw;margin-left:calc(50% - 50vw);
  margin-top:18px;text-align:center;
  background:
    radial-gradient(1000px 520px at 12% 0%,rgba(184,169,217,.05),transparent 62%),
    radial-gradient(900px 480px at 88% 30%,rgba(150,130,205,.04),transparent 62%),
    radial-gradient(700px 420px at 55% 0%,rgba(212,175,122,.035),transparent 60%);
  border-top:0;
  border-bottom:0;
}
html[data-hub="hub3"] .const-sky{padding:64px 22px 54px}
html[data-hub="hub3"] .const-band{padding:54px 22px 46px}
/* The constellation artwork: absolutely positioned over the top of the
   hero. pointer-events:none so it can never intercept taps on inputs. */
html[data-hub="hub3"] .const-svg{
  position:absolute;top:0;left:0;width:100%;height:600px;pointer-events:none;
}
/* The band heroes keep their star field in its own zone below the headline,
   so the theme stars are never covered by text (and always tappable). */
html[data-hub="hub3"] .const-field{position:relative;height:330px;max-width:1020px;margin:28px auto 0}
html[data-hub="hub3"] .const-field .const-svg{position:absolute;inset:0;width:100%;height:100%}
html[data-hub="hub3"] .const-head{position:relative;z-index:2;max-width:640px;margin:0 auto}
html[data-hub="hub3"] .const-head .kicker{
  font-family:var(--script);font-size:1.7rem;font-weight:400;line-height:1.4;
  color:var(--accent-deep);margin-bottom:10px;
}
html[data-hub="hub3"] .const-head h1{
  font-size:clamp(2.2rem,6vw,3.4rem);margin:0 0 12px;
  text-shadow:0 0 34px rgba(232,201,143,.4);
}
html[data-hub="hub3"] .const-head h1 em{color:var(--accent-deep);font-style:italic}
html[data-hub="hub3"] .const-head p{color:var(--muted);max-width:54ch;margin:0 auto;font-size:.98rem}
/* The engine's tool panel is moved inside the sky by the hero wiring script
   (the page is JS-rendered anyway), so the form sits under the stars. */
html[data-hub="hub3"] .const-sky .tool-top,
html[data-hub="hub3"] .const-band .tool-top{
  position:relative;z-index:2;max-width:600px;margin:38px auto 0;padding:0 4px;
}
/* Constellation stars + lines */
html[data-hub="hub3"] .cstar{fill:#4a4670;transition:fill .8s ease,filter .8s ease}
html[data-hub="hub3"] .cstar.tw{animation:cstar-twinkle 5s ease-in-out infinite}
html[data-hub="hub3"] .cstar.lit{fill:#e8c98f;filter:drop-shadow(0 0 8px rgba(232,201,143,.95))}
html[data-hub="hub3"] .cstar.final{fill:#ffe9bd}
html[data-hub="hub3"] .cstar.final.lit{filter:drop-shadow(0 0 18px rgba(255,220,150,1));animation:cstar-pulse 2.6s ease-in-out infinite}
@keyframes cstar-pulse{0%,100%{r:10}50%{r:14}}
@keyframes cstar-twinkle{0%,100%{opacity:.25}50%{opacity:.9}}
html[data-hub="hub3"] .cline{stroke:#d4af7a;stroke-width:1.2;opacity:0;stroke-dasharray:420;stroke-dashoffset:420}
html[data-hub="hub3"] .cline.drawn{opacity:.75;animation:cline-draw 1.6s ease forwards}
@keyframes cline-draw{to{stroke-dashoffset:0}}
/* Clickable theme stars (affirmation + printables heroes). The constellation
   SVG itself is pointer-events:none (so the decorative calculator sky can
   never swallow taps); the theme stars explicitly re-enable hit-testing. */
html[data-hub="hub3"] .const-svg .cat-star{pointer-events:visiblePainted;cursor:pointer}
html[data-hub="hub3"] .cat-star:focus{outline:none}
html[data-hub="hub3"] .cat-star:focus .cstar{stroke:#e8c98f;stroke-width:1.5}
html[data-hub="hub3"] .const-label{
  fill:#a79fd0;font-family:var(--body);font-size:13px;letter-spacing:2px;
  text-transform:uppercase;text-anchor:middle;
}
/* Homepage accent: a small twinkling constellation divider */
html[data-hub="hub3"] .const-divider{display:flex;justify-content:center;margin:38px auto}
html[data-hub="hub3"] .const-divider svg{display:block;width:min(440px,80vw);height:auto}
/* The full constellation is a desktop composition; on small screens the
   calculator's sky keeps its nebula + headline (as in the picked concept)
   while the band heroes keep their bright center star. */
@media (max-width:820px){
  /* Calculator sky: compact edition — the stars still light as you type.
     (The wiring switches preserveAspectRatio to meet so every star fits.) */
  html[data-hub="hub3"] .const-sky .const-svg{display:block;height:300px}
  /* Band heroes: hide the decorative constellation LINES only. The theme
     stars stay interactive, in a horizontally scrollable strip so all eight
     remain tappable at a usable size. */
  html[data-hub="hub3"] .const-band .cline{display:none}
  html[data-hub="hub3"] .const-field{height:200px;margin-top:18px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  html[data-hub="hub3"] .const-field .const-svg{min-width:660px}
  html[data-hub="hub3"] .const-sky{padding:48px 18px 42px}
  html[data-hub="hub3"] .const-head .kicker{font-size:1.45rem}
}
@media (prefers-reduced-motion:reduce){
  html[data-hub="hub3"] .cstar.final.lit{animation:none}
  html[data-hub="hub3"] .cstar.tw{animation:none;opacity:.7}
  html[data-hub="hub3"] .cline.drawn{animation:none;stroke-dashoffset:0;opacity:.75}
}
