/* ABF Production: the shell and the screens. Built on the shared ABF dark kit
   (abf/abf.css): sky is the only accent, Bebas Neue for labels, pill buttons,
   8px cards, flat surfaces. One layout for three sizes:
     computer  a rail of sections down the left
     tablet    the same rail, narrower
     phone     a bar on top and a dock of sections along the bottom */

:root {
  --rail: 236px;
  --dock: 62px;
  --gutter: 24px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-size: 15px; min-height: 100dvh; overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.center { text-align: center; }
.bad-text { color: var(--bad-text); }
.btn.busy { opacity: .6; pointer-events: none; }
.btn .i + span, .btn span + .i { margin-left: 0; }

/* ---------- shell ---------- */

.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.stage { min-width: 0; display: flex; flex-direction: column; }

.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-4) var(--s-3) var(--s-3); background: var(--chrome); border-right: 1px solid var(--line); overflow-y: auto; }
.rail .brand { padding: 6px 10px; text-decoration: none; }
.rail-nav { display: grid; gap: 2px; }
.rail-gap { height: 1px; margin: var(--s-3) 10px; background: var(--line); }
.nav { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: 0 12px; border-radius: var(--radius); color: var(--muted); font-family: var(--font-ui); font-size: 19px; line-height: 1; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; transition: color var(--t) var(--ease), background-color var(--t) var(--ease); }
.nav .i { width: 20px; height: 20px; }
.nav:hover { color: var(--text); }
.nav.active { color: var(--text); background: var(--panel); }
.nav.active .i { color: var(--accent); }

.who { margin-top: auto; display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius); background: none; cursor: pointer; text-align: left; transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease); }
.who:hover { background: var(--panel); border-color: var(--line); }
.who-text { display: grid; min-width: 0; }
.who-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.who-text small { font-size: 12px; }

.avatar { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); font-family: var(--font-ui); font-size: 15px; letter-spacing: .04em; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 48px; height: 48px; font-size: 19px; }

.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-5); min-height: 60px; padding: 0 var(--gutter); background: var(--chrome); border-bottom: 1px solid var(--line); }
.bar h1 { font-family: var(--font-ui); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.bar-brand { display: none; }
.bar-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 -12px 0 -10px; border-radius: 50%; color: var(--muted); }
.bar-back:hover { color: var(--text); }
.bar-back .i { width: 22px; height: 22px; }
.bar .status { margin-left: auto; }
.bar .tabs { overflow-x: auto; scrollbar-width: none; }
.bar .tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: flex; align-items: center; padding: 0 2px; color: var(--faint); font-family: var(--font-ui); font-size: 18px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; text-decoration: none; transition: color var(--t) var(--ease); }
.tabs a:hover, .tabs a.active { color: var(--text); }
.tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }

.banners { display: grid; }
.banner { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--gutter); background: var(--accent-tint); border-bottom: 1px solid var(--accent-line); color: #dff3fb; font-size: 14px; }
.banner.bad { background: var(--bad-tint); border-color: var(--bad-line); color: var(--bad-text); }
.banner .i { flex: none; width: 18px; height: 18px; }
.banner span { flex: 1; }

main#view { width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--s-5) var(--gutter) 96px; }
main#view.wide { max-width: none; }
.dock { display: none; }

.loading { padding: var(--s-8) 0; text-align: center; color: var(--faint); font-family: var(--font-ui); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }

dialog.wide { width: min(1080px, calc(100vw - 40px)); }
dialog .head h2 { font-size: 19px; }

/* ---------- shared pieces ---------- */

.reading { max-width: 760px; margin: 0 auto; }
.block { margin-bottom: var(--s-6); }
.block-sub { margin: calc(-1 * var(--s-1)) 2px var(--s-3); color: var(--muted); font-size: 13.5px; }
.list-actions { margin-top: var(--s-4); }

.rows.card { padding: 0; overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.row-link { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: 10px var(--s-4); color: inherit; text-decoration: none; }
a.row-link { transition: background-color var(--t) var(--ease); }
a.row-link:hover { background: var(--panel-2); color: inherit; }
.row-link > .i { flex: none; width: 22px; height: 22px; color: var(--muted); }
.row-link > .i.chev { width: 18px; height: 18px; color: var(--faint); }
.row-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row-main b { font-weight: 700; overflow-wrap: anywhere; }
.row-main small { font-size: 13px; overflow-wrap: anywhere; }
.i.st-done { color: var(--ok); }
.i.st-warn { color: var(--warn); }
.i.st-todo { color: var(--faint); }

.st { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; }
.st.ok { color: var(--ok); }
.st .i { width: 18px; height: 18px; }

.meter { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width var(--t-slow) var(--ease); }

details > summary { cursor: pointer; color: var(--accent); font-family: var(--font-ui); font-size: 16px; letter-spacing: .05em; text-transform: uppercase; }
details > summary:hover { color: var(--accent-text); }
.inset { margin-top: var(--s-3); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); }
label.field input, label.field select, label.field textarea { width: 100%; }
label.field.narrow { max-width: 160px; }
select { max-width: 100%; }

/* ---------- home ---------- */

.home { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 0 var(--s-6); align-items: start; }
.hero { grid-column: 1 / -1; margin-bottom: var(--s-6); padding: var(--s-5); display: grid; gap: var(--s-3); }
.hero .eyebrow { color: var(--accent); }
.hero-date { font-size: 34px; font-weight: 900; line-height: 1.05; letter-spacing: -0.015em; }
.hero-sub { color: var(--muted); font-size: 16px; }
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3) var(--s-6); margin-top: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.day-name { font-family: var(--font-ui); font-size: 18px; letter-spacing: .05em; text-transform: uppercase; color: var(--text); margin-bottom: 4px; }
.day-name small { margin-left: 6px; color: var(--faint); font-size: 15px; }
.day li { display: flex; gap: var(--s-3); padding: 3px 0; }
.day li b { flex: none; width: 78px; font-variant-numeric: tabular-nums; }
.day li span { color: var(--muted); }
.hero-actions { margin-top: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.hero-actions select { flex: 0 1 300px; min-width: 0; }

.team { padding: var(--s-4); }
.team + .team { margin-top: var(--s-3); }
.team-name { margin-bottom: var(--s-2); font-family: var(--font-ui); font-size: 18px; letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.needs { margin-bottom: var(--s-2); gap: var(--s-2); }
.people li { display: flex; align-items: center; gap: var(--s-3); padding: 7px 0; }
.people li + li { border-top: 1px solid var(--line); }
.people li.declined .row-main, .people li.declined .avatar { opacity: .5; }

.order.card { padding: 6px 0; }
.chip.key { font-family: var(--font); font-weight: 700; font-size: 12.5px; letter-spacing: 0; text-transform: none; padding: 3px 9px; }
.order li.oh { padding: var(--s-4) var(--s-4) 6px; font-family: var(--font-ui); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.order li.oi { display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: 8px var(--s-4); }
.order li.oi + li.oi { border-top: 1px solid var(--line); }
.oi-icon { flex: none; width: 20px; color: var(--accent); }
.oi-icon .i { width: 18px; height: 18px; }
.oi-len { flex: none; min-width: 44px; text-align: right; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }

.note-form { display: grid; gap: var(--s-3); padding: var(--s-4); margin-bottom: var(--s-3); }
.notes { display: grid; gap: var(--s-3); }
.note { display: grid; gap: var(--s-2); padding: var(--s-4); }
.note-top { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.note p { color: var(--text); overflow-wrap: anywhere; }
.note.resolved p { color: var(--muted); }
.note-foot { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; min-height: 30px; }

.gap { display: grid; gap: var(--s-2); padding: var(--s-4); }
.gap + .gap { margin-top: var(--s-3); }
.gap-head { display: flex; align-items: center; }
.gap-head a { display: inline-flex; color: var(--faint); }
.gap-head a:hover { color: var(--accent); }
.gap-line { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s-3); align-items: baseline; font-size: 13.5px; color: var(--muted); }
.gap-line .chip { justify-self: start; }

/* ---------- guides ---------- */

.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); }
.guide-card { display: grid; gap: var(--s-2); align-content: start; color: inherit; text-decoration: none; transition: border-color var(--t) var(--ease), transform var(--t) var(--ease); }
.guide-card:hover { color: inherit; border-color: var(--line-hover); }
.guide-card h2 { font-size: 21px; }
.guide-card p { color: var(--muted); }
.guide-card .chip { justify-self: start; }
.guide-progress { display: grid; gap: 6px; margin-top: var(--s-2); }

.guide { font-size: 17px; line-height: 1.6; }
.g-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--s-4); color: var(--muted); font-family: var(--font-ui); font-size: 16px; letter-spacing: .05em; text-transform: uppercase; }
.g-back:hover { color: var(--accent); }
.g-head { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.g-head .eyebrow { color: var(--accent); }
.g-title { font-size: 36px; font-weight: 900; line-height: 1.08; letter-spacing: -0.015em; }
.g-summary { color: var(--muted); }
.g-actions { margin-top: var(--s-2); }
.g-progress { display: grid; gap: var(--s-3); margin: var(--s-5) 0; padding: var(--s-4); font-size: 15px; }
.g-section { padding: var(--s-5) 0; border-top: 1px solid var(--line); }
.g-group { margin-top: var(--s-6); }
.g-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.g-sec-head h2 { font-size: 26px; line-height: 1.15; }
.g-sec-head .eyebrow { color: var(--accent); margin-bottom: 2px; }
.g-pages { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.g-page { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-3) var(--s-4); color: inherit; text-decoration: none; font-size: 17px; }
.g-page:hover { color: inherit; border-color: var(--line-hover); }
.g-page b { flex: 1; }
.g-page .i { color: var(--faint); }
.g-pager { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.g-pager .btn { white-space: normal; text-align: center; }

.g-body > * + * { margin-top: var(--s-4); }
.g-body .g-h { margin-top: var(--s-6); }
.g-body .g-h:first-child { margin-top: 0; }
.g-body h3.g-h, .g-body h4.g-h { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.g-body h5.g-h { font-size: 17px; font-weight: 700; color: var(--text); }
.g-body .g-h + p { margin-top: 4px; }
.g-body p { color: var(--body); }
.g-list { display: grid; gap: var(--s-2); padding-left: 0; }
.g-list li { position: relative; padding-left: 22px; }
.g-list li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.g-list li small, .g-steps li small { display: block; margin-top: 2px; color: var(--muted); font-size: .9em; }
.g-steps { display: grid; gap: var(--s-3); counter-reset: step; }
.g-steps li { position: relative; min-height: 32px; padding: 3px 0 0 46px; counter-increment: step; }
.g-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--accent); color: var(--text); font-family: var(--font-ui); font-size: 17px; line-height: 1; }
.g-note { font-size: .92em; }
.g-img { margin: var(--s-4) 0 0; }
.g-img img { display: block; width: min(100%, 300px); border-radius: var(--radius); border: 1px solid var(--line); }
.g-img figcaption { margin-top: 6px; color: var(--muted); font-size: 14px; }

.g-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-3); }
.g-fact { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.g-fact b { font-family: var(--font-ui); font-weight: 400; font-size: 30px; line-height: 1.05; letter-spacing: .03em; color: var(--accent); text-transform: uppercase; }
.g-fact span { color: var(--muted); font-size: 15px; line-height: 1.35; }

.g-keys { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--s-2); }
.g-keys .key { display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 6px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-family: var(--font-ui); font-size: 16px; line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; text-align: center; overflow-wrap: anywhere; }
.g-keys .key.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.g-keys .key.off { visibility: hidden; }

.g-pairs { display: grid; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.g-pairs > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-4); padding: var(--s-3) var(--s-4); }
.g-pairs > div + div { border-top: 1px solid var(--line); }
.g-pairs dt { color: var(--text); font-weight: 700; }
.g-pairs dd { margin: 0; color: var(--body); }
.g-table-wrap { overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.g-table th { text-align: left; padding: 8px 12px; font-family: var(--font-ui); font-weight: 400; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line-2); }
.g-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* checklists */
.g-checks { display: grid; gap: var(--s-2); }
.ck { position: relative; display: flex; align-items: flex-start; gap: var(--s-3); min-height: 52px; padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease); }
.ck:hover { border-color: var(--line-hover); }
.ck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ck-box { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 6px; border: 2px solid var(--line-hover); background: var(--panel-2) center / 18px no-repeat; transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.ck input:checked + .ck-box { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.ck input:focus-visible + .ck-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.ck input:disabled + .ck-box { opacity: .6; }
.ck-body { display: grid; gap: 2px; min-width: 0; }
.ck-text { color: var(--text); font-weight: 700; }
.ck-detail { color: var(--muted); font-size: .9em; line-height: 1.45; }
.ck-by { color: var(--accent-text); font-size: 13px; }
.ck.on { border-color: var(--accent-line); }
.ck-subs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s-2); margin: var(--s-2) 0 var(--s-2) 42px; }
.ck.sub { min-height: 0; padding: 10px var(--s-3); background: var(--panel-2); border-color: var(--line-2); }
.ck.sub .ck-box { width: 22px; height: 22px; background-size: 15px; background-color: var(--panel); }
.ck.sub .ck-text { font-size: .95em; }

/* editor */
.editor { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5); }
.editor textarea { min-height: 280px; font-family: var(--mono); font-size: 13.5px; line-height: 1.5; }
.editor-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.editor-preview { min-width: 0; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-size: 16px; line-height: 1.6; overflow: auto; max-height: 70vh; }
.editor-preview .eyebrow { margin-bottom: var(--s-3); }
.format-help pre { margin: var(--s-3) 0 0; padding: var(--s-3); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); color: var(--muted); font: 12.5px/1.5 var(--mono); white-space: pre-wrap; }
.reorder { display: grid; gap: 4px; margin-top: var(--s-2); }
.reorder li { display: flex; align-items: center; gap: var(--s-2); padding: 4px 4px 4px var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); }
.reorder li span { flex: 1; }
.reorder .btn .i { width: 18px; height: 18px; }

/* ---------- more, activity, history, settings ---------- */

.account .check { min-height: 32px; }
.log .log-day { padding: var(--s-4) var(--s-4) 6px; font-family: var(--font-ui); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-top: 0; }
.history-filter { margin-bottom: var(--s-3); }
.history-filter .block-sub { margin: 0; }
.settings h2 { font-size: 19px; }
.settings form.row input { flex: 1 1 180px; }
.check.switch { min-height: 40px; font-weight: 700; color: var(--text); }
.check.switch input { width: 20px; height: 20px; }

/* ---------- sign in ---------- */

body.login { display: grid; place-items: center; min-height: 100dvh; padding: var(--s-5); }
.login-card { display: grid; gap: var(--s-4); width: min(420px, 100%); padding: var(--s-6); }
.login-logo { width: 220px; height: auto; margin-bottom: var(--s-2); }
.login-card h1 { font-size: 30px; }
.login-card .eyebrow { color: var(--accent); margin-bottom: -8px; }
.login-card form { display: grid; gap: var(--s-3); }
.login-or { display: flex; align-items: center; gap: var(--s-3); color: var(--faint); font-family: var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- tablet: a narrower rail ---------- */

@media (max-width: 1023px) {
  :root { --rail: 84px; }
  .rail { padding: var(--s-3) 8px; align-items: stretch; }
  .rail .brand { justify-content: center; padding: 6px 0 2px; }
  .rail .brand span { display: none; }
  .nav { flex-direction: column; justify-content: center; gap: 5px; min-height: 62px; padding: 6px 2px; font-size: 13.5px; }
  .nav .i { width: 22px; height: 22px; }
  .who { justify-content: center; padding: 8px 0; }
  .who-text { display: none; }
  .home { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- phone: a bar on top, a dock along the bottom ---------- */

@media (max-width: 639px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }

  .bar { flex-wrap: wrap; gap: 0 var(--s-3); min-height: calc(52px + var(--safe-t)); padding: var(--safe-t) calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l)); }
  .bar h1 { font-size: 24px; line-height: 52px; }
  .bar-brand { display: inline-flex; align-items: center; }
  .bar-brand img { width: 26px; height: 26px; object-fit: contain; }
  .bar-back + h1 { margin-left: 0; }
  .bar-back { margin: 0 -6px 0 -4px; }
  .bar .tabs { order: 5; flex: 0 0 calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); min-height: 44px; border-top: 1px solid var(--line); gap: var(--s-5); }
  .bar .status { margin-left: auto; padding: 0; justify-content: flex-end; }
  .banner { align-items: flex-start; }

  main#view { padding: var(--s-4) calc(var(--gutter) + var(--safe-r)) calc(var(--dock) + var(--safe-b) + 40px) calc(var(--gutter) + var(--safe-l)); }

  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: calc(var(--dock) + var(--safe-b)); padding: 0 var(--safe-r) var(--safe-b) var(--safe-l); background: var(--chrome); border-top: 1px solid var(--line); }
  .dock .nav { flex-direction: column; justify-content: center; gap: 4px; min-height: 0; padding: 0; border-radius: 0; color: var(--faint); font-size: 13px; letter-spacing: .07em; }
  .dock .nav .i { width: 23px; height: 23px; }
  .dock .nav.active { background: none; color: var(--text); }

  /* 16px fields keep iOS from zooming in when one is tapped. */
  input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], select, textarea { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 38px; }
  .btn.ghost { min-height: 38px; }

  .toast { bottom: calc(var(--dock) + var(--safe-b) + 16px); }
  dialog, dialog.wide { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 14px 14px 0 0; border-width: 1px 0 0; }
  dialog .foot { padding-bottom: calc(var(--s-4) + var(--safe-b)); flex-wrap: wrap; }

  .card { padding: var(--s-4); }
  .hero { padding: var(--s-4); margin-bottom: var(--s-5); }
  .hero-date { font-size: 28px; }
  .hero-actions select { flex: 1 1 100%; }
  .hero-actions .spacer { display: none; }
  .hero-actions .btn { flex: 1; }

  /* On a phone the team comes right after the readiness list. */
  .home { display: flex; flex-direction: column; align-items: stretch; }
  .home-main, .home-side { display: contents; }
  .hero { order: 0; } #ready { order: 1; } #team { order: 2; } #carried { order: 3; } #order { order: 4; } #notes { order: 5; } #gaps { order: 6; }
  .gap-line { grid-template-columns: minmax(0, 1fr); gap: 4px; }

  .guide { font-size: 17px; }
  .g-title { font-size: 30px; }
  .g-sec-head h2 { font-size: 24px; }
  .g-pairs > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .g-keys { gap: 5px; }
  .g-keys .key { min-height: 50px; padding: 4px 2px; font-size: 12.5px; letter-spacing: .02em; }
  .ck-subs { margin-left: 0; }
  .g-pager { flex-direction: column-reverse; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-two { grid-template-columns: minmax(0, 1fr); }
}
