:root{
  /* Cheery blue + sunny gold. Warm, family-facing, deliberately not clinical teal. */
  --ink:#15293f; --muted:#5c7186; --line:#dce7f1; --bg:#eef5fb;
  --card:#ffffff; --accent:#2b7fd4; --accent-dk:#1a5896;
  --soft:#e3f0fc; --soft-line:#b9d8f4;
  /* sun-dk is the TEXT tone and sits on sun-soft: 6.2:1, clears AA for the
     11.5px age badge. The lighter #9a6a05 measured 4.29:1 and failed. */
  --sun:#f6b93b; --sun-dk:#7a5304; --sun-soft:#fdf3dd;
  /* affirmative UI state (was green) */
  --good:#1a5896;
  /* clinical traffic-light zones stay semantic: green/yellow/red mean something here */
  --zone-green:#1c7a52; --warn:#9a6412; --alert:#a3271f;
}
*{box-sizing:border-box;}
body{margin:0;font-family:-apple-system,Segoe UI,Roboto,sans-serif;
     color:var(--ink);background:var(--bg);line-height:1.45;}
a{color:var(--accent-dk);}
.demo-banner{background:var(--ink);color:#fff;text-align:center;
     padding:8px 12px;font-size:13.5px;font-weight:600;}
.wrap{max-width:760px;margin:0 auto;padding:20px 16px 70px;}
.wrap.narrow{max-width:620px;}
.wrap.wide{max-width:900px;}
a.back{display:inline-block;margin:6px 0 10px;color:var(--accent-dk);font-size:15px;text-decoration:none;}
a.back:hover{text-decoration:underline;}
h1{font-size:22px;margin:6px 0 2px;}
.sub{color:var(--muted);font-size:14.5px;margin:0 0 14px;}
.section{background:var(--card);border:1px solid var(--line);
     border-radius:14px;padding:18px;margin-bottom:16px;}
.section > h2{font-size:17px;margin:0 0 3px;}
.section > .hint{color:var(--muted);font-size:13.5px;margin:0 0 14px;}
.once-badge{display:inline-block;background:var(--soft);color:var(--good);
     font-size:12px;font-weight:700;border-radius:20px;padding:3px 10px;
     margin-left:6px;vertical-align:middle;}
label{display:block;font-weight:600;font-size:14px;margin:12px 0 5px;}
input,select,textarea{width:100%;padding:11px 12px;font-size:16px;
     border:1px solid var(--line);border-radius:8px;font-family:inherit;
     background:#fff;color:var(--ink);}
.row{display:flex;gap:10px;flex-wrap:wrap;}
.row > div{flex:1;min-width:110px;}
.w-mi{max-width:88px;}
.w-sm{max-width:130px;}
.check{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13.5px;
     color:var(--muted);font-weight:500;}
.check input{width:auto;}
.subhead{font-size:14px;font-weight:700;color:var(--accent-dk);
     margin:18px 0 2px;padding-top:14px;border-top:1px dashed var(--line);}
.subhead:first-of-type{border-top:0;padding-top:0;}
.child{border:1px solid var(--line);border-radius:12px;padding:14px;
     margin-bottom:12px;background:#fbfdff;position:relative;}
.child .clabel{font-weight:700;font-size:14px;color:var(--accent-dk);margin-bottom:4px;}
.child .remove{position:absolute;top:10px;right:12px;background:none;border:0;
     color:#9aa7b4;font-size:20px;cursor:pointer;line-height:1;width:auto;padding:0;}
#addChild{width:100%;background:var(--soft);color:var(--accent-dk);
     border:1px dashed var(--accent);border-radius:10px;padding:12px;
     font-size:15px;font-weight:600;cursor:pointer;}
#addChild:disabled{opacity:.5;cursor:default;}
.submit,button.primary{margin-top:8px;width:100%;background:var(--accent);color:#fff;
     border:0;border-radius:10px;padding:15px;font-size:17px;font-weight:700;
     cursor:pointer;}
.submit:hover,button.primary:hover{background:var(--accent-dk);}
.records-link{display:inline-block;margin-top:16px;color:var(--accent-dk);font-size:15px;}
input.autofilled{background:var(--soft);border-color:var(--soft-line);color:var(--good);font-weight:600;}
.holder-note{transition:color .2s;}

/* ---------- hub hero ---------- */
.hero{display:grid;grid-template-columns:1fr;background:var(--card);
     border-bottom:1px solid var(--line);}
.hero-photo{position:relative;min-height:220px;background:#dfe9f2;}
.hero-photo img{position:absolute;inset:0;width:100%;height:100%;
     object-fit:cover;object-position:center 32%;display:block;}
.hero-copy{padding:30px 20px 32px;text-align:center;
     background:linear-gradient(160deg,#ffffff 0%,#f3f9fe 100%);}
.hero-copy .brand{font-size:13px;letter-spacing:.08em;text-transform:uppercase;
     color:var(--accent-dk);font-weight:700;}
.hero-copy h1{font-size:30px;line-height:1.15;margin:10px 0 8px;letter-spacing:-.01em;}
.hero-copy p{color:var(--muted);font-size:15.5px;margin:0 auto;max-width:520px;}
.hero-rule{width:52px;height:4px;border-radius:4px;margin:14px auto 0;
     background:linear-gradient(90deg,var(--accent) 0%,var(--sun) 100%);}
@media (min-width:880px){
  .hero{grid-template-columns:1.05fr 1fr;align-items:stretch;}
  .hero-photo{min-height:380px;order:2;}
  .hero-copy{order:1;text-align:left;padding:56px 44px;display:flex;
       flex-direction:column;justify-content:center;}
  .hero-copy h1{font-size:38px;}
  .hero-copy p{margin:0;}
  .hero-rule{margin:18px 0 0;}
}

/* ---------- tile field + gradient wash ---------- */
.tiles-wrap{
  background:
    radial-gradient(820px 420px at 10% -6%, #d7e9fb 0%, rgba(215,233,251,0) 62%),
    radial-gradient(720px 400px at 92% 12%, #fdf0d2 0%, rgba(253,240,210,0) 60%),
    radial-gradient(700px 500px at 50% 108%, #e7f1fa 0%, rgba(231,241,250,0) 64%),
    linear-gradient(180deg,#f6fafe 0%, #e9f2fb 52%, #f7fbfe 100%);
}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
     gap:14px;padding:34px 16px 46px;max-width:1000px;margin:0 auto;}
.tile{background:var(--card);border:1px solid var(--line);border-radius:14px;
     padding:18px;text-decoration:none;color:var(--ink);display:flex;flex-direction:column;
     min-height:150px;position:relative;transition:box-shadow .15s, transform .15s;
     box-shadow:0 1px 2px rgba(21,41,63,.04);}
.tile.live:hover{box-shadow:0 10px 26px rgba(43,127,212,.20);transform:translateY(-2px);}
.tile .num{font-size:11px;color:var(--muted);font-weight:700;letter-spacing:.04em;}
.tile .t{font-size:16px;font-weight:700;margin:6px 0 6px;}
.tile .d{font-size:13px;color:var(--muted);flex:1;}
.tile .status{align-self:flex-start;margin-top:10px;font-size:11.5px;font-weight:700;
     border-radius:20px;padding:3px 10px;}
.tile.live .status{background:var(--soft);color:var(--good);}
.tile.ghost{opacity:.66;cursor:default;filter:grayscale(.4);}
.tile.ghost .status{background:#eceff2;color:#8a939c;}
.tile.ghost .t{color:#5a6773;}
.hub-foot{max-width:1000px;margin:0 auto;padding:0 16px 44px;
     font-size:12px;color:var(--muted);text-align:center;}
.hub-foot a{color:var(--muted);}

/* ---------- module page header (photo + title) ---------- */
.mod-head{display:grid;grid-template-columns:210px 1fr;background:var(--card);
     border:1px solid var(--line);border-radius:16px;overflow:hidden;
     margin:4px 0 18px;box-shadow:0 1px 2px rgba(21,41,63,.04);}
.mod-head .ph{position:relative;min-height:196px;background:#dfe9f2;}
.mod-head .ph img{position:absolute;inset:0;width:100%;height:100%;
     object-fit:cover;display:block;}
.mod-head .tx{padding:22px 24px;display:flex;flex-direction:column;
     justify-content:center;
     background:linear-gradient(160deg,#ffffff 0%,#f2f8fe 100%);}
.mod-head h1{margin:0;font-size:24px;letter-spacing:-.01em;}
.mod-head .mh-sub{color:var(--muted);font-size:14px;margin:7px 0 0;}
.mod-head .tx .accent{width:44px;height:3px;border-radius:3px;margin-top:13px;
     background:linear-gradient(90deg,var(--accent) 0%,var(--sun) 100%);}
@media (max-width:560px){
  .mod-head{grid-template-columns:1fr;}
  .mod-head .ph{min-height:148px;}
  .mod-head .tx{padding:16px 18px;}
  .mod-head h1{font-size:20px;}
  .mod-head .mh-sub{font-size:13.5px;}
}

/* ---------- screening / scoring ---------- */
.zone{display:inline-block;font-size:12px;font-weight:700;border-radius:20px;padding:3px 12px;}
.zone.green{background:#e7f3ec;color:var(--zone-green);}
.zone.yellow{background:#fff4e5;color:var(--warn);}
.zone.red{background:#fbe9e7;color:var(--alert);}
.safety{background:#fbe9e7;border:1px solid #f1c3bd;border-radius:10px;padding:10px 14px;
     margin:10px 0;font-size:14px;color:var(--alert);font-weight:700;}
.drill{margin-top:10px;}
.drill summary{cursor:pointer;color:var(--accent-dk);font-weight:600;font-size:13.5px;}
.item-row{display:flex;justify-content:space-between;gap:10px;padding:7px 0;
     border-bottom:1px dashed var(--line);font-size:13.5px;}
.item-row .a{font-weight:700;color:var(--muted);white-space:nowrap;}

/* ---------- kb ---------- */
.kb-card{background:var(--card);border:1px solid var(--line);border-radius:14px;
     padding:16px 18px;margin-bottom:12px;}
.kb-card h3{margin:0 0 4px;font-size:16px;}
.kb-card .age{display:inline-block;background:var(--sun-soft);color:var(--sun-dk);
     font-size:11.5px;font-weight:700;border-radius:20px;padding:2px 9px;margin-bottom:6px;}
.kb-card p{font-size:14px;color:var(--ink);margin:6px 0;}
.kb-search{width:100%;padding:13px 14px;font-size:16px;border:1px solid var(--line);
     border-radius:10px;margin-bottom:16px;}
