/* Genealogy CoLab. Palette from "CoLab colors.png": four hues plus black.
   Everything else is mixed from them, never picked freehand. */
:root {
  --purple: #4D089A;
  --blue: #323EDD;
  --magenta: #DC2ADE;
  --lime: #E8F044;
  --ink: #111111;
  --paper: #FFFFFF;

  --ground: color-mix(in srgb, var(--purple) 3%, var(--paper));
  --line: color-mix(in srgb, var(--purple) 16%, var(--paper));
  --muted: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --soft: color-mix(in srgb, var(--ink) 40%, var(--paper));
  --purple-wash: color-mix(in srgb, var(--purple) 8%, var(--paper));
  --blue-wash: color-mix(in srgb, var(--blue) 8%, var(--paper));
  --magenta-wash: color-mix(in srgb, var(--magenta) 9%, var(--paper));
  --lime-wash: color-mix(in srgb, var(--lime) 45%, var(--paper));
  --blue-deep: color-mix(in srgb, var(--blue) 80%, var(--ink));
  --magenta-deep: color-mix(in srgb, var(--magenta) 62%, var(--ink));
  --error: var(--magenta-deep);

  --radius: 14px;
  --head: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--body); font-size: 18px; line-height: 1.55;
}
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--blue-deep); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ── Frame ── */
.topbar {
  background: var(--paper); border-bottom: 4px solid var(--blue);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo { height: 44px; width: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.nav a {
  text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.nav a:hover { background: var(--purple-wash); }
.nav a.active { background: var(--purple); color: var(--paper); }
.signout { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .9rem; padding: 8px; }
.menu-btn { display: none; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 16px 64px; }
.page-lede { font-size: 1.1rem; color: var(--muted); max-width: 44em; }
footer.culture {
  text-align: center; padding: 28px 16px 40px; font-family: var(--head); font-weight: 700;
  font-size: 1.1rem; color: var(--purple);
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .menu-btn {
    display: inline-flex; margin-left: auto; background: var(--purple); color: var(--paper);
    border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer;
  }
  .nav { display: none; flex-basis: 100%; flex-direction: column; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
  .logo { height: 36px; }
}

/* ── Pieces ── */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: var(--paper); border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 1rem;
  min-height: 48px;
}
.btn:hover { background: var(--blue-deep); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn.secondary { background: var(--paper); color: var(--blue-deep); border: 2px solid var(--blue); }
.btn.secondary:hover { background: var(--blue-wash); }
.btn.quiet { background: none; color: var(--blue-deep); padding: 8px 4px; min-height: 0; text-decoration: underline; }
.btn.small { padding: 8px 14px; min-height: 38px; font-size: .9rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue-deep); text-decoration: underline; cursor: pointer; font-size: inherit; }

.pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line); color: var(--ink); white-space: nowrap; }
.pill.done { background: var(--lime); }
.pill.in_progress { background: var(--blue-wash); color: var(--blue-deep); }
.pill.not_started { background: var(--ground); color: var(--muted); border: 1px solid var(--line); }

.banner {
  background: var(--lime); color: var(--ink); font-family: var(--head); font-weight: 800;
  font-size: 1.2rem; padding: 14px 20px; border-radius: var(--radius); margin-bottom: 18px;
}
.notice { background: var(--blue-wash); border-left: 4px solid var(--blue); padding: 12px 16px; border-radius: 8px; margin: 12px 0; }
.notice.warn { background: var(--magenta-wash); border-left-color: var(--magenta); }
.error-text { color: var(--error); font-weight: 600; }

/* ── Login ── */
.login { max-width: 520px; margin: 6vh auto; text-align: center; }
.login .logo { height: auto; width: min(360px, 80%); margin: 0 auto 20px; }
.login form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 20px; }

/* ── Forms ── */
label.field { display: block; margin-bottom: 18px; }
.field > span.lab { display: block; font-weight: 700; margin-bottom: 6px; }
.field .help { display: block; color: var(--muted); font-size: .92rem; margin: -2px 0 8px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=search], textarea, select {
  width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px;
  background: var(--paper); font-size: 1rem;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); border-color: var(--blue); }
.field.missing input, .field.missing textarea, .field.missing select, .choice.missing { border-color: var(--magenta); }
.field.missing .lab::after, .choice.missing .lab::after { content: " · needed"; color: var(--error); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.choice { border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--paper); }
.choice .lab { font-weight: 700; display: block; }
.choice .help { color: var(--muted); font-size: .92rem; display: block; margin: 4px 0 8px; }
.yesno { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.yesno label, .radio-list label, .check-list label {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 2px solid var(--line);
  border-radius: 999px; cursor: pointer; background: var(--paper);
}
.radio-list, .check-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.radio-list label, .check-list label { border-radius: 10px; }
.yesno input, .radio-list input, .check-list input { width: 20px; height: 20px; accent-color: var(--blue); }
.yesno label:has(input:checked), .radio-list label:has(input:checked), .check-list label:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-family: var(--head); font-weight: 800; font-size: 1.3rem; margin-bottom: 12px; padding: 0; }

/* ── Home ── */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.welcome-note { white-space: pre-wrap; font-size: 1.08rem; }
.personal-line { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; font-style: italic; }
.case-glance .ancestor { font-family: var(--head); font-weight: 800; font-size: 1.35rem; color: var(--purple); margin-bottom: 6px; }
.case-glance .question { font-size: 1.08rem; }
.meter { height: 12px; background: var(--purple-wash); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.meter > div { height: 100%; background: var(--magenta); border-radius: 999px; transition: width .3s; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: attr(data-n); width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple); color: var(--paper); display: grid; place-items: center;
  font-family: var(--head); font-weight: 800; font-size: 1.2rem;
}
.steps li.done::before { content: "✓"; background: var(--lime); color: var(--ink); }
.steps h3 { margin: 0 0 2px; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }
.steps .act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 640px) {
  .steps li { grid-template-columns: 40px 1fr; }
  .steps .act { grid-column: 2; align-items: flex-start; }
}

/* ── Chat ── */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } }
.chat { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.messages { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-height: 320px; max-height: 62vh; overflow-y: auto; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.assistant { background: var(--purple-wash); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--blue); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.assistant .who { font-weight: 800; font-size: .8rem; color: var(--purple); display: block; margin-bottom: 2px; font-family: var(--head); }
.msg.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 52px; max-height: 200px; }
.chat-status { padding: 0 18px 12px; font-size: .92rem; color: var(--muted); min-height: 1.5em; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.captured dl { margin: 0; }
.captured dt { font-weight: 700; font-size: .9rem; margin-top: 10px; }
.captured dd { margin: 2px 0 0; color: var(--muted); font-size: .95rem; white-space: pre-wrap; }

/* ── Case File ── */
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.case-field { margin-bottom: 22px; }
.case-field .lab { font-family: var(--head); font-weight: 800; font-size: 1.15rem; }
.case-field.prominent {
  background: var(--lime-wash); border: 3px solid var(--lime); border-radius: var(--radius); padding: 18px;
}
.case-field.prominent .lab { font-size: 1.3rem; }
.save-state { font-size: .85rem; color: var(--muted); min-height: 1.2em; margin-top: 4px; }
.links-list .link-row { display: grid; grid-template-columns: 1fr 1.4fr 150px auto; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 720px) { .links-list .link-row { grid-template-columns: 1fr; padding: 12px; border: 1px solid var(--line); border-radius: 10px; } }
.uploads { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.upload { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); font-size: .85rem; }
.upload .thumb { height: 110px; background: var(--purple-wash); display: grid; place-items: center; overflow: hidden; }
.upload .thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload .meta { padding: 8px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.upload .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-count { font-size: .85rem; color: var(--muted); }

/* ── Schedule / text pages ── */
.day h2 { color: var(--purple); }
.sched { list-style: none; margin: 0; padding: 0; }
.sched li { display: grid; grid-template-columns: 108px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.sched .time { font-weight: 800; font-family: var(--head); color: var(--blue-deep); }
.rich ul { padding-left: 1.2em; margin: 0 0 1em; }
.rich p:last-child { margin-bottom: 0; }

@media print {
  .topbar, footer.culture, .no-print, .save-state, .btn, .composer { display: none !important; }
  body { background: white; font-size: 12pt; }
  main { padding: 0; }
  .card { border: 0; padding: 0; }
  textarea { border: 0; padding: 0; resize: none; overflow: visible; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ── Footer links, back link, small cards ── */
footer.culture .foot-links { font-family: var(--body); font-weight: 400; font-size: .9rem; margin-top: 8px; }
footer.culture .foot-links a { color: var(--muted); }
.back { display: inline-block; margin-bottom: 10px; font-weight: 600; text-decoration: none; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.slim { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 20px; }
.done-line { margin: 12px 0 0; font-size: .92rem; }
.done-line a { color: var(--muted); }
.done-steps summary { cursor: pointer; }
.done-steps .steps { margin-top: 10px; }
.event-teaser { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  border-left: 6px solid var(--magenta); }
.event-teaser p { margin-bottom: 4px; }
.section-title { margin: 30px 0 12px; }
.pill.coming { background: var(--purple-wash); color: var(--purple); }
.pill.example { background: var(--lime); }

/* ── Case File: locked until the interview is done ── */
.lock-card { border: 3px solid var(--blue); background: var(--blue-wash); }
.lock-card h2 { color: var(--blue-deep); }
.locked textarea, .locked input { background: var(--ground); color: var(--muted); border-style: dashed; cursor: not-allowed; resize: none; }
.locked .case-field.prominent { background: var(--ground); border-color: var(--line); }
.locked { opacity: .85; }
.card.ghost { background: transparent; border-style: dashed; color: var(--muted); }
.ghost-list { margin: 0; padding-left: 1.2em; }
.future .section-title { margin: 0; }
.future { margin-top: 30px; }
.future .card-head { margin-bottom: 12px; }

/* ── Chat extras ── */
.composer-main { flex: 1; min-width: 0; }
.chat-foot .attach { cursor: pointer; }

/* ── At CoLab: three modes, each its own color ── */
.mode-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.mode-tab { border: 3px solid transparent; border-radius: 999px; padding: 10px 18px; font-weight: 800; cursor: pointer;
  font-family: var(--head); font-size: 1rem; background: var(--ground); color: var(--ink); min-height: 48px; }
.mode-tab.mode-helping { border-color: var(--blue); }
.mode-tab.mode-parking { border-color: var(--lime); }
.mode-tab.mode-lead { border-color: var(--magenta); }
.mode-tab.mode-helping[aria-selected="true"] { background: var(--blue); color: var(--paper); }
.mode-tab.mode-parking[aria-selected="true"] { background: var(--lime); }
.mode-tab.mode-lead[aria-selected="true"] { background: var(--magenta); color: var(--paper); }
.mode-preview { border-radius: var(--radius); overflow: hidden; border: 3px solid var(--line); }
.mode-bar { padding: 12px 18px; font-family: var(--head); font-weight: 800; font-size: 1.15rem; }
.mode-body { padding: 18px; background: var(--paper); }
.mode-preview.mode-helping { border-color: var(--blue); }
.mode-preview.mode-helping .mode-bar { background: var(--blue); color: var(--paper); }
.mode-preview.mode-parking { border-color: var(--lime); }
.mode-preview.mode-parking .mode-bar { background: var(--lime); }
.mode-preview.mode-lead { border-color: var(--magenta); }
.mode-preview.mode-lead .mode-bar { background: var(--magenta); color: var(--paper); }
.thread-card { border: 2px solid var(--blue); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--blue-wash); }
.thread-target { font-weight: 700; margin: 8px 0 6px; }
.thread-log { color: var(--muted); font-size: .95rem; }
.thread-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.lead-item { border: 2px solid var(--magenta-wash); background: var(--magenta-wash); border-radius: 12px; padding: 12px 14px; }
.lead-item p { margin: 4px 0 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.seat { border: 2px dashed var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.seat.you { border: 2px solid var(--purple); background: var(--purple-wash); }
.seat .round { width: 32px; height: 32px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 800; font-family: var(--head); }
.later-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.later-grid .card { margin: 0; }
.btn.secondary:disabled { background: var(--ground); color: var(--muted); border-color: var(--line); }

/* ── Home travel note ── */
.travel-note { color: var(--muted); font-size: .95rem; margin: -4px 4px 18px; }

.lead-intro { font-size: 1.1rem; }
.encourage { background: var(--magenta-wash); border-radius: 10px; padding: 12px 16px; font-weight: 600; }
.share-box { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.peek-case { border: 2px solid var(--blue); border-radius: 12px; padding: 14px 16px; margin: 12px 0 20px; background: var(--paper); }
.peek-case dl { margin: 8px 0 0; }
.peek-case dt { font-weight: 700; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.peek-case dd { margin: 2px 0 0; }

/* ── At CoLab: sub-menu across the top ── */
.sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; border-bottom: 2px solid var(--line); padding-bottom: 10px; }
.sub-tab { padding: 10px 16px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700;
  background: var(--paper); border: 2px solid var(--line); white-space: nowrap; }
.sub-tab:hover { background: var(--purple-wash); }
.sub-tab.tab-lead { border-color: var(--magenta); }
.sub-tab.tab-helping { border-color: var(--blue); }
.sub-tab.tab-parking { border-color: var(--lime); }
.sub-tab.active { background: var(--purple); color: var(--paper); border-color: var(--purple); }
.sub-tab.tab-lead.active { background: var(--magenta); border-color: var(--magenta); }
.sub-tab.tab-helping.active { background: var(--blue); border-color: var(--blue); }
.sub-tab.tab-parking.active { background: var(--lime); border-color: var(--lime); color: var(--ink); }
@media (max-width: 760px) {
  .sub-tabs { flex-wrap: nowrap; overflow-x: auto; }
}
.event-panel .card { margin-bottom: 0; }

/* ── Helping: who you're helping ── */
.mate-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.mate { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; min-height: 44px;
  border: 2px solid var(--blue); background: var(--paper); color: var(--blue-deep); font-weight: 700; cursor: pointer; font-size: 1rem; }
.mate:hover { background: var(--blue-wash); }
.mate.selected { background: var(--blue); color: var(--paper); }
.lead-now { font-size: .72rem; font-weight: 800; background: var(--magenta); color: var(--paper); padding: 2px 8px; border-radius: 999px; }

/* ── Fold-away sections (Show / Hide, remembered per device) ── */
.fold > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--head); font-weight: 800; font-size: 1.08rem; }
.fold > summary::-webkit-details-marker { display: none; }
.fold-toggle::after, .inbox-toggle::after { content: "Show"; font-family: var(--body); font-size: .85rem; font-weight: 700; color: var(--blue-deep); }
.fold[open] .fold-toggle::after, .inbox[open] .inbox-toggle::after { content: "Hide"; }
.fold[open] > summary { margin-bottom: 10px; }

/* ── Case Lead: black and white, magenta only where it needs your eye ── */
.lead-view { border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.lead-bar { background: var(--ink); color: var(--paper); padding: 12px 18px; font-family: var(--head); font-weight: 800; font-size: 1.15rem;
  display: flex; align-items: center; gap: 10px; }
.lead-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--magenta); }
.lead-body { padding: 18px; }
.lead-view .fold { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.lead-view .fold-toggle::after { color: var(--ink); }
.lead-view .encourage { background: var(--ground); border-left: 4px solid var(--magenta); border-radius: 6px; padding: 10px 14px; font-weight: 600; }
.lead-view .share-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.lead-intro { font-size: 1.08rem; }
.rec { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 700; font-size: .9rem; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--magenta); animation: vi-pulse 1.4s infinite; }
@keyframes vi-pulse { 50% { opacity: .3; } }

/* Incoming: a slim full-width bar, closed by default */
.inbox { border: 1px solid color-mix(in srgb, var(--ink) 18%, var(--paper)); border-radius: 14px; margin: 22px 0 28px; background: color-mix(in srgb, var(--ink) 5%, var(--paper)); }
.inbox > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 16px; }
.inbox > summary::-webkit-details-marker { display: none; }
.inbox[open] > summary { border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, var(--paper)); }
.inbox > p, .inbox .findings { margin-left: 16px; margin-right: 16px; }
.inbox > p { margin-top: 12px; }
.inbox-title { font-family: var(--head); font-weight: 800; }
.inbox-count { font-weight: 700; color: var(--magenta-deep); }
.inbox-toggle { margin-left: auto; }
.inbox .inbox-toggle::after { color: var(--ink); }
.helper-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; }
.chip.has-new { background: var(--paper); border-color: var(--ink); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--magenta); color: var(--paper); font-size: .75rem; font-weight: 800; margin-left: 6px; }
.findings { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding-bottom: 16px; }
.finding { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper); display: flex; flex-direction: column; }
.finding .thread-actions { margin-top: auto; padding-top: 8px; }
.finding-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.finding .kind { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.finding.dead .kind { color: var(--muted); }
.finding p { margin: 4px 0; }
.lead-view .btn:disabled { background: var(--ground); color: var(--muted); border: 1px solid var(--line); }

/* Your own research: the main event */
.my-threads { border-top: 2px solid var(--ink); padding-top: 18px; }
.my-threads h3 { margin-bottom: 2px; font-size: 1.25rem; }
.thread-card.lead-thread { border: 1px solid var(--ink); border-left: 5px solid var(--magenta); background: var(--paper); }

/* Helping: the tablemate's Case File folds away */
.peek-case .fold > summary { font-size: 1.05rem; }
.peek-case dd { white-space: pre-wrap; }

/* The room clock: one clock for every table, started by the hosts */
.clock { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.clock-top { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.clock-round { font-family: var(--head); font-weight: 800; font-size: 1.1rem; }
.clock-time { font-family: var(--head); font-weight: 800; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-stage { font-size: 1.1rem; font-weight: 700; margin: 10px 0 12px; }
.stages { display: flex; gap: 3px; margin-bottom: 10px; }
.stage { position: relative; overflow: hidden; flex-basis: 0; min-width: 0; padding: 8px 8px 7px; border-radius: 6px;
  background: var(--ground); border: 1px solid var(--line); display: flex; flex-direction: column; }
.stage.past { background: color-mix(in srgb, var(--ink) 12%, var(--paper)); }
.stage.current { border: 2px solid var(--ink); background: var(--paper); }
.stage-fill { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--magenta); }
.stage-name { font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.stage-mins { font-size: .75rem; color: var(--muted); white-space: nowrap; position: relative; }
@media (max-width: 640px) {
  .stage:not(.current) .stage-name, .stage .stage-mins { font-size: 0; }
  .stage { min-height: 38px; }
  .clock-time { font-size: 1.8rem; }
}

/* Helping: the table in round order */
.mate .rnum { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-wash);
  color: var(--blue-deep); font-size: .8rem; font-weight: 800; }
.mate.selected .rnum { background: var(--paper); }
.mate.done { border-color: var(--line); color: var(--muted); }
.mate.done.selected { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.mate.self { border-style: dashed; border-color: var(--magenta); color: var(--ink); text-decoration: none; }
.mate.self .rnum { background: var(--magenta-wash); color: var(--magenta-deep); }
.clock-of { color: var(--muted); font-weight: 600; margin-left: -8px; }

/* ── Helping and parking lot share the Case Lead look ── */
.view-helping .lead-dot { background: var(--blue); }
.view-parking .lead-dot { background: var(--lime); }
.view-helping .mate { border-color: var(--ink); color: var(--ink); }
.view-helping .mate:hover { background: var(--ground); }
.view-helping .mate.selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.view-helping .mate .rnum { background: var(--ground); color: var(--ink); }
.view-helping .mate.selected .rnum { background: var(--paper); color: var(--ink); }
.view-helping .mate.done { border-color: var(--line); color: var(--muted); }
.view-helping .mate.done.selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.view-helping .peek-case { border: 1px solid var(--line); background: var(--paper); }
.view-helping .thread-card { border: 1px solid var(--ink); border-left: 5px solid var(--blue); background: var(--paper); }
.view-parking textarea { border-color: var(--line); }
.lead-view .btn.secondary { border-color: var(--ink); color: var(--ink); }

/* The helpers' clock: just time left */
.mini-clock { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px 16px; margin-bottom: 18px; }
.mini-left { font-family: var(--head); font-weight: 800; font-size: 1.2rem; }
.mini-track { position: relative; flex-basis: 100%; height: 6px; background: var(--line); border-radius: 999px; margin-top: 4px; }
.mini-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 999px; }
.mini-push { position: absolute; top: -4px; width: 3px; height: 14px; background: var(--magenta); border-radius: 2px; }
.mate .check { font-weight: 800; font-size: 1rem; line-height: 1; }

/* ── Prework on Home: finished steps are checked and crossed off ── */
.steps li.done h3 { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.steps li.done p { color: var(--soft); }

/* ── One accent per mode: magenta Case Lead, blue Helping, lime parking lot ── */
.view-lead { --accent: var(--magenta); --accent-ink: var(--paper); }
.view-helping { --accent: var(--blue); --accent-ink: var(--paper); }
.view-parking { --accent: var(--lime); --accent-ink: var(--ink); }
.lead-view .lead-bar { border-bottom: 4px solid var(--accent); }
.lead-view .lead-dot { background: var(--accent); }
.lead-view .pill.example { background: var(--accent); color: var(--accent-ink); }
.lead-view .lead-now { background: var(--accent); color: var(--accent-ink); }
.lead-view .mini-fill, .lead-view .mini-push, .lead-view .stage-fill { background: var(--accent); }
.lead-view .mini-push { box-shadow: 0 0 0 2px var(--paper); }
.view-lead .rec-dot, .view-lead .badge { background: var(--accent); }
.view-lead .inbox-count { color: var(--magenta-deep); }
.view-helping .thread-card, .view-lead .lead-thread { border-left-color: var(--accent); }

/* "Why do you need this?" — a small ? beside a label that shows a note */
.why-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 8px; border-radius: 50%; border: 0;
  background: var(--blue); color: var(--paper); font-weight: 800; font-size: .85rem; cursor: pointer; vertical-align: middle; }
.why-btn[aria-expanded="true"] { background: var(--ink); }
.why-note { background: var(--blue-wash); border-radius: 10px; padding: 10px 14px; font-size: .93rem; margin: 0 0 8px; }

/* The ancestor's timeline, building up beside the interview */
.glance-timeline { margin: 6px 0 12px; border-left: 3px solid var(--purple); padding-left: 12px; }
.glance-timeline h4 { margin: 0 0 4px; font-family: var(--head); font-size: .95rem; }
.glance-timeline ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.glance-timeline li { padding: 3px 0; border-bottom: 1px dotted var(--line); }
.glance-timeline li:last-child { border-bottom: 0; }

/* Helping: the tablemate's links and documents, as they'll appear at the event */
.peek-sub { margin: 14px 0 6px; font-size: .85rem; color: var(--muted); }
.peek-links { list-style: none; margin: 0; padding: 0; }
.peek-links li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.peek-kind { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); min-width: 56px; }
.peek-link { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.peek-docs { display: flex; gap: 10px; flex-wrap: wrap; }
.peek-doc { display: flex; flex-direction: column; gap: 4px; width: 150px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: .85rem; background: var(--ground); }
.peek-doc-type { font-size: .72rem; font-weight: 800; color: var(--muted); }

/* Lunch, one block per day */
.lunch-day { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; background: var(--ground); }
.lunch-day h3 { margin: 0 0 10px; }
.lunch-day .choice { background: var(--paper); }
.menu-group { margin-top: 10px; }
.menu-group:first-of-type { margin-top: 6px; }
.menu-group .help { display: block; color: var(--muted); font-size: .9rem; margin: 2px 0 6px; }
