/* Piper — visual system, section 18 of the spec.
   Sizes are in rem with 1 rem = 14 px in the narrow panel (root 87.5 %), so the whole interface
   scales with the root font size of the window width mode (section 20). Only 1 px lines stay in px. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../assets/fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

:root {
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --surface: #FFFFFF;
  --segment-on: #FFFFFF;
  --text: #1A1D21;
  --text-muted: #5F6773;
  --border: #C3C9D1;
  --divider: #E6E8EB;
  --accent: #0B6E99;
  --ring: rgba(11, 110, 153, 0.22);
  --row-hover: #F3F4F6;
  --row-selected: #EAECEF;
  --success-bg: #E8F5EC;
  --success: #1F7A3D;
  --warning: #B54708;
  --danger: #C0362C;
  --warning-bg: #FDF1E3;
  --danger-bg: #FDE8E6;
  color-scheme: light;
  font-size: 87.5%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #111316;
    --card: #1B1E23;
    --surface: #14161A;
    --segment-on: #2F343B;
    --text: #E6E8EB;
    --text-muted: #A1A8B2;
    --border: #3D434B;
    --divider: #2A2E34;
    --accent: #4FB3E0;
    --ring: rgba(79, 179, 224, 0.25);
    --row-hover: #1F2227;
    --row-selected: #272B31;
    --success-bg: #16311F;
    --success: #4CC37A;
    --warning: #F2A451;
    --danger: #FF7B72;
    --warning-bg: #3A2A14;
    --danger-bg: #3A1D1B;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #111316;
  --card: #1B1E23;
  --surface: #14161A;
  --segment-on: #2F343B;
  --text: #E6E8EB;
  --text-muted: #A1A8B2;
  --border: #3D434B;
  --divider: #2A2E34;
  --accent: #4FB3E0;
  --ring: rgba(79, 179, 224, 0.25);
  --row-hover: #1F2227;
  --row-selected: #272B31;
  --success-bg: #16311F;
  --success: #4CC37A;
  --warning: #F2A451;
  --danger: #FF7B72;
  --warning-bg: #3A2A14;
  --danger-bg: #3A1D1B;
  color-scheme: dark;
}

/* Window width modes: root font and column width (section 20). */
@media (min-width: 520px) {
  :root { font-size: 100%; }
}
@media (min-width: 960px) {
  :root { font-size: 112.5%; }
}

*, *::before, *::after { 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(--text);
  font-family: 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.4286rem;
  font-variant-numeric: tabular-nums;
  font-optical-sizing: auto;
}

button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
h1, h2 { font: inherit; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 0.2857rem; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.ic { width: 1.1429rem; height: 1.1429rem; flex: none; }
.ic.xs { width: 0.8571rem; height: 0.8571rem; }

/* Column */
.app {
  width: 100%;
  margin: 0 auto;
  padding: 0.7143rem;
}
@media (min-width: 520px) {
  .app { max-width: 30rem; }
}

/* Header */
.hd { display: flex; justify-content: space-between; align-items: center; padding: 0.1429rem 0.7143rem 0; min-height: 2rem; }
.logo { display: flex; align-items: center; gap: 0.5714rem; }
.mark { width: 1.5714rem; height: 1.5714rem; }
.wm { font-size: 1.1429rem; line-height: 1.4286rem; font-weight: 600; letter-spacing: -0.01em; }
.hr { display: flex; align-items: center; gap: 0.7143rem; color: var(--text-muted); }
.ib { position: relative; display: inline-flex; padding: 0.1429rem; border-radius: 0.2857rem; color: var(--text-muted); }
.ib:hover { color: var(--text); }
.lang { position: relative; display: flex; }
.lbt {
  display: inline-flex; align-items: center; gap: 0.2143rem;
  font-size: 0.8571rem; line-height: 1.1429rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--text-muted); padding: 0.2143rem 0.3571rem 0.2143rem 0.5rem;
  border: 1px solid var(--divider); border-radius: 0.4286rem;
}
.lbt:hover { color: var(--text); }
.lm {
  position: absolute; right: 0; top: calc(100% + 0.4286rem); z-index: 10;
  width: 11.1429rem; margin: 0; padding: 0.2857rem; list-style: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 0.5714rem;
}
.lm li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4286rem 0.5714rem; border-radius: 0.2857rem;
  font-size: 0.9286rem; line-height: 1.2857rem; color: var(--text); cursor: pointer;
}
.lm li:hover, .lm li:focus { background: var(--row-selected); outline: none; }
.lm li .ic { color: var(--accent); visibility: hidden; }
.lm li[aria-selected='true'] .ic { visibility: visible; }

/* Tooltips: inverted colours */
[data-tip]:hover::after, .tip-b[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute; z-index: 20;
  padding: 0.2857rem 0.5714rem; border-radius: 0.4286rem;
  background: var(--text); color: var(--card);
  font-size: 0.8571rem; line-height: 1.1429rem; font-weight: 400; letter-spacing: 0;
  white-space: nowrap; pointer-events: none;
}
.c[data-tip]:hover::after { right: -0.2857rem; bottom: calc(100% + 0.4286rem); }
.tip-b[data-tip]:hover::after, .tip-b[data-tip]:focus-visible::after { top: calc(100% + 0.4286rem); left: 50%; transform: translateX(-50%); }
.tip-b.tip-end[data-tip]:hover::after, .tip-b.tip-end[data-tip]:focus-visible::after { left: auto; right: 0; transform: none; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--divider); border-radius: 0.7143rem; padding: 0.8571rem 1.4286rem; margin-top: 0.7143rem; }
.hs { padding: 0.5714rem 1.4286rem 0; margin-top: 0.7143rem; }
.sh {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5714rem;
  font-size: 0.8571rem; line-height: 1.1429rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--text-muted); margin: 0 0 0.5714rem;
}
.lnk { color: var(--accent); font-weight: 500; letter-spacing: 0; cursor: pointer; }
.lnk:hover { text-decoration: underline; }

/* Segmented controls */
.segs { display: flex; flex-wrap: wrap; gap: 0.5714rem; margin: 0 0 0.4286rem; }
.seg { flex: 1 1 10rem; display: flex; background: var(--row-selected); border-radius: 0.4286rem; padding: 0.1429rem; }
.seg label { flex: 1; display: flex; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg span {
  flex: 1; text-align: center; padding: 0.2143rem 0.2857rem;
  font-size: 0.9286rem; line-height: 1.2857rem; color: var(--text-muted);
  border: 1px solid transparent; border-radius: 0.2857rem; cursor: pointer; user-select: none;
}
.seg input:checked + span { background: var(--segment-on); color: var(--text); font-weight: 500; border-color: var(--divider); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Label — value rows. The label column fits the longest label of the language. */
.rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 0.5714rem; align-items: center; }
.rows .lb, .rows .dd, .rows .fv { min-height: 2.2857rem; display: flex; align-items: center; }
/* Labels line up with the first line of a value that wraps. */
.rows .lb { align-self: start; }
.lb { color: var(--text-muted); }
.lbm { color: var(--text); font-weight: 500; min-height: 2.8571rem !important; }
.rows > .sub { margin: -0.4286rem 0 0.1429rem; min-height: 1.1429rem; }
.props span { display: block; }
.sub { font-size: 0.8571rem; line-height: 1.1429rem; color: var(--text-muted); }
.sub.err { color: var(--danger); }
.rule { grid-column: 1 / -1; width: 100%; border: 0; border-top: 1px solid var(--divider); margin: 0.5714rem 0 0.5714rem; }

.dd { position: relative; justify-content: space-between; gap: 0.4286rem; min-width: 0; cursor: pointer; }
.dd select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 1rem; }
.dd:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 0.2857rem; }
.ddv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sub.err { color: var(--danger); }
.cv { color: var(--text-muted); }
@media (prefers-reduced-motion: no-preference) {
  .cv { transition: transform 120ms; }
}

.fv { gap: 0.2857rem; flex-wrap: wrap; }
.nb {
  width: 3.7143rem; padding: 0.1429rem 0.5714rem; text-align: right;
  border: 1px solid var(--border); background: var(--surface); border-radius: 0.4286rem;
  line-height: 1.4286rem; outline: none;
}
.nb:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.nb.err { border-color: var(--danger); }
.mu { color: var(--text-muted); }
.fe { color: var(--danger); font-size: 0.8571rem; line-height: 1.1429rem; margin-left: 0.2857rem; }
.fe:empty { display: none; }
.ovb { display: inline-flex; gap: 0.2857rem; margin-left: 0.4286rem; }
.ovb .ib { padding: 0.2143rem; border-radius: 0.3571rem; }
.ovb .ib:hover { background: var(--row-hover); color: var(--text); }
.ovr { margin-left: auto; white-space: nowrap; }

/* Expandable parameter groups (Pipe, Fluid, Profile). The header row opens a panel with the settings;
   the open group is framed as one block so it never merges with the next row. Subgrid keeps the labels
   on the shared label column. */
.xg { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; border: 1px solid transparent; border-radius: 0.5714rem; }
.xg.open { margin: 0.2857rem -0.7143rem 0.5714rem; padding: 0 calc(0.7143rem - 1px); border-color: var(--border); background: var(--bg); }
.xh {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start;
  position: relative; width: 100%; text-align: left; padding: 0.4286rem 1.7143rem 0.4286rem 0; cursor: pointer;
}
.xh::before { content: ''; position: absolute; inset: 0 -0.7143rem; border-radius: 0.4286rem; }
.xh:hover::before { background: var(--row-hover); }
.xg.open .xh:hover::before { background: transparent; }
.xh:focus-visible { outline: none; }
.xh:focus-visible::before { outline: 2px solid var(--accent); outline-offset: -2px; }
.xh > * { position: relative; }
.xh .lb { min-height: 0 !important; display: block !important; }
.xv { display: flex; flex-direction: column; min-width: 0; }
.xt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xg.open .xt { font-weight: 500; }
.xh.err .xt, .xh.err .sub { color: var(--danger); }
.xc { position: absolute !important; right: 0; top: 0.7143rem; }
.xg.open .xc { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
  .xc { transition: transform 120ms; }
}
.xp { grid-column: 1 / -1; border-top: 1px solid var(--divider); padding: 0.5714rem 0 0.7143rem; }
.xp.xf:not([hidden]) { display: grid; grid-template-columns: subgrid; align-items: center; }
.xp.xf .props { grid-column: 2; margin: 0.2857rem 0 0; }
.fld {
  min-width: 11rem; max-width: 100%; min-height: 1.8571rem; padding: 0.1429rem 0.4286rem;
  border: 1px solid var(--border); background: var(--surface); border-radius: 0.4286rem; outline: none;
}
.fld:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* Option lists inside a panel: visible choices instead of a nested drop-down. */
.opts { display: flex; flex-direction: column; gap: 0.1429rem; }
.optg { font-size: 0.8571rem; line-height: 1.1429rem; font-weight: 500; color: var(--text-muted); padding: 0.1429rem 0.5714rem 0.2857rem; }
.opt {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5714rem; align-items: center;
  padding: 0.3571rem 0.5714rem; border-radius: 0.4286rem; cursor: pointer;
}
.opt input { grid-row: span 2; margin: 0; width: 1rem; height: 1rem; accent-color: var(--accent); }
.opt:hover { background: var(--card); }
.opt:has(input:checked) { background: var(--card); box-shadow: inset 0 0 0 1px var(--divider); }
.opt:has(input:checked) .ot { font-weight: 500; }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.os { grid-column: 2; font-size: 0.8571rem; line-height: 1.1429rem; color: var(--text-muted); }
.xl { display: inline-block; margin: 0.5714rem 0.5714rem 0; font-size: 0.9286rem; }

/* Primary input */
.pin {
  display: inline-flex; align-items: stretch; width: 13.4286rem; max-width: 100%; height: 2.8571rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.4286rem;
}
.pin:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.pin.err { border-color: var(--danger); }
.pin input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  text-align: right; font-size: 1.5714rem; line-height: 2rem; letter-spacing: -0.01em; padding: 0 0.7143rem;
}
.pin .u {
  position: relative; flex: 0 0 4.5714rem; display: flex; align-items: center; justify-content: space-between;
  padding: 0 0.5714rem 0 0.7143rem; border-left: 1px solid var(--divider); color: var(--text-muted); cursor: pointer;
}
.pin .u select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 1rem; }
.pin .u:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.pe { margin: 0.1429rem 0 0; }

/* Selected pipe */
.plq {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.4286rem; row-gap: 0.1429rem;
  margin: 0 -0.7143rem; padding: 0.7143rem; border-radius: 0.4286rem;
  background: var(--row-selected); font-size: 1.2857rem; line-height: 1.7143rem; letter-spacing: -0.01em; white-space: nowrap;
}
.plq.ok { background: var(--success-bg); }
.plq .d { font-weight: 600; }
.plq .gv { flex: 1 0 auto; display: flex; justify-content: space-between; align-items: baseline; }
/* The empty ::before centres Pa/m between the size and the velocity; spacing sits on the velocity only. */
.plq .gv > :last-child { margin-left: 0.4286rem; }
.plq .gv::before { content: ''; }
.od { display: inline-block; margin-left: 0.6em; font-size: 0.9286rem; font-weight: 400; letter-spacing: 0; color: var(--text-muted); white-space: nowrap; }
.od:empty { display: none; }
.u2 { font-size: 0.9286rem; letter-spacing: 0; color: var(--text-muted); }
.fl { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8571rem; margin-top: 0.7143rem; }
.fl .r { text-align: right; }
.idl { margin-top: 0.5714rem; padding-top: 0.5714rem; border-top: 1px solid var(--divider); font-size: 0.8571rem; line-height: 1.1429rem; color: var(--text-muted); }
.note { margin: 0.7143rem -0.7143rem 0; padding: 0.5714rem 0.7143rem; border-radius: 0.4286rem; background: var(--danger-bg); font-size: 0.9286rem; line-height: 1.2857rem; }
.note:empty { display: none; }
.note .nt { font-weight: 500; color: var(--danger); }
.note.warning { background: var(--warning-bg); }
.note.warning .nt { color: var(--warning); }
.cp { cursor: copy; border-radius: 0.2857rem; }
.cp:hover { background: var(--row-hover); }
.plq .cp:hover { background: transparent; text-decoration: underline dotted var(--text-muted); text-underline-offset: 0.2em; }
.stale .plq, .stale .fl, .stale .idl, .stale .note:not(.errs), .stale-table tbody { opacity: 0.45; }
/* Input errors at the top of the selected pipe card: what is wrong and where; each line leads to the field. */
.note.errs { margin: 0 -0.7143rem 0.7143rem; }
.errs .es { margin-top: 0.2857rem; }
.errs .ea { display: block; width: 100%; text-align: left; font-weight: 500; color: var(--text); }
.errs .ea::after { content: ' →'; color: var(--danger); }
.errs .ea:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.errs .ed { font-size: 0.8571rem; line-height: 1.1429rem; color: var(--text); }
.empty-result { color: var(--text-muted); font-size: 0.9286rem; }

/* Chips on numbers: the background sticks out and does not shift the digits */
.c { position: relative; display: inline-block; padding: 0 0.3571rem; margin: 0 -0.3571rem; border-radius: 0.2857rem; }
.c.e { background: var(--danger-bg); color: var(--danger); cursor: help; }
.c.w { background: var(--warning-bg); color: var(--warning); cursor: help; }

/* Tables */
.tb { width: calc(100% + 1.4286rem); margin: 0 -0.7143rem; border-collapse: collapse; table-layout: fixed; }
.tb th, .tb td { padding: 0.4286rem; white-space: nowrap; }
.tb th { font-size: 0.8571rem; line-height: 1.1429rem; font-weight: 400; color: var(--text-muted); text-align: right; padding-top: 0; padding-bottom: 0.2857rem; }
.tb td { text-align: right; border-top: 1px solid var(--divider); position: relative; }
.tb th:nth-child(-n+2), .tb td:nth-child(-n+2) { text-align: left; overflow: hidden; text-overflow: ellipsis; }
.tb th:first-child, .tb td:first-child { padding-left: 0.7143rem; }
.tb th:last-child, .tb td:last-child { padding-right: 2rem; }
.c-dn { width: 5.1429rem; }
.c-g { width: 4.2857rem; }
.c-v { width: 4.8571rem; }
.c-in { width: 6.8571rem; }
#neighbours-body tr { cursor: pointer; }
#neighbours-body tr:hover td { background: var(--row-hover); }
#neighbours-body tr.sel td { background: var(--success-bg); font-weight: 600; }
#neighbours-body tr.selx td { background: var(--row-selected); font-weight: 600; }
#neighbours-body tr.prev td { background: var(--row-selected); }
.ok2 { position: absolute; right: 0.7143rem; top: 50%; transform: translateY(-50%); color: var(--success); width: 1.0714rem; height: 1.0714rem; }
.ht { font-size: 0.9286rem; line-height: 1.2857rem; color: var(--text-muted); }
.ht td { padding-top: 0.3571rem; padding-bottom: 0.3571rem; }
.ht td:nth-child(2) { white-space: normal; }
.ht .h1 { display: flex; justify-content: space-between; gap: 0.2857rem; }
.ht .h1 span:first-child { overflow: hidden; text-overflow: ellipsis; }
.ht .od { font-size: 0.8571rem; }

/* Copied toast */
.toast {
  position: fixed; z-index: 30; padding: 0.2857rem 0.5714rem; border-radius: 0.4286rem;
  background: var(--text); color: var(--card); font-size: 0.8571rem; line-height: 1.1429rem; pointer-events: none;
}

/* Settings and About occupy the same panel */
dialog.panel {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text); overflow: auto;
}
dialog.panel::backdrop { background: var(--bg); }
.ah { display: flex; align-items: center; gap: 0.5714rem; padding: 0.1429rem 0.7143rem; min-height: 2rem; }
.bk { display: inline-flex; color: var(--text-muted); padding: 0.1429rem; border-radius: 0.2857rem; }
.bk .ic { width: 1.2857rem; height: 1.2857rem; }
.bk:hover { color: var(--text); }
.at { font-weight: 500; }
.alg { display: flex; align-items: center; gap: 0.8571rem; }
.alg .mark { width: 2.8571rem; height: 2.8571rem; }
.an { font-size: 1.2857rem; line-height: 1.7143rem; font-weight: 600; letter-spacing: -0.01em; }
.ap { margin: 0.7143rem 0 0; }
.it { font-size: 0.9286rem; line-height: 1.2857rem; padding: 0.5rem 0; }
.it + .it { border-top: 1px solid var(--divider); }
.it b { font-weight: 500; }
kbd {
  font-family: inherit; font-size: 0.8571rem; line-height: 1.1429rem; padding: 0.0714rem 0.4286rem;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 0.2857rem; background: var(--surface); color: var(--text);
}
.keys { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 0.8571rem; align-items: center; }
.keys > * { min-height: 2.2857rem; display: flex; align-items: center; gap: 0.2143rem; }
.lk { padding: 0.2857rem 1.4286rem; }
.li { display: flex; width: 100%; justify-content: space-between; align-items: center; min-height: 2.5714rem; text-align: left; }
.li + .li { border-top: 1px solid var(--divider); }
.li .ic { color: var(--text-muted); }
.disc { font-size: 0.8571rem; line-height: 1.1429rem; color: var(--text-muted); padding: 0.7143rem 1.4286rem 0.1429rem; }
.page p { margin: 0 0 0.7143rem; }
.page p:last-child { margin-bottom: 0; }
.page h3 { font-size: 0.9286rem; font-weight: 500; margin: 0.7143rem 0 0.2857rem; }
.page h3:first-child { margin-top: 0; }
.draft { font-size: 0.8571rem; color: var(--warning); margin-bottom: 0.5714rem; }

/* Settings */
.pf + .pf { border-top: 1px solid var(--divider); margin-top: 0.5714rem; padding-top: 0.5714rem; }
.pfh { display: flex; justify-content: space-between; align-items: center; gap: 0.5714rem; min-height: 2.2857rem; }
.pfh .name { font-weight: 500; }
.pfh input.name { flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 0.4286rem; padding: 0.1429rem 0.5714rem; outline: none; }
.pfh input.name:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.pfa { display: flex; gap: 0.8571rem; }
.set-row { display: flex; align-items: center; gap: 0.5714rem; min-height: 2.2857rem; }
.set-row input[type='checkbox'] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.set-row .fe { margin-left: 0; }
.sel-native {
  border: 1px solid var(--border); background: var(--surface); border-radius: 0.4286rem;
  padding: 0.1429rem 0.4286rem; min-height: 1.8571rem;
}
.add { display: block; margin-top: 0.5714rem; }
.checks { display: flex; flex-wrap: wrap; gap: 0 0.8571rem; }
.checks label { display: inline-flex; align-items: center; gap: 0.3571rem; min-height: 2rem; }
.checks input { accent-color: var(--accent); }

.nojs { padding: 1rem; }
/* In Settings the values keep their width and long labels wrap instead. */
.pf .rows { grid-template-columns: minmax(0, 1fr) max-content; }
.pf .fv { flex-wrap: nowrap; }
.pf .lb { line-height: 1.1429rem; padding: 0.2857rem 0; }
.nb.wide { width: 4.5714rem; }
.pf .row-error { grid-column: 1 / -1; margin: 0 0 0.2857rem; text-align: right; }
