/* Hand/offs: warm paper and frosted cards, Liter at -5%, pill buttons, dark terminal panels.
   Every colour comes from the roles below, so a palette is swapped in one place. Roles:
   paper (page, flat), card, hero-top (unused while the page is flat), ink (text and buttons), ink-deep (dark bands), muted and
   faint (secondary text, both at least 4.5:1 on paper), accent (fills and markers), accent-text (large headings,
   at least 3:1 on paper), hi (highlight), sage (success fills), extra (a fifth colour for variety), ok / bad
   (status text), on-dark* (text on ink-deep). Preview another theme with ?theme=name on any page. */
:root {
  /* theme: slate (default) */
  --paper: #F9F7F2; --card: #FFFEFB; --hero-top: #D4AB95; --ink: #36434A; --ink-rgb: 54,67,74; --ink-deep: #3F4C53;
  --muted: #55636A; --faint: #5E6C74; --accent: #8B4315; --accent-text: #8B4315; --hi: #CE8F6C; --sage: #8D957E; --extra: #788990;
  --ok: #465238; --bad: #8B3A15; --on-dark: #F9F7F2; --on-dark-muted: #C9D0D3; --on-dark-dim: #E0AC8E;
  /* derived, the same for every theme */
  --dark-panel: color-mix(in srgb, var(--ink-deep) 88%, white); --dark-line: color-mix(in srgb, var(--ink-deep) 70%, white);
  --sage-soft: color-mix(in srgb, var(--sage) 45%, var(--card)); --ok-on-dark: color-mix(in srgb, var(--sage) 65%, white);
  --tint-a: color-mix(in srgb, var(--hi) 42%, var(--card)); --tint-b: color-mix(in srgb, var(--sage) 42%, var(--card));
  --tint-c: color-mix(in srgb, var(--ink) 9%, var(--card)); --tint-d: color-mix(in srgb, var(--extra) 42%, var(--card));
  --sky: var(--paper);   /* flat page colour, no wash */
  /* containers (panels, bars, cards) are almost white, so they stand clear of the page behind them */
  --glass: color-mix(in srgb, white 80%, var(--card));
  --glass-strong: color-mix(in srgb, white 88%, var(--card));
  --glass-edge: rgba(var(--ink-rgb), 0.09);
  --on-hi: color-mix(in srgb, var(--ink) 72%, black);   /* small text on the highlight colour */
  --rule: rgba(var(--ink-rgb), 0.18);
  --black: var(--ink);
  --ok-bg: color-mix(in srgb, var(--sage) 38%, transparent);
  --warn: var(--ink); --warn-bg: color-mix(in srgb, var(--hi) 60%, transparent);
  --bad-bg: color-mix(in srgb, var(--accent) 22%, transparent);
  --run: var(--ink); --run-bg: rgba(var(--ink-rgb), 0.12);
  /* older names still used in a few rules */
  --cream: var(--paper); --terra: var(--accent); --navy: var(--ink); --sand: var(--hi); --terra-deep: var(--accent-text); --navy-deep: var(--ink-deep);
  --radius: 18px;
  --sans: "Liter", ui-sans-serif, system-ui, sans-serif;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
html[data-theme="desert"] {
  --paper: #F7E7CC; --card: #FDF6E8; --hero-top: #E0A85A; --ink: #4E2E1B; --ink-rgb: 78,46,27; --ink-deep: #4C5142;
  --muted: #6B4A35; --faint: #7A5A45; --accent: #CD774D; --accent-text: #B05A2C; --hi: #E0A85A; --sage: #B5AE7D; --extra: #C9CDBD;
  --ok: #4F5A2C; --bad: #9A3F1E; --on-dark: #F7E7CC; --on-dark-muted: #D5D2BE; --on-dark-dim: #E8BC7C;
}
html[data-theme="olive"] {
  --paper: #F6E7DA; --card: #FCF4EC; --hero-top: #ECD0B9; --ink: #463F0F; --ink-rgb: 70,63,15; --ink-deep: #4F4712;
  --muted: #655C2A; --faint: #6F6534; --accent: #C94927; --accent-text: #B63F1F; --hi: #DC8C50; --sage: #AAA96A; --extra: #ECD0B9;
  --ok: #55591F; --bad: #A5351A; --on-dark: #F6E7DA; --on-dark-muted: #DAD3B0; --on-dark-dim: #ECB88E;
}
html[data-theme="clay"] {
  --paper: #F4E9D8; --card: #FBF5EA; --hero-top: #E5C9A2; --ink: #4A3530; --ink-rgb: 74,53,48; --ink-deep: #563F39;
  --muted: #6A534C; --faint: #7A635C; --accent: #C76F4D; --accent-text: #AE5837; --hi: #E5C9A2; --sage: #ABB79B; --extra: #A7CCD1;
  --ok: #4B6142; --bad: #9C3F22; --on-dark: #F4E9D8; --on-dark-muted: #D9C9BC; --on-dark-dim: #E5C9A2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the hidden attribute must win over component display rules */
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--sky) fixed; background-color: var(--paper);
  font-size: 15px; line-height: 1.5; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .num, .brand { letter-spacing: -0.05em; font-weight: 400; }
a { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.wrap { max-width: 1760px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* header */
.top { display: flex; align-items: center; gap: 28px; padding: 22px 0 26px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 14px; font-size: 34px; text-decoration: none; color: var(--ink); }
.mark { font-size: 0.82em; letter-spacing: 0.02em; margin-right: 0.35em; white-space: nowrap; }   /* –/– logo mark, set in Liter */
.nav { display: flex; gap: 22px; flex: 1 1 auto; font-size: 14px; }
.nav a, .nav-r a { text-decoration: none; color: var(--muted); padding: 10px 0; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav-r { display: flex; gap: 22px; font-size: 14px; }

/* glass */
.glass { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), 0.05), 0 10px 30px rgba(var(--ink-rgb), 0.07); }
.panel { padding: 22px 24px; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat { padding: 14px 14px 16px; display: flex; flex-direction: column; }
.stat .label { font-size: 14px; }
.stat .num { font-size: 46px; line-height: 1.1; margin: 6px 0 10px; }
.stat .sub { font-size: 14px; color: var(--muted); border-top: 1px solid rgba(var(--ink-rgb),.45); padding-top: 10px; }

/* buttons */
.btn { font: inherit; letter-spacing: -0.02em; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 20px; border-radius: 999px; border: 1px solid var(--black); background: var(--black); color: var(--card); cursor: pointer; text-decoration: none; font-size: 15px; }
.btn:hover { background: var(--navy-deep); }
.btn.ghost { background: color-mix(in srgb, var(--card) 80%, transparent); color: var(--ink); border-color: transparent; box-shadow: 0 1px 2px rgba(var(--ink-rgb),.06), 0 4px 14px rgba(var(--ink-rgb),.06); }
.btn.ghost:hover { background: var(--card); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.big { min-height: 54px; font-size: 17px; padding: 0 28px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 14px; }
th { text-align: left; font-weight: 400; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-family: var(--mono); padding: 12px 16px; }
td { padding: 15px 16px; border-top: 1px solid var(--rule); vertical-align: middle; }
tr.rowlink { cursor: pointer; } tr.rowlink:hover td { background: rgba(var(--ink-rgb), .04); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--mono); letter-spacing: 0; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: rgba(var(--ink-rgb),.07); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.run { background: var(--run-bg); color: var(--run); }

/* checklist (done items struck through, like a finished to-do) */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); align-items: start; }
.step:first-child { border-top: 0; }
.step .ico { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(var(--ink-rgb),.35); display: grid; place-items: center; margin-top: 1px; }
.step .t { font-size: 16px; text-wrap: balance; }      /* two even lines instead of one word left over */ .step .d { text-wrap: pretty; font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.step .took { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0; }
.step.done .t { text-decoration: line-through; text-decoration-color: rgba(var(--ink-rgb),.35); color: var(--faint); }
.step.done .ico { background: var(--ink); border-color: var(--ink); }
/* running: the slash from the –/– mark turning inside its circle ( – / | \ ). --d keeps its phase when the list is redrawn */
.step.running .ico { border-color: rgba(var(--ink-rgb), .28); position: relative; }
.step.running .ico::before { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; border-radius: 2px;
  background: var(--accent); animation: turn .72s steps(4) infinite; animation-delay: var(--d, 0s); }
@keyframes turn { to { transform: rotate(180deg); } }
.step.failed .ico { background: var(--bad); border-color: var(--bad); }
.step.skipped .t { color: var(--faint); } .step.skipped .ico { border-style: dashed; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .step.running .ico::before { animation: none; transform: rotate(-60deg); } }

/* terminal */
.term { background: var(--navy-deep); color: var(--on-dark); border-radius: var(--radius); padding: 16px 18px; font-family: var(--mono); font-size: 12px; line-height: 1.7;
  letter-spacing: 0; max-height: 360px; overflow: auto; border: 1px solid var(--ink-deep);
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 6px 6px; }
.term .hd { display: flex; justify-content: space-between; color: var(--on-dark-muted); text-transform: uppercase; margin-bottom: 8px; }
.readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0;
  text-transform: uppercase; color: var(--muted); }
.readout b { color: var(--ink); font-weight: 500; }

/* forms */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
input[type=text], input[type=url], input[type=email], input[type=password], input[type=tel], select, textarea { font: inherit; letter-spacing: -0.02em; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid rgba(var(--ink-rgb),.2); background: rgba(255,255,255,.75); color: var(--ink); width: 100%; }
textarea { padding: 12px 14px; min-height: 84px; resize: vertical; }
/* our own caret, set in from the edge (the browser's sits almost on the border) */
select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 21px center, right 15px center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.drop { display: grid; place-items: center; min-height: 110px; margin-top: 8px; border-radius: 14px; border: 1.5px dashed rgba(var(--ink-rgb),.3);
  background: rgba(255,255,255,.45); color: var(--muted); font-size: 14px; cursor: pointer; text-align: center; padding: 16px; }
.drop.over, .drop:focus-within { border-color: var(--black); background: rgba(255,255,255,.8); }
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.thumbs figure { margin: 0; width: 140px; } .thumbs img { width: 140px; height: 180px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--rule); display: block; }
.thumbs figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.thumbs input { width: 100%; margin-top: 6px; padding: 6px 8px; font: inherit; font-size: 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink); }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.compare img { width: 100%; max-height: 520px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--rule); display: block; background: #fff; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice .card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid rgba(var(--ink-rgb),.18); background: rgba(255,255,255,.5); height: 100%; }
.choice input:checked + .card { border: 2px solid var(--black); background: rgba(255,255,255,.85); padding: 15px; }
.choice input:focus-visible + .card { outline: 2px solid var(--black); outline-offset: 2px; }
.choice .ct { font-size: 16px; } .choice .cd { font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; min-height: 44px; padding-top: 10px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }

.grid2 { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.grid2 > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.grid2 > .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--faint); letter-spacing: 0; }
.h1 { font-size: 44px; font-size: clamp(30px, 7vw, 44px); line-height: 1.05; margin: 6px 0 4px; overflow-wrap: anywhere; }
.h2 { font-size: 22px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.empty { padding: 70px 24px; text-align: center; color: var(--muted); }
.banner { border-radius: 14px; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.banner.run { background: var(--card); border: 1px solid var(--rule); } .banner.ok { background: var(--ok-bg); } .banner.warn { background: var(--warn-bg); } .banner.bad { background: var(--bad-bg); }
.copy { display: flex; gap: 8px; } .copy input { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
footer.foot { padding: 40px 0 30px; color: var(--faint); font-size: 13px; }

/* review and comment: the preview and the comments share one screen-high row; the comments scroll inside it */
.rv { display: flex; gap: 18px; align-items: stretch; height: calc(100vh - 150px); min-height: 540px; }
.rv-main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
/* The side panel is one container, as in Figma: sections stacked inside it, each with a heading that folds it
   away, one scroll for the whole panel, and the Save and Undo buttons fixed at its foot so they are always there. */
.rv-side { flex: 0 0 360px; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.rv-sections { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.rv-sec { border-bottom: 1px solid var(--rule); }
.rv-sec[hidden] { display: none; }
.rv-sec > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 20px; cursor: pointer; font: 600 var(--ui)/1.2 var(--sans, system-ui); letter-spacing: 0; color: var(--ink); user-select: none; }
.rv-sec > summary::-webkit-details-marker { display: none; }
.rv-sec > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 2px; }
.rv-sec[open] > summary::before { transform: rotate(45deg); }
.rv-sec > summary:hover { background: rgba(var(--ink-rgb), .04); }
.rv-sec > summary .rv-n { margin-left: auto; font-weight: 400; color: var(--muted); font-size: var(--ui-s); }
.rv-body { padding: 0 20px 18px; }
.rv-body > .h2:first-child, .rv-body h2.h2 { font-size: var(--ui); font-weight: 600; line-height: 1.3; margin: 0 0 6px; letter-spacing: 0; }
.rv-foot { flex: none; padding: 14px 20px 16px; border-top: 1px solid var(--rule); background: var(--glass-strong); }
.rv-foot .btn { min-height: 44px; }
@media (max-width: 980px) { .rv { flex-direction: column; height: auto; } .rv-stage { height: 70vh; flex: none; } .rv-side { flex: none; width: 100%; max-height: none; }
  .rv-sections { overflow: visible; } }
.rv-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; flex: none; }
.rv-bar select { width: auto; min-height: 40px; max-width: 260px; min-width: 120px; }
/* one row: the two dropdowns shorten (with an ellipsis) before anything wraps; Done reviewing sits at the right end */
.rv-bar { flex-wrap: nowrap; }
.rv-bar > select { flex: 0 1 auto; min-width: 84px; }
.rv-bar > .seg { flex: none; }
.rv-done { flex: none; margin-left: auto; min-height: 40px; white-space: nowrap; }
@media (max-width: 1200px) { .rv-bar { flex-wrap: wrap; } }
.seg { display: inline-flex; background: rgba(var(--ink-rgb), .08); border-radius: 999px; padding: 3px; }
.seg button { font: inherit; font-size: 13px; letter-spacing: -0.02em; border: 0; background: none; color: var(--muted); padding: 0 14px; min-height: 36px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.rv-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; border-radius: 14px; border: 1px solid var(--rule); background: #fff; }
.rv-stage iframe { position: absolute; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.rv-over { position: absolute; inset: 0; pointer-events: none; outline: none; }
.rv-over.draw { pointer-events: auto; cursor: crosshair; touch-action: none; }
.rv-over.busy { pointer-events: none; }
.rv-mark { position: absolute; border: 2.5px solid #d6281e; background: rgba(214, 40, 30, .08); border-radius: 4px; pointer-events: none; }
.rv-mark.circle { border-radius: 50%; }
.rv-mark.ghost, .rv-mark.pending { border-style: dashed; }
.rv-mark.rv-target-box { border: 2px solid #2f6fdb; background: rgba(47, 111, 219, .10); border-radius: 3px; }
.rv-mark b { position: absolute; left: -2px; top: -24px; background: #d6281e; color: #fff; font: 11px/1 var(--mono); letter-spacing: 0; padding: 4px 7px; border-radius: 4px; font-weight: 400; }
.rv-over.busy .rv-mark { animation: rvpulse 1.2s ease-in-out infinite; }
@keyframes rvpulse { 50% { background: rgba(214, 40, 30, .28); } }
.rv-pop { position: absolute; width: 320px; padding: 14px; z-index: 5; pointer-events: auto; background: var(--card); }
/* while edits are being made: a veil over the preview with a progress card */
.rv-working { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--paper) 72%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rv-wcard { width: min(420px, 100%); padding: 22px 24px 12px; background: var(--card); box-shadow: 0 20px 60px rgba(var(--ink-rgb), .22); }
.rv-whead { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.rv-wtitle { font-size: var(--ui); font-weight: 600; letter-spacing: 0; }
/* a row of slashes swinging in a travelling wave, like the slash field on the landing page */
.rv-wave { flex: none; display: flex; gap: 5px; align-items: center; height: 34px; padding: 0 2px; }
.rv-wave i { width: 2.5px; height: 20px; border-radius: 2px; background: var(--accent); transform: rotate(28deg); opacity: .3; animation: rvwave 1.3s ease-in-out infinite; animation-delay: calc(var(--i) * .1s); }
@keyframes rvwave { 0%, 100% { transform: rotate(28deg) scaleY(.75); opacity: .3; } 45% { transform: rotate(-24deg) scaleY(1.1); opacity: 1; } }
/* a band of light sweeping down the dimmed preview while the agents work */
.rv-working::before { content: ""; position: absolute; left: 0; right: 0; top: -35%; height: 35%; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 20%, transparent) 60%, color-mix(in srgb, var(--accent) 38%, transparent) 98%, transparent);
  animation: rvscan 2.6s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes rvscan { to { top: 100%; } }
.rv-wcard { position: relative; }
@media (prefers-reduced-motion: reduce) { .rv-wave i, .rv-over.busy .rv-mark, .rv-working::before { animation: none; } .rv-wave i { opacity: .8; } .rv-working::before { display: none; } }
.rv-ver { font-size: 13px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rv-note { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: var(--ui); align-items: start; }
.rv-note:first-child { border-top: 0; padding-top: 0; }
.rv-note > b, .rv-res > b { background: #d6281e; color: #fff; font: 11px/1 var(--mono); letter-spacing: 0; padding: 5px 0; border-radius: 4px; text-align: center; font-weight: 400; }
.rv-res { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: var(--ui); align-items: start; }
.rv-more summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 0 2px; min-height: 32px; }
.rv-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.rv-ba figure { margin: 0; } .rv-ba figcaption { font-size: 11px; font-family: var(--mono); letter-spacing: 0; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.rv-ba img { width: 100%; max-height: 150px; object-fit: cover; object-position: top left; border-radius: 6px; border: 1px solid var(--rule); display: block; }

/* form errors sit under the field they are about */
.ferr { display: block; color: var(--bad); font-size: 14px; margin-top: 6px; }
.ferr:empty { display: none; }
.opts { border-top: 1px solid var(--rule); padding-top: 12px; }
.opts > summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.term div { overflow-wrap: anywhere; }
details.log > summary { cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 0; }
.owner-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.owner-facts li { padding-left: 26px; position: relative; }
.owner-facts li::before { content: ""; position: absolute; left: 4px; top: 0.45em; width: 10px; height: 6px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
@media (max-width: 520px) { .rv-stage iframe { max-width: 100%; } }

/* a note under a design picture: what the build will run into, or what else to add */
.tip { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 6px 0 0; max-width: 34ch; }
.tip.warn { color: var(--ink); background: var(--warn-bg); padding: 6px 8px; border-radius: 6px; }

/* ---- the hands-on editor (app/ui/editor.js): what is drawn over the preview, and its properties panel.
   Blue is the selection, pink is spacing, red is a distance or a drop place: the colours Figma uses for the same. */
.rv-over.edit { cursor: default; }
.rv-over.typing { pointer-events: none; }
.ed-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; --ed: #0d99ff; --ed-pink: #ff24bd; --ed-red: #f24822; }
.ed-hover { position: absolute; outline: 1.5px solid var(--ed); outline-offset: -1px; }
.ed-sel { position: absolute; outline: 2px solid var(--ed); outline-offset: -1px; pointer-events: none; }
.ed-sel.typing { outline-style: dashed; }
.ed-sel.cropping { outline: 2px dashed var(--ed-red); }
.ed-tag { position: absolute; left: -2px; bottom: 100%; margin-bottom: 1px; background: var(--ed); color: #fff; font: 600 11px/1 var(--sans, system-ui); letter-spacing: 0; padding: 3px 6px; border-radius: 3px 3px 0 0; white-space: nowrap; text-transform: capitalize; }
.ed-tag.ed-quiet { background: none; color: var(--ed); padding-left: 2px; }
.ed-h { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid var(--ed); pointer-events: auto; touch-action: none; }
.ed-h::after { content: ""; position: absolute; inset: -9px; }          /* a bigger place to grab */
.ed-top, .ed-bot { left: 50%; margin-left: -12px; width: 24px; height: 5px; border: 0; border-radius: 3px; background: var(--ed-pink); cursor: ns-resize; opacity: .85; }
.ed-top { top: -12px; } .ed-bot { bottom: -12px; }
.ed-e { right: -5px; top: 50%; margin-top: -5px; cursor: ew-resize; }
.ed-s { left: 50%; bottom: -5px; margin-left: -5px; cursor: ns-resize; }
.ed-se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.ed-size { position: absolute; display: flex; justify-content: center; height: 0; overflow: visible; }
.ed-size b { background: var(--ed); color: #fff; font: 600 11px/1 var(--sans, system-ui); letter-spacing: 0; padding: 3px 6px; border-radius: 3px; white-space: nowrap; height: 17px; }
.ed-zone { position: absolute; background: repeating-linear-gradient(135deg, rgba(255, 36, 189, .28) 0 4px, rgba(255, 36, 189, .10) 4px 8px); display: flex; align-items: center; justify-content: center; overflow: visible; }
.ed-zone b, .ed-measure b { background: var(--ed-pink); color: #fff; font: 600 11px/1 var(--sans, system-ui); letter-spacing: 0; padding: 2px 5px; border-radius: 3px; white-space: nowrap; }
.ed-measure { position: absolute; background: var(--ed-red); display: flex; align-items: center; justify-content: center; overflow: visible; }
.ed-measure b { background: var(--ed-red); }
.ed-line { position: absolute; background: var(--ed-red); border-radius: 2px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.ed-badge { position: absolute; background: #1b1f23; color: #fff; font: 11px/1 var(--sans, system-ui); letter-spacing: 0; padding: 6px 8px; border-radius: 4px; white-space: nowrap; z-index: 3; }
/* the bar of likely next steps beside the selection (Adobe calls it the contextual task bar) */
.ed-bar { position: absolute; display: flex; gap: 2px; padding: 4px; background: #1e1e1e; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .28); pointer-events: auto; z-index: 4; white-space: nowrap; }
.ed-bar button { appearance: none; border: 0; background: none; color: #fff; font: 400 13px/1 var(--sans, system-ui); letter-spacing: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; min-width: 30px; }
.ed-bar button:hover, .ed-bar button[aria-pressed="true"] { background: rgba(255, 255, 255, .16); }
.ed-bar button[data-a="del"] { color: #ff9a8a; }
.rv-body h3 { font: 600 var(--ui)/1.2 var(--sans, system-ui); letter-spacing: 0; color: var(--ink); margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ed-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: var(--ui-s); margin: 2px 0 6px; color: var(--muted); }
.ed-trail button { background: none; border: 0; padding: 2px 4px; border-radius: 4px; color: inherit; font: inherit; cursor: pointer; text-transform: capitalize; }
.ed-trail button:hover { background: rgba(var(--ink-rgb), .08); }
.ed-trail button[aria-current] { color: var(--ink); font-weight: 600; }
.ed-like { min-height: 0; font-size: 13px; padding: 4px 0 0; }
.ed-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; align-items: center; }
.ed-row .btn { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.ed-row .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper, #fff); }
.ed-row .seg button { min-width: 36px; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
/* a field as Figma draws one: its name inside it on the left (drag the name to change the number) */
.ed-f { display: flex; align-items: center; gap: 6px; padding: 0 8px; min-height: 32px; border-radius: 6px; background: rgba(var(--ink-rgb), .06); font-size: var(--ui-s); color: var(--muted); min-width: 0; height: 32px; }
.ed-f:focus-within { outline: 1.5px solid #0d99ff; }
.ed-f span { flex: none; cursor: ew-resize; user-select: none; touch-action: none; }
.ed-f input[type=number], .ed-f select { flex: 1 1 auto; min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); font: 13px/1.2 var(--sans, inherit); text-align: right; padding: 6px 0; outline: none; -moz-appearance: textfield; }
.ed-f input[type=number]::-webkit-inner-spin-button { display: none; }
.ed-f select { appearance: none; -webkit-appearance: none; min-height: 0; border-radius: 0; text-align: right; text-align-last: right; cursor: pointer; background-image: none; padding-right: 0; }
.ed-sw { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ed-sw button { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(var(--ink-rgb), .3); cursor: pointer; padding: 0; }
.ed-sw button[aria-pressed="true"] { outline: 2px solid #0d99ff; outline-offset: 1px; }
.ed-sw input[type=color] { width: 28px; height: 24px; padding: 0; border: 1px solid var(--rule); border-radius: 5px; background: none; cursor: pointer; }
.ed-note { font-size: var(--ui-s); line-height: 1.45; margin: 14px 0 0; }
.ed-keys { font-size: var(--ui-s); color: var(--muted); margin: 6px 0 0; }
.ed-keys summary { cursor: pointer; }
.ed-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 0; }
.ed-keys dt { color: var(--ink); white-space: nowrap; } .ed-keys dd { margin: 0; }
.ed-parts { display: flex; flex-direction: column; gap: 1px; }
.ed-parts button { display: flex; gap: 8px; align-items: baseline; text-align: left; background: none; border: 0; border-radius: 6px; padding: 6px 8px; font: 13px/1.3 var(--sans, inherit); color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-parts button:hover { background: rgba(13, 153, 255, .12); }
.ed-parts button span { flex: 0 0 64px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.rv-hand { border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 10px; font-size: 13px; }
.rv-handhead { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rv-hand ol { margin: 6px 0 0; padding-left: 18px; }
.rv-hand li { margin: 2px 0; }
.ed-f.ed-full { grid-column: 1 / -1; }

/* ---- more of the editor: several parts selected, the full menu, asking the AI, finding anything */
.ed-sel.ed-also { outline-style: dashed; }
.ed-menu { position: absolute; min-width: 210px; padding: 6px; background: #1e1e1e; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .32); pointer-events: auto; z-index: 6; display: flex; flex-direction: column; }
.ed-menu button { appearance: none; border: 0; background: none; color: #fff; font: 13px/1.2 var(--sans, system-ui); letter-spacing: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-align: left; display: flex; justify-content: space-between; gap: 18px; }
.ed-menu button:hover { background: #0d99ff; }
.ed-menu button.bad { color: #ff9a8a; } .ed-menu button.bad:hover { color: #fff; background: #d6281e; }
.ed-menu kbd { font: 11px/1.4 var(--sans, system-ui); opacity: .6; }
.ed-ask { position: absolute; width: 320px; padding: 14px; z-index: 6; pointer-events: auto; background: var(--card); }
.ed-pal { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); width: min(520px, 92%); padding: 8px; z-index: 7; pointer-events: auto; background: var(--card); box-shadow: 0 24px 70px rgba(var(--ink-rgb), .3); }
.ed-pal input { width: 100%; min-height: 0; border-radius: 0; border: 0; outline: 0; background: transparent; font: 13px/1.4 var(--sans, inherit); letter-spacing: 0; color: var(--ink); padding: 10px 10px 12px; border-bottom: 1px solid var(--rule); }
.ed-palist { display: flex; flex-direction: column; padding-top: 6px; }
.ed-palist button { display: flex; gap: 12px; align-items: baseline; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 10px; font: 13px/1.3 var(--sans, inherit); letter-spacing: 0; color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-palist button span { flex: 0 0 70px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.ed-palist button[aria-selected="true"], .ed-palist button:hover { background: rgba(13, 153, 255, .14); }
.ed-scope { display: flex; align-items: center; gap: 8px; font-size: var(--ui-s); color: var(--muted); margin: 4px 0 2px; }
.ed-scope .seg button { font-size: var(--ui-s); letter-spacing: 0; padding: 5px 9px; min-height: 28px; }
.ed-many { font-size: 13px; margin: 4px 0 2px; padding: 6px 8px; border-radius: 6px; background: rgba(13, 153, 255, .12); }
.ed-f input[type=text] { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 13px/1.2 var(--sans, inherit); padding: 6px 0; outline: none; }
.ed-warn { font-size: var(--ui); line-height: 1.4; margin: 8px 0 0; padding: 6px 8px; border-radius: 6px; background: var(--warn-bg); color: var(--ink); }
.ed-styles { display: flex; flex-direction: column; gap: 1px; }
.ed-styles button { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: baseline; text-align: left; background: none; border: 0; border-radius: 6px; padding: 7px 8px; font: 13px/1.3 var(--sans, inherit); color: var(--ink); cursor: pointer; }
.ed-styles button:hover { background: rgba(13, 153, 255, .12); }
.ed-styles b { font-size: var(--ui); } .ed-styles i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.ed-cols label { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(var(--ink-rgb), .3); cursor: pointer; overflow: hidden; display: block; }
.ed-cols input { opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0; }
.ed-parts button[aria-current="true"] { background: rgba(13, 153, 255, .16); }
.ed-parts button[data-drop="before"] { box-shadow: 0 -2px 0 #f24822; } .ed-parts button[data-drop="after"] { box-shadow: 0 2px 0 #f24822; }
#rv-layers { max-height: 184px; overflow-y: auto; padding-bottom: 12px; scrollbar-width: thin; }
.rv-grip { position: absolute; top: 0; bottom: 0; width: 14px; cursor: ew-resize; z-index: 3; touch-action: none; display: flex; align-items: center; justify-content: center; }
.rv-grip::before { content: ""; width: 4px; height: 44px; border-radius: 3px; background: rgba(var(--ink-rgb), .35); }
.rv-grip:hover::before { background: #0d99ff; }
.rv-grip b { position: absolute; top: 8px; left: 16px; font: 600 11px/1 var(--sans, system-ui); letter-spacing: 0; background: #1b1f23; color: #fff; padding: 4px 6px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; }
.rv-grip:hover b, .rv-grip:active b { opacity: 1; }
.rv-grip[hidden] { display: none; }
.rv-state { font-size: 13px; margin: 10px 0 0; color: var(--ink); }
.rv-ai { font-size: var(--ui-s); color: var(--muted); margin: 0 0 8px; }
.rv-foot p:first-child:has(> [hidden]:first-child) { gap: 0; }

/* The review screen's own type: two sizes and two weights, as in Figma's panel. --ui for titles, values, names and
   anything to be read; --ui-s for field labels and secondary notes. Titles are semibold; the rest is regular, and
   grey says "secondary". Nothing else. */
:root { --ui: 13px; --ui-s: 11px; }
.rv-side, .rv-bar, .rv-pop, .ed-pal { font-size: var(--ui); line-height: 1.45; letter-spacing: 0; }
.rv-side .btn, .rv-bar .btn, .rv-pop .btn, .rv-done { font-size: var(--ui); font-weight: 400; letter-spacing: 0; }
.rv-foot .btn { min-height: 36px; padding: 0 14px; }
.rv-bar select { font-size: var(--ui); letter-spacing: 0; }
.rv-bar .seg button, .rv-side .seg button { letter-spacing: 0; }
.rv-side p, .rv-side dl { letter-spacing: 0; }
.rv-pop textarea, .rv-pop input[type=text] { font-size: var(--ui); letter-spacing: 0; }
.rv-body h2.h2 span { font-size: var(--ui); }
.ed-trail:has(> button:only-of-type) { display: none; }      /* a trail of one says nothing the title does not */
.ed-menu button, .ed-bar button, .ed-palist button { letter-spacing: 0; }
.rv-side strong, .rv-pop strong { font-weight: 600; }
.ed-font { border: 0; width: 100%; cursor: pointer; text-align: left; font-family: inherit; letter-spacing: 0; }
.ed-font span { cursor: pointer; } .ed-font b { margin-left: auto; font-weight: 400; font-size: var(--ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-font:hover { background: rgba(var(--ink-rgb), .1); }
.ed-fonts { top: 8%; left: auto; right: 12px; transform: none; width: min(340px, 92%); }      /* to one side, so the page stays in view while fonts are tried */
.ed-fonts .ed-palist { max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.ed-grip { position: absolute; left: -2px; bottom: 100%; margin-bottom: 1px; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; background: var(--ed); color: #fff; font: 11px/1 var(--sans, system-ui); font-style: normal; border-radius: 3px 0 0 0; cursor: grab; pointer-events: auto; touch-action: none; }
.ed-grip::after { content: ""; position: absolute; inset: -5px; }
.ed-sel.can-order > .ed-tag { left: 15px; border-radius: 0 3px 0 0; }
.ed-guide { position: absolute; background: var(--ed-red); min-width: 1px; min-height: 1px; }
.ed-row .btn[disabled] { opacity: .4; cursor: default; }
.ed-palist button { flex: none; }                    /* rows keep their height; the list scrolls */
.ed-palist { overscroll-behavior: contain; }
.ed-fonts .ed-palist button { align-items: center; padding: 7px 10px; }
.ed-fonts .ed-palist b { font-weight: 400; font-size: 17px; line-height: 1.25; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }      /* a specimen of the font, not interface text */
.ed-fonts .ed-palist i { font-style: normal; color: var(--muted); font-size: var(--ui-s); }
.rv-craft { list-style: none; margin: 0; padding: 0; }
.rv-craft li { font-size: var(--ui); line-height: 1.45; padding: 8px 0; border-top: 1px solid var(--rule); }

/* the handoff page: one large picture with a switch between the design and the build */
.dz-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dz-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.dz-bar .seg[aria-label="Which page"] button { text-transform: capitalize; }
.dz-bar .seg button[disabled] { opacity: .4; cursor: default; }
.dz-links { margin-left: auto; font-size: 14px; }
.dz-frame { max-height: min(72vh, 900px); overflow-y: auto; overscroll-behavior: contain; border-radius: 12px; border: 1px solid var(--rule); background: #fff; scrollbar-width: thin; }
.dz-frame img { display: block; width: 100%; height: auto; }
.grid2 > .side { flex: 1 1 360px; }
.side .btn.big { flex: 1 1 auto; min-height: 48px; font-size: 16px; padding: 0 20px; }
td.rowact { text-align: right; white-space: nowrap; } td.rowact .linkbtn { color: var(--muted); font-size: 13px; } td.rowact .linkbtn:hover { color: var(--bad, #b3261e); }

/* handoff page: the bar above the design or the build */
.dz-bar .dz-edit { margin-left: auto; }
.dz-page select { min-height: 42px; min-width: 180px; width: auto; text-transform: capitalize; }
.dz-frame.dz-live { position: relative; height: min(72vh, 900px); overflow: hidden; }
.dz-frame.dz-live iframe { position: absolute; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.dz-frame.phone:not(.dz-live) { max-width: 390px; margin: 0 auto; }
.dz-frame.dz-live.phone { background: rgba(var(--ink-rgb), .05); }
/* review panel: room to breathe, one line (not two) above the foot, and a list that can be clicked */
.rv-sec:last-of-type, .rv-sections > .rv-sec:nth-last-child(1), .rv-sections > .rv-sec:has(~ .rv-sec[hidden]):not(:has(~ .rv-sec:not([hidden]))) { border-bottom: 0; }
.rv-sec > summary { padding: 16px 20px; }
.rv-sec > summary:focus { outline: none; } .rv-sec > summary:focus-visible { outline: 2px solid #0d99ff; outline-offset: -2px; }
.rv-body { padding: 2px 20px 24px; }
.rv-body h3 { margin: 20px 0 10px; padding-top: 16px; }
.rv-body h2.h2 { margin: 0 0 8px; }
.ed-grid { gap: 8px; } .ed-row { margin-top: 10px; } .ed-scope { margin: 8px 0 4px; } .ed-trail { margin: 2px 0 10px; }
.rv-foot { padding: 18px 20px 20px; }
.rv-note { padding: 14px 0; cursor: pointer; } .rv-note:hover, .rv-hand li[data-jump]:hover { background: rgba(var(--ink-rgb), .04); }
.rv-hand li[data-jump] { cursor: pointer; padding: 3px 0; }
#rv-list { padding-bottom: 28px; }

.nav-r { margin-left: auto; } .nav-r a[aria-current="page"] { color: var(--ink); }
#view > .h1 { margin: 0 0 18px; } #view > .glass.panel + .glass.panel, #view > .stats + .glass.panel { margin-top: 22px; }
code { font-family: var(--mono); font-size: .9em; }
/* a little more air everywhere in the editing panel */
.ed-f { height: 36px; padding: 0 10px; } .ed-grid { gap: 10px; }
.ed-parts button { padding: 8px 8px; } .ed-parts { gap: 2px; } #rv-layers { max-height: 212px; padding-bottom: 16px; }
.rv-sec > summary { padding: 18px 20px 14px; }
.rv-body { padding: 4px 20px 26px; } .rv-body h3 { margin: 22px 0 12px; padding-top: 18px; } .rv-body h2.h2 { margin: 2px 0 10px; }
.ed-row { margin-top: 12px; } .ed-sw { margin-bottom: 2px; } .ed-note { margin-top: 18px; }
.rv-foot { padding: 20px 20px 22px; } .rv-state { margin-top: 12px; }

/* the app's own questions and notices */
.dlg-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(var(--ink-rgb), .28); backdrop-filter: blur(3px); }
.dlg { width: min(460px, 100%); padding: 26px 28px 22px; background: var(--card); box-shadow: 0 30px 80px rgba(var(--ink-rgb), .3); }
.dlg p { margin: 0 0 10px; font-size: 16px; line-height: 1.45; } .dlg p.muted { font-size: 14px; }
.dlg-row { display: flex; justify-content: flex-end; gap: 10px; margin: 20px 0 0 !important; }
.dlg .btn { min-height: 44px; } .btn.danger { background: var(--bad, #b3261e); border-color: transparent; color: #fff; }
.rv-ur button { min-width: 0; padding: 0 12px; }
.ed-tag.ed-grab { pointer-events: auto; cursor: grab; touch-action: none; padding: 5px 8px; }
.ed-tag.ed-grab { text-transform: none; }

/* a note someone left on the proof, pinned to its spot in the editor */
.rv-pin { position: absolute; width: 26px; height: 26px; margin-top: -26px; border-radius: 50% 50% 50% 0; background: #d6281e; color: #fff; display: grid; place-items: center; font: 600 11px/1 var(--mono); letter-spacing: 0; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none; z-index: 2; }
/* handoff page bar: every control the same height, the same gap between them */
.dz-bar { gap: 12px; align-items: center; }
.dz-bar .seg { height: 44px; box-sizing: border-box; padding: 3px; margin: 0; align-items: stretch; }
.dz-bar .seg button { min-height: 0; height: 100%; padding: 0 16px; }
.dz-bar .dz-page { display: flex; margin: 0; }
.dz-bar .dz-page select { height: 44px; min-height: 44px; box-sizing: border-box; margin: 0; }
.dz-bar .btn.dz-edit { height: 44px; min-height: 44px; box-sizing: border-box; padding: 0 20px; }
/* handoff page bar: the three choices share the space left of Edit equally */
.dz-bar > .seg, .dz-bar > .dz-page { flex: 1 1 0; min-width: 0; }
.dz-bar > .seg button { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-bar > .dz-page select { width: 100%; min-width: 0; }
.dz-bar .dz-edit { margin-left: 12px; flex: none; }
@media (max-width: 900px) { .dz-bar > .seg, .dz-bar > .dz-page { flex: 1 1 100%; } .dz-bar .dz-edit { margin-left: 0; } }

/* the font list's kinds */
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 6px 6px; border-bottom: 1px solid var(--rule); }
.ed-chips button { font: 11px/1 var(--sans, system-ui); letter-spacing: 0; padding: 7px 10px; border-radius: 999px; border: 0; background: rgba(var(--ink-rgb), .07); color: var(--muted); cursor: pointer; }
.ed-chips button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.ed-fonts { width: min(380px, 92%); }

/* our own colour picker: the same white rounded box as the font list */
.ed-color { position: fixed; z-index: 60; width: 248px; padding: 12px; background: var(--card); border: 0; box-shadow: 0 24px 70px rgba(var(--ink-rgb), .3); }
.ed-sv { position: relative; height: 150px; border-radius: 10px; cursor: crosshair; touch-action: none; background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.ed-sv i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); pointer-events: none; }
.ed-crow { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; }
.ed-chip { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(var(--ink-rgb), .2); }
.ed-drop { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(var(--ink-rgb), .07); cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink); }
.ed-hue { flex: 1 1 auto; min-width: 0; height: 12px; margin: 0; padding: 0; border: 0; min-height: 0; -webkit-appearance: none; appearance: none; border-radius: 6px; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.ed-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1px solid rgba(0, 0, 0, .35); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); cursor: pointer; }
.ed-hue::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1px solid rgba(0, 0, 0, .35); cursor: pointer; }
.ed-color .ed-f input { text-align: right; font-family: var(--mono); min-height: 0; border: 0; background: transparent; flex: 1 1 auto; min-width: 0; font-size: 13px; outline: none; border-radius: 0; padding: 6px 0; }
.ed-color .ed-f span { cursor: default; }
.ed-sw .ed-any { background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); border-radius: 50%; }
.ed-cols button { width: 26px; height: 26px; border-radius: 6px; }
