/* On Good Terms - the app (ogt4). Adds to /gt.css (day 1). The tokens below sit in a low-priority layer, so every token gt.css
   defines wins; they only fill what gt.css leaves out. Dark mode is the app's own (the pay page stays light), scoped to
   html.ogt-app. Paper, ink and evergreen; Fraunces for headings, Public Sans for the UI; 6 px cards, 8 px buttons, 1 px hairlines,
   no shadows, no gradients, no pills.
   w2app (OGT-25) - the identity's radii, the same on the site (gt.css --radius / --radius-ctl) and the pay page: 6 px (--r) for every
   card, box, list, table, sheet, toast and picture frame; 8 px (--r-ctl) for every control you press or type in (buttons, inputs,
   selects, segmented controls, the language switch, variable chips, the close buttons); 4 px only for small inline tags. */
@layer ogt-defaults {
  :root {
    --paper: #FAF7F2; --card: #FFFFFF; --ink: #1F2A24; --muted: #5E6B63; --line: #E4DED3; --soft: #F2EEE6;
    --primary: #1E5B4A; --primary-hover: #17483A; --on-primary: #FFFFFF; --primary-tint: #E6EFEB;
    --attention: #A94E28; --attention-tint: #F6E9E2; --pending: #8A6616; --pending-tint: #F5EEDC;
    --settled: #2A7353; --settled-tint: #E3F0E9; --danger: #9B2C2C; --danger-tint: #F6E4E4; --locked: #EFEBE4;
    --focus: #1E5B4A; --line-strong: #7F8982;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  }
}
/* the app's own contrast-safe status inks (AA on paper and on card) */
html.ogt-app { --attention: #A94E28; --settled: #2A7353; --pending: #8A6616; --line-btn: #CFC7B8; color-scheme: light;
  --r: var(--radius, 6px); --r-ctl: var(--radius-ctl, 8px); }
@media (prefers-color-scheme: dark) {
  html.ogt-app:not([data-theme="light"]) {
    --paper: #1A1F1C; --card: #222925; --ink: #EDE8DF; --muted: #A9B3AC; --line: #353E39; --soft: #262D29; --line-strong: #737F78; --line-btn: #4A544E;
    --primary: #6FB59A; --primary-hover: #86C4AB; --on-primary: #10231C; --primary-tint: #243A31;
    --attention: #E08E6A; --attention-tint: #3A2A22; --pending: #D8B05A; --pending-tint: #36301F;
    --settled: #79C39E; --settled-tint: #213529; --danger: #E88A8A; --danger-tint: #3A2323; --locked: #2B322E; --focus: #6FB59A;
    color-scheme: dark;
  }
}
html.ogt-app[data-theme="dark"] {
  --paper: #1A1F1C; --card: #222925; --ink: #EDE8DF; --muted: #A9B3AC; --line: #353E39; --soft: #262D29; --line-strong: #737F78; --line-btn: #4A544E;
  --primary: #6FB59A; --primary-hover: #86C4AB; --on-primary: #10231C; --primary-tint: #243A31;
  --attention: #E08E6A; --attention-tint: #3A2A22; --pending: #D8B05A; --pending-tint: #36301F;
  --settled: #79C39E; --settled-tint: #213529; --danger: #E88A8A; --danger-tint: #3A2323; --locked: #2B322E; --focus: #6FB59A;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
html.ogt-app *, html.ogt-app *::before, html.ogt-app *::after { box-sizing: border-box; }
html.ogt-app { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; scroll-behavior: auto; }
html.ogt-app body { margin: 0; display: block; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; overflow-x: hidden; min-height: 100vh; }
:where(.ogt-app) :where(h1, h2, h3, h4) { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; font-variation-settings: "opsz" 72; letter-spacing: -.005em; color: var(--ink); }
:where(.ogt-app) h1 { font-size: 34px; letter-spacing: -.012em; }
:where(.ogt-app) h2 { font-size: 22px; }
.ogt-app h1:focus, .ogt-app h2:focus { outline: none; }
.ogt-app .h2 { font-size: 26px; }
.ogt-app .h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.ogt-app .h4 { font-size: 16px; }
:where(.ogt-app) p { margin: 0; }
:where(.ogt-app) a { color: var(--primary); text-underline-offset: 2px; }
:where(.ogt-app) a:hover { color: var(--primary-hover); }
.ogt-app :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
:where(.ogt-app) button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sm { font-size: 14px; }
.anywhere { overflow-wrap: anywhere; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic-sm { width: 15px; height: 15px; vertical-align: -2px; }
.ic-lg { width: 32px; height: 32px; color: var(--primary); stroke-width: 1.3; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 60; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 14px; font-weight: 600; }
.skip:focus { top: 12px; }
.shell { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 16px; }

/* ---------------------------------------------------------------- top bar */
.atop { background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.atop-in { display: flex; align-items: center; gap: 12px 28px; min-height: 64px; }
.wm { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-family: var(--serif); font-weight: 500; font-size: 21px; color: var(--ink) !important; text-decoration: none; white-space: nowrap; font-variation-settings: "opsz" 72; letter-spacing: -.005em; }
.wm .mark { width: 26px; height: 26px; color: var(--primary); fill: none; stroke: currentColor; }
.nav { display: flex; gap: 2px 22px; flex: 1; min-width: 0; }
.nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 64px; color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; padding-top: 2px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--primary); }
.cnt { color: var(--attention); font-weight: 600; }
.cnt[hidden] { display: none !important; }
.acct { display: flex; align-items: center; gap: 14px; margin-left: auto; min-width: 0; }
.tenant { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.langs button { min-width: 44px; min-height: 40px; border: 0; background: var(--card); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 10px; }
.langs button + button { border-left: 1px solid var(--line); }
.langs button[aria-pressed="true"] { background: var(--soft); color: var(--ink); }
.bnav { display: none; }

/* ---------------------------------------------------------------- banner */
.banner { background: var(--pending-tint); border-bottom: 1px solid var(--line); }
.bn { display: flex; align-items: center; gap: 12px; min-height: 56px; padding-top: 8px; padding-bottom: 8px; color: var(--ink); font-size: 15px; }
.bn .ic { color: var(--pending); }
.bn p { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- page scaffolding */
main.shell { padding-top: 36px; padding-bottom: 112px; outline: none; display: block; }
.app-page { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page-hd { display: flex; flex-direction: column; gap: 8px; }
.page-hd.row-hd { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-hd.row-hd > div { display: flex; flex-direction: column; gap: 8px; }
.lede { font-size: 17px; color: var(--muted); max-width: 68ch; }
.kicker { font-size: 14px; color: var(--muted); font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; text-decoration: none; align-self: flex-start; margin: -12px 0 -12px -2px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; min-width: 0; }
.sec { display: flex; flex-direction: column; gap: 16px; }
.sec > h2, .sec-plain > h2 { display: flex; align-items: center; gap: 9px; font-size: 21px; }
.sec > h2 .ic, .sec-plain > h2 .ic { color: var(--primary); }
.sec-plain { display: flex; flex-direction: column; gap: 14px; }
.sec > .btn, .sec > .row, .sub-card > .row { align-self: flex-start; }
.sub-card { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--primary-tint); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: 15px; color: var(--ink); }
.note .ic { color: var(--primary); margin-top: 2px; }
.note.card { align-items: center; flex-wrap: wrap; background: var(--card); padding: 16px 20px; }
.note.card > div { flex: 1 1 280px; }
.note.warnbox { background: var(--pending-tint); }
.note.warnbox .ic { color: var(--pending); }
.note.sm { font-size: 14px; padding: 12px 14px; }
.warn { color: var(--attention); display: inline-flex; gap: 5px; align-items: baseline; }
.warn .ic { width: 15px; height: 15px; align-self: center; }
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 36px 28px; }
.state p { color: var(--muted); max-width: 60ch; }
.state .btn { margin-top: 4px; }

/* ---------------------------------------------------------------- buttons, tags, status */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--line-btn, var(--line)); background: var(--card); color: var(--ink); font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; max-width: 100%; }
.ogt-app a.btn { color: var(--ink); }
.btn:hover { border-color: var(--muted); }
.btn.pri { background: var(--primary); border-color: var(--primary); color: var(--on-primary) !important; }
.btn.pri:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--card); border-color: var(--danger); color: var(--danger) !important; }
.btn.danger:hover { background: var(--danger-tint); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--primary) !important; padding: 0 10px; }
.btn.quiet:hover { background: var(--primary-tint); }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.on { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after { content: ""; position: absolute; left: calc(50% - 8px); top: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) var(--muted) var(--muted) transparent; }
.btn.pri.is-busy::after { border-color: var(--on-primary) var(--on-primary) var(--on-primary) transparent; }
@media (prefers-reduced-motion: no-preference) {
  .btn.is-busy::after { animation: ogt-spin .8s linear infinite; }
  .btn, .nav a, .langs button, .chip, .tile { transition: background-color .15s, border-color .15s, color .15s; }
  .toast { animation: ogt-in .15s ease-out; }
  .sk { animation: ogt-pulse 1.4s ease-in-out infinite; }
}
@keyframes ogt-spin { to { transform: rotate(360deg); } }
@keyframes ogt-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ogt-pulse { 50% { opacity: .55; } }
.lnk { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; font-size: 15px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; line-height: 1.3; border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; background: var(--card); color: var(--ink); white-space: nowrap; font-weight: 400; }
.tag.sample { background: var(--pending-tint); color: var(--ink); }
.tag.pk { background: var(--soft); margin-left: 6px; vertical-align: 1px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.st .ic { width: 16px; height: 16px; }
.st.ready { color: var(--primary); } .st.pending { color: var(--pending); } .st.settled { color: var(--settled); } .st.attn { color: var(--attention); } .st.quiet { color: var(--muted); }

/* ---------------------------------------------------------------- forms */
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > label, .lbl, .segf legend { font-size: 15px; font-weight: 600; color: var(--ink); }
.fld input[type=text], .fld input[type=email], .fld input[type=number], .fld input:not([type]), .fld textarea, .fld select, .inp-sfx input {
  width: 100%; min-height: 44px; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-ctl); background: var(--card); color: var(--ink);
  font: 400 16px/1.45 var(--sans); padding: 9px 12px; min-width: 0; }
.fld textarea { resize: vertical; min-height: 88px; }
.fld select { padding-right: 36px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E6B63' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.fld input:focus-visible, .fld textarea:focus-visible, .fld select:focus-visible, .inp-sfx input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--primary); }
.fld input::placeholder, .fld textarea::placeholder, .inp-sfx input::placeholder { color: var(--muted); opacity: 1; }
.fld input[disabled], .fld select[disabled], .fld textarea[disabled], .inp-sfx input[disabled] { background: var(--soft); color: var(--muted); cursor: not-allowed; }
.fld input[readonly], .fld textarea[readonly] { background: var(--soft); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.hint { font-size: 14px; color: var(--muted); line-height: 1.5; }
.hint .st { font-size: 14px; margin-right: 4px; }
.vstat { font-size: 14px; }
.err { display: flex; gap: 7px; align-items: flex-start; color: var(--danger); font-size: 14px; line-height: 1.45; font-weight: 600; }
.err .ic { margin-top: 1px; width: 16px; height: 16px; }
.err[hidden] { display: none; }
.inp-sfx { position: relative; display: flex; align-items: center; }
.inp-sfx input { padding-right: 62px; }
.inp-sfx .sfx { position: absolute; right: 12px; color: var(--muted); font-size: 14px; pointer-events: none; }
.inp-row { display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.inp-row > input, .inp-row > .inp-sfx { flex: 1; min-width: 0; }
.fld.inline { flex: 0 1 auto; }
.fld.sm-inp .inp-sfx, .fld.sm-inp input { max-width: 170px; }
.swrow, .ckrow { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.swrow label, .ckrow label { font-size: 15px; font-weight: 600; cursor: pointer; }
.ckrow label { font-weight: 400; }
.sw { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line-strong, var(--line)); position: relative; cursor: pointer; flex: none; margin: 0; border: 0; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); }
.sw:checked { background: var(--primary); }
.sw:checked::after { left: 21px; background: var(--on-primary); }
.sw:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) { .sw, .sw::after { transition: left .15s, background-color .15s; } }
.sw-h { margin: -6px 0 0 56px; }
.ckrow input[type=checkbox] { width: 22px; height: 22px; margin: 0; accent-color: var(--primary); flex: none; cursor: pointer; }
.segf { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.segf legend { padding: 0; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-ctl); overflow: hidden; align-self: flex-start; max-width: 100%; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; white-space: nowrap; white-space: nowrap; font-size: 15px; cursor: pointer; background: var(--card); color: var(--muted); border-right: 1px solid var(--line); }
.seg label:last-of-type { border-right: 0; }
.seg input:checked + label { background: var(--primary-tint); color: var(--primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--primary); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px; }
.seg input:disabled + label { opacity: .5; cursor: not-allowed; }
.savest { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); min-height: 22px; }
.savest.saved .ic { color: var(--settled); } .savest.error { color: var(--danger); font-weight: 600; }

/* ---------------------------------------------------------------- skeletons */
.sk { display: block; background: var(--soft); border-radius: 4px; max-width: 100%; }
.sk-line { height: 1px !important; }
.sk-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.sk-col { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }
.sk-tiles { display: flex; gap: 16px; flex-wrap: wrap; }
.sk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sk-card.tall { min-height: 360px; }
.sk-row { display: flex; align-items: center; gap: 14px; }
.sk-tabs { display: flex; gap: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sk-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.sk-2.le { grid-template-columns: 240px minmax(0, 1fr); }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 10px; max-width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 10px 8px 10px 14px; font-size: 15px; line-height: 1.4; }
.toast .ic { color: var(--paper); }
.toast .tmsg { flex: 1; min-width: 0; }
.toast .btn.quiet { color: var(--paper) !important; text-decoration: underline; min-height: 40px; }
.toast .btn.quiet:hover { background: transparent; }
.toast.err { background: var(--danger); color: #fff; } .toast.err .ic { color: #fff; }
.toast.out { opacity: 0; transition: opacity .15s; }
.tx { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: var(--r-ctl); flex: none; }
.tx:hover { background: rgba(127, 127, 127, .15); }

/* ---------------------------------------------------------------- the sheet */
dialog.sheet { border: 1px solid var(--line); border-radius: var(--r); padding: 0; background: var(--card); color: var(--ink); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog.sheet.wide { width: min(760px, calc(100vw - 32px)); }
dialog.sheet::backdrop { background: rgba(20, 26, 23, .5); }
.sh { display: flex; flex-direction: column; max-height: calc(100vh - 50px); }
.sh-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 14px 4px 24px; }
.sh-hd h2 { font-size: 22px; padding-top: 8px; }
.sh-bd { padding: 12px 24px 20px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.sh-ft { border-top: 1px solid var(--line); padding: 14px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.sh-ft .row { justify-content: flex-end; }
.sh-err { color: var(--danger); font-weight: 600; font-size: 14px; display: flex; gap: 7px; align-items: flex-start; }
.sh-err:empty { display: none; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.countlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.countlist li { display: flex; gap: 14px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.countlist li:last-child { border-bottom: 0; }
.countlist b { font-family: var(--serif); font-size: 22px; min-width: 32px; text-align: right; }
.menu { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.menu li + li { border-top: 1px solid var(--line); }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu a .ic { color: var(--primary); }

/* ---------------------------------------------------------------- gates + evidence */
.gates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.gates li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.gates li:last-child { border-bottom: 0; }
.gates li .ic { margin-top: 2px; }
.gates li.ok .ic { color: var(--settled); }
.gates li.bad { color: var(--danger); font-weight: 600; }
.bl { list-style: none; margin: 0; padding: 0; }
.bl li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bl li:last-child { border-bottom: 0; }
.bl li .ic { color: var(--primary); margin-top: 1px; }

/* ---------------------------------------------------------------- home */
.hm-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 24px; flex-wrap: wrap; }
.hm-rec { display: flex; flex-direction: column; gap: 6px; }
.big { font-family: var(--serif); font-weight: 600; font-size: 48px; line-height: 1.05; letter-spacing: -.015em; font-variation-settings: "opsz" 72; }
.tiles { display: flex; gap: 16px; flex-wrap: wrap; }
.tile { display: flex; flex-direction: column; gap: 4px; min-width: 156px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; text-decoration: none; color: var(--ink); }
.ogt-app a.tile { color: var(--ink); }
.tile .n { font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 600; }
a.tile:hover { border-color: var(--muted); }
.list-hd { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: -10px; padding-top: 4px; }
.list-hd h1 { font-size: 28px; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; }
.excl { margin: -12px 0 -8px; text-align: right; }
.importline { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: -8px; }
.importline > p { display: inline-flex; align-items: center; gap: 8px; }
.importline .keys { margin-left: auto; font-size: 13px; }
/* ogt4c: why the last import built nothing - one muted line under the import line */
.impwhy { display: flex; gap: 8px; align-items: flex-start; margin: -10px 0 -8px; }
.impwhy .ic { margin-top: 3px; flex: none; }
.cases { list-style: none; margin: 0; padding: 0; }
.cases.card { padding: 0; }
.case { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: relative; }
/* the whole row opens the case (a stretched link); the actions sit above it */
.cn::after { content: ""; position: absolute; inset: 0; }
.case .act, .case .tag { position: relative; z-index: 1; }
.case:last-child { border-bottom: 0; }
.case:hover { background: color-mix(in srgb, var(--paper) 60%, var(--card)); }
.kic { width: 40px; height: 40px; border-radius: var(--r); background: var(--soft); display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.kic .ic { width: 20px; height: 20px; }
.cmain { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nm { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-weight: 600; }
.cn { color: var(--ink) !important; text-decoration: none; overflow-wrap: anywhere; min-height: 28px; display: inline-flex; align-items: center; }
.cn:hover { text-decoration: underline; }
.mt { font-size: 14px; color: var(--muted); }
.asked { font-size: 14px; color: var(--muted); text-align: right; white-space: nowrap; }
.act { display: flex; justify-content: flex-end; }
.fold { padding: 0; }
.fold > summary { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; min-height: 56px; padding: 12px 20px; cursor: pointer; list-style: none; font-size: 15px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .chev { margin-left: auto; transition: transform .15s; color: var(--muted); }
.fold[open] > summary .chev { transform: rotate(180deg); }
.fold > summary:focus-visible { outline-offset: -3px; }
.fs-t { display: inline-flex; align-items: center; gap: 8px; }
.fs-t .ic { color: var(--muted); }
.fold .cases { border-top: 1px solid var(--line); }
.fold .case { background: var(--paper); }

/* ---------------------------------------------------------------- case detail */
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 24px; flex-wrap: wrap; }
.cd-t { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 360px; }
.cd-t .meta { gap: 8px 14px; font-size: 14px; }
.cd-head .acts { justify-content: flex-end; }
.tabs { display: flex; gap: 4px 26px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); text-decoration: none; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); font-weight: 600; border-bottom-color: var(--primary); }
.cd { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.cd-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cd-main > .card:not(.pic):not(.rcp):not(.tl):not(.addrow) { display: flex; flex-direction: column; gap: 10px; }
.cd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cd-side .card { display: flex; flex-direction: column; gap: 12px; }
.cd-side .h3 .ic { color: var(--primary); }
.moneyline { background: var(--soft); }
.lt-ctl { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.lt-ctl .fld select { min-width: 190px; }
.subj { font-size: 15px; }
.subj > .muted:first-child { margin-right: 8px; }
.frame-w { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.letter-frame { display: block; width: 100%; height: 480px; border: 0; background: #fff; color-scheme: light; }
.pics { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pic { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 20px; padding: 16px; }
.pic.off { background: var(--paper); }
.pic.off .pthumb img { opacity: .45; }
.pthumb { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); align-self: start; background: var(--soft); aspect-ratio: 4 / 3; }
.pthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); }
.pbody { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pbody .kv { font-size: 14px; gap: 6px 14px; }
.pctl { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; }
.rcp { list-style: none; margin: 0; padding: 0; }
.rcp li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.rcp li:last-child { border-bottom: 0; }
.rcp.card { padding: 0; }
.rc-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rc-main .ckrow { min-height: 36px; }
.rc-main .ckrow label { font-weight: 600; }
.rc-main > p { padding-left: 34px; }
.rcp li.guess { background: var(--pending-tint); }
.addrow .fld { flex: 1; }
.tl { list-style: none; margin: 0; padding: 6px 22px; }
.tl li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.tl li:last-child { border-bottom: 0; }
.tl-d { color: var(--muted); }

/* ---------------------------------------------------------------- needs you */
.grp { display: flex; flex-direction: column; gap: 12px; }
.grp-h { font-family: var(--sans) !important; font-size: 15px !important; font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: baseline; }
.decs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.dec { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
.dtxt { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.dtxt .ic { color: var(--attention); margin-top: 3px; width: 20px; height: 20px; }
.dacts { gap: 10px 12px; padding-left: 32px; }
.dacts .lnk { margin-left: auto; }
.dform { padding-left: 32px; }
.dnote { padding-left: 32px; }
.paused-note p { margin: 0; }
.dform form { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
/* ogt4c: they say the pictures are removed · the kind-of-letter sheet */
.rm-note { margin: 0 0 0 32px; padding: 10px 14px; border-left: 2px solid var(--line-strong); background: var(--soft); border-radius: 0 var(--r) var(--r) 0; display: flex; flex-direction: column; gap: 4px; }
.rm-note p:last-child { font-family: var(--serif); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.rm-res { display: flex; gap: 8px; align-items: flex-start; padding-left: 32px; font-size: 15px; }
.rm-res:empty { margin-top: -14px; }
.rm-res.wait { min-height: 1.5em; }
.dacts .btn[disabled][aria-busy="true"] { opacity: .85; cursor: progress; }
.rm-res .ic { margin-top: 2px; flex: none; }
.rm-res.ok { color: var(--settled); } .rm-res.bad { color: var(--attention); }
.rm-res .rm-at { color: var(--muted); font-weight: 400; }
.rm-keep { margin-top: -6px; max-width: 72ch; }
.opts { border: 1px solid var(--line); border-radius: var(--r); margin: 0; padding: 0; min-width: 0; }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: relative; }
.opt:last-child { border-bottom: 0; }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; cursor: pointer; }
.opt label { display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; flex: 1; }
.opt label::after { content: ""; position: absolute; inset: 0; }
.opt-t { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.opt-t .ic { color: var(--primary); }
.opt-d { font-size: 14px; color: var(--muted); padding-left: 26px; }
.opt:has(input:checked) { background: var(--primary-tint); }

/* ---------------------------------------------------------------- setup */
.wel { display: flex; flex-direction: column; gap: 18px; padding: 36px; max-width: 880px; }
.wel h1 { font-size: 40px; }
.wcounts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.wcounts li { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--paper); display: flex; flex-direction: column; gap: 2px; }
.wcounts b { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.wcounts span { color: var(--muted); font-size: 15px; }
.rail ol { list-style: none; margin: 0; padding: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px 26px; border-bottom: 1px solid var(--line); }
.rail a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 15px; }
.rail a:hover { color: var(--ink); }
.rail .dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong, var(--line)); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--card); flex: none; }
.rail .dot .ic { width: 15px; height: 15px; }
.rail .done a { color: var(--ink); }
.rail .done .dot { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.rail .cur a { color: var(--ink); font-weight: 600; }
.rail .cur .dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.wz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 32px; align-items: start; }
.wz-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wz-main > h1 { margin-top: -4px; }
.wz-form { display: flex; flex-direction: column; gap: 20px; margin-top: 12px; }
.wz-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); }
.wz-mid { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; flex: 1 1 200px; }
.pv { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.pv > summary { display: none; }
.pv-sum { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 600; list-style: none; }
.pv-sum::-webkit-details-marker { display: none; }
.pv-sum .chev { margin-left: auto; color: var(--muted); }
.pv[open] .pv-sum .chev { transform: rotate(180deg); }
.pv-hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.side-sum { display: flex; flex-direction: column; gap: 10px; }
.drop { display: flex; align-items: center; gap: 18px; border: 1px dashed var(--line-strong, var(--line)); border-radius: var(--r); padding: 16px; background: var(--paper); }
.drop.over { border-color: var(--primary); background: var(--primary-tint); }
.logo-pv { width: 72px; height: 72px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; color: var(--muted); }
.logo-pv img { max-width: 64px; max-height: 64px; object-fit: contain; }
.logo-pv .ic { width: 26px; height: 26px; }
.drop-t { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.vh-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.vh-file:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.codebox { margin-top: 6px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.codebox[hidden] { display: none; }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--soft); padding-top: 10px; padding-bottom: 10px; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl tbody th { font-weight: 600; }
.rates tbody th { width: 46%; }
.rates td > * + * { margin-top: 6px; }
.lbl-t { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.lbl-t .ic { color: var(--primary); }
.sub { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; padding-left: 26px; }
.rates .inp-sfx { max-width: 220px; }
.kinds { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.kind { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--card); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.kind.locked { background: var(--paper); }
.kind-t { display: flex !important; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.kind-t .ic { color: var(--primary); }
.kind.locked .kind-t .ic { color: var(--muted); }
.kind .segf legend { margin-bottom: 6px; }
.kind .seg { align-self: stretch; }
.kind .seg label { flex: 1; justify-content: center; padding: 0 10px; text-align: center; }
.kind.locked p.muted { display: flex; gap: 6px; align-items: flex-start; }
.kinds + .note { margin-top: 4px; }
/* w2app (OGT-14): the three kinds that always wait for you - one compact locked list under the four switchable cards */
.klock { display: flex; flex-direction: column; gap: 8px; }
.klock ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); overflow: hidden; }
.klock li.kind.locked { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); align-items: baseline; gap: 4px 16px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; background: transparent; }
.klock li.kind.locked:last-child { border-bottom: 0; }
.klock + .note { margin-top: 4px; }
.wz-form .klock li.kind.locked { grid-template-columns: minmax(0, 1fr); }
/* ogt4c: the network operator's switch, its warning and "I have read this" */
.net-rev { display: flex; gap: 6px; align-items: flex-start; }
.net-rev .ic { margin-top: 3px; }
.kind-net .netbox { margin-top: 8px; }
/* the warning makes the operator card taller: it and its row neighbour keep their own height (no half-empty card) */
.kinds > .kind-net, .kinds > .kind:has(+ .kind-net) { align-self: start; }
.netbox[hidden] { display: none; }
.netbox-t { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.netbox-t .ckrow label { font-weight: 600; }
.net-hint { color: var(--attention); font-weight: 600; }
.net-hint:empty { margin-top: -8px; }
.scopes { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.scl { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.scl li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.scl li:last-child { border-bottom: 0; }
.scl li > span:first-child { flex: 1 1 200px; min-width: 0; }
.scadd { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.scadd .fld { flex: 1 1 220px; }
.cap-w[hidden] { display: none; }
.cap-w .fld { max-width: 260px; margin-left: 56px; }
/* w2app (OGT-14): the seven letters of setup step 3 are one list of rows - no lonely card - with the case count on its own line */
.tlist { list-style: none; margin: 0; padding: 0; display: block; overflow: hidden; container-type: inline-size; }
.tlist.card { padding: 0; }
.tlist .tcard { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.tlist .tcard:last-child { border-bottom: 0; }
.tlist .tcard.dim { background: var(--paper); }
.tc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tc-main .h4 { font-size: 17px; }
.tc-tpl { margin-top: 3px; overflow-wrap: anywhere; }
.tc-act { align-self: center; flex-wrap: nowrap; gap: 8px; }
@container (max-width: 600px) {
  .tlist .tcard { grid-template-columns: 40px minmax(0, 1fr); }
  .tc-act { grid-column: 2; align-self: start; flex-wrap: wrap; margin-top: 6px; }
}
.wz-form .kinds { grid-template-columns: minmax(0, 1fr); }
.wz-form .kind .seg { align-self: flex-start; }
.wz-form .kind .seg label { flex: 0 1 auto; padding: 0 18px; }
.wz-side .pv .letter-frame { height: 520px; }

/* ---------------------------------------------------------------- letters */
.le { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.types ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.types li + li { border-top: 1px solid var(--line); }
.types a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; color: var(--ink); text-decoration: none; font-size: 15px; }
.types a .ic { color: var(--muted); }
.types a:hover { background: var(--paper); }
.types a[aria-current] { background: var(--primary-tint); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.types a[aria-current] .ic { color: var(--primary); }
.types .tn { flex: 1; min-width: 0; }
.cnt-s { color: var(--muted); font-size: 14px; font-weight: 400; }
.dotm { color: var(--attention); font-weight: 600; }
.only-m { display: none; }
.le-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.subtabs { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.subtabs .tabs { border-bottom: 0; }
/* w2app (OGT-16): the letter's language - a labelled select, never a second EN / DA toggle */
.lt-lang { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 6px; }
.lt-lang > label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.fld.lt-lang select { min-width: 150px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: 15px; }
.segl { display: inline-flex; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-ctl); overflow: hidden; margin-bottom: 6px; }
.segl a { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 40px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; background: var(--card); }
.segl a + a { border-left: 1px solid var(--line); }
.segl a[aria-current] { background: var(--primary-tint); color: var(--primary); }
.lt-form { display: flex; flex-direction: column; gap: 18px; }
.lt-form textarea { font-family: var(--serif) !important; font-size: 16px !important; line-height: 1.65 !important; }
.tmeta { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.tmeta .unsaved { color: var(--attention); }
.lock { display: flex; gap: 10px; align-items: center; background: var(--locked); border-radius: var(--r); padding: 10px 14px; font-size: 14px; color: var(--muted); }
.lock b { color: var(--ink); font-weight: 600; }
.chips-w { display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* w2app (OGT-24): a chip names what the variable prints, with the token second */
.chip { min-height: 40px; padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--primary-tint); color: var(--primary); font: 600 13px/1.2 var(--sans); cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; text-align: left; }
.chip:hover { border-color: var(--primary); }
.chip-l { color: var(--ink); font-size: 14px; font-weight: 600; }
.chip-t { font: 400 12px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--primary); }
@media (pointer: coarse) { .chip { min-height: 44px; } }
.le-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.matrix > summary { border-bottom: 0; }
.mx-w { padding: 0 20px 20px; overflow-x: auto; }
.mx { font-size: 14px; }
.mx td, .mx th { padding: 10px 12px; white-space: nowrap; }
.mx a { display: inline-flex; min-height: 32px; align-items: center; text-decoration: none; }
.mx a.mine { font-weight: 600; }

/* ---------------------------------------------------------------- money */
.mo-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.mo-rec { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.mo-lines { margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; }
.mo-lines > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
.mo-lines > div:last-child { border-bottom: 0; }
.mo-lines dt { color: var(--muted); flex: 0 1 auto; min-width: 0; }
.mo-lines dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.ledger td.r { white-space: nowrap; }
.stl { list-style: none; margin: 0; padding: 0; }
.stl.card { padding: 0; }
.stl li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stl li:last-child { border-bottom: 0; }
.stl li > div { display: flex; flex-direction: column; gap: 2px; }

/* ---------------------------------------------------------------- w2app (the UX audit's wave 2) */
/* the Guide: a '?' beside each page title (44 px target) and the account line in the More sheet (OGT-11) */
.h1q { display: flex; align-items: center; gap: 4px 6px; min-width: 0; }
.h1q > h1 { min-width: 0; }
.qm { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin: -4px 0; border-radius: var(--r-ctl); color: var(--muted); text-decoration: none; }
.qm .ic { width: 22px; height: 22px; }
.qm:hover { color: var(--primary); background: var(--primary-tint); }
.ogt-app a.qm:hover { color: var(--primary); }
.list-hd .h1q, .cd-t .h1q { align-self: flex-start; }
.who { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); padding: 0 4px; overflow-wrap: anywhere; }
.who .ic { color: var(--primary); }
/* OGT-12: Recipients says "To" on a narrow phone; the strip fades at the edge that has more */
.tabs .tab-s { display: none; }
/* OGT-22: the Needs-you tile at 0 is calm */
.tile .st.quiet { color: var(--muted); }
.tile .st.quiet .ic { color: var(--settled); }
.tile .st[data-cnt-st] { flex-wrap: wrap; row-gap: 0; }
.tile-ok { flex-basis: 100%; padding-left: 22px; font-weight: 400; font-size: 13px; }
/* simulated payments inside a figure (/api/money includes_simulated, ledger[].simulated) */
.tag.sim { background: var(--soft); color: var(--muted); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.big .tag.sim { vertical-align: 10px; margin-left: 8px; }
/* gate states: pending (read again when you send) and warn (never blocks) */
.gates li.pend .ic { color: var(--muted); }
.gates li.warn .ic { color: var(--pending); }
/* OGT-13: the case's money story */
.mstory { display: flex; flex-direction: column; gap: 14px; }
.mtbl { font-size: 14px; }
.mtbl caption { caption-side: top; text-align: left; padding: 0 0 8px; font-family: var(--serif); font-weight: 600; }
.mtbl th, .mtbl td { padding: 8px 14px; }
.mtbl tbody th { font-weight: 400; }
.mtbl tfoot th, .mtbl tfoot td { font-weight: 600; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.mkv { gap: 10px 18px; }
.mkv .st { white-space: normal; align-items: flex-start; font-weight: 600; }
.mkv .st .ic { margin-top: 2px; }
/* OGT-05: a done step whose required field is empty is flagged, and the note says what is missing */
.rail .gap a { color: var(--ink); }
.rail .gap .dot { background: var(--pending-tint); border-color: var(--pending); color: var(--pending); }
.gaps { margin-top: -4px; }
.gapl { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
/* w4ed: the discount for fast settlement - its own group on the rate card, the case's own row on the Money tab, the list hint */
.pr-pair { margin-top: 20px; }
.dsc { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px 12px; margin: 20px 0 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.dsc legend { padding: 0 6px; margin-left: -6px; font-size: 15px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.dsc legend .ic { color: var(--primary); }
.dsc-row, .dsc-edit { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; }
.dsc-row .fld { flex: 0 1 260px; }
.dsc-edit { gap: 12px 16px; }
.dsc-edit .fld { flex: 0 1 170px; }
.dsc-row .inp-sfx input[type=number], .dsc-edit .inp-sfx input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.dsc-row .inp-sfx input::-webkit-inner-spin-button, .dsc-row .inp-sfx input::-webkit-outer-spin-button, .dsc-edit .inp-sfx input::-webkit-inner-spin-button, .dsc-edit .inp-sfx input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dsc-ex { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 15px; font-weight: 600; color: var(--ink); }
.dsc-ex .muted { font-weight: 400; font-size: 14px; }
.mkv dd .dsc-ex { margin-top: 10px; }
.mkv dd .hint { margin-top: 4px; }
.dsc-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 14px; color: var(--muted); margin-top: -4px; }
.dsc-sug[hidden] { display: none; }
button.lnk { background: none; border: 0; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; border-radius: var(--r-ctl); font-family: var(--sans); }
button.lnk:hover { color: var(--primary-hover); }
button.lnk[disabled] { color: var(--muted); cursor: progress; }
.asked .dsc-h { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--primary); white-space: normal; }
.dsc-ml { color: var(--primary); font-weight: 600; }
/* OGT-05: Getting paid under Settings */
.pd-flat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 28px; }
.pd-part { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* OGT-23: the three bottom fields of the rate card share one baseline (the labels sit on the input line) */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 981px) {
    .grid3 { row-gap: 0; }
    .grid3 > .fld { grid-row: span 4; display: grid; grid-template-rows: subgrid; row-gap: 6px; align-content: start; }
    .grid3 > .fld > label { align-self: end; }
  }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1060px) {
  .nav { gap: 2px 16px; }
  .tenant { max-width: 120px; }
}
@media (max-width: 980px) {
  .wz, .cd, .mo-top, .sk-2 { grid-template-columns: minmax(0, 1fr); }
  .wz-side { position: static; }
  .pv > summary { display: flex; }
  details.pv:not([open]) { padding: 6px 16px; gap: 0; }
  details.pv:not([open]) > :not(summary) { display: none; }
  .grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .nav, .tenant .ic { display: none; }
  .atop-in { min-height: 56px; gap: 10px; }
  .bnav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.2; text-align: center; border: 0; background: transparent; cursor: pointer; font-weight: 600; }
  .bnav .ic { width: 22px; height: 22px; }
  .bnav a[aria-current="page"], .bnav button.on { color: var(--primary); box-shadow: inset 0 2px 0 var(--primary); }
  .bi { position: relative; display: inline-flex; }
  .bi .cnt { position: absolute; top: -6px; left: 14px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--attention); color: var(--card); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
  main.shell { padding-bottom: 112px; }
  .toasts { bottom: 76px; left: 16px; right: 16px; max-width: none; }
}
@media (max-width: 760px) {
  .shell { padding: 0 16px; }
  main.shell { padding-top: 24px; }
  .app-page { gap: 20px; }
  .ogt-app h1 { font-size: 28px; }
  .wel h1 { font-size: 30px; }
  .wcounts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .bn { flex-wrap: wrap; }
  .bn p { flex: 1 1 240px; }
  .big { font-size: 38px; }
  .card { padding: 16px; }
  .wel { padding: 20px 16px; }
  .grid2, .grid3, .kinds, .tcards { grid-template-columns: minmax(0, 1fr); }
  .hm-top { align-items: stretch; }
  .tiles { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .tile { min-width: 0; padding: 12px 14px; }
  .importline .keys { display: none; }
  .langs button, .btn.sm, .segl a { min-height: 44px; }
  .chip { min-height: 44px; padding: 0 12px; }
  .rail a { min-width: 44px; justify-content: center; }
  .tabs a { min-width: 44px; justify-content: center; }
  .rc-main .ckrow { min-height: 44px; }
  .kic { align-self: start; }
  .pbody .kv { grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; }
  .pbody .kv dd { margin-bottom: 0; }
  .list-hd h1 { font-size: 26px; }
  .list-hd .btn { width: 100%; }
  .excl { text-align: left; margin: -8px 0 -8px; }
  .case { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; padding: 14px 16px; }
  .case .asked { grid-column: 2; text-align: left; }
  .case .act { grid-column: 1 / -1; }
  .case .act .btn { width: 100%; }
  .fold > summary { padding: 12px 16px; }
  .cd-head .acts { width: 100%; }
  .cd-head .acts .btn { flex: 1 1 auto; }
  .tabs { gap: 0 18px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .tabs a { flex: none; }
  .tabs::-webkit-scrollbar { display: none; }
  /* w2app (OGT-12): snap to a tab; fade the edge that has more */
  .tabs { scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
  .tabs a { scroll-snap-align: start; }
  .tabs.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
  .tabs.fade-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px); mask-image: linear-gradient(to right, transparent, #000 44px); }
  .tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
  .pd-flat { grid-template-columns: minmax(0, 1fr); }
  .klock li.kind.locked { grid-template-columns: minmax(0, 1fr); }
  .ledger a.lcode { display: inline-flex; align-items: center; min-height: 44px; }
  .lt-lang { flex-direction: column; align-items: stretch; gap: 6px; margin-bottom: 10px; width: 100%; }
  .fld.lt-lang select { min-height: 44px; width: 100%; }
  .pic { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  .pthumb { max-width: 200px; }
  .tl { padding: 4px 16px; }
  .tl li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rcp li { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
  .dec { padding: 16px; }
  .dacts, .dform, .dnote, .rm-res { padding-left: 0; }
  .rm-note { margin-left: 0; }
  .impwhy { margin-top: -6px; }
  .dacts .btn { flex: 1 1 auto; }
  .dacts .lnk { margin-left: 0; }
  .le { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .types { display: none; }
  .only-m { display: flex; }
  .subtabs .tabs { margin: 0; padding: 0; }
  .le-foot .row { width: 100%; }
  .le-foot .row .btn { flex: 1 1 auto; }
  .wz-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .wz-mid { grid-column: 1 / -1; order: 0; }
  .wz-foot > .row { display: contents; }
  .wz-foot [data-next] { grid-column: 1 / -1; order: 1; width: 100%; }
  .wz-foot > .btn { order: 2; justify-self: start; }
  .wz-foot [data-skip] { order: 3; justify-self: end; }
  .rail ol { gap: 2px 6px; flex-wrap: nowrap; }
  .rail li:not(.cur) a > span:nth-child(2) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .drop { flex-direction: column; align-items: flex-start; }
  .inp-row { flex-wrap: wrap; }
  .inp-row > input, .inp-row > .inp-sfx { flex: 1 1 100%; }
  .inp-row > .btn { flex: 1 1 100%; }
  .scl li { padding: 10px 12px; }
  .cap-w .fld, .sw-h { margin-left: 0; }
  .sw-h { margin-top: -4px; }
  dialog.sheet, dialog.sheet.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r) var(--r) 0 0; max-height: 92vh; border-bottom: 0; }
  .sh { max-height: 92vh; }
  .sh-hd { padding: 16px 8px 0 16px; }
  .sh-bd { padding: 10px 16px 16px; }
  .sh-ft { padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0)); }
  .sh-ft .row .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  /* tables become cards */
  .rt thead { display: none; }
  .rt, .rt tbody, .rt tr, .rt td, .rt tbody th { display: block; width: 100% !important; }
  .rt tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .rt tbody tr:last-child { border-bottom: 0; }
  .rt td, .rt tbody th { padding: 3px 0 !important; border: 0 !important; text-align: left !important; }
  .rt td::before { content: attr(data-l); display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
  .rates td::before { display: none; }
  .rates td { padding-top: 10px !important; }
  .ledger td { display: flex; justify-content: space-between; gap: 12px; }
  .ledger td::before { display: inline; }
  .mx-w { padding: 0 0 12px; }
  .mx tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
  .mx tbody th { grid-column: 1 / -1; font-size: 15px; }
  .mx td, .mx th { white-space: normal; }
  .mx a { min-height: 44px; min-width: 44px; }
  .mo-lines > div { padding: 12px 16px; }
  .stl li { padding: 12px 16px; }
}
/* w2app (OGT-11): below 560 px the account name leaves the top bar (it was cut mid-word); the More sheet says "Signed in as" */
@media (max-width: 560px) {
  .acct .tenant { display: none; }
}
@media (max-width: 420px) {
  .wm { font-size: 18px; gap: 7px; }
  .wm .mark { width: 22px; height: 22px; }
  .tenant { max-width: 92px; font-size: 13px; }
  .acct { gap: 8px; }
}
@media (max-width: 400px) {
  .tabs { gap: 0 14px; }
  .tabs .tab-l { display: none; }
  .tabs .tab-s { display: inline; }
}
@media print {
  .atop, .bnav, .toasts, .banner, .skip { display: none !important; }
}
/* w4gr: a statement row links its month as a PDF - a text link beside the invoice state, 44 px tall on a phone */
.stl li > .st-acts { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 4px 20px; flex-wrap: wrap; }
.st-pdf { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-weight: 600; font-size: 14px; }
.st-pdf[aria-busy="true"] { opacity: .6; cursor: progress; transition: opacity .15s .3s; }   /* no flash when the PDF is quick */
.st-pdf .ic { width: 16px; height: 16px; vertical-align: 0; }
@media (max-width: 760px) { .st-pdf { min-height: 44px; } .stl li > .st-acts { justify-content: flex-start; } }
@media print { .st-pdf { display: none; } }
/* w5o (VW-18): 44 px hit areas with the same look - the input is the 44 px box, its ::before draws the visible shape, negative
   margins keep the layout footprint (nothing moves), the focus ring sits on the shape; forced-colors mode keeps both visible */
.sw { width: 44px; height: 44px; margin: -9px 0; background: transparent; border-radius: 0; }
.sw::before { content: ""; position: absolute; left: 0; top: 9px; width: 44px; height: 26px; border-radius: 13px; background: var(--line-strong, var(--line)); }
.sw::after { top: 12px; }
.sw:checked { background: transparent; }
.sw:checked::before { background: var(--primary); }
.ogt-app .sw:focus-visible { outline: none; }
.ogt-app .sw:focus-visible::before { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .sw::before { transition: background-color .15s; } }
.ckrow input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 44px; margin: -11px; padding: 0; border: 0; background: transparent; }
.ckrow input[type=checkbox]::before { content: ""; position: absolute; left: 11px; top: 11px; width: 22px; height: 22px; box-sizing: border-box; border: 1.5px solid var(--line-strong, var(--line)); border-radius: 4px; background: var(--card); }
.ckrow input[type=checkbox]::after { content: ""; position: absolute; left: 19px; top: 14px; width: 6px; height: 12px; box-sizing: border-box; border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
.ckrow input[type=checkbox]:checked::before { background: var(--primary); border-color: var(--primary); }
.ckrow input[type=checkbox]:checked::after { opacity: 1; }
.ckrow input[type=checkbox]:disabled { cursor: not-allowed; }
.ckrow input[type=checkbox]:disabled::before { opacity: .5; }
.ogt-app .ckrow input[type=checkbox]:focus-visible { outline: none; }
.ogt-app .ckrow input[type=checkbox]:focus-visible::before { outline: 3px solid var(--focus); outline-offset: 2px; }
.ckrow label a { display: inline-block; padding: 14px 0; margin: -14px 0; }       /* 'Read the terms': a 45 px tall hit box, the line stays */
@media (max-width: 760px) { .cn { min-height: 44px; margin: -8px 0; } }   /* a case name in a row: 44 px to tap, the row stays */
/* w5o (VW-27): an amount never wraps ('DKK' / '1,200'); the page beside it breaks at its dots and slashes instead */
.mtbl td.num { white-space: nowrap; }
@media (forced-colors: active) {
  .sw::before, .ckrow input[type=checkbox]::before { border: 1px solid CanvasText; background: Canvas; }
  .sw::after { background: CanvasText; }
  .sw:checked::before, .ckrow input[type=checkbox]:checked::before { background: Highlight; border-color: Highlight; }
  .sw:checked::after { background: HighlightText; }
  .ckrow input[type=checkbox]::after { border-color: HighlightText; }
}
/* w5o: the top bar between 861 and 1120 px (app.js fitTop) - 'short': the account name shortens; 'tight': it leaves the bar,
   the icon keeps it as a tooltip and screen readers still read it; 'wrap2': the nav gets its own row under the wordmark */
.tenant #tenant { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* a shortened name ends in '…', not mid-letter */
.atop.short .tenant { max-width: 120px; }
.atop.tight #tenant { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.atop.tight .tenant { cursor: default; }
.atop.wrap2 .atop-in { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
.atop.wrap2 .nav { order: 3; flex: 1 0 100%; }
.atop.wrap2 .nav a { min-height: 48px; }
.atop.wrap2 .tenant { max-width: 240px; }

/* ics (7 Oct 2026): the Independent copy site card on a case */
.ics-card p{margin:0 0 8px}
.ics-card .bl{margin:0 0 8px}
