/* GOV.UK Design System inspired styling (no crown/logo - private portal) */
:root {
  --blue: #1d70b8; --dark-blue: #003078; --light-blue: #d2e2f1; --text: #0b0c0c; --secondary: #505a5f;
  --border: #b1b4b6; --light-grey: #f3f2f1; --mid-grey: #e8e9ea; --white: #fff; --green: #00703c;
  --green-dark: #002d18; --red: #d4351c; --yellow: #ffdd00; --orange: #f47738; --purple: #4c2c92;
  --turquoise: #28a197; --focus: #ffdd00;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--white);
  font-size: 16px; line-height: 1.4; }
@media (min-width: 641px) { body { font-size: 19px; line-height: 1.32; } }
a { color: var(--blue); text-underline-offset: .15em; }
a:hover { color: var(--dark-blue); text-decoration-thickness: 3px; }
a:focus, button:focus-visible, input:focus, select:focus, textarea:focus, summary:focus {
  outline: 3px solid var(--focus); outline-offset: 0; box-shadow: 0 -2px var(--focus), 0 4px var(--text); }
a:focus { background: var(--focus); color: var(--text); text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 641px) { .wrap { padding: 0 30px; } }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 99; padding: 8px; }
.hidden { display: none !important; }
.muted { color: var(--secondary); }
.nowrap { white-space: nowrap; }

/* Header */
.topbar { background: var(--blue); color: #fff; border-bottom: 10px solid var(--dark-blue); }
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand:hover { color: #fff; }
.brand-mark { border: 3px solid #fff; padding: 0 6px; font-size: 22px; letter-spacing: 1px; }
.brand-name { font-size: 18px; }
@media (max-width: 640px) { .brand-name { font-size: 15px; } }
.topnav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.topnav a { color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
.topnav a:hover, .topnav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; }
.topnav a:focus { color: var(--text); }

.subnav { background: var(--light-grey); border-bottom: 1px solid var(--border); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0 22px; overflow-x: auto; scrollbar-width: thin; }
.subnav li { flex: none; }
.subnav a { display: block; padding: 12px 0 9px; font-size: 16px; font-weight: 700; text-decoration: none; color: var(--blue); border-bottom: 4px solid transparent; }
.subnav a[aria-current="page"] { border-bottom-color: var(--blue); color: var(--text); }
.subnav .subnav-glove a { color: var(--red); }
.subnav-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.save-state { font-size: 14px; color: var(--secondary); padding: 6px 0; }
.save-state.err { color: var(--red); font-weight: 700; }

.phase-banner .tag { flex: none; }
.phase-banner { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; font-size: 15px; }
main { display: block; padding-top: 24px; padding-bottom: 60px; min-height: 60vh; }
main:focus { outline: none; }
.footer { border-top: 1px solid var(--border); background: var(--light-grey); padding: 24px 0; font-size: 15px; color: var(--secondary); }

/* Typography */
h1, .h-xl { font-size: 32px; line-height: 1.1; margin: 0 0 20px; font-weight: 700; }
h2, .h-l { font-size: 24px; line-height: 1.15; margin: 0 0 15px; font-weight: 700; }
h3, .h-m { font-size: 19px; margin: 0 0 10px; font-weight: 700; }
@media (min-width: 641px) { h1, .h-xl { font-size: 44px; } h2, .h-l { font-size: 32px; } h3, .h-m { font-size: 24px; } }
.caption { display: block; color: var(--secondary); font-size: 16px; margin-bottom: 4px; }
@media (min-width: 641px) { .caption { font-size: 19px; } }
.lead { font-size: 19px; margin: 0 0 24px; }
@media (min-width: 641px) { .lead { font-size: 24px; } }
p { margin: 0 0 16px; }
.small { font-size: 15px; }

/* Buttons */
.btn { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  font: 700 16px/1.2 Arial, Helvetica, sans-serif; padding: 8px 12px 7px; border: 2px solid transparent; border-radius: 0;
  background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-dark); cursor: pointer; text-decoration: none;
  margin: 0 8px 12px 0; vertical-align: top; }
@media (min-width: 641px) { .btn { font-size: 19px; } }
.btn:hover { background: #005a30; color: #fff; }
.btn:focus-visible { background: var(--focus) !important; color: var(--text) !important; box-shadow: 0 2px 0 var(--text) !important; outline: none; border-color: var(--focus); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn--secondary { background: var(--light-grey); color: var(--text); box-shadow: 0 2px 0 #929191; }
.btn--secondary:hover { background: #dbdad9; color: var(--text); }
.btn--warning { background: var(--red); box-shadow: 0 2px 0 #55150b; }
.btn--warning:hover { background: #aa2a16; }
.btn--blue { background: var(--blue); box-shadow: 0 2px 0 var(--dark-blue); }
.btn--blue:hover { background: var(--dark-blue); }
.btn--small { font-size: 15px !important; padding: 5px 9px 4px; margin-bottom: 6px; }
.btn--inverse { background: #fff; color: var(--blue); box-shadow: 0 2px 0 #144e81; }
.btn-group { display: flex; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; margin-right: 12px; }
.linkbtn:hover { color: var(--dark-blue); text-decoration-thickness: 3px; }
.linkbtn--danger { color: var(--red); }
.iconbtn { background: #fff; border: 1px solid var(--border); width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; padding: 0; color: var(--text); }
.iconbtn:hover { background: var(--light-grey); }
.iconbtn:disabled { opacity: .35; cursor: default; }

/* Tags */
.tag { display: inline-block; padding: 2px 8px 1px; font-weight: 700; font-size: 14px; line-height: 1.25; letter-spacing: .3px;
  text-transform: none; background: #bbd4ea; color: #0c2d4a; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tag--grey { background: #e5e6e7; color: #0b0c0c; } .tag--green { background: #cce2d8; color: #005a30; }
.tag--turquoise { background: #d4ecea; color: #10403c; } .tag--blue { background: #bbd4ea; color: #0c2d4a; }
.tag--light-blue { background: #e8f1f8; color: #0c2d4a; } .tag--purple { background: #e5e1ef; color: #3d2375; }
.tag--pink { background: #efdfed; color: #6b1c5c; } .tag--red { background: #f4cdc6; color: #2a0b06; }
.tag--orange { background: #fcd6c3; color: #6e3619; } .tag--yellow { background: #fff7bf; color: #594d00; }
.tag--solid-red { background: var(--red); color: #fff; } .tag--solid-black { background: #0b0c0c; color: #fff; }

/* Forms */
.field { margin-bottom: 22px; }
.label { display: block; font-weight: 700; margin-bottom: 5px; }
.hint { display: block; color: var(--secondary); margin-bottom: 8px; font-size: 16px; }
.input, .select, .textarea { font: inherit; font-size: 16px; width: 100%; padding: 6px 8px; border: 2px solid var(--text); border-radius: 0; background: #fff; color: var(--text); min-height: 40px; }
@media (min-width: 641px) { .input, .select, .textarea { font-size: 19px; } }
.textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.input--w10 { max-width: 12ch; } .input--w20 { max-width: 22ch; } .input--w30 { max-width: 34ch; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.choice { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; padding: 3px 0; min-height: 32px; }
.choice input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--text); }
.choices--stack { flex-direction: column; }
.fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.fieldset legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 24px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 0 24px; }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.error-summary { border: 5px solid var(--red); padding: 16px 20px; margin-bottom: 24px; }
.error-summary h2 { font-size: 22px; }
.error-summary a { color: var(--red); font-weight: 700; }

/* Layout pieces */
.card { background: #fff; border: 1px solid var(--border); padding: 18px 20px; margin-bottom: 20px; }
.card--accent { border-top: 5px solid var(--blue); }
.card--warn { border-left: 8px solid var(--orange); }
.card--red { border-left: 8px solid var(--red); }
.card h2, .card h3 { margin-top: 0; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-bottom: 24px; }
.stat { background: var(--light-grey); border-left: 6px solid var(--blue); padding: 14px 16px; text-decoration: none; color: var(--text); display: block; }
.stat:hover { background: var(--mid-grey); color: var(--text); }
.stat b { display: block; font-size: 40px; line-height: 1; margin-bottom: 4px; }
.stat span { font-size: 16px; font-weight: 700; }
.stat--green { border-color: var(--green); } .stat--orange { border-color: var(--orange); } .stat--red { border-color: var(--red); } .stat--purple { border-color: var(--purple); }
.panel { background: var(--green); color: #fff; padding: 28px 20px; text-align: center; margin-bottom: 28px; }
.panel h1 { color: #fff; margin-bottom: 10px; }
.panel-ref { font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.panel--blue { background: var(--blue); }
.inset { border-left: 10px solid var(--border); padding: 12px 16px; margin: 0 0 22px; }
.warning-text { display: flex; gap: 14px; align-items: flex-start; font-weight: 700; margin-bottom: 22px; }
.warning-text::before { content: "!"; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--text); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.notice { background: var(--light-blue); border-left: 6px solid var(--blue); padding: 12px 16px; margin-bottom: 22px; }
.section-break { border: 0; border-top: 1px solid var(--border); margin: 30px 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 16px; }
.toolbar .select, .toolbar .input { width: auto; max-width: 100%; }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.back-link { display: inline-block; margin-bottom: 18px; font-size: 16px; color: var(--text); padding-left: 14px; position: relative; }
.back-link::before { content: ""; position: absolute; left: 2px; top: .45em; width: 7px; height: 7px; border: solid; border-width: 2px 0 0 2px; transform: rotate(-45deg); }

/* Summary list */
.summary { margin: 0 0 24px; display: grid; grid-template-columns: 1fr; }
.summary div { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--border); padding: 9px 0; }
@media (min-width: 641px) { .summary div { grid-template-columns: 34% 1fr; gap: 16px; } }
.summary dt { font-weight: 700; } .summary dd { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: 24px; }
table.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--border); }
.table th { font-weight: 700; }
.table tr.is-muted td { color: var(--secondary); background: #fafafa; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--text); }
.table input.input, .table select.select { font-size: 16px; min-height: 34px; padding: 3px 6px; }
@media (max-width: 760px) {
  table.table--stack thead { display: none; }
  table.table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { border: 1px solid var(--border); border-left: 6px solid var(--blue); padding: 10px 12px; margin-bottom: 14px; }
  .table--stack tr.is-muted { border-left-color: var(--border); }
  .table--stack td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
  .table--stack td::before { content: attr(data-label); font-weight: 700; font-size: 14px; color: var(--secondary); }
  .table--stack td[data-label=""]::before { display: none; }
  .table--stack td[data-label=""] { grid-template-columns: 1fr; }
}

/* Modal */
.modal { border: 0; padding: 0; width: min(720px, calc(100vw - 20px)); max-height: calc(100vh - 30px); box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.modal--wide { width: min(1000px, calc(100vw - 20px)); }
.modal::backdrop { background: rgba(11,12,12,.6); }
.modal-head { position: sticky; top: 0; background: #fff; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 10px; border-bottom: 4px solid var(--blue); }
.modal-head h2 { margin: 0; font-size: 24px; }
.modal-x { background: none; border: 0; font-size: 32px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-body { padding: 20px; }

#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(140%); background: var(--text); color: #fff; padding: 12px 18px; font-weight: 700; z-index: 1000; transition: transform .25s; max-width: calc(100vw - 32px); border-left: 6px solid var(--yellow); }
#toast.show { transform: translateX(-50%) translateY(0); }

/* Studio */
.studio { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1100px) { .studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } .studio-preview { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; } }
.studio-preview { background: #dcdcdc; padding: 14px; border: 1px solid var(--border); }
.studio-preview .toolbar { background: #fff; padding: 10px; margin: -14px -14px 14px; border-bottom: 1px solid var(--border); position: sticky; top: -14px; z-index: 3; }
.sec-card { border: 2px solid var(--text); margin-bottom: 18px; background: #fff; }
.sec-card.drop-target { outline: 4px dashed var(--blue); }
.sec-head { display: flex; gap: 8px; align-items: center; background: var(--light-grey); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.sec-head .input { font-weight: 700; min-height: 36px; padding: 4px 8px; }
.sec-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.handle { cursor: grab; user-select: none; font-size: 20px; color: var(--secondary); padding: 0 4px; flex: none; touch-action: none; }
.handle:active { cursor: grabbing; }
.fld-list { padding: 8px 10px; min-height: 24px; }
.fld { border: 1px solid var(--border); border-left: 5px solid var(--blue); margin-bottom: 8px; background: #fff; }
.fld.is-open { border-left-color: var(--yellow); box-shadow: 0 0 0 2px var(--text); }
.fld.drop-before { box-shadow: 0 -4px 0 var(--blue); }
.fld.dragging, .sec-card.dragging { opacity: .45; }
.fld-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; flex-wrap: wrap; }
.fld-title { flex: 1 1 160px; font-size: 16px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.fld-tools { display: flex; gap: 4px; }
.fld-edit { padding: 12px 14px 4px; border-top: 1px solid var(--border); background: #fbfbfb; }
.fld-edit .field { margin-bottom: 14px; }
.fld-edit .input, .fld-edit .select, .fld-edit .textarea { font-size: 16px; }
.fld-end { border: 2px dashed transparent; padding: 4px; color: var(--secondary); font-size: 14px; }
.fld-end.drop-target { border-color: var(--blue); }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 4px 10px 12px; }
.add-row .select { width: auto; font-size: 16px; min-height: 36px; padding: 2px 6px; }
.merge-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.merge-bar button { font: 700 13px/1 ui-monospace, Menlo, monospace; background: #fff7bf; border: 1px solid #b59f00; padding: 6px 7px; cursor: pointer; }
.merge-bar button:hover { background: var(--yellow); }
.letter-textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px !important; min-height: 440px; line-height: 1.5; }
.theme-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-pick label { display: flex; align-items: center; gap: 6px; border: 2px solid var(--border); padding: 4px 8px; cursor: pointer; font-size: 14px; font-weight: 700; background: #fff; }
.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick label:has(input:checked) { border-color: var(--text); box-shadow: inset 0 -4px 0 var(--text); }
.theme-pick label:has(input:focus-visible) { outline: 3px solid var(--focus); }
.swatch { width: 18px; height: 18px; border: 1px solid rgba(0,0,0,.3); flex: none; }
.swatch--pink { background: linear-gradient(135deg, #fbe0e8 50%, #b0305c 50%); }
.swatch--emerald { background: linear-gradient(135deg, #e7f6ef 50%, #047857 50%); }
.swatch--gov { background: linear-gradient(135deg, #1d70b8 50%, #ffdd00 50%); }

/* Timeline */
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; counter-reset: s; }
.steps li { position: relative; padding-top: 34px; font-size: 14px; font-weight: 700; text-align: center; color: var(--secondary); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; z-index: 1; color: var(--secondary); }
.steps li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 4px; background: var(--border); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--text); }
.steps li.done::before { content: "✓"; background: var(--green); border-color: var(--green); color: #fff; }
.steps li.done::after, .steps li.current::after { background: var(--green); }
.steps li.current { color: var(--text); }
.steps li.current::before { background: var(--blue); border-color: var(--blue); color: #fff; }
.history { list-style: none; padding: 0; margin: 0 0 24px; border-left: 4px solid var(--blue); }
.history li { padding: 0 0 12px 18px; position: relative; }
.history li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); }

/* Home / landing */
.hero { background: var(--blue); color: #fff; padding: 28px 22px; margin-bottom: 28px; }
.hero h1 { color: #fff; }
.hero p { font-size: 19px; margin: 0; max-width: 40em; }
.route-strip { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-weight: 700; margin: 14px 0 0; font-size: 16px; }
.route-strip span.arrow { color: var(--yellow); }

/* Glovebox emergency mode */
body.glovebox { background: #0b0c0c; }
body.glovebox .topbar, body.glovebox #subnav, body.glovebox .phase-banner, body.glovebox .footer { display: none; }
body.glovebox main { max-width: none; padding: 0 0 40px; color: #fff; }
.gb-bar { background: var(--red); color: #fff; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.gb-bar h1 { color: #fff; margin: 0; font-size: 26px; }
.gb-bar .btn { margin: 0; }
.gb-sos { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; background: #1f2021; }
.gb-sos a { flex: 1 1 140px; text-align: center; background: var(--yellow); color: #0b0c0c; font-size: 22px; font-weight: 700; padding: 12px; text-decoration: none; }
.gb-grid { display: grid; gap: 14px; padding: 14px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.gb-card { background: #fff; color: #0b0c0c; border-top: 10px solid var(--blue); padding: 14px 16px; }
.gb-card.has-allergy { border-top-color: var(--red); }
.gb-card h2 { font-size: 28px; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gb-tel { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #ddd; }
.gb-tel a { font-size: 22px; font-weight: 700; color: #0b0c0c; white-space: nowrap; }
.gb-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--secondary); margin-top: 10px; }
.gb-allergen { display: inline-block; background: var(--red); color: #fff; font-weight: 700; padding: 3px 8px; margin: 3px 4px 0 0; font-size: 16px; }
.gb-aid { display: inline-block; background: var(--yellow); color: #0b0c0c; font-weight: 700; padding: 3px 8px; margin: 3px 4px 0 0; font-size: 16px; }

/* Driving timer */
.timer { font-size: 54px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; margin: 6px 0 10px; }
.timer-bar { height: 14px; background: var(--mid-grey); margin-bottom: 14px; }
.timer-bar span { display: block; height: 100%; background: var(--green); transition: width .5s; }
.timer-bar.warn span { background: var(--orange); } .timer-bar.over span { background: var(--red); }


/* ---------- friendly public pages (13–20 year olds) ---------- */
.big-links { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 20px; }
.big-link { display: flex; gap: 16px; align-items: center; padding: 20px; border: 3px solid var(--blue); background: #fff; color: var(--text); text-decoration: none; font-size: 17px; box-shadow: 0 4px 0 var(--dark-blue); }
.big-link strong { font-size: 24px; color: var(--blue); }
.big-link:hover { background: #f4f8fb; color: var(--text); }
.big-link:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--dark-blue); }
.big-emoji { font-size: 44px; line-height: 1; flex: none; }
.teen-card { max-width: 560px; }
.input--big { font-size: 20px !important; min-height: 54px; letter-spacing: .5px; }
.btn--big { font-size: 20px !important; padding: 12px 22px 11px; min-height: 52px; }
@media (max-width: 640px) { .teen-card .btn--big, .status-hero .btn--big { width: 100%; } }
.status-hero { display: flex; gap: 18px; align-items: flex-start; padding: 22px; margin-bottom: 18px; border-left: 10px solid var(--blue); background: #eef4fa; }
.status-hero h2 { margin-bottom: 6px; }
.status-hero p { font-size: 19px; }
.status-emoji { font-size: 52px; line-height: 1; flex: none; }
.status-hero--green { border-color: var(--green); background: #e9f4ee; }
.status-hero--red { border-color: var(--red); background: #fcebe8; }
.status-hero--orange { border-color: var(--orange); background: #fef1e9; }
.status-hero--grey { border-color: var(--border); background: var(--light-grey); }
@media (max-width: 640px) { .status-hero { flex-direction: column; gap: 6px; padding: 18px 16px; } .status-emoji { font-size: 40px; } }
.choice-cards { display: grid; gap: 10px; }
.card-choice { display: flex; gap: 14px; align-items: center; border: 2px solid var(--border); padding: 14px 16px; cursor: pointer; background: #fff; font-size: 18px; min-height: 60px; }
.card-choice input { width: 26px; height: 26px; flex: none; accent-color: var(--blue); margin: 0; }
.card-choice:has(input:checked) { border-color: var(--blue); box-shadow: inset 6px 0 0 var(--blue); background: #f4f8fb; }
.card-choice:has(input:focus-visible) { outline: 3px solid var(--focus); }
.wiz-hide { display: none !important; }
.wiz-top { position: sticky; top: 0; z-index: 4; background: #fff; padding: 10px 0 12px; margin-bottom: 8px; }
.wiz-count { font-size: 17px; margin-bottom: 6px; }
.wiz-bar { height: 10px; background: var(--mid-grey); border-radius: 5px; overflow: hidden; }
.wiz-bar span { display: block; height: 100%; background: var(--green); transition: width .3s; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; position: sticky; bottom: 0; background: #fff; padding: 12px 0; border-top: 1px solid var(--border); margin-top: 12px; z-index: 4; }
.wiz-nav .btn { margin: 0; flex: 1; max-width: 260px; }
.wiz .doc-input, .wiz .doc-textarea { min-height: 50px; font-size: 18px; font-family: Arial, Helvetica, sans-serif; }
.wiz .doc-label { font-size: 17px; }
.wiz .doc-help { font-size: 15px; }
.wiz .doc-opt { min-height: 46px; font-size: 16px; padding: 4px 0; }
.wiz .doc-opt input { width: 26px; height: 26px; }
.wiz .doc-dob-in input { width: 40px; height: 50px; font-size: 22px; }
.wiz .sig-canvas { height: 160px; }
.wiz .doc-page { margin-bottom: 0; }
@media (max-width: 560px) { .wiz .doc-opts, .wiz .doc-opts[style] { grid-template-columns: 1fr !important; } .wiz .doc-sec-body > .doc-half { grid-column: 1 / -1; } }

.task-list { list-style: none; padding: 0; margin: 0 0 22px; border-top: 1px solid var(--border); }
.task { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.task-side { display: flex; gap: 10px; align-items: center; }
.task-side .btn { margin: 0; }

.doc-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 700; margin: 18px 0 8px; }
.scan-slot { background: #fff; border: 1px solid var(--border); padding: 8px; margin-bottom: 14px; text-align: center; }
.scan-slot img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.track-doc, #track-doc { background: #dcdcdc; padding: 12px; margin-bottom: 20px; }
.track-doc .doc-note { background: #fff; padding: 8px 10px; margin: 0 0 10px; }
@media print { .doc-note { margin: 0 0 6px; } .scan-slot { break-inside: avoid; border: 0; } }

.signin-card { max-width: 560px; }
.input--code { max-width: 9ch; letter-spacing: .4em; font-size: 1.6rem; text-align: center; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.acct-head .btn { margin: 8px 0 0; }
.acct-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.acct-tab { font: inherit; font-weight: 700; font-size: 1.05rem; padding: 10px 16px; border: 2px solid var(--border); background: #fff; border-radius: 999px; cursor: pointer; min-height: 44px; }
.acct-tab.is-on { background: #1d70b8; border-color: #1d70b8; color: #fff; }
.acct-tab:focus-visible { outline: 3px solid #ffdd00; outline-offset: 0; }
.count-badge { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: #d4351c; color: #fff; font-size: .85rem; text-align: center; }
.h-s { font-size: 1.15rem; font-weight: 700; margin: 18px 0 8px; }
@media (max-width: 520px) { .acct-tab { flex: 1 1 calc(50% - 8px); text-align: center; padding: 10px 8px; } }

/* Print: show only #print-root */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  body { background: #fff; }
  body[data-print-theme="pink"] { background: #fbe3ea; }
}
