/* Themes (build 2026-11-22.24). Every colour is a token. A component never names a colour itself.
   - Light is the base. Dark redefines the same tokens, nothing else.
   - The person's choice is on <html data-theme="light|dark">, written by the server, so there is no flash and
     no inline script. With no choice, the page follows the computer (prefers-color-scheme).
   - A token without "-solid" is text or a line on a surface. A "-solid" token is a filled background that
     carries white text (buttons, verdict banners, step numbers), so it stays dark enough in both themes.
   - The two dark blocks below must stay the same; tests/test_theme.py checks it, and the contrast. */
:root {
  color-scheme: light;
  --ink: #16202e; --muted: #5d6b7e; --line: #dde3ea; --bg: #f4f6f9; --card: #fff;
  --surface-2: #f7f9fb; --surface-3: #e9edf2; --field: #fff;
  --brand: #1c3d6e; --brand-solid: #1c3d6e; --header: #1c3d6e; --focus: #1f4fd1;
  --ok: #17643a; --ok-bg: #e4f3ea; --ok-solid: #17643a; --ok-line: #a9dcc0;
  --err: #a3201a; --err-bg: #fce9e7; --err-solid: #a3201a; --err-line: #f0b8b3;
  --warn: #8a4b00; --warn-bg: #fff0d6; --warn-solid: #8a4b00; --warn-line: #ecd391;
  --info-bg: #e8f0fb; --mark-bg: #ffb3ab;
  --error-solid: #5f1410; --error-fg: #7a1712;
  --awaiting: #5b2fa8; --awaiting-bg: #ece4fb; --awaiting-solid: #5b2fa8;
  --outdated: #4a4a46; --outdated-bg: #ecece8; --outdated-solid: #4a4a46;
  --border-strong: #7d8794; --pane: #e3e6ea; --pane-2: #d6dade;
  --shadow: rgba(22, 32, 46, .35); --backdrop: rgba(22, 32, 46, .55);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6ebf2; --muted: #a8b3c2; --line: #313b49; --bg: #12161c; --card: #1b2129;
  --surface-2: #222a35; --surface-3: #2b3442; --field: #141a21;
  --brand: #9cc2ff; --brand-solid: #2f5ea8; --header: #0f1722; --focus: #8ab4ff;
  --ok: #7fd6a2; --ok-bg: #12301f; --ok-solid: #17643a; --ok-line: #2c6b47;
  --err: #ff9d94; --err-bg: #3a1614; --err-solid: #a3201a; --err-line: #7a2a24;
  --warn: #f2c26b; --warn-bg: #3a2a08; --warn-solid: #8a4b00; --warn-line: #7a5a14;
  --info-bg: #17263d; --mark-bg: #7a2a24;
  --error-solid: #5f1410; --error-fg: #ffb0a8;
  --awaiting: #c7a8ff; --awaiting-bg: #2a1f47; --awaiting-solid: #5b2fa8;
  --outdated: #c2c2bb; --outdated-bg: #2e2e2b; --outdated-solid: #4a4a46;
  --border-strong: #7a8698; --pane: #3b424c; --pane-2: #333a43;
  --shadow: rgba(0, 0, 0, .6); --backdrop: rgba(0, 0, 0, .65);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --ink: #e6ebf2; --muted: #a8b3c2; --line: #313b49; --bg: #12161c; --card: #1b2129;
  --surface-2: #222a35; --surface-3: #2b3442; --field: #141a21;
  --brand: #9cc2ff; --brand-solid: #2f5ea8; --header: #0f1722; --focus: #8ab4ff;
  --ok: #7fd6a2; --ok-bg: #12301f; --ok-solid: #17643a; --ok-line: #2c6b47;
  --err: #ff9d94; --err-bg: #3a1614; --err-solid: #a3201a; --err-line: #7a2a24;
  --warn: #f2c26b; --warn-bg: #3a2a08; --warn-solid: #8a4b00; --warn-line: #7a5a14;
  --info-bg: #17263d; --mark-bg: #7a2a24;
  --error-solid: #5f1410; --error-fg: #ffb0a8;
  --awaiting: #c7a8ff; --awaiting-bg: #2a1f47; --awaiting-solid: #5b2fa8;
  --outdated: #c2c2bb; --outdated-bg: #2e2e2b; --outdated-solid: #4a4a46;
  --border-strong: #7a8698; --pane: #3b424c; --pane-2: #333a43;
  --shadow: rgba(0, 0, 0, .6); --backdrop: rgba(0, 0, 0, .65);
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
header.top { background: var(--header); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 10px 20px; }
header.top .logo { font-weight: 700; font-size: 17px; margin-right: 10px; color: #fff; text-decoration: none; }
header.top nav { display: flex; flex-wrap: wrap; gap: 2px 14px; flex: 1; }
/* The underline is always there, clear until hover: a border that appears on hover moved the whole page (build 2026-11-22.23). */
header.top nav a { color: #d6e2f3; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
header.top nav a:hover, header.top nav a.on { color: #fff; border-bottom-color: #fff; }
header.top form { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
main.wide { max-width: 1440px; }
main:focus { outline: none; }
h1 { font-size: 24px; margin: 6px 0 16px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.scroll { overflow-x: auto; }
tr.bad td { background: var(--err-bg); } tr.warn td { background: var(--warn-bg); }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=search], input[type=url], input[type=number], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 7px; font: inherit; background: var(--field); color: var(--ink); }
textarea { min-height: 120px; }
.btn { display: inline-block; background: var(--brand-solid); color: #fff; border: 0; border-radius: 7px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.light { background: var(--card); color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: var(--err-solid); } .btn.small { padding: 5px 10px; font-size: 13px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.b-passed { background: var(--ok-bg); color: var(--ok); } .b-blocked { background: var(--err-bg); color: var(--err); }
.b-error { background: var(--err-bg); color: var(--error-fg); box-shadow: inset 0 0 0 1px var(--error-fg); }
.b-overridden { background: var(--warn-bg); color: var(--warn); } .b-running, .b-queued { background: var(--info-bg); color: var(--brand); }
.b-outdated { background: var(--outdated-bg); color: var(--outdated); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: var(--ok-line); } .flash.error { background: var(--err-bg); border-color: var(--err-line); }
.flash.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.verdict { border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; color: #fff; }
.verdict h1 { margin: 0 0 4px; font-size: 26px; } .verdict p { margin: 0; opacity: .95; }
.v-passed { background: var(--ok-solid); } .v-blocked { background: var(--err-solid); } .v-error { background: var(--error-solid); }
.v-overridden { background: var(--warn-solid); } .v-outdated { background: var(--outdated-solid); } .v-running { background: var(--brand-solid); }
.finding { border-left: 5px solid; padding: 8px 12px; margin-bottom: 8px; border-radius: 0 8px 8px 0; }
.finding.error { border-color: var(--err); background: var(--err-bg); } .finding.warning { border-color: var(--warn); background: var(--warn-bg); }
.finding b { display: block; } .finding .meta { font-size: 12px; color: var(--muted); }
mark { background: var(--mark-bg); color: var(--ink); padding: 0 1px; border-radius: 2px; font-weight: 700; }
.pre { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 380px; overflow: auto; font-size: 13.5px; }
.preview img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; margin-bottom: 10px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border-strong); vertical-align: -2px; margin-right: 4px; }
.demo-tag { background: #6a3fb5; color: #fff; padding: 8px 14px; border-radius: 8px; margin-bottom: 12px; font-weight: 600; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; } .tabs button { flex: 1; }
.thread { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.spinner { width: 22px; height: 22px; border: 3px solid #ffffff55; border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin 1s linear infinite; vertical-align: -5px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { max-width: 380px; margin: 8vh auto; }
details summary { cursor: pointer; font-weight: 600; }
.btn.big { font-size: 17px; padding: 14px 26px; }
label.upload { display: inline-block; margin: 0; cursor: pointer; }
a.unopened { font-weight: 700; }
details.card > summary { margin: -2px 0; } details.card[open] > summary { margin-bottom: 12px; }
button:disabled { opacity: .6; cursor: default; }
.b-awaiting_approval { background: var(--awaiting-bg); color: var(--awaiting); } .b-rejected { background: var(--outdated-bg); color: var(--outdated); }
.v-awaiting_approval { background: var(--awaiting-solid); } .v-rejected { background: var(--outdated-solid); }
.btn.approve { background: var(--ok-solid); }
.langs { display: flex; gap: 2px; margin: 0; } .langbar { display: flex; justify-content: flex-end; padding: 10px 16px 0; }
.langs button { min-width: 34px; min-height: 26px; border: 1px solid #8fa6c8; background: transparent; color: #d6e2f3; font: inherit; font-size: 12px; font-weight: 700; padding: 3px 8px; cursor: pointer; border-radius: 5px; }
.langs button.on { background: #fff; color: var(--brand-solid); }
.langbar .langs button { border-color: var(--border-strong); color: var(--muted); } .langbar .langs button.on { background: var(--brand-solid); color: #fff; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; } .compare.one { grid-template-columns: minmax(0, 520px); }
.compare figure { margin: 0; } .compare figcaption { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.compare img { width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; }
.spinner.dark { border-color: var(--line); border-top-color: var(--brand); }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; }
.steps li { padding: 6px 14px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-weight: 600; font-size: 13px; }
.steps li.done { background: var(--ok-bg); color: var(--ok); } .steps li.now { background: var(--info-bg); color: var(--brand); }
.steps li.bad { background: var(--err-bg); color: var(--err); }
table.recipe td { padding: 3px 4px; border: 0; } table.recipe input { min-width: 110px; }
.target { max-width: 190px; } .filelist a { font-weight: 600; }

/* Accessibility (build 2026-11-17.1) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.field-label { font-weight: 600; margin: 12px 0 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
header.top :focus-visible { outline-color: #fff; }
label.upload:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.check-label { font-weight: 400; }

/* ---- build 2026-11-17.2: status icons, check layout, viewer, emails, polish ---- */
/* Status never by colour alone: every badge and verdict carries a word and an icon. */
.badge::before, .verdict h1::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .35em;
  vertical-align: -.14em; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.badge:not([class*="b-"])::before, .v-running h1::before { display: none; }
.b-passed, .v-passed { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.b-blocked, .v-blocked { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.b-error, .v-error { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5L1.5 21h21z' fill='black'/%3E%3Cpath d='M12 9v5.5M12 17.6v.4' stroke='white' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.b-overridden, .v-overridden { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10.5' fill='black'/%3E%3Cpath d='M12 6.5v7M12 17.2v.4' stroke='white' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.b-awaiting_approval, .v-awaiting_approval, .b-running, .b-queued { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke='black' stroke-width='2.6'/%3E%3Cpath d='M12 6.5V12l3.5 2.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.b-outdated, .v-outdated, .b-rejected, .v-rejected { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 12a8 8 0 1 1-2.6-5.9' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round'/%3E%3Cpath d='M20 3.5v5h-5' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Check page: findings left, picture right (stacks on narrow screens). */
.check-layout.with-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.check-side { position: sticky; top: 12px; }
@media (max-width: 1000px) { .check-layout.with-side { grid-template-columns: 1fr; } .check-side { position: static; order: -1; } }

/* Picture viewer */
.viewer-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.viewer-tools [aria-pressed="true"] { background: var(--brand-solid); color: #fff; }
.viewer-panes.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.viewer-panes figure { margin: 0; } .viewer-panes figcaption { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.pane { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 8px; background-color: var(--pane);
  background-image: linear-gradient(45deg, var(--pane-2) 25%, transparent 25%, transparent 75%, var(--pane-2) 75%),
                    linear-gradient(45deg, var(--pane-2) 25%, transparent 25%, transparent 75%, var(--pane-2) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.pane.tall { max-height: calc(100vh - 140px); }
.pane img { display: block; max-width: none; cursor: zoom-out; }
.pane img.fit { width: 100%; height: auto; cursor: zoom-in; }
.pane img + img { margin-top: 8px; }

/* Order emails, one card per message */
.emails { display: grid; gap: 10px; max-height: 520px; overflow: auto; padding-right: 4px; }
.email { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 10px 12px; background: var(--card); }
.email.from-company { border-left-color: var(--outdated); background: var(--surface-2); }
.email-head { margin-bottom: 6px; } .email-subject { font-weight: 600; margin-top: 2px; }
.email-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }

/* Polish */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--card); color: var(--brand); padding: 8px 14px; border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 8px; }
html { scroll-padding-top: 16px; }
.footer { margin-top: 28px; }
td, .compare figcaption, .finding { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: transparent; }
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media (max-width: 700px) {
  header.top { padding: 8px 12px; gap: 6px 12px; }
  header.top nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 14px; }
  header.top nav a { white-space: nowrap; }
  header.top form span { display: none; }
  main { padding: 14px 10px 40px; }
  .verdict h1 { font-size: 21px; }
}
.who-customer { background: var(--info-bg); color: var(--brand); } .who-company { background: var(--outdated-bg); color: var(--outdated); }
/* Pictures carry width/height attributes (so the browser reserves their space before they load);
   keep them scaled by width with the right proportions. (build 2026-11-17.3) */
img[width][height] { height: auto; }
.pane img { height: auto; }

/* a group of fields inside a card (build 2026-11-21.4) */
fieldset.plain { border: 0; border-top: 1px solid var(--line); margin: 16px 0 4px; padding: 10px 0 0; min-width: 0; }
fieldset.plain legend { font-weight: 600; padding: 0 8px 0 0; }
.mailbox-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 6px 0; }
.mailbox-row input { min-width: 0; margin: 0; }
.save-row { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Check report (build 2026-11-21.7): summary first, errors grouped, the rest folded away. */
.in-short { margin: 0 0 14px; padding: 10px 12px; background: var(--info-bg); border-radius: 8px; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 17px; }
.group-title.is-error { color: var(--err); }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  font-weight: 700; font-size: 14px; line-height: 1; color: #fff; background: var(--err-solid); }
.is-warning .ico { background: var(--warn-solid); }
.count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 11px; font-size: 13px; font-weight: 600; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--ink); background: var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chips a { display: inline-block; padding: 3px 10px; border: 1px solid var(--border-strong); border-radius: 14px; font-size: 14px; color: var(--ink); text-decoration: none; }
.chips a:hover { background: var(--bg); }
.issue-group h4 { margin: 14px 0 6px; font-size: 15px; scroll-margin-top: 12px; }
.issue-group { scroll-margin-top: 12px; }
ul.issues, ul.points { list-style: none; margin: 0; padding: 0; }
ul.points { list-style: disc; padding-left: 20px; margin: 4px 0; }
ul.points li { margin: 3px 0; }
.finding b .count { margin-left: 4px; }
.diffline { margin: 2px 0; }
details.fold { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.fold > summary, details.fold-card > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
details.fold > summary { font-size: 17px; color: var(--warn); }
details.fold[open] > summary { margin-bottom: 10px; }
details.fold-card h3 { margin: 16px 0 6px; font-size: 16px; }
.issue-group h4::first-letter, .chips a::first-letter { text-transform: uppercase; }
.finding details > summary { cursor: pointer; font-weight: 400; }
.finding details > summary b { display: inline; }
.finding details > summary .diffline { display: block; margin-left: 18px; }
.finding details[open] > summary { margin-bottom: 4px; }
.fold-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }

/* Home page: the work list of checks (build 2026-11-21.8). */
table.checks td { vertical-align: middle; }
.thumb-cell { width: 68px; padding-right: 0; }
.thumb { display: block; width: 56px; height: 56px; object-fit: contain; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.chips a[aria-current] { background: var(--brand-solid); border-color: var(--brand); color: #fff; }
.all-clear { margin: 4px 0; }
.empty-state h2 { margin-top: 0; }
table.checks .btn { white-space: nowrap; }
table.checks td:last-child { text-align: right; }
table.checks td:nth-child(3) { min-width: 170px; }
table.checks td:nth-child(2) { min-width: 110px; }
table.checks td:nth-child(5) { white-space: nowrap; }
/* On a phone each check is a small block (picture left, facts stacked), so the result is never off-screen. */
@media (max-width: 700px) {
  table.checks, table.checks tbody, table.checks tr, table.checks td { display: block; }
  table.checks tr:first-child { position: absolute; left: -9999px; }
  table.checks tr { position: relative; min-height: 78px; padding: 10px 0 10px 68px; border-bottom: 1px solid var(--line); }
  table.checks td, table.checks td:nth-child(2), table.checks td:nth-child(3), table.checks td:last-child { border: 0; padding: 2px 0; min-width: 0; text-align: left; }
  table.checks td.thumb-cell { position: absolute; left: 0; top: 10px; width: 56px; }
  table.checks td:last-child { padding-top: 6px; }
}

/* Suggested mockup page (build 2026-11-21.10): the long lists are folded under the pictures. */
details.fold.is-plain > summary { color: var(--ink); }
ol.points { list-style: decimal; padding-left: 26px; margin: 4px 0; }
ol.points li { margin: 3px 0; }
details.fold .points { max-width: 90ch; }

.notice ul { margin: 6px 0 0; padding-left: 20px; } .notice li { margin: 2px 0; }

/* Orders list (build 2026-11-22.1): one cell per order, filters in the address, buttons that never wrap. */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.page-head h1 { margin: 6px 0; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.filter-row input { flex: 1 1 260px; }
.chips a .count { margin-left: 4px; }
.chips a[aria-current] .count { background: #fff; color: var(--brand-solid); }
table.orders td { vertical-align: middle; }
table.orders tr[hidden] { display: none; }
table.orders td:first-child { min-width: 220px; }
table.orders .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.orders .btn { white-space: nowrap; }
table.orders td:last-child { text-align: right; width: 1%; }
table.orders tr:hover td { background: var(--bg); }
.new-tag { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--info-bg); vertical-align: 1px; }
.list-foot { margin: 10px 0 0; }
@media (max-width: 700px) {
  table.orders, table.orders tbody, table.orders tr, table.orders td { display: block; }
  table.orders tr:first-child { position: absolute; left: -9999px; }
  table.orders tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.orders tr[hidden] { display: none; }
  table.orders td, table.orders td:first-child, table.orders td:last-child { border: 0; padding: 2px 0; min-width: 0; width: auto; text-align: left; }
  table.orders td:last-child { padding-top: 6px; }
  table.orders .btn.small, .chips a { padding: 9px 14px; }   /* touch targets */
}
#syncerror p { margin: 0 0 4px; overflow-wrap: anywhere; } #syncerror p:last-child { margin: 0; }

/* Orders list: pages and search over the whole list (build 2026-11-22.2). */
form.filter-row { margin: 0 0 10px; }
.filter-row input[type=search] { margin: 0; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; }
.pager ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pager ol a { display: inline-block; min-width: 32px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 7px; text-align: center;
  font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; }
.pager ol a:hover { background: var(--bg); }
.pager ol a[aria-current] { background: var(--brand-solid); border-color: var(--brand); color: #fff; font-weight: 700; }
.pager ol li { align-self: center; }
.pager .is-off { color: var(--muted); border-color: var(--line); cursor: default; }
.pager .btn { white-space: nowrap; }
@media (max-width: 700px) { .pager ol a { min-width: 40px; padding: 8px 10px; } .pager .btn.small { padding: 9px 14px; } }

/* Orders list: column titles that sort (build 2026-11-22.3). */
th a.sort { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; color: inherit; text-decoration: none; }
th a.sort:hover, th[aria-sort] a.sort { color: var(--ink); }
th a.sort:hover { text-decoration: underline; }
th a.sort .arrow { font-size: 11px; letter-spacing: 0; }
th[aria-sort] a.sort .arrow { color: var(--brand); }
/* On a phone the column titles become one row of sort links above the blocks. */
@media (max-width: 700px) {
  table.orders tr:first-child { position: static; display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 4px 0 8px; }
  table.orders th { display: block; border: 0; padding: 0; }
  table.orders th:last-child { display: none; }
  th a.sort { padding: 9px 0; }
}

/* Users page: extra rights of one user (build 2026-11-22.4). */
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
form.rights { gap: 8px 12px; } form.rights .btn { white-space: nowrap; }

/* Orders list: "Hidden" is the last group, set a little apart (build 2026-11-22.5). */
.chips a.chip-hidden { margin-left: 10px; border-style: dashed; }

/* Print gate: short intro and a labelled file field (build 2026-11-22.7). */
.lead { margin: 0 0 6px; } .gate-form { margin-top: 14px; } .gate-form label { margin-top: 0; }

/* Order page (build 2026-11-22.8): three numbered steps, the current one marked; the rest in tabs. */
.steps.flow { gap: 8px; margin-bottom: 14px; }
.steps.flow li { flex: 1 1 200px; padding: 0; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.steps.flow li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: inherit; text-decoration: none; }
.steps.flow li a:hover { text-decoration: underline; }
.steps.flow .step-state { display: block; font-weight: 400; font-size: 12.5px; }
.num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--line); }
.steps.flow li.done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); } .steps.flow li.done .num { background: var(--ok-solid); color: #fff; }
.steps.flow li.now { background: var(--info-bg); border-color: var(--brand); color: var(--brand); } .steps.flow li.now .num { background: var(--brand-solid); color: #fff; }
.steps.flow li.bad { background: var(--err-bg); border-color: var(--err); color: var(--err); } .steps.flow li.bad .num { background: var(--err-solid); color: #fff; }
.card.step { scroll-margin-top: 12px; }
.card.step h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card.step.is-now { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); } .card.step.is-now h2 .num { background: var(--brand-solid); color: #fff; }
.card.step.is-bad { border-color: var(--err); box-shadow: inset 4px 0 0 var(--err); } .card.step.is-bad h2 .num { background: var(--err-solid); color: #fff; }
.card.step.is-done h2 .num { background: var(--ok-solid); color: #fff; }
.card.step.is-later { background: var(--surface-2); } .card.step.is-later h2 { color: var(--muted); }
.card.step > p:last-child, .card.step > form:last-child { margin-bottom: 0; }
.step-tag { padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--line); color: var(--ink); }
.step-tag.is-done { background: var(--ok-bg); color: var(--ok); } .step-tag.is-now { background: var(--info-bg); color: var(--brand); }
.step-tag.is-bad { background: var(--err-bg); color: var(--err); } .step-tag.is-later { color: var(--muted); }
.tabs-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; border-bottom: 2px solid var(--line); }
.tabs-nav[hidden] { display: none; }
.tabs-nav a { padding: 9px 14px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.tabs-nav a:hover { color: var(--ink); }
.tabs-nav a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
[data-tab-panel][hidden] { display: none; }
.spaced { margin-top: 12px; } .sub-h { margin: 18px 0 8px; font-size: 16px; }

/* Order page (build 2026-11-22.9): a click on a step opens its card; the open step is marked. */
.has-steps .steps.flow li a { cursor: pointer; }
.has-steps .steps.flow li { position: relative; opacity: .8; }
.has-steps .steps.flow li.open { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }
.has-steps .steps.flow li.open::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; margin-left: -7px;
  background: inherit; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.has-steps .steps.flow { margin-bottom: 20px; }
[data-step][hidden] { display: none; }
.card.step h2:focus { outline: none; }
.card.step.just-opened { animation: opened .6s ease-out; }
@keyframes opened { from { background: var(--info-bg); } to { background: var(--card); } }
@media (prefers-reduced-motion: reduce) { .card.step.just-opened { animation: none; } }
.next-hint { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.next-hint .points { margin-top: 6px; }
@media (max-width: 700px) { .has-steps .steps.flow li.open::after { display: none; } }

/* Report page (build 2026-11-22.11): one "What to do now" card, the rest of the report in tabs. */
.card.next { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
ol.choices { list-style: none; margin: 0; padding: 0; counter-reset: choice; }
ol.choices > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
ol.choices > li:first-child { border-top: 0; padding-top: 2px; } ol.choices > li:last-child { padding-bottom: 0; }
ol.choices .grow { flex: 1 1 100%; } ol.choices form { margin: 0; }
ol.choices .grow > p { margin: 6px 0; } ol.choices .grow > form { margin-top: 8px; }
ol.choices details > summary { font-weight: 400; } ol.choices details[open] > summary { margin-bottom: 8px; }
ol.choices .compare.one { max-width: 320px; }
#p-record form.row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Report page (build 2026-11-22.12): the warnings that only one AI reading saw, in one list. */
details.one-reading > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
details.one-reading > summary b { display: inline; }
details.one-reading > p { margin: 6px 0; max-width: 90ch; }
details.one-reading .points .meta { display: inline; }

/* Log page (build 2026-11-22.14): search, groups, sorting, pages. */
.filter-row select { flex: 0 1 200px; margin: 0; }
table.log td { vertical-align: top; }
table.log .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.log .who { white-space: nowrap; }
table.log .what { min-width: 230px; max-width: 340px; }
table.log .detail { overflow-wrap: anywhere; }
table.log tr.entry:hover td { background: var(--bg); }
table.log tr.notice .what { font-weight: 700; }
.mark { display: inline-block; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--warn-solid); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.list-foot .mark { margin-right: 2px; }
@media (max-width: 700px) {
  table.log, table.log tbody, table.log tr, table.log td { display: block; }
  table.log tr:first-child { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 4px 0 8px; }
  table.log th { display: block; border: 0; padding: 0; }
  table.log th:last-child { display: none; }
  table.log tr.entry { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.log td { border: 0; padding: 2px 0; }
  table.log .who, table.log .what { white-space: normal; }
  table.log .who { font-weight: 600; }
  .filter-row select { flex: 1 1 100%; }
}

/* Search as you type (build 2026-11-22.15): the parts the search replaces. */
[data-live]:empty { display: none; }

/* Log page (build 2026-11-22.16): what the person did, what the app answered, details with labels. */
table.log .outcome { margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--muted); }
table.log tr.notice .outcome { color: var(--ink); }
table.log .part { display: block; overflow-wrap: anywhere; }
table.log .part .k { color: var(--muted); }

/* Confirm dialog (build 2026-11-22.17): replaces the browser's own confirm box. */
dialog.confirm { width: min(460px, calc(100vw - 32px)); padding: 22px 24px 20px; border: 0; border-top: 5px solid var(--brand);
  border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: 0 18px 50px var(--shadow); }
dialog.confirm::backdrop { background: var(--backdrop); }
dialog.confirm h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
dialog.confirm p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.confirm-actions .btn { min-height: 40px; }
@media (max-width: 700px) { .confirm-actions .btn { flex: 1 1 140px; min-height: 44px; } }

/* Print files page (build 2026-11-22.18): three step cards, like the order page. */
.pkg-source { margin: -4px 0 14px; overflow-wrap: anywhere; }
.card.step h3 { margin: 18px 0 6px; font-size: 16px; }
.card.step form > h3:first-of-type { margin-top: 6px; }
table.colours td { vertical-align: middle; }
table.colours td:first-child, table.colours th:first-child { width: 40px; }
table.colours .mono-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.colours input.target { margin: 0; min-width: 150px; max-width: 220px; font-variant-numeric: tabular-nums; }
.check-line { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 4px 0; }
.check-line input { flex: none; width: auto; margin: 4px 0 0; }
table.filelist .size { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
table.filelist a { overflow-wrap: anywhere; }
.card.step .preview { margin-top: 8px; }

/* Order page, step 3 (build 2026-11-22.18): what to do now, as a short list. */
.next-hint.todo { margin: 10px 0 4px; }
.next-hint.todo ol.points { margin: 8px 0 0; padding-left: 22px; }
.next-hint.todo li { margin: 8px 0; }
.next-hint.todo li .btn { display: table; margin: 8px 0 2px; }
.next-hint.todo li.is-done { color: var(--muted); }

/* Report of a print file check (build 2026-11-22.19): two named pictures, the print file and the approved mockup. */
.check-side .picture-of + .picture-of { margin-top: 12px; }
.pic-name { margin: -2px 0 8px; overflow-wrap: anywhere; }
.pic-tag { display: inline-block; margin-right: 6px; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; vertical-align: 2px; }
.pic-tag.is-checked { background: var(--brand-solid); color: #fff; }
.pic-tag.is-reference { background: var(--ok-bg); color: var(--ok); }
.picture-of#pic-print { border-top: 4px solid var(--brand); }
.picture-of#pic-mockup { border-top: 4px solid var(--ok); }
.pane.half { max-height: calc(50vh - 150px); min-height: 220px; }
@media (max-width: 1000px) { .pane.half { max-height: 60vh; } }

/* Settings: a set of choices with one line of help each (build 2026-11-22.20). */
fieldset.choice-set { margin: 16px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
fieldset.choice-set legend { padding: 0 6px; font-weight: 700; }
fieldset.choice-set .check-line { margin: 8px 0; }
fieldset.choice-set .check-line b { display: block; }
.step-tag.is-bad { background: var(--err-bg); color: var(--err); }

/* Order page: what the ERP asked (build 2026-11-22.21). */
.erp-card { margin-top: 14px; }
table.erp .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.erp td { vertical-align: middle; }

/* Home page: started orders (build 2026-11-22.22). */
table.started td { vertical-align: middle; }
table.started .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.started td:last-child { text-align: right; width: 1%; white-space: nowrap; }

/* Personal settings and the user name in the header (build 2026-11-22.24). */
header.top .me-link { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
header.top .me-link:hover { text-decoration-color: #fff; }
.me-facts { margin: 0 0 6px; } .me-facts dt { float: left; clear: left; width: 150px; color: var(--muted); } .me-facts dd { margin: 0 0 6px 150px; }
.theme-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.theme-choices label { display: block; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; font-weight: 600; }
.theme-choices label:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--info-bg); }
.theme-choices input { width: auto; margin: 0 6px 0 0; }
.theme-sample { display: flex; gap: 0; height: 34px; margin-top: 8px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-strong); }
.theme-sample span { flex: 1; }
/* The little samples show the theme they stand for, whatever theme is on now, so their colours are fixed here on purpose. */
.theme-sample .l1 { background: #f4f6f9; } .theme-sample .l2 { background: #fff; } .theme-sample .l3 { background: #1c3d6e; }
.theme-sample .d1 { background: #12161c; } .theme-sample .d2 { background: #1b2129; } .theme-sample .d3 { background: #2f5ea8; }
img { color-scheme: only light; }
.theme-note { margin: 10px 0 6px; }

/* Build 2026-11-29.2: the files of a mockup set on the report */
.setfiles { margin: 4px 0 10px; padding-left: 22px; }
.setfiles li { margin: 2px 0; overflow-wrap: anywhere; }

/* Build 2026-11-29.5: ERP order number on the order page; mockups of the ERP that wait for an order */
.erp-number { margin-top: 10px; align-items: center; gap: 8px 10px; } .erp-number label { margin: 0; }
.erp-waiting ul.plain { list-style: none; margin: 6px 0 0; padding: 0; }
.erp-waiting ul.plain > li { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.erp-waiting ul.cands > li { border-top: 0; padding: 4px 0 0 14px; } .erp-waiting ul.cands form { align-items: center; gap: 6px 10px; }

/* Build 2026-11-29.6: the page "Callbacks to the ERP" */
table.callbacks .btn { white-space: nowrap; }
table.callbacks .mono { word-break: normal; white-space: nowrap; }
table.callbacks td { vertical-align: top; }

/* Build 2026-11-29.7: what a person in the ERP may decide (Settings) */
fieldset.erp-may { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 14px 0 6px; }
fieldset.erp-may legend { font-weight: 600; padding: 0 6px; }

/* Build 2026-11-29.10: "No activity" - the mark on an order and the two lists */
.idle-tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
table.inactive .days { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; width: 1%; white-space: nowrap; }
table.inactive th:nth-child(2) { text-align: right; }
table.orders.inactive td:last-child { text-align: left; width: auto; }
.phone-only { display: none; }
@media (max-width: 700px) {
  .phone-only { display: inline; font-weight: 400; }
  table.inactive .days { text-align: left; width: auto; }
}
