/* Make it click. Tokens follow spec section 16: sage and teal, Space Grotesk for
   headings and buttons, Inter for body text, IBM Plex Mono for times. No inline
   styles anywhere, so style-src 'self' holds. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("/fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url("/fonts/space-grotesk-600.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("/fonts/space-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --bg: #F1F5EF; --surface: #FBFCF9; --ink: #1C2A25; --muted: #55665E; --line: #D3DCD3;
  --teal: #1E6C60; --teal-ink: #FFFFFF; --sage: #DAE5D8; --sage-2: #E8EFE5;
  --amber: #7D5210; --amber-bg: #F5EAD4; --mark: #CFE6DB; --speak: #F1DFA8; --shadow: rgba(28, 42, 37, .14);
  --key: #EBD29A;
  --head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131A17; --surface: #1A231F; --ink: #E3EBE5; --muted: #9BACA3; --line: #2E3A35;
    --teal: #6FC4B2; --teal-ink: #0D1916; --sage: #26332D; --sage-2: #1F2A25;
    --amber: #E6BA6C; --amber-bg: #33291A; --mark: #2A4B41; --speak: #5B4A1C; --shadow: rgba(0, 0, 0, .45);
    --key: #5A4818;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131A17; --surface: #1A231F; --ink: #E3EBE5; --muted: #9BACA3; --line: #2E3A35;
  --teal: #6FC4B2; --teal-ink: #0D1916; --sage: #26332D; --sage-2: #1F2A25;
  --amber: #E6BA6C; --amber-bg: #33291A; --mark: #2A4B41; --speak: #5B4A1C; --shadow: rgba(0, 0, 0, .45);
  --key: #5A4818;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); overflow-wrap: break-word; min-height: 100dvh; }
h1, h2, h3, h4, .btn, .tab, .brand { font-family: var(--head); }
h1 { font-size: 30px; line-height: 1.2; font-weight: 600; margin: 0; text-wrap: balance; }
h2 { font-size: 21px; line-height: 1.3; font-weight: 600; margin: 0; text-wrap: balance; }
h3 { font-size: 16px; line-height: 1.35; font-weight: 600; margin: 0; }
h4 { font-size: 15px; line-height: 1.35; font-weight: 600; margin: 0; }
p { margin: 0; }
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 2px; }
legend { padding: 0; }

.skip-link { position: absolute; left: var(--gutter-l); top: -48px; z-index: 40; background: var(--surface); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }
.skip-link:focus { top: 8px; }
.noscript { padding: 24px 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }
.mono { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px var(--gutter-r) 72px var(--gutter-l); display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.narrow { max-width: 640px; }
.stack { display: grid; gap: 12px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.stack-s { display: grid; gap: 4px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.stack-l { display: grid; gap: 22px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; }
.between { justify-content: space-between; }
.grow { flex: 1 1 160px; min-width: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }
.measure { max-width: 66ch; }

/* Header */
/* The wrapper sticks, so the bar stays in view for the whole page, not just its own box. */
#header { position: sticky; top: 0; z-index: 20; }
.top { position: relative; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-height: 56px; padding: 6px var(--gutter-r) 6px var(--gutter-l); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; white-space: nowrap; color: inherit; text-decoration: none; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--teal); display: inline-block; flex: none; animation: breathe 4.5s ease-in-out infinite; }
.dot.big { width: 14px; height: 14px; }
@keyframes breathe { 0%, 100% { transform: scale(.72); opacity: .6; } 50% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } * { scroll-behavior: auto !important; } }
.nav { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; flex: 1 1 auto; }
.nav a { padding: 6px 10px; border-radius: 7px; font: 500 14.5px var(--head); color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 34px; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sage); }
.nav a:hover { color: var(--ink); }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber-bg); color: var(--amber); font: 500 12px/18px var(--mono); text-align: center; margin-left: 4px; }
.top-actions { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.icon-btn { width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--sage); color: var(--ink); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 7px 15px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 15px; text-align: center; text-decoration: none; color: inherit; }
.btn:hover { border-color: var(--teal); }
.btn.pri { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.btn.quiet { background: none; border-color: transparent; color: var(--teal); padding-inline: 8px; }
.btn.quiet:hover { background: var(--sage-2); }
.btn.sm { min-height: 32px; padding: 3px 10px; font-size: 13.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.field { display: grid; gap: 5px; font-weight: 500; font-size: 14.5px; min-width: 0; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13.5px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=file], select, textarea { width: 100%; max-width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 400; font-size: 16px; }
textarea { resize: vertical; min-height: 76px; }
.err { color: var(--amber); background: var(--amber-bg); padding: 8px 12px; border-radius: 8px; font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 13px; cursor: pointer; font-size: 14.5px; min-height: 36px; }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 5px; background: var(--sage); font-size: 12.5px; line-height: 20px; white-space: nowrap; }
.tag.warn { background: var(--amber-bg); color: var(--amber); }
.tag.line { background: none; border: 1px solid var(--line); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; gap: 12px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.test-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 16px; background: var(--amber-bg); color: var(--amber); font-size: 13.5px; }
.test-banner span { flex: 1 1 14rem; }
.notice { background: var(--sage-2); border-radius: 8px; padding: 9px 13px; font-size: 14.5px; }
.notice.warn { background: var(--amber-bg); color: var(--amber); }
.tw { overflow-x: auto; min-width: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th { font: 500 13px var(--head); color: var(--muted); text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td.wide { min-width: 200px; }
table.dash { min-width: 760px; }
.link { background: none; border: 0; padding: 0; color: var(--teal); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-align: left; font: inherit; }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px; cursor: pointer; font-weight: 500; font-size: 14.5px; color: var(--muted); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--teal); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.steps { display: flex; gap: 5px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--teal); }
.opt-line { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; font-size: 15px; cursor: pointer; font-weight: 400; }
.opt-line input { margin-top: 5px; accent-color: var(--teal); flex: none; }
.dial { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 14px; flex-wrap: wrap; }
.dial input { width: 150px; accent-color: var(--teal); flex: 1 1 120px; max-width: 240px; min-width: 0; }

.level-menu { position: relative; }
.level-menu > summary { list-style: none; user-select: none; }
.level-menu > summary::-webkit-details-marker { display: none; }
.level-menu > summary::after { content: "\25BE"; font-size: 12px; line-height: 1; }
.level-menu[open] > summary::after { transform: rotate(180deg); }
.level-menu > summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.level-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 10; width: min(320px, calc(100vw - 32px)); padding: 14px 16px; display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px var(--shadow); }
.level-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.level-panel input { width: 100%; accent-color: var(--teal); }
.level-ends { display: flex; justify-content: space-between; }

/* Reader */
/* Ask, prompts and checks sit under the reading, as in the first prototype. */
.read { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.read-title { font-size: 26px; }
/* Always in reach: it sticks to the bottom whenever its own spot is off screen. */
.part-nav { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
.read-main { min-width: 0; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.lane { display: grid; gap: 12px; min-width: 0; max-width: 720px; scroll-margin-bottom: 80px; grid-template-columns: minmax(0, 1fr); }
.lane:not(.open) { display: none; }
.prose { max-width: 66ch; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.sec { padding-left: 13px; border-left: 2px solid transparent; min-width: 0; scroll-margin-top: 76px; }
.sec.cur { border-left-color: var(--teal); }
.sec.original { white-space: pre-line; }
.sec.intro { font-weight: 500; }
.hlz { cursor: text; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.s.speaking { background: var(--speak); border-radius: 3px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.spk { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; cursor: pointer; font: 500 13px var(--head); color: var(--muted); min-height: 30px; }
.spk { justify-self: start; }
.spk:hover { color: var(--ink); border-color: var(--teal); }
.spk.on { background: var(--speak); color: var(--ink); }
.inline { margin-top: 10px; padding: 12px 14px; background: var(--sage-2); border-radius: 8px; display: grid; gap: 8px; white-space: normal; grid-template-columns: minmax(0, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px; display: grid; gap: 10px; box-shadow: 0 1px 3px var(--shadow); min-width: 0; grid-template-columns: minmax(0, 1fr); }
.card > .spk { justify-self: start; }
.limit { background: var(--sage-2); padding: 11px 14px; border-radius: 8px; }
.material-photo { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }

.chat { display: grid; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px; box-shadow: 0 1px 3px var(--shadow); grid-template-columns: minmax(0, 1fr); }
.msgs { display: grid; gap: 9px; max-height: 300px; overflow-y: auto; padding-right: 3px; grid-template-columns: minmax(0, 1fr); }
.msg { padding: 8px 11px; border-radius: 9px; font-size: 14.5px; line-height: 1.5; min-width: 0; display: grid; gap: 6px; }
.msg.me { background: var(--sage); justify-self: end; max-width: 92%; }
.msg.bot { background: var(--sage-2); }
.quote { border-left: 2px solid var(--teal); padding-left: 9px; font-size: 13.5px; color: var(--muted); }
#hlmenu { position: fixed; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 4px 18px var(--shadow); padding: 4px; display: flex; flex-wrap: wrap; gap: 2px; max-width: min(340px, calc(100vw - 24px)); }
#hlmenu button { background: none; border: 0; border-radius: 6px; padding: 5px 9px; cursor: pointer; font: 500 13.5px var(--head); min-height: 36px; color: inherit; }
#hlmenu button:hover, #hlmenu button:focus-visible { background: var(--sage); }

/* Formatted model text */
.rich { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.rich p, .rich ul, .rich ol { margin: 0; }
.rich ul, .rich ol { padding-left: 22px; display: grid; gap: 6px; }
.rich h3, .rich h4 { margin-top: 4px; }
.rich li.term > strong:first-child { display: block; font-family: var(--head); font-weight: 600; }
.rich h2, .rich h3 { color: var(--teal); }
.rich strong { font-weight: 600; }
.rich ol { list-style: none; padding-left: 0; counter-reset: step; }
.rich ol > li { counter-increment: step; position: relative; padding-left: 36px; min-width: 0; }
.rich ol > li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--sage); color: var(--teal); font: 600 13px/24px var(--head); text-align: center; }
.msg .rich ol > li { padding-left: 32px; }

/* Diagrams */
.diagram { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.diagram-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.diagram-title { font: 600 15px var(--head); }
.diagram-nav { display: flex; align-items: center; gap: 8px; }
.diagram-count { font-size: 14px; color: var(--muted); }
.diagram-canvas { min-width: 0; overflow-x: auto; }
.diagram-svg { display: block; max-width: 100%; height: auto; }
.dg-rect { fill: var(--surface); stroke: var(--muted); stroke-width: 1.2; }
.dg-box[role="button"] { cursor: pointer; }
.dg-box.selected .dg-rect { stroke: var(--teal); stroke-width: 2.4; fill: var(--sage-2); }
.dg-label { fill: var(--ink); font-family: var(--body); font-weight: 500; }
.dg-group, .dg-caption { fill: var(--muted); font: 500 12.5px var(--head); }
.dg-link { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.dg-link.dashed { stroke: var(--teal); stroke-dasharray: 6 5; }
.dg-link-label { fill: var(--muted); font: 400 12px var(--body); }
.dg-arrowhead { fill: var(--muted); }
.dg-axis, .dg-tick { stroke: var(--line); stroke-width: 1.4; }
.dg-dot { fill: var(--teal); }
.diagram-links { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.diagram-redraw { display: grid; gap: 10px; }
.diagram-redraw .label { font: 600 15px var(--head); }
.diagram-redraw .hint { font-size: 13.5px; color: var(--muted); }
.diagram-redraw-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.diagram-redraw-free { display: flex; flex-wrap: wrap; gap: 8px; }
.diagram-redraw-free input { flex: 1 1 200px; min-width: 0; }

@media (max-width: 860px) {
  .read { gap: 16px; }
}

/* Sign-in */
.center { min-height: calc(100dvh - 57px); display: grid; place-content: center; padding: 32px var(--gutter-r) 32px var(--gutter-l); grid-template-columns: minmax(0, 440px); }
.signin { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.brand.big { font-size: 20px; }
.role-card { display: grid; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; width: 100%; }
.role-card:hover { border-color: var(--teal); }
.role-card[aria-pressed="true"] { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.role-card b { font: 600 16px var(--head); }
.grid2.bottom { align-items: end; }
.idea-row { flex-wrap: nowrap; align-items: flex-start; }
.idea-row textarea { flex: 1; min-width: 0; min-height: 0; resize: none; overflow: hidden; }
.access-row { padding: 4px 0; display: grid; gap: 6px; }
.code-box { font-size: 24px; letter-spacing: .08em; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-align: center; overflow-wrap: anywhere; }
.past-summary { cursor: pointer; }
.past-entries { display: grid; gap: 0; margin-top: 8px; }
.past-entry { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.spark { display: block; width: 100%; max-width: 240px; height: auto; overflow: visible; }
.spark-line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark-last { fill: var(--teal); stroke: var(--surface); stroke-width: 2; }
.spark-target { fill: none; stroke: var(--amber); stroke-width: 1.2; stroke-dasharray: 4 4; }
.spark-hit { fill: transparent; }
.settings { max-width: 640px; }
.log-preview { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: 12.5px/1.5 var(--mono); }
.share-url { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  /* Tables become labeled cards, so nothing is hidden off to the side. */
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; }
  table.cards { min-width: 0; }
  table.cards thead { display: none; }
  table.cards tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.cards td { border: 0; padding: 2px 0 2px 150px; white-space: normal; min-width: 0; position: relative; }
  table.cards td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 2px; white-space: nowrap; font: 500 12.5px/1.8 var(--head); color: var(--muted); }
  table.cards td:first-child { font-weight: 500; padding-left: 0; }
  table.cards td:first-child::before { display: none; }
  table.cards td:empty { display: none; }
}
@media print {
  /* Print shows the title and the current view's text (or diagram and its description). */
  .top, #header, .tabs, .skip-link, #toast, #hlmenu, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { max-width: none; padding: 0; margin: 0; }
  .read { display: block; }
  .read-title { font-size: 22px; margin: 0 0 12px; color: #000; }
  .view button, .view .btn, .diagram-nav, .diagram-redraw, .diagram-links { display: none !important; }
  .view .sec, .view .sec.cur { border-left: 0; padding-left: 0; background: none; }
  .view mark, .view .hl { background: none; }
  .view .inline { display: none; }
  .view, .view * { color: #000 !important; }
  .sec, .diagram-svg, .diagram-description { break-inside: avoid; }
}
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.page-loading { padding: 40px var(--gutter-r) 40px var(--gutter-l); max-width: 1120px; margin: 0 auto; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--bg); padding: 9px 15px; border-radius: 9px; font-size: 14.5px; max-width: calc(100vw - 32px); }

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .center { place-content: start stretch; grid-template-columns: minmax(0, 1fr); }
  /* The phone header has two rows, so a part lands below both. */
  .sec { scroll-margin-top: 124px; }
  .brand { min-height: 40px; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; flex: none; }
  .dial { width: 100%; }
  .dial input { max-width: none; }
  .level-menu { width: 100%; }
  .level-menu > summary { width: 100%; }
  .level-panel { position: static; width: auto; margin-top: 8px; box-shadow: none; }
}
