/* Intoplace: one stylesheet, tokens first. */
:root {
  /* Solarized. One accent (teal) and one exception color (amber): everything kept is quiet, only what needs a person is marked.
     Red is for an error message alone, never a mark on the data. Dark mode below uses the same token names. */
  color-scheme: light;
  --bg: #EEE8D5;
  --card: #FDF6E3;
  --line: #DDD6C1;
  --line-soft: #EDE6D2;
  --field: #698184;
  --text: #073642;
  --muted: #49646C;
  --quiet: #18424C;
  --teal: #15726C;
  --teal-hover: #105D5D;
  --teal-tint: #DAE2D1;
  --teal-wash: #EDEDDB;
  --ok-pill: #D1DDCC;
  --ok-dot: #15726C;
  --amber: #A04312;
  --amber-ink: #7A401E;
  --amber-tint: #EDD8BF;
  --amber-wash: #F6E8D2;
  --try-tint: #E6E3D4;
  --try-ink: #35565F;
  --err: #DC322F;
  --err-ink: #8B3436;
  --err-tint: #F9DECD;
  --chip: #E6E3D4;
  --wash-soft: #EDEDDB;
  --ask-bg: #F6E8D2;
  --ask-line: #E1C0A4;
  --ask-frame: #B3673C;
  --ask-card: #F9EFDB;
  --wait-dot: #698184;
  --ok-step: #15726C;
  --step1: #DAE2D1;
  --step2: #E6E3D4;
  --step3: #EAD2B9;
  --step4: #EDEDDB;
  --step5: #DAE2D1;
  --step6: #EDD8BF;
  --step7: #E6E3D4;
  --step8: #F4E4CE;
  --step9: #DAE2D1;
  --on-accent: #FDF6E3;
  --on-ink: #FDF6E3;
  --ink-hover: #355A5F;
  --field-hover: #4C6A70;
  --hover-bg: #EDEDDB;
  --input-bg: #FDF6E3;
  --off-bg: #EDE6D2;
  --disabled-bg: #EDE6D2;
  --disabled-ink: #49646C;
  --shadow: rgba(7, 54, 66, 0.14);
  --focus: 0 0 0 3px #FDF6E3, 0 0 0 5px #15726C;
  --rule: var(--amber);
  --rule-ink: var(--amber-ink);
  --rule-tint: var(--amber-tint);
  --req: var(--amber);
  --req-ink: var(--amber-ink);
  --req-tint: var(--amber-tint);
  --ask-ink: var(--amber-ink);
  --ask-dot: var(--amber);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #002B36;
    --card: #073642;
    --line: #124652;
    --line-soft: #0C3E4A;
    --field: #C1C3B8;
    --text: #EEE8D5;
    --muted: #D3D3C5;
    --quiet: #D3D3C5;
    --teal: #35B5AB;
    --teal-hover: #7FC9BC;
    --teal-tint: #0E4952;
    --teal-wash: #0A3F49;
    --ok-pill: #104E56;
    --ok-dot: #35B5AB;
    --amber: #D9A62A;
    --amber-ink: #D9A62A;
    --amber-tint: #1E423F;
    --amber-wash: #183F40;
    --try-tint: #17434C;
    --try-ink: #D3D3C5;
    --err: #DC322F;
    --err-ink: #E58D82;
    --err-tint: #213640;
    --chip: #17434C;
    --wash-soft: #0A3F49;
    --ask-bg: #183F40;
    --ask-line: #46583B;
    --ask-frame: #AF902F;
    --ask-card: #0F3A41;
    --wait-dot: #C1C3B8;
    --ok-step: #35B5AB;
    --step1: #0E4952;
    --step2: #17434C;
    --step3: #22453F;
    --step4: #0A3F49;
    --step5: #0E4952;
    --step6: #1E423F;
    --step7: #17434C;
    --step8: #1C4140;
    --step9: #0E4952;
    --on-accent: #002B36;
    --on-ink: #002B36;
    --ink-hover: #FDF6E3;
    --field-hover: #CECEC1;
    --hover-bg: #0A3F49;
    --input-bg: #073642;
    --off-bg: #0C3E4A;
    --disabled-bg: #0C3E4A;
    --disabled-ink: #D3D3C5;
    --shadow: rgba(0, 0, 0, 0.45);
    --focus: 0 0 0 3px #073642, 0 0 0 5px #35B5AB;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #002B36;
  --card: #073642;
  --line: #124652;
  --line-soft: #0C3E4A;
  --field: #C1C3B8;
  --text: #EEE8D5;
  --muted: #D3D3C5;
  --quiet: #D3D3C5;
  --teal: #35B5AB;
  --teal-hover: #7FC9BC;
  --teal-tint: #0E4952;
  --teal-wash: #0A3F49;
  --ok-pill: #104E56;
  --ok-dot: #35B5AB;
  --amber: #D9A62A;
  --amber-ink: #D9A62A;
  --amber-tint: #1E423F;
  --amber-wash: #183F40;
  --try-tint: #17434C;
  --try-ink: #D3D3C5;
  --err: #DC322F;
  --err-ink: #E58D82;
  --err-tint: #213640;
  --chip: #17434C;
  --wash-soft: #0A3F49;
  --ask-bg: #183F40;
  --ask-line: #46583B;
  --ask-frame: #AF902F;
  --ask-card: #0F3A41;
  --wait-dot: #C1C3B8;
  --ok-step: #35B5AB;
  --step1: #0E4952;
  --step2: #17434C;
  --step3: #22453F;
  --step4: #0A3F49;
  --step5: #0E4952;
  --step6: #1E423F;
  --step7: #17434C;
  --step8: #1C4140;
  --step9: #0E4952;
  --on-accent: #002B36;
  --on-ink: #002B36;
  --ink-hover: #FDF6E3;
  --field-hover: #CECEC1;
  --hover-bg: #0A3F49;
  --input-bg: #073642;
  --off-bg: #0C3E4A;
  --disabled-bg: #0C3E4A;
  --disabled-ink: #D3D3C5;
  --shadow: rgba(0, 0, 0, 0.45);
  --focus: 0 0 0 3px #073642, 0 0 0 5px #35B5AB;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.5; overflow-x: hidden;
}
a { color: var(--teal); }
a:hover { color: var(--teal-hover); }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.2; }
h1 { font-size: 30px; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--teal); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--teal); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.quiet { color: var(--quiet); font-size: 14px; }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.pad { padding: 24px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.base { align-items: baseline; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.stack.loose { gap: 22px; }
[hidden] { display: none !important; }

/* ---- Header */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding: 12px 32px; border-bottom: 1px solid var(--line); background: var(--card);
}
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 32px; height: 32px; flex: none; display: block; }
.brand a.home { font-weight: 700; font-size: 28px; line-height: 1; color: var(--text); text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand a.home span { color: var(--muted); }
.brand a.home b { font-weight: 700; color: var(--text); }
@media (max-width: 399px) {
  .logo { width: 28px; height: 28px; }
  .brand a.home { font-size: 24px; }
  .brand .crumb-page { display: none; }
}
.demo-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--muted); color: var(--muted); white-space: nowrap; }
.crumb-sep { color: var(--quiet); }
.crumb-name { font-weight: 500; overflow-wrap: anywhere; }
.crumb-link { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.crumb-link:hover { text-decoration: underline; }
.crumb-page { color: var(--muted); }
.chainline { margin: 0 0 4px; }
.touched { list-style: none; margin: 0; padding: 0; }
.chainline .attention .row { margin-top: 2px; }
/* Project bar: rounds, history, finishing */
.pbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 10px 32px; background: var(--card); border-bottom: 1px solid var(--line);
}
.rounds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rounds li {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px;
  background: var(--off-bg); color: var(--muted); font-size: 14px;
}
.rounds li.now { background: var(--teal); color: var(--on-accent); font-weight: 600; }
.pbar .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.why { font-size: 13px; color: var(--muted); max-width: 260px; }
.confirm, .unlock {
  margin: 0; padding: 14px 32px; background: var(--teal-wash); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
}
.unlock { background: var(--amber-wash); }
.tag-test { padding: 2px 8px; border-radius: 6px; background: var(--req-tint); color: var(--req-ink); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--field);
  background: var(--card); color: var(--text); font-weight: 500; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--field-hover); background: var(--hover-bg); color: var(--text); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); color: var(--on-accent); }
.btn.dark { background: var(--text); border-color: var(--text); color: var(--on-ink); font-weight: 600; }
.btn.dark:hover { background: var(--ink-hover); }
.btn.quiet-btn { border-color: transparent; background: transparent; color: var(--teal); font-weight: 600; }
.btn.quiet-btn:hover { background: var(--teal-tint); }
.btn.danger { color: var(--err-ink); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-ink); cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::before {
  content: ""; width: 14px; height: 14px; border-radius: 999px; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn[aria-busy="true"]::before { animation-duration: 3s; } }
.icon-btn { min-width: 44px; padding: 0 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--field); background: var(--card); color: var(--text); font-size: 14px; cursor: pointer;
}
.chip:hover { border-color: var(--field-hover); }
.chip[aria-pressed="true"] { border: 2px solid var(--teal); background: var(--teal-tint); color: var(--teal-hover); font-weight: 600; padding: 0 13px; }
.chip .n { font-variant-numeric: tabular-nums; color: inherit; opacity: 0.8; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.always { background: var(--ok-pill); color: var(--teal-hover); }
.pill.try { background: var(--try-tint); color: var(--try-ink); }
.pill.ok { background: var(--ok-pill); color: var(--teal-hover); }
.pill.request { background: var(--req-tint); color: var(--req-ink); }
.pill.rule { background: var(--rule-tint); color: var(--rule-ink); }
.pill.off, .pill.done { background: var(--off-bg); color: var(--muted); }
.pill.draft { background: var(--req-tint); color: var(--req-ink); }
.pill.final { background: var(--ok-pill); color: var(--teal-hover); }

.dot { flex: none; width: 9px; height: 9px; border-radius: 999px; background: var(--ok-dot); display: inline-block; }
.dot.request { background: var(--req); }
.dot.rule, .dot.unplaced { background: var(--rule); }
.dot.outside { background: var(--field-hover); }

/* ---- Forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
label.field .hint { font-weight: 400; color: var(--muted); }
.input, select.input {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field);
  background: var(--input-bg); width: 100%; min-width: 0;
}
input[type="file"].input { padding: 8px 10px; background: var(--card); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal); width: 20px; height: 20px; margin: 0; flex: none; }
fieldset { margin: 0; border: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; border: 1px solid var(--field);
  min-height: 44px; cursor: pointer; background: var(--card);
}
.choice input { margin-top: 3px; }
.choice:has(input:checked) { border: 2px solid var(--teal); background: var(--teal-wash); padding: 11px; }
.choice strong { display: block; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }

/* ---- Messages */
.msg { border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.msg:empty { display: none; }
.msg.err { background: var(--err-tint); color: var(--err-ink); }
.msg.ok { background: var(--teal-tint); color: var(--teal-hover); }
.banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  border-radius: 12px; padding: 12px 16px; background: var(--req-tint); color: var(--req-ink);
}
.banner.teal { background: var(--teal-tint); color: var(--teal-hover); }

/* ---- Layout */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 24px; }
.page.wide { max-width: none; padding-top: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.card.flush { padding: 0; }
.card.accent { border: 2px solid var(--teal); }
.card-head { padding: 14px 18px 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }  /* relative: keeps .sr-only cells inside */
.hero { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.hero h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; }
.hero p { font-size: 16px; color: var(--muted); }

/* ---- Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: middle; }
thead th { color: var(--quiet); font-size: 13px; font-weight: 600; padding: 10px 8px; white-space: nowrap; }
thead th:first-child, tbody td:first-child, tbody th:first-child { padding-left: 18px; }
thead th:last-child, tbody td:last-child { padding-right: 18px; }
tbody tr { border-top: 1px solid var(--line-soft); }
tbody td, tbody th { padding: 10px 8px; }
.t-projects { min-width: 640px; }
.t-places { min-width: 560px; }
tr.group-row { background: var(--bg); }
tr.group-row th { font-weight: 700; }
tr.sel { background: var(--teal-wash); box-shadow: inset 3px 0 0 var(--teal); }
.rowbtn {
  border: 0; background: none; padding: 0; min-height: 44px; font-weight: 600; color: var(--text); cursor: pointer;
  text-align: left; display: inline-flex; align-items: center;
}
.rowbtn:hover { color: var(--teal); text-decoration: underline; }
.fill { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.fill .bar { display: inline-block; width: 72px; height: 8px; border-radius: 999px; background: var(--off-bg); overflow: hidden; }
.fill .bar span { display: block; height: 8px; border-radius: 999px; background: var(--teal); }
.fill .bar span.over { background: var(--rule); }
.table-foot { padding: 10px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }

/* ---- Projects */
.proj-link { font-weight: 600; text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.new-card { display: flex; flex-direction: column; gap: 16px; }

/* ---- Data */
.colchip { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 8px; background: var(--chip); font-size: 13px; }
.colchip b { font-weight: 600; }
.colchip span { color: var(--muted); font-size: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; min-width: 0; }
.tile .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.tile .l { color: var(--muted); font-size: 14px; }
.tile.rule .v { color: var(--rule-ink); }
.tile.request .v { color: var(--req-ink); }
.tile.rule { border-color: var(--ask-frame); }

/* ---- Questions and the rule box */
.queue { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.queue-head { display: flex; flex-direction: column; gap: 12px; }
.likely { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--teal-wash); border-radius: 10px; padding: 10px 12px; }
.qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.q { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.q .kind { font-size: 13px; color: var(--quiet); font-weight: 600; overflow-wrap: anywhere; }
.q .kind b { text-transform: uppercase; letter-spacing: 0.05em; font-size: 12px; }
.q .text { overflow-wrap: anywhere; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--field); background: var(--card); cursor: pointer; text-align: left; }
.opt:hover { border-color: var(--teal); }
.opt.likely-opt { border: 2px solid var(--teal); background: var(--teal-tint); color: var(--teal-hover); font-weight: 600; padding: 0 11px; }
.pager { padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; color: var(--quiet); font-size: 14px; }
.rulebox-row { display: flex; flex-wrap: wrap; gap: 10px; }
.rulebox-row .input { flex: 1 1 260px; width: auto; }
.rcard { background: var(--teal-wash); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rcard .sentence { font-size: 16px; overflow-wrap: anywhere; }
.rcard ul { margin: 0; padding-left: 20px; color: var(--err-ink); font-size: 14px; }
.rule-sentence { overflow-wrap: anywhere; }
.rule-flag { color: var(--req-ink); overflow-wrap: anywhere; }
.tab-note { color: var(--req-ink); }
.nh { margin: 0; padding-left: 20px; }

/* ---- Fit */
.fit-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.places { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.detail { flex: 1 1 320px; max-width: 440px; display: flex; flex-direction: column; gap: 12px; }
.search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search-row .input { flex: 1 1 240px; width: auto; background: var(--card); }
.matches { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
.member { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 8px; border-radius: 8px; border: 0; background: none; font-size: 14px; text-align: left; cursor: pointer; }
.member:hover { background: var(--bg); }
.member[aria-pressed="true"] { background: var(--teal-wash); box-shadow: inset 0 0 0 2px var(--teal); }
.member span.nm { overflow-wrap: anywhere; min-width: 0; }
.whybox { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.whybox ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.move-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.move-row label { flex: 1 1 160px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Name gate */
.gate { max-width: 460px; margin: 64px auto; }

/* ---- Phone */
@media (max-width: 720px) {
  .top, .pbar { padding-left: 16px; padding-right: 16px; }
  .confirm, .unlock { padding-left: 16px; padding-right: 16px; }
  .page { padding: 20px 16px 48px; gap: 18px; }
  .hero h1 { font-size: 28px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .card.flush { padding: 0; }
  .members { grid-template-columns: minmax(0, 1fr); }
  .why { max-width: none; flex-basis: 100%; }
  .detail { max-width: none; }
}
/* a place's name wraps (at any point, for one long word) rather than pushing the other columns out of sight */
.t-places tbody th { white-space: normal; overflow-wrap: anywhere; min-width: 7em; max-width: 18em; }
.t-places .rowbtn { text-align: left; }

/* ---- Live fit */
.fitting-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  background: var(--teal-tint); color: var(--teal-hover); font-size: 14px; font-weight: 600;
}
.spinner {
  width: 14px; height: 14px; border-radius: 999px; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite; flex: none;
}
.live-strip { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--teal); }
.parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.part {
  display: grid; grid-template-columns: minmax(90px, 160px) minmax(80px, 1fr) 56px minmax(0, 400px);
  align-items: center; gap: 6px 14px; padding: 6px 0; border-top: 1px solid var(--line-soft);
}
.part:first-child { border-top: 0; }
.part-name { font-weight: 600; overflow-wrap: anywhere; }
.track { display: block; height: 8px; border-radius: 999px; background: var(--off-bg); overflow: hidden; }
.track span { display: block; height: 8px; border-radius: 999px; background: var(--teal); transition: width 0.7s linear; }
.track span.done { background: var(--ok-dot); }
.part-state { font-size: 14px; color: var(--muted); text-align: right; }
/* the spark's words stay on one line; when the column is narrow the label, the spark and the pill each take a line */
.part-spark { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.spark-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.spark { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.spark > span { min-width: 0; white-space: nowrap; }
.spark-label { flex: none; }
.spark svg { display: block; flex: none; overflow: visible; }
.spark-base { stroke: var(--line); stroke-width: 1; }
.spark-line { fill: none; stroke: var(--req); stroke-width: 2; stroke-linejoin: round; }
.spark-dot { fill: var(--req); }
.fill .bar span { transition: width 0.45s ease; }
.dot { transition: background-color 0.4s ease; }
.tile .v.bump { animation: bump 0.6s ease; }
@keyframes bump { 0% { color: var(--teal); transform: translateY(-2px); } 100% { transform: none; } }
tr.flash > * { animation: rowflash 1.2s ease; }
@keyframes rowflash { 0% { background: var(--teal-tint); } 100% { background: transparent; } }
.members li.enter { animation: slide-in 0.35s ease both; }
.members li.leave { animation: slide-out 0.35s ease both; pointer-events: none; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-10px); background: var(--teal-tint); } to { opacity: 1; transform: none; } }
@keyframes slide-out { from { opacity: 1; } to { opacity: 0; transform: translateX(10px); } }
@media (max-width: 720px) {
  .part { grid-template-columns: minmax(0, 1fr) 56px; }
  .part .track { grid-column: 1 / -1; grid-row: 2; }
  .part-spark { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
  .track span, .fill .bar span, .dot { transition: none; }
  .tile .v.bump, tr.flash > *, .members li.enter, .members li.leave { animation: none; }
}

/* ---- Workbook import, the job box, checks */
.tabs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.tabrow { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tab-head { overflow-wrap: anywhere; }
.tab-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.tab-controls label.field { flex: 1 1 200px; min-width: 0; }
.book-lines { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.tabrow.has-layout { grid-column: 1 / -1; }
.layout { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.layout h4, .review h4 { font-size: 16px; }
.review h5 { font-size: 14px; margin-top: 4px; }
h4.sub { font-size: 17px; }
.lay-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; overflow-wrap: anywhere; }
.lay-problems { color: var(--err-ink); }
.lay-counts { font-size: 15px; overflow-wrap: anywhere; }
.lay-table { max-width: 100%; border: 1px solid var(--line-soft); border-radius: 10px; }
.lay-table table { min-width: 360px; font-size: 14px; }
.lay-table td, .lay-table th { white-space: nowrap; }
.lay-edit-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lay-step { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.lay-step .tab-controls label.field { flex: 1 1 150px; }
.review { padding: 14px 16px; }
.win { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; min-width: 0; }
.win legend { font-weight: 600; padding: 0 4px; overflow-wrap: anywhere; }
.t-win { min-width: 300px; font-size: 14px; }
textarea.input { min-height: 96px; resize: vertical; padding: 10px 12px; line-height: 1.4; }
.jobcards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jobcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.jobcard.cant { border-color: var(--ask-frame); }
.jobcard .sentence { overflow-wrap: anywhere; }
.jobcard ul { margin: 0; padding-left: 20px; color: var(--err-ink); font-size: 14px; }
.who-edit { display: flex; flex-direction: column; gap: 10px; }
.who-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.vals { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.vals label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14px; }
.checks { display: flex; flex-direction: column; gap: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.check-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
.t-counts { min-width: 420px; }
.t-counts td, .t-counts th { font-variant-numeric: tabular-nums; }
.t-counts tr.total-row { font-weight: 700; background: var(--bg); }


/* ---- Shared pieces for the steps */
.sub-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.sub-card.flush { padding: 0; }
.sub-card.accent { border: 2px solid var(--teal); }
.h3like { font-size: 16px; font-weight: 700; line-height: 1.2; }
.h4like { font-size: 15px; font-weight: 700; line-height: 1.25; }
.strong { font-weight: 600; }
.push { margin-left: auto; }
.grow { flex: 1 1 auto; min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--quiet); letter-spacing: 0.04em; text-transform: uppercase; }
.btn.outline { border-color: var(--teal); color: var(--teal-hover); font-weight: 600; }
.btn.big { min-height: 48px; padding: 0 20px; }
.hist { font-weight: 400; }
/* Undo and Redo name the change; a long one (a long name or place) ends in an ellipsis, the whole of it in the title */
.hist-btn { max-width: min(42ch, 46vw); }
.hist-in { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdot { flex: none; width: 8px; height: 8px; border-radius: 99px; background: var(--wait-dot); display: inline-block; }
.sdot.ok { background: var(--ok-step); }
.sdot.ready { background: var(--card); box-shadow: inset 0 0 0 2px var(--teal); }
.sdot.ask { background: var(--ask-dot); }
.sdot.fix { background: var(--rule); }
.small-spin { width: 10px; height: 10px; color: var(--teal); }
.sc-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--quiet); }
.sc-state.ok, .sc-state.ready { color: var(--teal-hover); }
.sc-state.ask { color: var(--ask-ink); font-weight: 600; }
.sc-state.fix { color: var(--rule-ink); font-weight: 600; }
.sc-state.run { color: var(--teal-hover); font-weight: 600; }
.uses { display: flex; flex-wrap: wrap; gap: 4px; }
.use { padding: 1px 8px; border-radius: 999px; background: var(--wash-soft); color: var(--teal-hover); font-size: 12px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.use.more { background: var(--chip); color: var(--quiet); }
.tabchips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tabchip { padding: 2px 10px; border-radius: 999px; background: var(--off-bg); color: var(--quiet); font-size: 13px; overflow-wrap: anywhere; }
.tabchip.used { background: var(--teal-tint); color: var(--teal-hover); }
.pill-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--teal); background: var(--teal-tint); font-size: 14px; }
details.others > summary { cursor: pointer; font-weight: 600; color: var(--teal); min-height: 44px; display: flex; align-items: center; }
details.others[open] > summary { margin-bottom: 10px; }
.problems { margin: 4px 0 0; padding-left: 20px; color: var(--err-ink); }
.rv-title { font-size: 15px; }
.rv-sub { font-size: 14px; font-weight: 700; margin-top: 4px; }

/* ---- Projects home */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 24px; align-items: start; }
.projcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.projcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.projcard h3 { font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
.projcard .btn { margin-top: auto; align-self: flex-start; }

/* ---- Setup: describe it, bring the sheets, your steps */
.page.define, .page.work { max-width: 1392px; padding: 24px 24px 48px; gap: 20px; }
.define-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 24px; align-items: start; }
.define h1, .work h1 { font-size: 26px; letter-spacing: -0.01em; }
/* the empty box's examples: one at a time, a short fade between them (none with reduced motion: they don't change) */
textarea.describe::placeholder { color: var(--quiet); opacity: 1; transition: opacity 0.25s ease; }
textarea.describe.fading::placeholder { opacity: 0; }
@media (prefers-reduced-motion: reduce) { textarea.describe::placeholder { transition: none; } }
.linklike { background: none; border: 0; padding: 4px 0; min-height: 32px; color: var(--teal); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.linklike:hover { color: var(--teal-hover); }
/* a step's gray label: the block that runs, written by code */
.blocklabel { display: inline-block; font-size: 11px; line-height: 18px; color: var(--quiet); background: var(--line-soft); border-radius: 999px; padding: 0 8px; white-space: nowrap; font-weight: 500; letter-spacing: 0; text-transform: none; }
.sc-head + .blocklabel { align-self: flex-start; margin-left: 34px; }
.rename { max-width: 560px; }
textarea.describe { font-size: 17px; line-height: 1.7; border: 2px solid var(--teal); border-radius: 14px; padding: 14px 18px; background: var(--card); min-height: 168px; }
.defsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.defstep { display: flex; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.defstep.ask { background: var(--ask-card); border: 2px solid var(--ask-frame); padding: 11px 13px; }
.defstep.fix { border: 2px solid var(--rule); padding: 11px 13px; }
.stepnum { flex: none; width: 26px; height: 26px; border-radius: 999px; background: var(--off-bg); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.defstep .stepnum { background: var(--teal-tint); }
.defstep.ask .stepnum { background: var(--step3); }
.defstep.wait .stepnum { background: var(--off-bg); }
.qlist.inline { margin-top: 6px; }
.qlist.inline .q { background: var(--card); padding: 10px 12px; }
.tried { background: var(--teal-wash); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.try-row { padding-top: 4px; }

/* ---- The working page */
.how { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.how > div { flex: 1 1 560px; min-width: 0; }
q.said { color: var(--text); overflow-wrap: anywhere; }
.marked { background: var(--card); border: 2px solid var(--teal); border-radius: 14px; padding: 14px 18px; font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; margin: 0; }
mark.hl { color: inherit; padding: 1px 3px; border-radius: 4px; }
mark.hl sup { font-size: 10px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.hl.s1 { background: var(--step1); } .hl.s2 { background: var(--step2); } .hl.s3 { background: var(--step3); } .hl.s4 { background: var(--step4); }
.hl.s5 { background: var(--step5); } .hl.s6 { background: var(--step6); } .hl.s7 { background: var(--step7); }
.hl.s8 { background: var(--step8); } .hl.s9 { background: var(--step9); }
q.said mark.hl { padding: 0 1px; background: transparent; border-radius: 0; box-shadow: inset 0 -0.45em 0 var(--hl, transparent); }
q.said .hl.s1 { --hl: var(--step1); } q.said .hl.s2 { --hl: var(--step2); } q.said .hl.s3 { --hl: var(--step3); } q.said .hl.s4 { --hl: var(--step4); }
q.said .hl.s5 { --hl: var(--step5); } q.said .hl.s6 { --hl: var(--step6); } q.said .hl.s7 { --hl: var(--step7); }
q.said .hl.s8 { --hl: var(--step8); } q.said .hl.s9 { --hl: var(--step9); }
q.said mark.hl sup { font-size: 9px; font-weight: 600; color: var(--quiet); }
.side-link { font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.steprow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps, 7), minmax(0, 1fr)); gap: 22px; }
.stepcard { position: relative; min-width: 0; }
.stepcard:not(:last-child)::after { content: "→"; position: absolute; right: -18px; top: 50%; transform: translateY(-50%); color: var(--quiet); font-size: 18px; }
.stepcard a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 176px; padding: 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.stepcard a:hover { border-color: var(--field-hover); color: var(--text); }
.stepcard.ask a { background: var(--ask-card); border: 2px solid var(--ask-frame); padding: 11px; }
.stepcard.fix a { border: 2px solid var(--rule); padding: 11px; }
.stepcard.sel a { border: 3px solid var(--teal); box-shadow: 0 0 0 4px var(--teal-tint); padding: 10px; }
.sc-head { display: flex; align-items: flex-start; gap: 8px; }
.sc-head b { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; min-width: 0; }
.sc-what { font-size: 13px; color: var(--muted); line-height: 1.4; }
.stepcard .sc-state { margin-top: auto; }
.work-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.panel { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 10px; }
.panel-head h2 { font-size: 20px; }
.panel-head .sc-state { margin-left: auto; }
.panel-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.work-grid > .side { flex: 1 1 320px; max-width: 400px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.side-card h2 { font-size: 17px; }
.sortlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sortitem { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; min-height: 40px; border-radius: 8px; font-size: 14px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.sortitem:hover { background: var(--teal-wash); color: var(--text); }
.sortitem .sdot, .sortitem .spinner { margin-top: 6px; }
.lastrun { padding: 0 4px; }
.rulecards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rulecard { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.rulecard.is-off { background: var(--bg); }
.rulecard.is-off .rule-sentence { color: var(--muted); }
.rc-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rc-actions { display: flex; align-items: center; gap: 6px; }
.switch { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14px; font-weight: 600; cursor: pointer; }
.exports { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fit-step .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

@media (max-width: 1240px) {
  .steprow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .stepcard::after { display: none; }
  .stepcard a { min-height: 150px; }
}
@media (max-width: 1100px) {
  .define-grid, .home-grid { grid-template-columns: minmax(0, 1fr); }
  .work-grid > .side { max-width: none; }
}
@media (max-width: 720px) {
  .page.define, .page.work { padding: 18px 16px 40px; }
  .define h1, .work h1 { font-size: 23px; }
  .steprow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stepcard a { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; }
  .stepcard.ask a, .stepcard.fix a { padding: 9px 11px; }
  .stepcard.sel a { padding: 8px 10px; }
  .stepcard .sc-what, .stepcard .uses, .stepcard .blocklabel { display: none; }
  .stepcard .sc-state { margin-top: 0; align-self: center; text-align: right; }
  .sc-head { align-items: center; }
  .panel { padding: 14px; }
  .hist { display: none; }
}
.stages { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.stages li { padding: 4px 10px; border-radius: 999px; background: var(--off-bg); color: var(--quiet); }
.stages li.now { background: var(--teal); color: var(--on-accent); font-weight: 600; }
.stages li a { color: inherit; text-decoration: none; }
.stages li a:hover { color: var(--teal); text-decoration: underline; }
@media (max-width: 720px) { .stages { order: 3; width: 100%; } }

/* ---- Explanations that point at the sheet (explain.js) */
.eyebrow-s { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--quiet); }
.reasons { display: flex; flex-direction: column; gap: 14px; }
.kept-by { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; }
.kept-by.try { background: var(--step4); }
.kept-by.always { background: var(--teal-wash); }
ol.links { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ol.links li { list-style: none; padding-left: 12px; border-left: 3px solid var(--teal); font-size: 14px; }
.cites { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: baseline; }
.cite { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 6px; background: var(--teal-tint);
  color: var(--teal-hover); font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.cite-ic { width: 9px; height: 9px; border-radius: 2px; background:
  linear-gradient(var(--teal-hover), var(--teal-hover)) 0 0 / 4px 4px no-repeat,
  linear-gradient(var(--teal-hover), var(--teal-hover)) 5px 0 / 4px 4px no-repeat,
  linear-gradient(var(--teal-hover), var(--teal-hover)) 0 5px / 4px 4px no-repeat,
  linear-gradient(var(--teal-hover), var(--teal-hover)) 5px 5px / 4px 4px no-repeat; }
.sheet-rows { display: flex; flex-direction: column; gap: 8px; }
.sheet { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.t-sheet { border-collapse: collapse; font-size: 12px; background: var(--card); width: max-content; max-width: 100%; }
.t-sheet th { background: var(--bg); border: 1px solid var(--line); padding: 2px 8px; font-weight: 500; color: var(--quiet); text-align: center; }
.t-sheet td { border: 1px solid var(--line); padding: 3px 8px; white-space: nowrap; }
.t-sheet td.hit { outline: 2px solid var(--teal); outline-offset: -2px; background: var(--teal-wash); }
.t-sheet tr.head-row td { background: var(--bg); color: var(--muted); font-weight: 600; }
.t-sheet .blank { color: var(--muted); font-style: italic; }
/* the audit step (ADR 0046): each check, then its rows to look at, each with its cells */
.audit-checks { list-style: none; margin: 0; padding: 0; gap: 12px; }
.audit-check h3 { overflow-wrap: anywhere; }
.audit-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.audit-row { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 6px 12px; border-left: 3px solid var(--req-tint); font-size: 14px; min-width: 0; }
.audit-line { gap: 8px; flex-wrap: nowrap; }
.audit-line > span { overflow-wrap: anywhere; }
.audit-line .linklike { flex: none; white-space: nowrap; }
.audit-date { gap: 10px; flex-wrap: wrap; }
label.field.inline { flex-direction: row; align-items: center; gap: 8px; }
label.field.inline .input { width: auto; }
@media (max-width: 720px) { .audit-line { flex-wrap: wrap; } }
.linked-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.linked-groups li { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 3px solid var(--teal); font-size: 14px; }
.conflict { border: 2px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 18px; }
.conflict-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.clash { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: start; padding: 12px; border-radius: 10px; }
@media (max-width: 720px) { .clash { grid-template-columns: minmax(0, 1fr); } }
.clash.always { background: var(--teal-wash); }
.clash.try { background: var(--step4); }
.clash.room { background: var(--ask-bg); }
.clash-main { display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-width: 0; }
.clash-main b { font-size: 15px; }
.clash-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 360px; }
.whyhere { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--ask-card); border: 1px solid var(--ask-frame); font-size: 14px; }
.whyhere-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.whyhere-list li { display: flex; flex-direction: column; gap: 2px; }

/* ---- Pair up (ADR 0047): the rules, the matches, why a row is matched where it is */
.pair-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pair-rule { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--teal-wash); font-size: 14px; min-width: 0; }
.pair-rule.try { background: var(--step4); }
.pair-rule b { font-weight: 600; overflow-wrap: anywhere; }
.rule-edit { margin-top: 8px; background: var(--card); }
.pair-matches { flex: 2 1 520px; min-width: 0; }
.pair-q { flex: 1 1 200px; width: auto; min-width: 0; margin-left: auto; }
.t-pairs { width: 100%; border-collapse: collapse; font-size: 14px; }
.t-pairs th { text-align: left; font-size: 12px; font-weight: 600; color: var(--quiet); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.t-pairs td { padding: 4px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.t-pairs td.num { font-variant-numeric: tabular-nums; color: var(--quiet); }
.t-pairs tr.sel td { background: var(--teal-tint); }
.pcells { display: flex; gap: 10px; align-items: baseline; min-width: 0; white-space: nowrap; }
.pcells .pc.key { overflow: hidden; text-overflow: ellipsis; max-width: 18ch; }
.t-pairs td:last-child .pill { white-space: normal; }
.pair-rule.off b { color: var(--muted); font-weight: 600; }
fieldset.ask-card { margin: 0; min-width: 0; }
fieldset.ask-card legend { padding: 0; margin-bottom: 4px; }
.ask-card .vals label { display: flex; gap: 8px; align-items: flex-start; }
.pcells .pc.amount, .pcells .pc.date { margin-left: auto; }
.pcells .pc { color: var(--muted); font-variant-numeric: tabular-nums; }
.pcells .pc.first { color: var(--text); }
.linkrow { all: unset; cursor: pointer; display: block; max-width: 100%; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.linkrow:hover .pc.first, .linkrow[aria-pressed="true"] .pc.first { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 3px; }
.linkrow:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.pair-step .detail, .checks .detail { max-width: 400px; position: sticky; top: 12px; }
@media (max-width: 900px) { .pair-step .detail, .checks .detail { position: static; } }
.whybox-top { display: flex; flex-direction: column; gap: 12px; }
.check-grid.one { flex: 2 1 480px; grid-template-columns: minmax(0, 1fr); }
.ex-list { list-style: none; padding-left: 0; gap: 6px; }
.ex-list li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; justify-content: space-between; }
.ex-list li > span { flex: 1 1 240px; min-width: 0; }
.pair-sentences { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.inline-q { border: 0; margin: 4px 0 0; padding: 0; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-q legend { padding: 0; margin-bottom: 4px; }
.inline-q.side legend { float: left; margin: 8px 8px 0 0; }
.inline-q .vals label { padding: 0 10px; border-radius: 8px; border: 1px solid var(--field); background: var(--card); font-size: 13px; }
.inline-q .vals label.on { border: 2px solid var(--teal); background: var(--teal-tint); padding: 0 9px; }
@media (max-width: 720px) { .pair-q { margin-left: 0; flex-basis: 100%; } }
.pair-step .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 640px) {
  .t-pairs thead { display: none; }
  .t-pairs tr { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 2px 6px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); }
  .t-pairs td { display: block; border: 0; padding: 0 !important; min-width: 0; }
  .t-pairs td:nth-child(3), .t-pairs td:nth-child(4) { grid-column: 2; }
  .t-pairs .pcells { flex-wrap: wrap; white-space: normal; }
  .pcells .pc.key { max-width: none; }
  .pcells .pc.amount, .pcells .pc.date { margin-left: 0; }
}
.pair-rule > .row { flex-wrap: nowrap; align-items: flex-start; }
.pair-rule > .row > .grow { min-width: 0; }
.change-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.change-list li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 6px; }
.change-list li:first-child { border-top: 0; padding-top: 0; }
.change-list li .btn { flex: none; }

/* ---- jobs running for this project (ADR 0049): what each is doing, and Stop */
.jobline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.jobline:empty { display: none; }
.jobpill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 99px;
  background: var(--teal-tint); color: var(--teal-hover); font-size: 14px; font-weight: 600; max-width: 100%; }
.jobpill > span:nth-child(2) { overflow-wrap: anywhere; }
.jobpill .btn { min-height: 28px; padding: 2px 10px; }

/* ---- the schedule (ADR 0045): a week grid, day by period down, age groups across */
.sched-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; justify-content: space-between; }
.sched-filters .weeks { gap: 6px; flex-wrap: wrap; }
.field.inline { display: inline-flex; flex-direction: column; gap: 4px; min-width: 150px; }
.sched-layout { flex-direction: column; align-items: stretch; min-width: 0; }
.sched-step, .sched-step > * { min-width: 0; max-width: 100%; }
.sched-layout > .sched-grid-card { flex: none; min-width: 0; width: 100%; max-width: 100%; overflow: hidden; }
.sched-layout > .detail { flex: none; max-width: none; }
.rcard ul.whyhere-list { color: var(--text); }
.t-sched { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; font-size: 13px; }
.t-sched th, .t-sched td { padding: 3px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.t-sched thead th { position: sticky; top: 0; background: var(--card); font-weight: 600; padding: 8px 4px; white-space: nowrap; z-index: 1; }
.t-sched .sday { position: sticky; left: 0; background: var(--card); width: 46px; font-weight: 600; z-index: 2; vertical-align: top; padding-top: 8px; }
.t-sched .sper { position: sticky; left: 46px; background: var(--card); width: 34px; color: var(--quiet); font-weight: 500; z-index: 2; }
.t-sched tr.day-start > * { border-top: 2px solid var(--line); }
.scell { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%;
  min-height: 30px; padding: 4px 7px; border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1.2; color: var(--text);
  border: 1px solid transparent; }
.scell:focus-visible { box-shadow: var(--focus); }
.scell:hover { filter: brightness(0.96); }
.scell { background: var(--wash-soft); justify-content: flex-start; }
.scell.problem { border: 2px solid var(--amber); background: var(--amber-wash); }
.scell .mark { width: 7px; height: 7px; }
.scell .sact { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* week by week (ADR 0075): each week's state in words, headers that open what can be kept of them */
.week-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; padding-top: 4px; padding-bottom: 4px; min-height: 44px; }
.week-chip .small { font-weight: 500; }
.headbtn { all: unset; box-sizing: border-box; cursor: pointer; font-weight: 600; border-radius: 6px; padding: 2px 4px; min-height: 28px; display: inline-flex; align-items: center; }
.headbtn:hover { color: var(--teal); text-decoration: underline; }
.headbtn:focus-visible { box-shadow: var(--focus); }
.headbtn[aria-pressed="true"] { background: var(--teal-tint); color: var(--teal-hover); }
.headbtn.corner { color: var(--quiet); font-weight: 500; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-right: 10px; }
h3.inline-h { display: inline; font-size: inherit; }
details.sub-card > summary { cursor: pointer; }
.sched-week .row { gap: 10px 14px; align-items: center; }
.scell.sel { box-shadow: 0 0 0 2px var(--teal) inset; }
.sched-moved summary { cursor: pointer; }
.confirm-final { border-left: 3px solid var(--teal); padding-left: 10px; }
.scell.dim { opacity: 0.28; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--quiet); }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.sched-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rcard.is-off { opacity: 0.7; }
.t-counts { border-collapse: collapse; font-size: 13px; min-width: 320px; }
.t-counts th, .t-counts td { padding: 4px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.t-counts td.num { text-align: right; }
@media (max-width: 720px) {
  .sched-filters { align-items: stretch; }
  .field.inline { flex: 1 1 140px; }
  .t-sched { min-width: 560px; font-size: 12px; }
  .scell { font-size: 12px; padding: 3px 5px; min-height: 28px; }
  .sched-lists { grid-template-columns: minmax(0, 1fr); }
}

/* ---- the staff schedule (ADR 0060): a row per shift and time, a column per day, the names in each cell; one day at a time
   on a phone */
.t-rota { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; font-size: 13px; table-layout: fixed; }
.t-rota.one-day { min-width: 0; }
.t-rota th, .t-rota td { padding: 3px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.t-rota thead th { position: sticky; top: 0; background: var(--card); font-weight: 600; padding: 8px 4px; white-space: nowrap; z-index: 1; }
.t-rota .rshift { position: sticky; left: 0; background: var(--card); width: 136px; z-index: 2; padding: 6px 6px 6px 8px; }
.t-rota.one-day .rshift { position: static; width: 40%; }
.t-rota .rshift .rname { display: block; font-weight: 600; overflow-wrap: anywhere; }
.rcell { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px; min-height: 36px; white-space: normal; }
.rcell .rn { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcell .rshort { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text); }
.rota-days { gap: 6px; padding: 10px 10px 4px; overflow-x: auto; flex-wrap: nowrap; }
.rota-days .chip { white-space: nowrap; flex: none; }
.rpeople { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rperson { border-top: 1px solid var(--line-soft); padding-top: 6px; }
.rperson:first-child { border-top: 0; padding-top: 0; }
.rp-name { font-weight: 600; min-height: 32px; }
.rweek { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rweek li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.rwday { font-weight: 600; }
.rwshifts { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.rota-more > summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.rota-more[open] > summary { margin-bottom: 12px; }

/* ---- Merge (ADR 0056): the line-up of columns, the questions, the merged list, why these are one */
.t-lineup { width: 100%; border-collapse: collapse; font-size: 14px; }
.t-lineup th, .t-lineup td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.t-lineup thead th { font-size: 12px; font-weight: 600; color: var(--quiet); border-bottom: 1px solid var(--line); }
.t-lineup tbody th { font-weight: 600; white-space: nowrap; }
.t-lineup select { min-width: 9em; }
.merge-qs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.merge-qs .q-card { background: var(--ask-card); border: 1px solid var(--ask-frame); }
.merge-qs .q-card .row { gap: 8px; }
.t-merged td.mcell { color: var(--muted); white-space: nowrap; }
.t-merged td.mfrom { min-width: 9em; }
.t-merged .pcells .pc.first { white-space: nowrap; }
ul.merge-values { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
ul.merge-values li { gap: 2px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
ul.merge-values li:first-child { border-top: 0; padding-top: 0; }
.merge-step .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 640px) {
  .t-merged tr { grid-template-columns: minmax(0, 1fr); }
  .t-merged td:nth-child(n) { grid-column: 1; }
  .t-merged td.mfrom { white-space: normal; }
  .t-lineup tbody th { white-space: normal; }
}
.merge-step .detail, .merge-step .whybox-top, .merge-step .sheet-rows, .merge-step figure.sheet { min-width: 0; max-width: 100%; }
@media (max-width: 900px) { .merge-step .detail { flex-basis: 100%; } }
@media (max-width: 640px) {
  .t-lineup thead { display: none; }
  .t-lineup tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
  .t-lineup th, .t-lineup td { display: block; border: 0; padding: 2px 0; }
  .t-lineup td::before { content: attr(data-tab) ": "; color: var(--quiet); font-size: 13px; }
  .t-lineup select { width: 100%; }
}

/* ---- Signing in and accounts (ADR 0066) */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.codes code, .key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.04em; }
.codes li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); text-align: center; }
.keybox { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.key { display: block; overflow-wrap: anywhere; user-select: all; }
.plain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.small-select { min-height: 36px; padding: 0 8px; width: auto; }
.t-people { min-width: 560px; }
.pill.off { background: var(--off-bg); color: var(--muted); }

/* ---- Ask about your sheets (ADR 0072): the box, the chips, the answer card, the form as lines, the rows, the actions */
.ask .h3like { margin: 0; }
.ask-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--field); border-radius: 12px; padding: 4px 6px 4px 12px; background: var(--card); }
.ask-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }
.ask-mark { color: var(--quiet); font-weight: 600; }
.ask-input.input { border: 0; box-shadow: none; flex: 1 1 120px; min-width: 0; padding-left: 0; }
.ask-input.input:focus { box-shadow: none; }
.ask-go.btn { min-height: 36px; }
.ask-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ask-chip { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ask-chip:hover { border-color: var(--field-hover); }
.ask-answer { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.ask-sentence { font-size: 17px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.ask-lines { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.ask-line { display: contents; }
.ask-lines dt { color: var(--quiet); font-weight: 600; padding-top: 3px; }
.ask-lines dd { margin: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ask-lines dd > .stack { flex: 1 1 100%; }
.ask-line-text { font-weight: 600; }
.ask-edit .small-select { min-width: 0; max-width: 100%; }
.ask-edit input.small-select { width: 140px; }
.t-ask { border-collapse: collapse; font-size: 14px; width: 100%; }
.t-ask th { text-align: left; font-weight: 600; color: var(--quiet); font-size: 12px; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t-ask td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; overflow-wrap: anywhere; }
.t-ask td.blank { color: var(--muted); font-style: italic; }
.t-ask td .sheet-rows { margin-top: 6px; }
.ask-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.ask-act { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ask-act .btn, .ask-act a.btn { width: 100%; justify-content: center; }
.ask-search summary { cursor: pointer; font-weight: 600; color: var(--teal); }
.ask-lists { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) { .ask-lines { grid-template-columns: minmax(0, 1fr); } .ask-lines dt { padding-top: 6px; } }

/* Who can see what (ADR 0073): audience pickers, the import question, private rule cards, the share question */
.aud { position: relative; display: inline-block; max-width: 100%; }
.aud-sum { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; max-width: 100%; }
.aud-sum:hover { border-color: var(--field-hover); }
.aud-sum:disabled { cursor: default; color: var(--muted); }
.aud-caret { color: var(--quiet); font-size: 12px; }
.aud-opts { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.aud-opts label { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; }
.aud-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.aud-row { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.aud-row:last-child { border-bottom: 0; }
.aud-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.aud-line.sub { padding-left: 18px; }
.aud-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.aud-words { font-size: 14px; color: var(--muted); }
.lock-ic { color: var(--quiet); flex: none; }
.vis { display: inline-block; }
.rulecard.is-private { background: var(--bg); border-style: dashed; }
.pill.group { background: var(--chip); color: var(--muted); font-weight: 500; }
.change-box { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.groups { gap: 10px; }
.group-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.group-row:last-child { border-bottom: 0; }
.strong { font-weight: 600; }
.confirm.with-share { flex-direction: column; align-items: stretch; }
.share-q { border: 1px solid var(--ask-line); border-radius: 12px; background: var(--ask-card); padding: 12px 14px; margin: 0; }
.share-q legend { float: left; width: 100%; padding: 0; margin-bottom: 8px; font-weight: 600; }
.share-opt { display: flex; align-items: flex-start; gap: 8px; min-height: 32px; font-size: 14px; }
.share-opt input { margin-top: 4px; }
@media (max-width: 560px) { .aud-line { flex-direction: column; align-items: flex-start; } }

/* ---- Simpler screens (ADR 0074): the page is the step, one attention line, marks only on exceptions */
.attention { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.attention.hold { background: transparent; border-color: transparent; padding: 0 4px; color: var(--muted); font-size: 14px; }
.attention a { color: var(--text); font-weight: 600; }
.attention.hold a { color: var(--muted); font-weight: 500; }
.attention .mark { margin-top: 7px; }
.mark { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--amber); }
.mark.hold { background: var(--wait-dot); }
.more-inline { display: inline; }
.more-inline > summary { display: inline; cursor: pointer; color: var(--teal); font-weight: 600; list-style: none; }
.more-inline > summary::-webkit-details-marker { display: none; }
.more-inline ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.panel-head h1 { font-size: 24px; letter-spacing: -0.01em; }
.panel-head { align-items: center; }
.steps-menu { margin-left: auto; position: relative; }
.steps-menu > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--teal); min-height: 36px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 10px; list-style: none; }
.steps-menu > summary::-webkit-details-marker { display: none; }
.steps-menu > summary::after { content: " ▾"; font-size: 12px; margin-left: 2px; }
.steps-menu > summary:hover { background: var(--teal-tint); }
.steps-pop { position: absolute; right: 0; top: 100%; z-index: 5; min-width: min(420px, 90vw); max-width: 92vw; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow); }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps-list a { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.steps-list a:hover { background: var(--teal-wash); color: var(--text); }
.steps-list li.sel a { background: var(--teal-wash); box-shadow: inset 3px 0 0 var(--teal); }
.steps-list .grow { display: flex; flex-direction: column; gap: 2px; }
.steps-list .sc-state { margin-left: auto; white-space: nowrap; }
.next-step { border-top: 1px solid var(--line-soft); padding-top: 14px; display: flex; justify-content: flex-end; }
.addstep { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.addstep label.strong { color: var(--muted); }
.draft-line { font-size: 15px; color: var(--muted); }
.place-mark { font-size: 13px; color: var(--amber-ink); }
.marked-line { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.facts { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
details.kept-by { padding: 0; background: none; font-size: 14px; }
details.kept-by > summary { cursor: pointer; font-weight: 600; }
details.whyhere > summary { cursor: pointer; font-weight: 600; }
.move-row { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.move-row .linklike { min-height: 44px; }
.way { align-items: flex-end; text-align: right; }
.clash.suggested { border: 2px solid var(--teal); padding: 11px; }
.clash { background: var(--card); border: 1px solid var(--line); }
details.from > summary, details.more-ways > summary { cursor: pointer; color: var(--teal); font-weight: 600; font-size: 13px; }
details.more-ways { text-align: right; }
.confirm.handback { background: var(--teal-tint); }
.row.base > .linklike { padding: 0; }
.steps-menu .stepnum { margin-top: 1px; }
@media (max-width: 720px) {
  .panel-head h1 { font-size: 21px; }
  .steps-pop { position: fixed; left: 16px; right: 16px; top: auto; width: auto; min-width: 0; max-width: none; }
  .way { align-items: flex-start; text-align: left; }
  details.more-ways { text-align: left; }
}
/* Home (ADR 0074): one row per job, the row opens it */
.page.home { max-width: 820px; }
.jobrows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.jobrows li + li { border-top: 1px solid var(--line-soft); }
.jobrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 18px; min-height: 56px; color: var(--text); text-decoration: none; }
.jobrow:hover { background: var(--teal-wash); color: var(--text); }
.jobrow .jobname { font-weight: 600; font-size: 16px; flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.jobline-att { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--amber-ink); }
.jobline-att .spinner { width: 10px; height: 10px; }
.jobrow .jobstate { white-space: nowrap; }
.jobrow .caret { color: var(--quiet); font-size: 18px; }
.home .new-card { max-width: 520px; }
/* Your sheets (ADR 0074): one line per tab */
.tablines { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tabline + .tabline { border-top: 1px solid var(--line-soft); }
.tabline > summary { display: flex; align-items: center; gap: 12px; padding: 12px 18px; min-height: 48px; cursor: pointer; list-style: none; }
.tabline > summary::-webkit-details-marker { display: none; }
.tabline > summary:hover { background: var(--teal-wash); }
.tabline .tabname { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tabline .tablock { display: inline-flex; align-items: center; gap: 4px; }
.tabline .caret { color: var(--quiet); font-size: 18px; transition: transform 0.15s ease; }
.tabline[open] .caret { transform: rotate(90deg); }
.tabbody { padding: 0 18px 14px; }
.tabbody .aud-line { padding: 4px 0; }
/* Ask (ADR 0074): the sentence opens the form; a row opens its cells; one action, the rest behind More */
button.ask-sentence.linkish { background: none; border: 0; padding: 0; text-align: left; color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 4px; text-decoration-thickness: 2px; }
button.ask-sentence.linkish:hover { color: var(--teal-hover); }
.t-ask .rowbtn { min-height: 32px; font-weight: 500; }
.t-ask tr.ask-row.open td { border-bottom: 0; }
.t-ask tr.ask-cells td { padding-top: 0; }
.t-ask tr.ask-cells .cites { margin-bottom: 6px; }
details.more-ways.inline { display: inline-block; text-align: left; }
details.more-ways.inline > summary { list-style: none; }
details.more-ways.inline > summary::-webkit-details-marker { display: none; }
.ask-actions { display: flex; align-items: flex-start; }
/* Setup (ADR 0074): defaults as plain lines */
.defaults { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.defaults li + li { border-top: 1px solid var(--line-soft); }
.default-line > summary { cursor: pointer; padding: 10px 14px; min-height: 44px; display: flex; align-items: center; list-style: none; }
.default-line > summary::-webkit-details-marker { display: none; }
.default-line > summary:hover { background: var(--teal-wash); }
.default-line > span { display: block; padding: 0 14px 10px; }

/* ---- the question-led start (ADR 0076): one decision a screen, its default chosen, the next step the one button */
.page.start { max-width: 720px; }
.start-card { padding: 28px 28px 30px; gap: 18px; }
.start-card h1 { font-size: 28px; line-height: 1.2; margin: 0; }
.start-card .eyebrow { margin: 0; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 16px; border: 2px dashed var(--field);
  border-radius: var(--radius); text-align: center; cursor: pointer; }
.drop:focus-within { border-color: var(--teal); }
.lead { margin: 0; font-size: 17px; }
.start-lines { list-style: none; margin: 0; padding: 0; }
.start-lines li { border-bottom: 1px solid var(--line-soft); }
.start-lines li:last-child { border-bottom: 0; }
.start-line summary { padding: 11px 0; cursor: pointer; list-style: none; }
.start-line summary::-webkit-details-marker { display: none; }
.start-line[open] summary { font-weight: 600; }
.start-line > div { padding: 0 0 12px; }
.start-rules summary, .paste summary { cursor: pointer; color: var(--teal); font-weight: 600; }
.day-chip { min-width: 52px; }
.t-periods { border-collapse: collapse; width: 100%; }
.t-periods th { text-align: left; font-size: 13px; color: var(--quiet); font-weight: 500; padding: 0 6px 4px 0; }
.t-periods td { padding: 3px 6px 3px 0; }
.t-periods .input { width: 100%; min-width: 0; }
.input.narrow { max-width: 120px; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.read-ok { color: var(--teal-hover); }
.read-ok::before { content: "✓ "; }
.inline-q { gap: 8px; align-items: flex-end; }
.start-over { align-items: flex-start; }
.t-answers { border-collapse: collapse; font-size: 14px; }
.t-answers th, .t-answers td { border: 1px solid var(--line-soft); padding: 4px 8px; text-align: left; vertical-align: top; }
@media (max-width: 600px) {
  .start-card { padding: 20px 16px 22px; }
  .start-card h1 { font-size: 24px; }
  .t-periods .input { padding-left: 6px; padding-right: 6px; }
}

/* The share-out (ADR 0059, 0074): a row per place or person and what it gets, one row at a time at any width; the
   one mark a row may have is said in words, never color alone. */
.share-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.share-rows > li { border-bottom: 1px solid var(--line-soft); }
.share-rows > li.sel { background: var(--teal-wash); }
.share-head { display: flex; gap: 12px; padding: 6px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.share-head > :first-child { flex: 1 1 auto; }
.share-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; width: 100%; min-height: 44px; padding: 8px;
  background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.share-row:hover { background: var(--teal-wash); }
.share-row:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.share-row .grow { flex: 1 1 10em; min-width: 0; overflow-wrap: anywhere; }
.share-row .amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.share-row .mark-word { flex-basis: 100%; text-align: right; }
.share-rows .sub-card { margin: 0 8px 10px; }
.notkept { color: var(--amber-ink); font-weight: 600; }
.rule-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rule-lines > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rule-lines > li .grow { flex: 1 1 14em; min-width: 0; }
.rule-lines > li.off .grow { color: var(--quiet); text-decoration: line-through; }
.share-changes > li { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.share-changes > li .grow { flex: 1 1 8em; min-width: 0; }
details.share-rules > summary, details.share-cells > summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.share-adjust { align-items: flex-end; flex-wrap: wrap; }
.share-adjust .field { flex: 1 1 12em; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
@media (min-width: 721px) { .share-row .mark-word { flex-basis: auto; } }

/* ---- The menus around every screen (menus.js): the avatar at the top right, and on phones the bar along the bottom */
.me { position: relative; flex: none; }
.av-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; border-radius: 999px; cursor: pointer; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--teal); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.av-btn:hover .avatar, .av-btn[aria-expanded="true"] .avatar { background: var(--teal-hover); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 250px; max-width: calc(100vw - 32px); box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow); padding: 8px; color: var(--text); }
.mn-head { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14.5px; }
.mn-sub { color: var(--muted); font-size: 13px; }
.mn-item { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-decoration: none; font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.mn-item:hover { background: var(--hover-bg); }
.mn-item svg { color: var(--muted); flex: none; }
.mn-looks { border: 0; margin: 4px 0 0; padding: 6px 0 4px; border-top: 1px solid var(--line); }
.mn-looks legend { padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mn-ap { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: 14.5px; cursor: pointer; }
.mn-ap:hover { background: var(--hover-bg); }
.mn-ap input { accent-color: var(--teal); margin: 0; width: 18px; height: 18px; }
.mn-out { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; font-weight: 600; }
.av-btn:focus-visible, .mn-item:focus-visible, .mt:focus-visible, .mn-ap:focus-within { outline: none; box-shadow: var(--focus); }
.mbar { display: none; }
@media (max-width: 720px) {
  .top { padding: 8px 8px 8px 16px; flex-wrap: nowrap; }
  .top .brand { flex: 1; }
  main#main { padding-bottom: 76px; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); }
  .mt { flex: 1; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); text-decoration: none; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
  .mt[aria-current="page"], .mt[aria-expanded="true"] { color: var(--teal); font-weight: 600; }
  .sheet { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -6px 24px var(--shadow); padding: 8px; display: flex; flex-direction: column; max-height: 70vh; overflow: auto; }
}
/* the conversation beside the start's questions (ADR 0076, phase 2) */
.conversation { border-top: 1px solid var(--line-soft); padding-top: 14px; display: grid; gap: 10px; }
.conversation .eyebrow { margin: 0; }
.conv-turns { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conversation ul { margin: 0; padding-left: 18px; }
.conversation p { margin: 0; overflow-wrap: anywhere; }
