/* Lulabee v2 — one stylesheet, no build step.
   Brand (docs/v1-reference + v1 brand audit): warm paper world, espresso ink, one clay accent,
   steady slate for security contexts. Serif for human headings, humanist sans for body.
   Sized for older readers: 18px base, 48px targets, high contrast, visible focus. */

:root {
  --paper: #FAF7F2;
  --surface: #FFFFFF;
  --surface-2: #F3EEE6;
  --ink: #241F1B;
  --ink-2: #4A423B;
  --muted: #6B6158;
  --line: #D8D1C7;
  --line-strong: #B9AFA2;
  --clay: #A6502E;
  --clay-hover: #8C4123;
  --clay-tint: #F6E7DF;
  --slate: #2E4250;
  --slate-tint: #E6ECF0;
  --ok: #2F6B45;
  --ok-tint: #E4F1E8;
  --warn: #8A5A00;
  --warn-tint: #FBF0D9;
  --danger: #A2302A;
  --danger-tint: #F9E3E1;
  --focus: #1E5AA8;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(36, 31, 27, .06), 0 4px 16px rgba(36, 31, 27, .05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1B1815;
    --surface: #24201C;
    --surface-2: #2C2722;
    --ink: #F2ECE4;
    --ink-2: #D9D0C5;
    --muted: #ADA296;
    --line: #443C34;
    --line-strong: #5E544A;
    --clay: #E08A63;
    --clay-hover: #EBA27F;
    --clay-tint: #3A2A22;
    --slate: #A9C1D1;
    --slate-tint: #23303A;
    --ok: #7BC596;
    --ok-tint: #1F3226;
    --warn: #E8B85C;
    --warn-tint: #382C14;
    --danger: #F08E86;
    --danger-tint: #3D2220;
    --focus: #8DB8F2;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.55;
}
img, svg { max-width: 100%; }
a { color: var(--clay); text-underline-offset: 3px; }
a:hover { color: var(--clay-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 2rem; letter-spacing: -.01em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* ---------- Header / shell ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .inner { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.brand svg { width: 30px; height: 30px; color: var(--clay); }
.site-header nav { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.site-header nav a, .site-header nav button { font-size: .9rem; }
.demo-ribbon { background: var(--slate); color: #fff; text-align: center; font-size: .85rem; padding: 6px 12px; }
.demo-ribbon a, .demo-ribbon .linklike { color: #fff; }
.demo-ribbon { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; align-items: center; }
.demo-ribbon form.inline { display: inline; margin: 0; }
.page { max-width: 760px; margin: 0 auto; padding: 32px 20px 72px; }
.page.wide { max-width: 1180px; }
.page.narrow { max-width: 560px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer .inner { max-width: 1180px; margin: 0 auto; padding: 20px; display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* App shell with side navigation (dashboard pages, Guided Entry) */
.shell { max-width: 1180px; margin: 0 auto; padding: 24px 20px 72px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
.sidenav { font-size: .92rem; }
.sidenav h3 { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; font-weight: 700; }
.sidenav ul { list-style: none; padding: 0; margin: 0; }
.sidenav li a, .sidenav li span { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.sidenav li a:hover { background: var(--surface-2); }
.sidenav li a[aria-current="page"] { background: var(--clay-tint); color: var(--ink); font-weight: 600; }
.sidenav .done::after { content: " ✓"; color: var(--ok); }
.sidenav .skipped { color: var(--muted); }
.sidenav .note { margin-top: 18px; color: var(--muted); font-size: .85rem; }
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; gap: 12px; }
  .sidenav { order: 2; border-top: 1px solid var(--line); padding-top: 12px; }
  .sidenav.guided-steps { order: 0; border: 0; padding: 0; }
  .sidenav.guided-steps ul { display: none; }
  .sidenav.guided-steps h3 { display: none; }
}

/* ---------- Eyebrow / step header ---------- */
.eyebrow { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 14px; }
.eyebrow .sep { margin: 0 .45em; }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.crumbs { font-size: .85rem; color: var(--muted); margin: -4px 0 12px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.steps-bar { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--muted); margin: 0 0 20px; padding: 0; list-style: none; }
.steps-bar li[aria-current="step"] { color: var(--ink); font-weight: 700; }
.steps-bar li + li::before { content: "›"; margin-right: 14px; color: var(--line-strong); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: var(--radius); border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.btn-primary { background: var(--clay); color: #fff; }
.btn-primary:hover { background: var(--clay-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--clay); color: var(--ink); }
.field-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 8px; }
.field-heading h2 { margin: 0; font-size: 1.25rem; }
.field-heading details.info { flex: 1; }
.field-heading details.info summary { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; list-style: none; color: var(--clay); font-size: 1.2rem; }
.field-heading details.info summary::-webkit-details-marker { display: none; }
.warn-text { color: #9A4A0B; }
.btn-inline { background: none; border: 0; padding: 0; font: inherit; color: var(--clay); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-link { background: none; color: var(--clay); padding-left: 6px; padding-right: 6px; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); color: #fff; }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--clay); text-decoration: underline; cursor: pointer; }
form.inline { display: inline; }

/* ---------- Forms ---------- */
.field { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field legend { font-size: 1rem; padding: 0; }
.req { color: var(--clay); font-size: .7em; vertical-align: super; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"],
input[type="date"], input[type="url"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
}
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 3px solid color-mix(in srgb, var(--focus) 25%, transparent); outline-offset: 0; }
input[readonly] { background: var(--surface-2); }
.hint { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }
.error { color: var(--danger); font-size: .92rem; font-weight: 600; margin: 6px 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.row { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.row-3 { display: grid; gap: 0 18px; grid-template-columns: 2fr 1.4fr 1fr; }
@media (max-width: 640px) { .row-3 { grid-template-columns: 1fr; } }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 12px; border: 1.5px solid var(--line-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--surface-2); }
.input-prefix input { border-radius: 0 var(--radius) var(--radius) 0; }
.secret { display: flex; gap: 8px; }
.secret input { flex: 1; }
.btn-show { min-height: 48px; padding: 0 14px; border-radius: var(--radius); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.code-input { font-family: var(--mono); font-size: 1.4rem !important; letter-spacing: .25em; max-width: 220px; }
.field-check { display: flex; gap: 12px; align-items: flex-start; }
.field-check input[type="checkbox"], .check-item > input, .radio-item > input, .card-option > input { width: 22px; height: 22px; margin: 3px 0 0; flex: none; accent-color: var(--clay); }
.field-check label { font-weight: 400; }
.field-check .hint { display: block; }
.field-check .error { flex-basis: 100%; }
.field-check.has-error { flex-wrap: wrap; }
.checklist { display: grid; gap: 10px; }
.checklist.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.check-item, .radio-item { display: flex; gap: 12px; align-items: flex-start; }
.check-item label, .radio-item label { font-weight: 400; cursor: pointer; }
.check-item { flex-wrap: wrap; }
.check-item > label { flex: 1; }
.check-sub { flex: 0 0 100%; padding-left: 34px; }
.check-sub label { font-weight: 600; }
.check-sub:has(> [hidden]:only-child) { display: none; }
.check-desc, .card-desc { display: block; color: var(--muted); font-size: .9rem; }
.radios.inline { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.card-options { display: grid; gap: 12px; }
.card-option { position: relative; }
.card-option input { position: absolute; left: 18px; top: 20px; }
.card-option label { display: block; padding: 16px 18px 16px 54px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; }
.card-option input:checked + label { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay) inset; background: var(--clay-tint); }
.card-option a.panel.card-link { display: block; position: relative; margin: 0; padding: 16px 18px 16px 54px; text-decoration: none; color: inherit; }
.card-option a.panel.card-link.plain { padding-left: 18px; }
.loc-tree { list-style: none; padding: 0; margin: 10px 0 0; }
.loc-tree.panel { padding: 6px 18px; }
.loc-row { padding: 10px 0; border-top: 1px solid var(--line); }
.loc-tree .loc-row:first-child { border-top: 0; }
.loc-elbow { color: var(--line-strong); }
.card-dot { position: absolute; left: 18px; top: 20px; width: 22px; height: 22px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.card-title { display: block; font-weight: 700; margin-bottom: 2px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--slate-tint); color: var(--slate); vertical-align: middle; }
.badge.ok { background: var(--ok-tint); color: var(--ok); }
.badge.warn { background: var(--warn-tint); color: var(--warn); }
.badge.danger { background: var(--danger-tint); color: var(--danger); }
.badge.clay { background: var(--clay-tint); color: var(--clay); }
.upload-drop { display: flex; flex-direction: column; gap: 2px; padding: 18px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; text-align: center; }
.upload-drop:hover { border-color: var(--clay); }
.upload-title { font-weight: 700; }
.upload input[type="file"] { margin-top: 10px; font-size: .9rem; }
.upload-list { list-style: none; padding: 0; margin: 0 0 10px; }
.upload-list li { padding: 8px 12px; background: var(--surface-2); border-radius: 8px; margin-bottom: 6px; }
.either { border: 0; padding: 0; min-width: 0; }
.either legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.either-options { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 14px; align-items: start; }
.either-option .field { margin-bottom: 0; }
.either-option label { font-weight: 600; }
.either-or { align-self: center; padding-top: 22px; font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: .85rem; }
@media (max-width: 640px) { .either-options { grid-template-columns: 1fr; } .either-or { padding: 6px 0; } }
@media (max-width: 640px) { .pointer-row { grid-template-columns: 1fr; } }

/* Error summary */
.error-summary { border: 2px solid var(--danger); background: var(--danger-tint); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 24px; }
.error-summary h2 { font-family: var(--sans); font-size: 1rem; margin: 0 0 6px; color: var(--danger); }
.error-summary ul { margin: 0; }
.error-summary a { color: var(--danger); font-weight: 600; }

/* ---------- Panels, notices, banners ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); margin: 0 0 20px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.panel.quiet { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.notice { border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; background: var(--slate-tint); color: var(--ink); border-left: 4px solid var(--slate); }
.notice.ok { background: var(--ok-tint); border-color: var(--ok); }
.notice.warn { background: var(--warn-tint); border-color: var(--warn); }
.notice.danger { background: var(--danger-tint); border-color: var(--danger); }
.notice.clay { background: var(--clay-tint); border-color: var(--clay); }
.notice p:last-child { margin-bottom: 0; }
.notice .actions { margin-top: 12px; }
.check-ok::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.legal { font-size: .9rem; color: var(--ink-2); background: var(--surface-2); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; }

/* Feature list (security summary, how we protect) */
.points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; }
.points li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.points .icon { width: 40px; height: 40px; border-radius: 12px; background: var(--clay-tint); color: var(--clay); display: grid; place-items: center; }
.points .icon svg { width: 22px; height: 22px; }
.points strong { display: block; }

/* Summary table (all set, review) */
.summary { width: 100%; border-collapse: collapse; margin: 0 0 20px; }
.summary th, .summary td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.summary th { width: 30%; color: var(--muted); font-weight: 600; }
.summary td.act { width: 1%; white-space: nowrap; }

/* Data tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data thead th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data select { min-height: 40px; padding: 6px 34px 6px 10px; background-position: calc(100% - 18px) 17px, calc(100% - 12px) 17px; min-width: 128px; }

/* Codes list */
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; font-family: var(--mono); font-size: 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; margin: 0 0 16px; list-style: none; counter-reset: c; }
.codes li { counter-increment: c; }
.codes li::before { content: counter(c) ". "; color: var(--muted); }
.totp-key { font-family: var(--mono); font-size: 1.2rem; letter-spacing: .12em; background: var(--surface-2); padding: 10px 14px; border-radius: var(--radius); display: inline-block; }
.qr { width: 220px; height: 220px; color: #000; background: #fff; padding: 6px; border-radius: 8px; }

/* Simulated messages (development and demo) */
.sim { border: 1.5px dashed var(--slate); border-radius: var(--radius-lg); background: var(--surface); margin: 24px 0; overflow: hidden; }
.sim-head { background: var(--slate-tint); color: var(--slate); font-size: .75rem; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; padding: 8px 16px; }
.sim-meta { padding: 12px 18px 0; font-size: .88rem; color: var(--muted); }
.sim-meta div { margin: 2px 0; }
.sim-body { padding: 12px 18px 18px; white-space: pre-wrap; font-size: .95rem; }
.sim-body a { word-break: break-all; }
.sim .draft { color: var(--warn); }

/* Dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 0 0 32px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; text-decoration: none; color: var(--ink); display: block; box-shadow: var(--shadow); }
a.tile:hover { border-color: var(--clay); color: var(--ink); }
.tile .big { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1; display: block; margin-bottom: 6px; }
.tile .label { font-weight: 700; display: block; }
.tile .sub { color: var(--muted); font-size: .88rem; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--clay) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; margin-bottom: 8px; }
.ring span { width: 58px; height: 58px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.cat-card h3 { margin-bottom: 4px; }
.status { font-size: .85rem; font-weight: 700; }
.status.in-progress { color: var(--clay); }
.status.not-started { color: var(--muted); }
.status.complete { color: var(--ok); }
.cat-card .meta { color: var(--muted); font-size: .85rem; margin-top: 10px; display: flex; justify-content: space-between; gap: 8px; }
.progressbar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 0; }
.progressbar span { display: block; height: 100%; background: var(--clay); }
.todos { background: var(--warn-tint); border-radius: var(--radius-lg); padding: 14px 18px; margin: 0 0 24px; }
.todos h2 { font-family: var(--sans); font-size: 1rem; margin: 0 0 4px; }

/* Records */
.record { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; margin: 0 0 16px; }
.record-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; justify-content: space-between; margin-bottom: 8px; }
.record-head h3 { margin: 0; }
dl.fields { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; gap: 6px 18px; margin: 0; }
dl.fields dt { color: var(--muted); font-size: .92rem; }
dl.fields dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { dl.fields { grid-template-columns: 1fr; } dl.fields dd { margin-bottom: 8px; } }
.masked { font-family: var(--mono); letter-spacing: .1em; }
.record-top { display: flex; gap: 10px; align-items: center; }
.record-left { display: flex; gap: 12px; align-items: center; }
.record-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 14px; position: relative; }
.share-pop > summary { list-style: none; cursor: pointer; }
.share-pop > summary::-webkit-details-marker { display: none; }
.share-box { position: absolute; right: 0; bottom: 100%; z-index: 5; width: min(420px, 92vw); margin-bottom: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.share-box h2 { margin: 0 0 12px; font-size: 1.3rem; }
.share-person { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.share-who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--clay-tint); font-weight: 700; font-size: .85rem; flex: none; }
.share-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-modes > div { display: flex; flex-direction: column; gap: 4px; }
.level { display: block; text-align: center; padding: 6px 4px; border-radius: 8px; font-weight: 600; font-size: .85rem; background: #efece6; color: #55554f; }
.level-view { background: var(--clay-tint); color: inherit; }
.level-edit { background: var(--clay); color: #fff; }
.share-change { display: block; text-align: center; margin-top: 4px; }
/* Sharing & Access (Tracy's handoff): level colours, the access selector, mode tabs */
.level-category { --lvl-bg: #EEF6F5; --lvl-line: #A9CCC8; --tag-bg: #DCEBE9; --tag-ink: #174A47; }
.level-subcategory { --lvl-bg: #FBF3E4; --lvl-line: #E2C48F; --tag-bg: #F8EBD3; --tag-ink: #6B4508; }
.level-record { --lvl-bg: #F0F3FC; --lvl-line: #B8C5EA; --tag-bg: #E3E9F8; --tag-ink: #2F3F73; }
.access-card { background: var(--lvl-bg); border: 1px solid var(--lvl-line); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; }
.access-card h2, .access-card h3, .access-card h4 { margin: 2px 0 10px; font-size: 1.15rem; }
.access-card h3, .access-card h4 { font-family: inherit; font-size: 1rem; font-weight: 700; margin-bottom: 0; }
.access-card .access-card { margin: 12px 0 0; }
.access-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.tag { display: inline-block; background: var(--tag-bg); color: var(--tag-ink); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.pill { display: inline-block; background: #F8EBD3; color: #6B4508; font: 600 .75rem/1.6 inherit; padding: 0 9px; border-radius: 999px; vertical-align: middle; }
.rel { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.rel.differs { color: #6B4508; } .rel.differs-record { color: #2F3F73; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #B9B9B3; border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { min-height: 44px; border: 0; border-left: 1px solid #B9B9B3; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.seg button:first-of-type { border-left: 0; }
.seg button[aria-pressed="true"] { background: #1F5F5B; color: #fff; }
details.by { margin-top: 12px; }
details.by > summary { display: inline-block; cursor: pointer; list-style: none; padding: 8px 14px; border-radius: 10px; font-weight: 600; background: var(--tag-bg); color: var(--tag-ink); border: 1px solid var(--lvl-line); }
details.by > summary::-webkit-details-marker { display: none; }
details.by > summary.sr-only { position: absolute; }
.mode-tabs { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 0 0 16px; }
.mode-tabs a { display: block; text-align: center; padding: 10px 6px; border: 1px solid #B9B9B3; border-radius: 10px; background: #fff; text-decoration: none; color: inherit; font-weight: 600; }
.mode-tabs a[aria-current="step"] { background: #1F5F5B; border-color: #1F5F5B; color: #fff; }
.mode-tabs .num { opacity: .75; }
.levels-key { font-size: .9rem; }
.read-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.read-levels > div { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; }
.read-level { text-align: center; padding: 5px 4px; border-radius: 8px; background: #fff; border: 1px solid #D5D5CF; color: #55554F; font-weight: 600; }
.read-level.view { border-color: #1F5F5B; color: #163F3C; }
.read-level.edit { background: #1F5F5B; border-color: #1F5F5B; color: #fff; }
.mode-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; margin-top: 8px; }
.mode-row > span { font-weight: 600; font-size: .9rem; }
.varies { background: #fff; border: 1px solid var(--lvl-line); border-radius: 10px; padding: 10px 12px; margin-top: 4px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(30, 24, 20, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; max-width: 520px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; }
table.report th, table.report td { text-align: left; vertical-align: top; padding: 8px 10px; font-size: .92rem; }
table.report thead th { font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
@media print { .no-print, .sidenav, .site-header, .site-footer { display: none !important; } .shell { display: block; } }
.stamp { color: var(--muted); font-size: .85rem; margin-top: 10px; }

/* Stage pills and tracker */
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .82rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.pill.on { background: var(--ok-tint); color: var(--ok); }
.pill.off { background: var(--surface-2); color: var(--muted); }
.pill.wait { background: var(--warn-tint); color: var(--warn); }
.tracker { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.tracker li { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); font-size: .88rem; color: var(--muted); border-top: 4px solid var(--line); }
.tracker li.done { color: var(--ink); border-top-color: var(--ok); }
.tracker li.now { color: var(--ink); border-top-color: var(--clay); font-weight: 700; }

/* Dialog-style confirmation pages */
.confirm-box { max-width: 520px; margin: 32px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px 28px; }

/* Terms reader */
.terms-docs { display: grid; gap: 16px; margin: 4px 0 20px; }
.terms-docs .terms-reader { height: 260px; }
.legal-note { font-size: .92rem; color: var(--muted); margin: 6px 0 10px; }
.terms-reader { height: 52vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; }
.terms-progress { text-align: center; color: var(--muted); font-size: .9rem; margin: 10px 0; }

/* Password checklist */
.pw-rules { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; }
.pw-rules li::before { content: "○ "; color: var(--muted); }
.pw-rules li.met::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.pw-rules li.unmet::before { content: "✗ "; color: var(--danger); font-weight: 700; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 4px; }
.meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .4s ease; }
.meter[data-level="Fair"] span { width: 50%; background: var(--warn); }
.meter[data-level="Strong"] span { width: 80%; background: var(--ok); }
.meter[data-level="Very strong"] span { width: 100%; background: var(--ok); }
.meter[data-level="Weak"] span { width: 25%; }

/* Breakout notes printed in the walkthrough are not part of the product. */

/* Utility */
.stack > * + * { margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.right { text-align: right; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--clay-tint); color: var(--clay); font-weight: 700; font-size: .85rem; margin-right: 8px; vertical-align: middle; }
[hidden] { display: none !important; }

@media print {
  .site-header, .site-footer, .sidenav, .actions, .demo-ribbon, .sim { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Guided Entry: section label left, exit upper right (Tracy's 11-4 review, page 51) */
.guided-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.guided-top .eyebrow { margin: 0; }
.guided-top .guided-exit { margin-left: auto; padding: 0; }

/* Paid Tier areas: visible but greyed out (Tracy's 11-4 review, page 129) */
.locked { opacity: .6; background: var(--surface-2); }
.locked h2, .locked h3 { color: var(--muted); }

/* Message library (/admin/messages, Tracy's 11-4 review) */
.lib-filters { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 24px; }
.lib-filters a[aria-current] { font-weight: 700; text-decoration: none; color: var(--ink); }
.lib-entry { border-top: 1px solid var(--line); padding: 24px 0; }
.lib-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lib-head h2 { margin: 0; font-size: 1.15rem; }
.lib-head code { font-size: .95rem; }
.lib-notes { color: var(--muted); font-size: .92rem; margin: 8px 0 12px; }
.lib-version { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.lib-email { max-width: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; }
.lib-email p { margin: 0 0 12px; }
.lib-email h4 { margin: 18px 0 6px; }
.lib-email blockquote { margin: 0 0 12px; padding: 6px 14px; border-left: 3px solid var(--line-strong); color: var(--ink-2); }
.lib-subject { font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.lib-subject span { font-weight: 400; color: var(--muted); }
.lib-button { display: inline-block; background: var(--clay); color: #fff; font-weight: 600; padding: 8px 16px; border-radius: var(--radius); }
.lib-small { font-size: .85rem; color: var(--muted); }
.lib-sms { max-width: 420px; background: var(--surface-2); border-radius: 18px; padding: 12px 16px; line-height: 1.45; }
.lib-standalone { max-width: 860px; margin: 0 auto; padding: 32px 24px; }
@media print { .lib-email, .lib-sms { break-inside: avoid; } .lib-head { break-after: avoid; } }
.lib-index { columns: 2; column-gap: 32px; font-size: .9rem; padding-left: 18px; }
.lib-index li { break-inside: avoid; }
.legal-docs { display: grid; gap: 16px; margin: 0 0 24px; }
.legal-docs .terms-reader { height: 18rem; }
.legal-docs .terms-progress { text-align: left; margin: 6px 0 0; }
.top-actions { display: flex; justify-content: flex-end; margin: 0 0 4px; }
.pw-choice legend { font-weight: 600; margin-bottom: 6px; }
.pw-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.pw-pair .field { margin-bottom: 0; }
.pw-or { align-self: center; margin-top: 22px; font-weight: 600; color: var(--muted); text-transform: uppercase; font-size: .85rem; }
@media (max-width: 640px) { .pw-pair { grid-template-columns: 1fr; } .pw-or { margin-top: 0; justify-self: start; } }
.paid-tier { opacity: .55; filter: grayscale(1); }
a.cat-card.paid-tier { display: block; color: inherit; text-decoration: none; }
