/* Tokens from the Claude Design handoff (docs/design/README.md, "Design tokens"). */
:root {
  --surface: #FBF8F3;
  --sidebar: #F2ECE2;
  --rail: #F6F1E8;
  --ink: #1E1A16;
  --body: #3A332C;
  --muted: #5B5248;
  --rule: #E4DBCD;
  --soft: #C9BEAD;
  --ok: #3F7A4F;
  --ok-bg: #E3EEE3;
  --ok-text: #2F5E3B;
  --timing: #B4532A;
  --conflict: #F3E3C4;
  --stopped: #5B5248;
  --serif: 'Literata', Georgia, serif;
  --sans: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--body); font: 400 16px/1.5 var(--sans); }
h1, h2 { font-family: var(--serif); color: var(--ink); font-weight: 600; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
[hidden] { display: none !important; }

/* Sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin-card { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 32px; max-width: 380px; width: 100%; }
.signin-card p { color: var(--muted); }
.error { color: var(--timing); font-weight: 700; }
.offline-bar { position: sticky; top: 0; z-index: 50; background: var(--conflict); color: var(--ink); font-weight: 700; font-size: 14px;
  padding: max(8px, env(safe-area-inset-top)) 16px 8px; text-align: center; border-bottom: 1px solid var(--rule); }

/* Shell */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); padding: 20px 14px; display: flex; flex-direction: column; gap: 2px; }
.brand { font: 600 22px var(--serif); color: var(--ink); padding: 0 10px 16px; }
.sidebar a { color: var(--ink); text-decoration: none; padding: 9px 10px; border-radius: 9px; font-weight: 700; font-size: 15px; }
.sidebar a:hover { background: rgba(30, 26, 22, .06); }
.sidebar a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.who { margin-top: auto; padding: 16px 10px 0; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; word-break: break-all; }
/* The sidebar stays put while a long page scrolls. */
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.topbar, .scrim { display: none; }
.main { padding: 28px 32px; max-width: 860px; }
.sub { color: var(--muted); font-size: 15px; margin: 6px 0 20px; }

/* Cards and controls */
.card { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
details.card summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.badge { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--rule); color: var(--ink); white-space: nowrap; }
.badge.ok { background: var(--ok); color: #fff; }
.badge.warn { background: var(--timing); color: #fff; }
.badge.manual { background: var(--conflict); color: var(--ink); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0 0 16px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); font-weight: 700; }
#operator-view pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { font: 700 15px var(--sans); padding: 9px 16px; border-radius: 9px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--ink); color: var(--surface); }
.btn.quiet { border-color: var(--soft); color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; text-align: left; }
.hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.notice { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 700; background: var(--ok-bg); color: var(--ok-text); }
.notice.bad { background: var(--conflict); color: var(--ink); }
.scopes { margin: 12px 0 0; padding-left: 20px; font-size: 14px; color: var(--body); }

/* Needs attention (handoff screen B) */
.statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 15px; }
.status-item { display: flex; align-items: center; gap: 8px; }
.statusbar .btn { margin-left: auto; }
.muted { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--soft); display: inline-block; flex: none; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--timing); }
.change { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; }
.change.quiet { background: var(--rail); }
.change .cbadge { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px;
  border-radius: 6px; display: inline-block; margin-right: 6px; }
.change h3 { font: 700 18px var(--sans); color: var(--ink); margin: 6px 0 2px; }
.change .says { margin: 0; color: var(--body); }
.change .src { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.change .actions { justify-content: flex-end; }
.change details { grid-column: 1 / -1; font-size: 14px; }
.change details summary { cursor: pointer; color: var(--muted); }
.change details ul { margin: 8px 0 0; padding-left: 18px; }
.flag { font-size: 11px; font-weight: 700; color: var(--timing); margin-left: 6px; text-transform: uppercase; letter-spacing: .04em; }
.b-new { background: var(--ok); color: #fff; }
.b-timing, .b-dose { background: var(--timing); color: #fff; }
.b-conflict { background: var(--conflict); color: var(--ink); }
.b-missing, .b-hold { background: var(--rule); color: var(--ink); }
.b-stopped { background: var(--stopped); color: #fff; }
.b-import { background: var(--conflict); color: var(--ink); }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--soft); border-radius: 14px; }

/* Mom's screen */
.code-box { margin-top: 16px; padding: 16px; background: var(--rail); border-radius: 12px; text-align: center; }
.code { font: 700 44px var(--sans); letter-spacing: .25em; color: var(--ink); }
.steps { margin: 12px 0 0; padding-left: 22px; }
.steps li { margin: 6px 0; }

/* Review (handoff C, D, F) */
.draft-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--rail); }
.crumb { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; }
.title-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 2px; }
.title-row h1 { font-size: 32px; }
.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 12px 0; }
.source h3 { font: 700 17px var(--sans); color: var(--ink); margin: 8px 0; }
.chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--soft); }
.chip.prescribed { border-color: #3C5A94; color: #3C5A94; }
.quote { background: var(--rail); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.quote p { margin: 0; color: var(--ink); }
.facts.small { font-size: 14px; margin: 0; }
.editor { border: 1.5px solid var(--ink); }
.editor h2 { margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.field-label { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .confirm input[type=text] { font: 15px var(--sans); padding: 7px 9px; border: 1px solid var(--soft); border-radius: 8px; background: #fff; color: var(--ink); }
.editor > .field { margin: 8px 0; max-width: 420px; }
/* Multi-family: the health-system picker on Sources & sync */
.org-picker { margin: 12px 0; max-width: 560px; }
.org-picker .field { margin: 6px 0; }
.org-results { display: grid; gap: 6px; margin: 8px 0; }
.org-option { text-align: left; font: 15px var(--sans); padding: 8px 10px; border: 1px solid var(--rule); border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; }
.org-option:hover, .org-option:focus-visible { border-color: var(--ink); }
#org-card .notice p { margin: 0 0 8px; }
/* Multi-family: the family picker, Family settings and invitation links */
.family-pick { display: flex; flex-direction: column; gap: 3px; padding: 0 10px 12px; }
.family-pick select { font: 15px var(--sans); padding: 7px 9px; border: 1px solid var(--soft); border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; }
.card > .field { margin: 8px 0; max-width: 420px; }
.field input[type=email] { font: 15px var(--sans); padding: 7px 9px; border: 1px solid var(--soft); border-radius: 8px; background: #fff; color: var(--ink); }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 6px 0 10px; }
.members { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.members li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; word-break: break-word; }
.actions.inline { display: inline-flex; gap: 12px; }
.link-box { text-align: left; }
/* One admin per family (AJ 2026-10-08): everyone else sees every page, with no edit controls. */
.sidebar-badge { align-self: flex-start; margin: 0 10px 12px; }
.topbar .view-only-badge { margin-left: auto; }
/* Family pages only: the operator, welcome and invitation pages are never view-only (Codex role review, #1). */
body.view-only:not([data-route="operator"]):not([data-route="welcome"]):not([data-route="join"]) .main [data-page]:not([data-page="operator"]):not([data-page="welcome"]):not([data-page="join"]) button:not([data-view-ok]),
body.view-only:not([data-route="operator"]):not([data-route="welcome"]):not([data-route="join"]) .main [data-page]:not([data-page="operator"]):not([data-page="welcome"]):not([data-page="join"]) label.btn,
body.view-only #publish-dialog { display: none !important; }
/* A backstop only: view-only pages are RENDERED without edit links and forms (Codex role review 2, #2). */
body.view-only:not([data-route="operator"]):not([data-route="welcome"]):not([data-route="join"]) .main [data-page]:not([data-page="operator"]):not([data-page="welcome"]):not([data-page="join"]) .edit-only,
body.view-only:not([data-route="operator"]):not([data-route="welcome"]):not([data-route="join"]) .main [data-page]:not([data-page="operator"]):not([data-page="welcome"]):not([data-page="join"]) form { display: none !important; }
.link-box input { width: 100%; font: 14px var(--sans); padding: 7px 9px; border: 1px solid var(--soft); border-radius: 8px; background: #fff; }
.slot-rows { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.slot-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .55fr) minmax(0, .75fr) minmax(0, 1.4fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: end; padding: 10px; background: var(--rail); border-radius: 10px; }
/* Fields shrink to their column; a long choice never pushes the row past its box. */
.slot-row .field, .slot-row .with-box { min-width: 0; }
.slot-row input, .slot-row select { width: 100%; min-width: 0; box-sizing: border-box; text-overflow: ellipsis; }
.slot-row > .link { white-space: nowrap; padding-bottom: 8px; }
.radio { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 15px; }
.confirm { border: 1px solid var(--rule); }
.confirm legend { font-weight: 700; color: var(--ink); padding: 0 4px; }
.confirm input[type=text] { width: 100%; margin-top: 6px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0; border-top: 1px solid var(--rule); }
.publish-dialog { border: 0; border-radius: 14px; padding: 22px 24px; max-width: 540px; width: calc(100% - 32px); box-shadow: 0 16px 40px rgba(40,30,20,.14); }
.publish-dialog::backdrop { background: rgba(30,26,22,.35); }
.summary { padding-left: 18px; }
.summary li { margin: 8px 0; }
.small-btn { padding: 4px 10px; font-size: 13px; margin-left: 8px; }
.version-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.version-row > div:last-child { grid-column: 1 / -1; }
.version-row .badge { margin-left: 8px; }
.preview-frame { position: relative; width: 100%; max-width: 900px; overflow: hidden; border-radius: 14px; border: 8px solid #2B2724; background: #F7F2E9; }
.preview-stage { position: absolute; left: 0; top: 0; width: 1194px; height: 834px; transform-origin: 0 0; padding: 28px 34px; display: flex; flex-direction: column; gap: 18px; background: #F7F2E9; }
.preview-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #1E1A16; padding-bottom: 16px; }
.preview-title { font: 600 38px 'Literata', Georgia, serif; color: #1E1A16; }
.preview-updated { font-size: 22px; color: #4A4239; font-weight: 700; }

.approve-box { margin: 14px 0; }
.quote.small { font-size: 14px; padding: 6px 10px; margin: 4px 0; }
.quote.small p { margin: 2px 0; }
.quick-row { margin: 8px 0 0; font-size: 15px; }
.why { margin: 8px 0 0; font-size: 13px; color: var(--timing); font-weight: 700; }

/* Visit notes on cards */
.notes { margin-top: 12px; }
.notes-title { font-size: 15px; margin: 8px 0; }
.note-finding { border-left: 3px solid var(--line, #ccc); padding: 6px 0 6px 12px; margin: 8px 0; }
.note-finding.changed { border-left-style: dashed; }
.note-meta { font-size: 13px; color: var(--muted, #666); margin: 0; }
.note-heading { font-size: 13px; font-weight: 700; margin: 4px 0 0; }
.note-para { margin: 4px 0; line-height: 1.45; font-size: 15px; }
.note-para mark { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 2px; }
.note-state { font-size: 13px; font-weight: 700; color: var(--timing, #9a5b00); margin: 4px 0; }
.note-reading { font-size: 13px; color: var(--muted, #666); border: 1px dashed var(--line, #ccc); border-radius: 6px; padding: 6px 8px; margin-top: 4px; }
.note-reading p { margin: 2px 0; }
.note-reading-label { font-weight: 700; }
@media (prefers-color-scheme: dark) { .note-para mark { background: #6b5a00; } }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.photo-tile { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.photo-tile img.broken { outline: 2px dashed var(--line, #ccc); }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--soft, #eee); }

/* Taken panel (Mom's screen page) */
.taken-sec h3 { margin: 14px 0 4px; font-size: 15px; }
.taken-row { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--rule, #e5ded2); }
.taken-row.on strong { color: #2F6B2A; }
.taken-row strong { color: #8a5a00; font-weight: 600; }
.taken-history { border-collapse: collapse; width: 100%; font-size: 14px; }
.taken-history th, .taken-history td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule, #e5ded2); }

.with-box { display: flex; flex-direction: column; gap: 6px; }

/* One review-card layout (plan 2026-10-04): what changed, labelled evidence, after you save */
.changed-box { border: 1.5px solid var(--ink); }
.changed-box h2 { margin: 0 0 6px; }
.changed-lead { font-weight: 700; margin: 4px 0; }
.changed-line { margin: 3px 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip.ended { color: var(--muted); border-color: var(--soft); }
.chip.new { background: #E7F0E1; color: #2F6B2A; border-color: #2F6B2A; }
.chip.note { color: #6b4a00; border-color: #c9a24a; }
.source.ended { opacity: .65; }
.facts dd.changed { background: #FFF3C4; border-radius: 4px; padding: 0 4px; }
.was { font-weight: 400; color: var(--muted); font-size: .9em; }
.after-row { margin: 10px 0 0; font-weight: 700; }

/* Interval fields (doses through the day) span the editor row */
.slot-row > .field[hidden] { display: none; }

.taken-log { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }

/* Required / missing fields in the editor */
.req { color: #b3261e; font-weight: 700; }
.missing { outline: 3px solid #b3261e !important; outline-offset: 2px; border-radius: 8px; background: #fdecea; }
.field-warn { color: #b3261e; font-weight: 700; margin: 4px 0 8px; }

.version-row.ended { opacity: .6; }

.btn.danger { color: #b3261e; border-color: #b3261e; }

/* ---------- Layout tiers (plan 2026-10-07 "Admin as a PWA"): one DOM, CSS only ---------- */

/* Desktop >= 1024px: a review card puts Stanford's evidence beside the editor. */
@media (min-width: 1024px) {
  body[data-route="card"] .main, body[data-route="edit"] .main { max-width: 1200px; }
  .review-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
  .review-cols .sources { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .review-decide .slot-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Tablet 720-1023px: a narrower sidebar, one content column. */
@media (min-width: 720px) and (max-width: 1023.98px) {
  .app { grid-template-columns: 172px minmax(0, 1fr); }
  .sidebar { padding: 16px 8px; }
  .brand { font-size: 19px; padding: 0 8px 12px; }
  .sidebar a { font-size: 14px; padding: 9px 8px; }
  .main { padding: 24px; }
}

/* Phone < 720px: top bar + slide-over nav, stacked rows, 44px touch targets. */
@media (max-width: 719.98px) {
  .app { display: block; min-height: 100vh; }
  .topbar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30; min-height: 56px;
    padding: max(6px, env(safe-area-inset-top)) 12px 6px max(6px, env(safe-area-inset-left)); background: var(--sidebar); border-bottom: 1px solid var(--rule); }
  .nav-toggle { flex: none; width: 44px; height: 44px; border: 0; border-radius: 9px; background: none; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
  .nav-toggle span { display: block; width: 22px; height: 2px; border-radius: 1px; background: var(--ink); }
  .topbar-title { font: 600 19px var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(300px, 85vw); height: auto;
    padding: max(20px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; box-shadow: 0 0 40px rgba(40, 30, 20, .2); }
  .app.nav-open .sidebar { transform: none; visibility: visible; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(30, 26, 22, .35); }
  .sidebar a { min-height: 44px; display: flex; align-items: center; font-size: 16px; }
  .who .link { min-height: 44px; }
  .main { max-width: none; padding: 16px max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  h1, .title-row h1 { font-size: 26px; }
  .title-row { flex-wrap: wrap; }
  .card { padding: 14px; }

  /* Touch targets; 16px inputs so iOS does not zoom in on focus. */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
  button.link { min-height: 44px; display: inline-flex; align-items: center; }
  .field input, .field select, .confirm input[type=text], .main input[type=text], .main input[type=email], .main input[type=date], .main input[type=time], .main select, .family-pick select { min-height: 44px; font-size: 16px; }
  .radio { min-height: 44px; }
  .radio input { width: 22px; height: 22px; flex: none; }
  .main summary { padding: 12px 0; }
  details.card > summary { margin: -12px 0; }
  .crumb { display: inline-flex; align-items: center; min-height: 44px; }

  /* Stacked rows instead of side-by-side columns. */
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dt { margin-top: 8px; font-size: 13px; }
  .change { grid-template-columns: minmax(0, 1fr); }
  .change .actions { justify-content: flex-start; }
  .version-row { grid-template-columns: minmax(0, 1fr); }
  .statusbar .btn { margin-left: 0; width: 100%; }
  .slot-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sources { grid-template-columns: minmax(0, 1fr); }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .code { font-size: 36px; }
  .preview-frame { border-width: 4px; }

  /* Tables become one block per row, each cell labelled. */
  .taken-history, .taken-history tbody, .taken-history tr, .taken-history td { display: block; width: 100%; }
  .taken-history tr:first-child { display: none; }
  .taken-history tr { padding: 8px 0; border-bottom: 1px solid var(--rule); }
  .taken-history td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; }
  .taken-history td:first-child { font-weight: 700; color: var(--ink); }
  .taken-history td[data-label]::before { content: attr(data-label); color: var(--muted); }

  /* Save / Publish stay within thumb reach. */
  .sticky-actions, .draft-bar { position: sticky; bottom: 0; z-index: 20; margin: 0 -16px; border-radius: 0; border: 0;
    border-top: 1px solid var(--rule); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 16px rgba(40, 30, 20, .06); }
  .sticky-actions { background: var(--surface); }
  .sticky-actions .btn, .draft-bar .btn { flex: 1 1 auto; }
  /* The draft bar sits above the cards, so sticky wouldn't hold it: pin it to the bottom. */
  .draft-bar { position: fixed; left: 0; right: 0; margin: 0; flex-wrap: wrap; }
  .main:has(#draft-bar:not([hidden])) { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }

  /* The publish modal becomes a full-screen sheet. */
  /* dialog.x:modal outranks the browser's own dialog:modal size limits. */
  dialog.publish-dialog:modal { inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0;
    padding: max(16px, env(safe-area-inset-top)) 16px 0; }
  .publish-dialog[open] { display: flex; flex-direction: column; }
  .publish-dialog #publish-body { flex: 1 1 auto; overflow-y: auto; }
  .publish-dialog > .actions { position: sticky; bottom: 0; background: #fff; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
  .publish-dialog > .actions .btn { flex: 1 1 auto; }
}

/* M7: consent and Getting started (multi-family sites only). */
#consent-view .check, #family-view .check { align-items: flex-start; }
#consent-view .check input[type=checkbox], #family-view .check input[type=checkbox] { margin-top: 3px; flex: 0 0 auto; }
.draft-note .badge { display: inline-block; margin: 0 0 4px; }
.legal-links a { margin-right: 4px; }
.setup-steps { list-style: none; padding-left: 0; }
.setup-steps > li { border-left: 3px solid var(--rule); padding: 4px 0 4px 12px; margin: 10px 0; }
.setup-steps > li.done { opacity: .75; }
.setup-steps > li.next { border-left-color: var(--ok); }
.setup-steps > li .actions { margin-top: 6px; }
