/* CareMap AI — visual style matched to the INTEX 2026 poster */
:root {
  --teal: #127a70;
  --teal-deep: #0e4f4a;
  --navy: #1d4a5c;
  --ink: #23384a;
  --muted: #677885;
  --faint: #8a98a3;
  --line: #d6dfe4;
  --field: #f6f8fa;
  --page: #ffffff;
  --card: #ffffff;
  --mint: #e7f3f0;
  --mint-line: #b7dcd5;
  --amber-bg: #fcefc6;
  --amber: #b4570b;
  --alert: #a1261d;
  --alert-soft: #fbeae8;
  --focus: #1a73c7;
  --r-field: 6px;
  --r-card: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --teal: #4fb8ac; --teal-deep: #8dd6cc; --navy: #9cc3d3; --ink: #e3ecef; --muted: #a6b5bd; --faint: #7f8e97;
    --line: #2f4148; --field: #1a2a30; --page: #0f1a1d; --card: #15232a; --mint: #183632; --mint-line: #2c5d55;
    --amber-bg: #3b2e10; --amber: #f2b45e; --alert: #ff9b90; --alert-soft: #3a1c19; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --teal: #4fb8ac; --teal-deep: #8dd6cc; --navy: #9cc3d3; --ink: #e3ecef; --muted: #a6b5bd; --faint: #7f8e97;
  --line: #2f4148; --field: #1a2a30; --page: #0f1a1d; --card: #15232a; --mint: #183632; --mint-line: #2c5d55;
  --amber-bg: #3b2e10; --amber: #f2b45e; --alert: #ff9b90; --alert-soft: #3a1c19; color-scheme: dark;
}

:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: inherit; }
html, body { margin: 0; }
body {
  background: var(--page); color: var(--ink);
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
/* ---------- app shell: top bar, stepper, two-column layout ---------- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top, 0px); }
:root { padding-top: 0; }
.topbar-in { max-width: 74rem; margin: 0 auto; padding: 0.7rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand-main { display: flex; align-items: center; gap: 0.7rem; }
.logo { width: 42px; height: 42px; flex: 0 0 auto; }
.brand-name { margin: 0; font-size: 1.55rem; line-height: 1.05; font-weight: 700; color: var(--teal); letter-spacing: -0.01em; }
.brand-sub { margin: 0.15rem 0 0; font-size: 0.8rem; font-weight: 700; color: var(--ink); }
.tagline { margin: 0; max-width: 17rem; text-align: right; font-family: "Roboto Serif", Georgia, serif; font-style: italic; color: var(--teal); font-size: 0.9rem; line-height: 1.3; }
@media (max-width: 760px) { .tagline { display: none; } }
@media (max-width: 480px) { .brand-sub { display: none; } .brand-name { font-size: 1.35rem; } .logo { width: 36px; height: 36px; } }

.stepper-wrap { background: var(--mint); border-bottom: 1px solid var(--mint-line); }
.stepper { max-width: 74rem; margin: 0 auto; padding: 0.85rem 1.25rem; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.st { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.8rem; border-radius: 10px; background: var(--card); border: 1px solid var(--line); opacity: 0.65; }
.st .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--field); color: var(--muted); border: 1px solid var(--line); flex: 0 0 auto; font-size: 0.9rem; }
.st .ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--field); color: var(--muted); flex: 0 0 auto; }
.st .ico svg { width: 18px; height: 18px; }
.st .tx { min-width: 0; }
.st .t1 { font-weight: 700; font-size: 0.95rem; line-height: 1.2; margin: 0; }
.st .t2 { font-size: 0.78rem; color: var(--muted); line-height: 1.3; margin: 0.1rem 0 0; }
.st.done { opacity: 1; }
.st.done .num { background: var(--teal); border-color: var(--teal); color: #fff; }
.st.now { opacity: 1; border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; }
.st.now .num { background: var(--teal); border-color: var(--teal); color: #fff; }
.st.now .ico { background: var(--mint); color: var(--teal); }
@media (max-width: 760px) {
  .stepper { gap: 0.4rem; padding: 0.6rem 0.75rem; }
  .st { padding: 0.45rem 0.5rem; gap: 0.45rem; }
  .st .ico, .st .t2 { display: none; }
  .st .t1 { font-size: 0.82rem; }
  .st .num { width: 24px; height: 24px; font-size: 0.8rem; }
}

.layout { max-width: 74rem; margin: 1.5rem auto 0; padding: 0 1.25rem; display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.foot-wrap { max-width: 74rem; margin: 1.5rem auto 2rem; padding: 0 1.25rem; }

/* side panel */
.side { display: grid; gap: 1rem; position: sticky; top: 5.5rem; }
@media (max-width: 980px) { .side { position: static; } }
.sc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem 1.1rem; }
.sc h2 { font-size: 0.95rem; margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.45rem; color: var(--teal-deep); }
.sc h2 svg { width: 18px; height: 18px; color: var(--teal); }
.sc p { font-size: 0.875rem; color: var(--muted); }
.sc p:last-child { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.2rem 0 0.8rem; }
.stat { background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.4rem; text-align: center; }
.stat b { display: block; font-size: 1.15rem; color: var(--teal); line-height: 1.1; }
.stat span { font-size: 0.7rem; color: var(--muted); line-height: 1.2; display: block; }
.fw { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.fw span { font-size: 0.75rem; font-weight: 700; color: var(--navy); background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.55rem; }
.kbv { margin-top: 0.7rem; font-size: 0.75rem; color: var(--faint); }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.how li { display: flex; gap: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.how li b { display: block; color: var(--ink); font-size: 0.875rem; }
.how .n { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: 0.75rem; display: grid; place-items: center; flex: 0 0 auto; margin-top: 0.1rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.8rem; font-size: 0.85rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22a06b; margin-right: 0.3rem; box-shadow: 0 0 0 3px rgba(34,160,107,0.18); }
.live.off { background: var(--faint); box-shadow: none; }

/* ---------- app card (the "screen" on the poster) ---------- */
.app-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 0 1.5rem 1.6rem; }
.app-bar { display: flex; justify-content: space-between; align-items: center; padding: 0.95rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.app-bar .who { font-weight: 700; color: var(--muted); }
.app-bar .step { color: var(--muted); }
h1 { font-size: 1.3rem; line-height: 1.3; color: var(--teal-deep); margin: 0 0 0.4rem; font-weight: 700; }
h2 { font-size: 1.1rem; color: var(--teal-deep); margin: 1.6rem 0 0.5rem; font-weight: 700; }
h3 { font-size: 1rem; margin: 0; font-weight: 700; }
p { margin: 0 0 0.9rem; }
.lead { color: var(--muted); margin-bottom: 1.4rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- form ---------- */
.field { margin-bottom: 1.1rem; }
.field > label, .field > .flabel { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field .opt { font-weight: 400; color: var(--faint); }
.hint { color: var(--muted); font-size: 0.875rem; margin: 0.35rem 0 0; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--r-field); padding: 0.6rem 0.75rem; min-height: 44px;
}
textarea { min-height: 6.5rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--alert) !important; }

/* chips (answer pills on the poster) */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip label {
  display: inline-block; cursor: pointer; padding: 0.35rem 0.85rem; border-radius: 999px;
  background: var(--field); border: 1px solid var(--line); color: var(--ink); font-size: 0.95rem; line-height: 1.35;
}
.chip input:checked + label { background: var(--mint); border-color: var(--teal); color: var(--teal-deep); font-weight: 700; }
.chip input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.concern { margin-bottom: 0.6rem; }
.concern-head { display: flex; justify-content: space-between; align-items: baseline; }
.linkbtn { background: none; border: 0; padding: 0.25rem 0; color: var(--teal); font: inherit; font-weight: 700; cursor: pointer; min-height: 0; border-radius: 4px; }
.linkbtn:hover { text-decoration: underline; }

.error { color: var(--alert); font-weight: 700; font-size: 0.9rem; margin: 0.35rem 0 0; }
.error:empty { display: none; }
.agebox { margin-top: 0.4rem; color: var(--teal-deep); font-weight: 500; font-size: 0.9rem; }

/* buttons */
button { font: inherit; cursor: pointer; }
.btn-primary { display: block; width: 100%; background: var(--teal); color: #fff; border: 0; border-radius: var(--r-field); padding: 0.8rem 1rem; font-weight: 700; min-height: 48px; }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--teal-deep); border: 1px solid var(--line); border-radius: var(--r-field); padding: 0.7rem 1rem; font-weight: 700; min-height: 48px; }
.actions { display: flex; gap: 0.6rem; margin-top: 1.5rem; align-items: stretch; }
.actions .btn-primary { flex: 1; }
:root[data-theme="dark"] .btn-primary { color: #0f1a1d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0f1a1d; } }

.subhead { font-weight: 700; color: var(--teal-deep); margin: 1.6rem 0 0.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }

/* alerts */
.flag { background: var(--alert-soft); border-left: 4px solid var(--alert); border-radius: 0 var(--r-field) var(--r-field) 0; padding: 0.75rem 0.9rem; margin: 0.6rem 0; }
.flag p { margin: 0; }
.note { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-field); padding: 0.65rem 0.8rem; font-size: 0.925rem; margin: 0.6rem 0; }

/* ---------- step 2: understood + clarify ---------- */
.understood { border: 1px solid var(--line); border-radius: var(--r-field); background: var(--field); padding: 0.85rem 1rem; margin-bottom: 0.6rem; }
.understood .quote { font-style: italic; margin: 0 0 0.35rem; }
.u-item { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.35rem 0; }
.u-item input { width: 18px; height: 18px; margin-top: 0.15rem; accent-color: var(--teal); flex: 0 0 auto; }
.u-item label { cursor: pointer; }
.u-item.flagged label { color: var(--alert); font-weight: 700; }
.q { margin: 1.15rem 0 0; }
.q .qid { color: var(--teal); font-weight: 700; font-size: 0.9rem; margin: 0 0 0.1rem; }
.q .qtext { font-weight: 700; margin: 0 0 0.45rem; }

/* ---------- step 3: profile ---------- */
.summary-box { border: 1px solid var(--line); border-radius: var(--r-field); background: var(--field); padding: 0.9rem 1.1rem; margin-bottom: 1.2rem; }
.summary-box h3 { color: var(--teal-deep); margin-bottom: 0.3rem; }
.summary-box .quote { font-style: italic; margin: 0 0 0.4rem; }
.summary-box .quote:last-child { margin-bottom: 0; }
.domains-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin: 1.2rem 0 0.6rem; flex-wrap: wrap; }
.domains-head h3 { font-size: 1.05rem; }
.badge { background: var(--amber-bg); color: var(--amber); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.03em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 4px; }
.dom { border: 1px solid var(--line); border-radius: var(--r-field); background: var(--field); padding: 0.75rem 1rem; margin-bottom: 0.55rem; }
.dom.active { border-left: 4px solid var(--teal); background: var(--card); }
.dom .dname { font-weight: 700; color: var(--faint); }
.dom.active .dname { color: var(--teal); }
.dom .dstate { color: var(--faint); font-size: 0.9rem; }
.dom.active .dstate { color: var(--ink); font-weight: 700; }
.dom .sub { color: var(--muted); font-size: 0.9rem; }
.dom .sub strong { color: var(--ink); }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 999px; margin-left: 0.35rem; vertical-align: 1px; }
.pill-worth { background: var(--teal); color: var(--card); }
.pill-possible { border: 1px solid var(--teal); color: var(--teal-deep); }
.dom details { margin-top: 0.4rem; }
.dom summary { cursor: pointer; color: var(--teal); font-weight: 700; font-size: 0.9rem; }
.dom .why { font-size: 0.9rem; margin-top: 0.4rem; }
.dom .why .lbl { font-weight: 700; color: var(--muted); margin: 0.6rem 0 0.15rem; font-size: 0.85rem; }
.dom .why ul { margin: 0; padding-left: 1.1rem; }
.dom .why blockquote { margin: 0.2rem 0; font-style: italic; }

.next { border-radius: var(--r-field); padding: 0.9rem 1rem; margin: 1rem 0; border-left: 4px solid var(--teal); background: var(--mint); }
.next.sun { border-left-color: var(--amber); background: var(--amber-bg); }
.next.alert { border-left-color: var(--alert); background: var(--alert-soft); }
.next .lbl { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0; }
.next .title { font-size: 1.15rem; font-weight: 700; margin: 0.15rem 0 0.25rem; }
.next p:last-child { margin: 0; }

.profs { list-style: none; padding: 0; margin: 0; }
.profs li { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.profs li:first-child { border-top: 0; }
.profs .muted, .profs .small { display: block; }
ul.plain { margin: 0 0 0.5rem; padding-left: 1.2rem; }
ul.plain li { margin-bottom: 0.25rem; }
.answers li { margin-bottom: 0.35rem; }
.disclaimer { margin-top: 1.6rem; font-size: 0.875rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.9rem; }

/* developer / tester tools stay available but out of the way */
.devtools { margin-top: 1.4rem; border-top: 1px dashed var(--line); padding-top: 0.8rem; font-size: 0.875rem; }
.devtools summary { cursor: pointer; color: var(--faint); }
pre { overflow-x: auto; background: var(--field); padding: 0.8rem; border-radius: var(--r-field); font-size: 0.78rem; line-height: 1.45; }

/* tester view (fallback when AI is unavailable) */
.tester-tag { display: inline-block; font-size: 0.75rem; font-weight: 700; background: var(--amber-bg); color: var(--amber); padding: 0.15rem 0.55rem; border-radius: 4px; margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.03em; }
.tag-block { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.tag-block h3 { font-size: 0.95rem; margin: 1rem 0 0.35rem; }
.tag-search { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: var(--r-field); padding: 0.5rem 0.7rem; }
.tag-list { max-height: 14rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-field); margin-top: 0.35rem; }
.tag-list.short { max-height: 10rem; } .tag-list.open { max-height: none; }
.tag-opt { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.tag-opt:last-child { border-bottom: 0; }
.tag-opt input { margin-top: 0.25rem; accent-color: var(--teal); }
.tag-opt .muted { display: block; font-size: 0.8rem; }
.chipset { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 0.4rem; }
.tchip { background: var(--mint); color: var(--teal-deep); font-weight: 700; font-size: 0.8rem; padding: 0.1rem 0.5rem; border-radius: 999px; }
.quote-block { margin: 0.25rem 0 0.6rem; padding: 0.55rem 0.8rem; border-left: 3px solid var(--teal); background: var(--field); font-style: italic; }

/* loading */
.loader { display: flex; gap: 0.45rem; margin: 1.2rem 0 0.4rem; }
.loader span { width: 11px; height: 11px; border-radius: 50%; background: var(--teal); animation: pulse 1.2s ease-in-out infinite; }
.loader span:nth-child(2) { animation-delay: 0.2s; } .loader span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: none; } }

/* footer disclaimer (as on the poster) */
.foot { display: flex; gap: 0.6rem; align-items: center; margin-top: 0; padding: 0.7rem 1rem; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-field); color: var(--muted); font-size: 0.85rem; }
.foot svg { width: 18px; height: 18px; flex: 0 0 auto; }
.foot p { margin: 0; }
.foot strong { color: var(--ink); }

.fade-in { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in, .loader span { animation: none; } }
@media (max-width: 480px) { .app-card { padding: 0 1rem 1.2rem; } .row2 { grid-template-columns: 1fr 1fr; } }

@media print {
  body { background: #fff; }
  .foot-wrap, .no-print, .devtools, .app-bar .step, .side, .stepper-wrap { display: none !important; }
  .topbar { position: static; }
  .layout { display: block; margin-top: 0.5rem; }
  .app-card { border: 0; padding: 0; }
  .dom details { display: block; } .dom details > summary { display: none; }
  .dom { break-inside: avoid; }
}

/* ---------- visible AI (step 2) ---------- */
.ai-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; background: var(--mint); border: 1px solid var(--mint-line); border-radius: var(--r-field); padding: 0.55rem 0.8rem; font-size: 0.85rem; margin-bottom: 0.9rem; }
.ai-strip .ai-tag { font-weight: 700; color: var(--teal-deep); display: inline-flex; align-items: center; gap: 0.35rem; }
.ai-strip .ai-tag svg { width: 16px; height: 16px; }
.ai-strip .meta { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 0.8rem; font-size: 0.78rem; color: var(--muted); margin: 0 0 0.6rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.3rem; vertical-align: -1px; }
mark { color: inherit; border-radius: 3px; padding: 0 0.15rem; }
mark sup { font-style: normal; font-weight: 700; font-size: 0.65rem; margin-left: 0.15rem; }
.hl-ind { background: #d3ece7; box-shadow: inset 0 -2px 0 var(--teal); }
.hl-amb { background: #fbeec8; box-shadow: inset 0 -2px 0 #d39b2a; }
.hl-rf { background: #f8d9d5; box-shadow: inset 0 -2px 0 var(--alert); }
:root[data-theme="dark"] .hl-ind { background: #1f4a44; } :root[data-theme="dark"] .hl-amb { background: #4a3c18; } :root[data-theme="dark"] .hl-rf { background: #4d2420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl-ind { background: #1f4a44; } :root:not([data-theme="light"]) .hl-amb { background: #4a3c18; } :root:not([data-theme="light"]) .hl-rf { background: #4d2420; } }
.u-item .badge-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--teal); flex: 0 0 auto; margin-top: 0.15rem; }
.u-item.flagged .badge-n { background: var(--alert); }
.u-item.amb .badge-n { background: #c98a12; }
.u-item.amb label { cursor: default; }

/* ---------- domain map (step 3) ---------- */
.dmap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; margin: 0.2rem 0 0.6rem; }
@media (max-width: 760px) { .dmap { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .dmap { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dt { text-align: center; padding: 0.6rem 0.3rem 0.55rem; border-radius: 10px; border: 1px solid var(--line); background: var(--field); opacity: 0.55; }
.dt .ic { width: 40px; height: 40px; margin: 0 auto 0.35rem; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--faint); border: 1px solid var(--line); }
.dt .ic svg { width: 20px; height: 20px; }
.dt .code { font-size: 0.7rem; font-weight: 700; color: var(--faint); }
.dt .nm { font-size: 0.72rem; line-height: 1.2; color: var(--muted); margin-top: 0.1rem; overflow-wrap: break-word; }
@media (max-width: 760px) { .dt { padding: 0.5rem 0.2rem; } .dt .nm { font-size: 0.66rem; } .dt .ic { width: 34px; height: 34px; } }
.dt.on { opacity: 1; background: var(--card); border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; }
.dt.on .ic { background: var(--teal); color: #fff; border-color: var(--teal); }
.dt.on .code { color: var(--teal); }
.dt.on .nm { color: var(--ink); font-weight: 700; }
.dt.flagged.on { border-color: var(--alert); box-shadow: 0 0 0 1px var(--alert) inset; }
.dmap-note { font-size: 0.8rem; color: var(--muted); margin: 0 0 1rem; }

/* ---------- cover page ---------- */
a.brand-main { text-decoration: none; color: inherit; border-radius: 8px; }
body.is-cover .stepper-wrap { display: none; }
body.is-cover .layout { grid-template-columns: minmax(0, 1fr); max-width: 62rem; }
body.is-cover .side { display: none; }
body.is-cover .app-card { border: 0; padding: 0; background: transparent; }
.cover { display: grid; gap: 1.25rem; }
.hero { background: linear-gradient(135deg, var(--mint) 0%, var(--card) 70%); border: 1px solid var(--mint-line); border-radius: 16px; padding: 2.4rem 2.2rem 2rem; }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); background: var(--card); border: 1px solid var(--mint-line); border-radius: 999px; padding: 0.25rem 0.75rem; margin-bottom: 1rem; }
.hero h1 { font-size: 2.2rem; line-height: 1.15; color: var(--teal-deep); margin-bottom: 0.8rem; max-width: 34rem; }
.hero-lead { font-size: 1.08rem; color: var(--ink); max-width: 40rem; margin-bottom: 1.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 0.9rem; }
.hero-cta .btn-primary { width: auto; padding: 0.8rem 1.6rem; }
.cv { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.5rem; }
.cv h2 { margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; }
.cv h2 svg { width: 22px; height: 22px; color: var(--teal); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.how-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: var(--field); }
.how-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; }
.how-card .n { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 0.85rem; }
.how-card .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--mint); color: var(--teal); display: grid; place-items: center; }
.how-card .ico svg { width: 18px; height: 18px; }
.how-card h3 { margin: 0 0 0.25rem; color: var(--teal-deep); }
.how-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.stats.wide { grid-template-columns: repeat(6, 1fr); margin: 0.6rem 0 1rem; }
.stats.wide .stat b { font-size: 1.5rem; }
.stats.wide .stat span { font-size: 0.75rem; }
.fw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
.fw-card { border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 0.85rem; }
.fw-card b { display: block; color: var(--navy); margin-bottom: 0.2rem; }
.fw-card span { font-size: 0.85rem; color: var(--muted); line-height: 1.35; display: block; }
.cv.trust { border-left: 4px solid var(--teal); }
.cv.trust p { margin: 0; color: var(--ink); }
@media (max-width: 860px) { .how-grid { grid-template-columns: 1fr; } .fw-grid { grid-template-columns: 1fr 1fr; } .stats.wide { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .hero { padding: 1.6rem 1.2rem; } .hero h1 { font-size: 1.7rem; } .cv { padding: 1.1rem; } .fw-grid { grid-template-columns: 1fr; } .hero-cta .btn-primary, .hero-cta .btn-secondary { width: 100%; } }
.tips { margin: 0; padding-left: 1.1rem; font-size: 0.875rem; color: var(--muted); }
.tips li { margin-bottom: 0.35rem; }
[tabindex="-1"]:focus { outline: none; }
body.is-cover .foot-wrap { display: none; }

/* ---------- cover: for organisations ---------- */
.cv.org { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1.2rem; align-items: center; background: linear-gradient(135deg, var(--card) 40%, var(--mint) 100%); }
.cv.org p { color: var(--ink); }
.org-list { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.92rem; }
.org-list li { margin-bottom: 0.3rem; }
.org-cta .btn-primary { margin-bottom: 0.5rem; }
@media (max-width: 760px) { .cv.org { grid-template-columns: 1fr; } }

/* ---------- centre dashboard ---------- */
body.is-dash .stepper-wrap, body.is-dash .side { display: none; }
body.is-dash .layout { grid-template-columns: minmax(0, 1fr); }
body.is-dash .app-card { border: 0; padding: 0; background: transparent; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.dash > * { min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.6rem; margin: 0.2rem 0 0.2rem; }
.demo-note { margin: 0; font-size: 0.85rem; background: var(--amber-bg); color: var(--amber); border-radius: var(--r-field); padding: 0.55rem 0.8rem; font-weight: 500; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.7rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.85rem 0.9rem; border-top: 4px solid var(--teal); }
.kpi b { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--ink); }
.kpi span { font-size: 0.8rem; color: var(--muted); line-height: 1.25; display: block; }
.kpi.alert { border-top-color: var(--alert); } .kpi.alert b { color: var(--alert); }
.kpi.sun { border-top-color: #d39b2a; } .kpi.calm { border-top-color: var(--teal); } .kpi.grey { border-top-color: var(--faint); }
.kpi.alert-o { border-top-color: var(--alert); }

.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.dash-card h2 { margin: 0 0 0.8rem; font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; }
.bars { display: grid; gap: 0.35rem; }
.bar-row { display: grid; grid-template-columns: 28px 15rem 1fr 2rem; align-items: center; gap: 0.6rem; background: none; border: 1px solid transparent; border-radius: 8px; padding: 0.3rem 0.4rem; text-align: left; color: var(--ink); font: inherit; }
.bar-row:hover, .bar-row.sel { background: var(--mint); border-color: var(--mint-line); }
.bar-ic { width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: var(--teal); display: grid; place-items: center; }
.bar-ic svg { width: 15px; height: 15px; }
.bar-nm { font-size: 0.88rem; }
.bar-track { height: 10px; background: var(--field); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.bar-n { font-weight: 700; text-align: right; }
@media (max-width: 640px) { .bar-row { grid-template-columns: 28px 1fr 2rem; } .bar-track { grid-column: 2 / 4; grid-row: 2; } }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.tools { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.tools input, .tools select { width: auto; min-height: 38px; padding: 0.4rem 0.6rem; font-size: 0.9rem; }
.tools input { width: 14rem; }
.chip-clear { background: var(--mint); color: var(--teal-deep); border: 1px solid var(--mint-line); border-radius: 999px; padding: 0.3rem 0.7rem; font-weight: 700; font-size: 0.85rem; }
.table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tr { display: grid; grid-template-columns: 9rem 13rem 8rem minmax(0, 1fr) 4.5rem; gap: 0.8rem; align-items: center; padding: 0.7rem 0.9rem; border: 0; border-top: 1px solid var(--line); background: var(--card); width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.tr:hover { background: var(--field); }
.tr.th { cursor: default; border-top: 0; background: var(--field); font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.c-child b { display: block; } .c-child .small { display: block; }
.c-text { font-size: 0.88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--mint); color: var(--teal-deep); line-height: 1.3; }
.upill.alert { background: var(--alert-soft); color: var(--alert); } .upill.sun { background: var(--amber-bg); color: var(--amber); }
.upill.grey { background: var(--field); color: var(--muted); border: 1px solid var(--line); }
.upill.big { font-size: 0.9rem; padding: 0.4rem 0.9rem; }
.flagdot { margin-left: 0.4rem; color: var(--alert); font-weight: 700; font-size: 0.8rem; }
.dchip { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--teal-deep); background: var(--mint); border: 1px solid var(--mint-line); border-radius: 5px; padding: 0.05rem 0.35rem; margin: 0 0.2rem 0.2rem 0; }
@media (max-width: 860px) {
  .tr.th { display: none; }
  .tr { grid-template-columns: 1fr auto; gap: 0.3rem 0.6rem; }
  .tr .c-doms { grid-column: 1; } .tr .c-text { grid-column: 1 / 3; } .tr > span:last-child { grid-column: 2; grid-row: 1; text-align: right; }
}

/* first-interview guide */
.g-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.g-title h1 { margin: 0.2rem 0; font-size: 1.5rem; }
.g-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.g-facts div { background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; }
.g-facts span { display: block; font-size: 0.75rem; color: var(--muted); }
.g-facts b { font-size: 0.92rem; }
@media (max-width: 640px) { .g-facts { grid-template-columns: 1fr 1fr; } }
.g-sec.first { border-left: 4px solid var(--alert); }
.g-n { width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-grid; place-items: center; font-size: 0.8rem; flex: 0 0 auto; }
.g-sec.first .g-n { background: var(--alert); }
.g-area { border-top: 1px solid var(--line); padding: 0.7rem 0 0.4rem; }
.g-area:first-of-type { border-top: 0; padding-top: 0; }
.g-area-h { margin: 0 0 0.3rem; }
.ro { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ro span { font-size: 0.85rem; background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.7rem; }
.g-qgroup { margin-top: 0.8rem; }
.g-qgroup .qid { color: var(--teal); font-weight: 700; font-size: 0.85rem; margin: 0 0 0.2rem; }
.g-qs { margin: 0; padding-left: 1.3rem; }
.g-qs li { margin-bottom: 0.55rem; }
.g-line { display: none; }
@media print {
  body.is-dash .dash-card { break-inside: avoid; border: 1px solid #ccc; }
  .g-line { display: block; border-bottom: 1px dotted #999; height: 1.4rem; }
  .demo-note { display: none; }
}

/* ---------- centre platform ---------- */
.cbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 1rem; }
.cbar-l b { display: block; color: var(--teal-deep); }
.cnav { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.cnav a { text-decoration: none; color: var(--ink); font-weight: 500; padding: 0.4rem 0.7rem; border-radius: 8px; }
.cnav a:hover { background: var(--field); }
.cnav a.on { background: var(--mint); color: var(--teal-deep); font-weight: 700; }
.cnav .linkbtn { padding: 0.4rem 0.7rem; }
.login-card { max-width: 30rem; margin: 1rem auto; }
.login-card .btn-primary { margin-top: 0.4rem; }
.backlink { color: var(--teal); font-weight: 700; text-decoration: none; font-size: 0.92rem; }
.btn-primary.sm, .btn-secondary.sm { width: auto; min-height: 40px; padding: 0.5rem 0.95rem; font-size: 0.92rem; display: inline-flex; align-items: center; }
a.btn-secondary { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.child-head { padding-bottom: 0; }
.ch-main { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--mint); color: var(--teal-deep); display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; border: 2px solid var(--mint-line); }
.ch-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0 0.2rem; }
.tabs { display: flex; gap: 0.2rem; margin-top: 0.8rem; border-top: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 0.75rem 0.9rem; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--teal-deep); border-bottom-color: var(--teal); font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.g-facts.four { grid-template-columns: repeat(4, 1fr); margin: 0.6rem 0; }
@media (max-width: 640px) { .g-facts.four { grid-template-columns: 1fr 1fr; } }
.hist { margin: 0 0 0.7rem; }
.hist b { display: block; font-size: 0.82rem; color: var(--muted); }
.ctable .tr { grid-template-columns: minmax(10rem, 1.4fr) 9rem 7rem 5rem 7rem 9rem; text-decoration: none; }
.dstable .tr { grid-template-columns: minmax(12rem, 1.6fr) 7.5rem 7rem 7rem 7rem 7.5rem 4rem; cursor: default; }
.dstable .tr:hover { background: var(--card); }
.dstable .tr.faded { opacity: 0.55; }
.dsd { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.chg { font-weight: 700; font-size: 0.85rem; } .chg.better { color: var(--teal); } .chg.worse { color: var(--alert); } .chg.same { color: var(--muted); }
.arow { grid-template-columns: 11rem 12rem 6rem minmax(0, 1fr) 9rem; text-decoration: none; }
.strow { grid-template-columns: minmax(0, 1.3fr) 13rem 6rem 11rem; text-decoration: none; }
.plrow { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 13rem 6rem; text-decoration: none; }
.cbar-l b.cbar-centre { font-size: 1.08rem; }
.pw-input { width: 100%; font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r-field); background: var(--field); color: var(--ink); min-height: 44px; }
.ok-msg { color: var(--teal-deep); font-weight: 700; margin: 0.4rem 0; }
.ok-msg:empty, .error:empty { display: none; }
.cform.narrow { max-width: 34rem; }
.handover { border: 2px solid var(--teal); background: var(--mint); }
.handover .kv dd { text-align: left; }
.handover code { font-size: 1rem; background: var(--card); padding: 0.1rem 0.4rem; border-radius: 6px; }
.handover .temp-pw { font-size: 1.15rem; letter-spacing: 0.04em; }
.cform .actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.arow2 { grid-template-columns: 9rem minmax(0, 1fr); cursor: default; }
.linkish { color: var(--teal); font-weight: 700; font-size: 0.88rem; text-align: right; }
@media (max-width: 860px) {
  .ctable .tr, .dstable .tr, .arow, .strow, .plrow { grid-template-columns: 1fr 1fr; }
  .dstable .tr.th { display: none; }
}
.rev { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.rev:first-of-type { border-top: 0; padding-top: 0; }
.rev-h { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; align-items: baseline; }
.rev-n { margin-left: auto; font-size: 0.85rem; color: var(--muted); }
.goal-h { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.goal-badges { display: flex; gap: 0.6rem; align-items: center; flex: 0 0 auto; }
.gchart { width: 100%; height: auto; max-height: 190px; display: block; margin-top: 0.4rem; }
.gchart .grid { stroke: var(--line); stroke-width: 1; }
.gchart .ax { font-size: 10px; fill: var(--muted); font-family: inherit; }
.gchart .tg { fill: var(--amber); font-weight: 700; }
.gchart .tgt { stroke: #d39b2a; stroke-width: 1.5; stroke-dasharray: 5 4; }
.gchart .ln { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; }
.gchart .dot { fill: var(--card); stroke: var(--teal); stroke-width: 2; }
.gchart .dot.ok { fill: var(--teal); }
.sess-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.sess-row:first-child { border-top: 0; padding-top: 0; }
.sess-d b { display: block; } .sess-d .small { display: block; }
@media (max-width: 640px) { .sess-row { grid-template-columns: 1fr; gap: 0.3rem; } }
.cform h2 { margin: 1.2rem 0 0.6rem; } .cform h1 + h2, .cform > h2:first-child { margin-top: 0.4rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 0.9rem; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.cform input[type="date"], .cform input[type="email"], .cform input[type="tel"], .cform input[type="password"] { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: var(--r-field); padding: 0.6rem 0.75rem; min-height: 44px; }
.cform .actions { justify-content: flex-end; }
.cform .actions .btn-primary { flex: 0 0 auto; width: auto; padding-left: 1.6rem; padding-right: 1.6rem; }
.dpick { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.dp { display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid var(--line); background: var(--field); border-radius: 999px; padding: 0.3rem 0.8rem 0.3rem 0.35rem; font: inherit; font-size: 0.9rem; color: var(--ink); }
.dp.on { background: var(--mint); border-color: var(--teal); color: var(--teal-deep); font-weight: 700; }
.rsec { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin: 1rem 0; }
.rsec h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.4rem; color: var(--teal-deep); }
.rsec .lbl { font-weight: 700; color: var(--muted); font-size: 0.85rem; margin: 0.4rem 0 0; }
.sgoal { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.trials { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.trials input { width: 5.5rem; }
.centre-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--mint); border: 1px solid var(--mint-line); color: var(--teal-deep); font-weight: 700; border-radius: var(--r-field); padding: 0.55rem 0.8rem; margin-bottom: 1rem; }
.org-cta .btn-secondary { margin-bottom: 0.5rem; }
@media print { .cbar, .tabs, .ch-actions, .backlink { display: none !important; } }
#handover { scroll-margin-top: 6rem; }
