/* Collision Assistant Portal
   Brand: black, white and red (#ce140b), set in config/brand.php and served as /brand.css.
   Two themes share one set of tokens: light (default) and dark. The theme follows the device
   setting unless the person picks Light or Dark (stored per person, applied as <html data-theme>).
   Status colors (blue = in progress, amber = waiting, green = done, red = problem) are kept
   separate from the brand red, which is used for actions and highlights. */

:root {
    color-scheme: light;
    --brand-red: #ce140b;
    --brand-red-dark: #a50f08;
    --brand-black: #000000;

    --ink: #111111;
    --ink-2: #4a4a4a;
    --ink-3: #737373;
    --paper: #f4f4f4;
    --surface: #ffffff;
    --surface-2: #f8f8f8;
    --surface-3: #ececec;
    --rule: #d6d6d6;
    --rule-soft: #ebebeb;
    --line-input: #b0b0b0;
    --line-strong: #8a8a8a;

    --steel: var(--brand-red);          /* primary actions */
    --steel-dark: var(--brand-red-dark);
    --on-steel: #ffffff;
    --action-text: var(--brand-red);    /* red text links/toggles */
    --signal: var(--brand-red);         /* highlights: active menu, high priority */
    --accent-text: #b3120a;
    --priority: #c4161c;               /* high priority markers: always red */
    --link: #111111;
    --link-hover: var(--brand-red);
    --focus: var(--brand-red);
    --focus-ring: rgba(206, 20, 11, 0.22);

    --info: #2563a8;
    --info-text: #1d4f86;
    --info-soft: #e6eef8;
    --info-faint: #f1f6fc;
    --info-border: #c3d5ec;
    --warn-strong: #d48a00;
    --warn-text: #7a4b00;
    --warn-soft: #fdf2d9;
    --warn-faint: #fdf9ef;
    --warn-border: #efd49a;
    --signal-soft: var(--warn-soft);
    --ok: #1d7a4f;
    --ok-text: #14573a;
    --ok-soft: #e3f3ea;
    --ok-border: #b5dcc6;
    --danger: #b42318;
    --danger-text: #8a1c13;
    --danger-soft: #fdecea;
    --danger-border: #f2c2bd;

    --chrome-bg: #ffffff;               /* sidebar and mobile top bar */
    --chrome-fg: #3a3a3a;
    --chrome-strong: #000000;
    --chrome-muted: #7a7a7a;
    --chrome-hover: #f3f3f3;
    --chrome-active: #f6f6f6;
    --chrome-rule: #e2e2e2;
    --chrome-btn-border: #cfcfcf;

    --toast-bg: #111111;
    --toast-fg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.18);
    --shadow-soft: rgba(0, 0, 0, 0.05);
    --backdrop: rgba(0, 0, 0, 0.45);

    --font: "Public Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
    --radius: 6px;
    --sidebar: 248px;
}

/* Dark theme tokens (applied by the device setting or by choosing Dark) */
:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #ededed;
    --ink-2: #b8b8b8;
    --ink-3: #8c8c8c;
    --paper: #0e0e0e;
    --surface: #171717;
    --surface-2: #1e1e1e;
    --surface-3: #262626;
    --rule: #333333;
    --rule-soft: #262626;
    --line-input: #4d4d4d;
    --line-strong: #6b6b6b;

    --steel-dark: #e0261c;
    --action-text: #ff6b63;
    --accent-text: #ff6b63;
    --priority: #ff6b63;
    --link: #ededed;
    --link-hover: #ff6b63;
    --focus: #ff4d43;
    --focus-ring: rgba(255, 77, 67, 0.3);

    --info: #5fa0e8;
    --info-text: #9cc4f2;
    --info-soft: #14263b;
    --info-faint: #111c29;
    --info-border: #24456b;
    --warn-strong: #e8a92e;
    --warn-text: #f3c86b;
    --warn-soft: #2e2410;
    --warn-faint: #1f1a0f;
    --warn-border: #5a4618;
    --ok: #4cc38a;
    --ok-text: #7fdcaa;
    --ok-soft: #10281c;
    --ok-border: #1f4d35;
    --danger: #f2655d;
    --danger-text: #ffa39d;
    --danger-soft: #2e1413;
    --danger-border: #5e2420;

    --chrome-bg: #000000;
    --chrome-fg: #cfcfcf;
    --chrome-strong: #ffffff;
    --chrome-muted: #8c8c8c;
    --chrome-hover: rgba(255, 255, 255, 0.06);
    --chrome-active: rgba(255, 255, 255, 0.09);
    --chrome-rule: #222222;
    --chrome-btn-border: #444444;

    --toast-bg: #f2f2f2;
    --toast-fg: #111111;
    --shadow: rgba(0, 0, 0, 0.6);
    --shadow-soft: rgba(0, 0, 0, 0.4);
    --backdrop: rgba(0, 0, 0, 0.65);
}

/* Logos: each image is marked for the background it suits; only one shows */
:root:not([data-theme="dark"]) .logo-for-dark { display: none !important; }
:root[data-theme="dark"] .logo-for-light { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--ink); background: var(--paper); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--ink-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* ---------- App shell ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
    background: var(--chrome-bg); color: var(--chrome-fg); border-right: 1px solid var(--chrome-rule);
    display: flex; flex-direction: column; padding: 24px 0 20px;
    z-index: 20;
}
.brand { display: block; padding: 0 24px 24px; text-decoration: none; color: var(--chrome-strong); }
.brand__name { display: block; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand__sub { display: block; font-size: 13px; color: var(--chrome-muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__link {
    position: relative; display: block; padding: 10px 24px 10px 28px;
    color: var(--chrome-fg); text-decoration: none; font-weight: 600; font-size: 14px;
}
.nav__link:hover { color: var(--chrome-strong); background: var(--chrome-hover); }
/* The current page is marked like a painted lane line. */
.nav__link.is-active { color: var(--chrome-strong); background: var(--chrome-active); }
.nav__link.is-active::before {
    content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 4px;
    background: repeating-linear-gradient(to bottom, var(--signal) 0 6px, transparent 6px 10px);
}

.sidebar__foot { margin-top: auto; padding: 16px 24px 0; border-top: 1px solid var(--chrome-rule); }
.who { font-size: 13px; color: var(--chrome-muted); }
.who strong { display: block; color: var(--chrome-strong); font-size: 14px; }

.shell { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { display: none; }
.main { max-width: 1120px; padding: 32px 40px 64px; }

/* ---------- Page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head__sub { color: var(--ink-2); margin: 6px 0 0; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head h1 .badge { vertical-align: middle; margin-left: 8px; }
.crumbs { font-size: 13px; margin: 0 0 6px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel__title { margin-bottom: 14px; }
.panel__head .panel__title { margin-bottom: 0; }
.panel__subtitle { margin: 20px 0 8px; }
.panel--notice { border-left: 4px solid var(--signal); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.split > .panel { margin-bottom: 0; }
.split + .panel { margin-top: 20px; }
.empty { color: var(--ink-2); margin: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.stat { background: var(--surface); padding: 18px 20px; text-decoration: none; color: inherit; }
a.stat:hover { background: var(--surface-2); }
.stat__num { display: block; font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { display: block; font-size: 13px; color: var(--ink-2); margin-top: 4px; }

/* ---------- Lists ---------- */
.activity, .people { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 10px 0; border-top: 1px solid var(--rule-soft); display: flex; gap: 6px; flex-wrap: wrap; }
.activity li:first-child { border-top: 0; padding-top: 0; }
.activity__who { font-weight: 600; }
.activity time { margin-left: auto; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.people li { padding: 10px 0; border-top: 1px solid var(--rule-soft); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.people li:first-child { border-top: 0; padding-top: 0; }
.people li span:not(.badge) { color: var(--ink-2); font-size: 14px; flex: 1 1 200px; }
.people .badge { margin-left: auto; }

.details { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0; }
.details dt { color: var(--ink-3); font-size: 14px; }
.details dd { margin: 0; }
.notes { white-space: normal; color: var(--ink-2); }

/* ---------- Tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 13px; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.strong-link { font-weight: 600; }
.row-actions { white-space: nowrap; text-align: right; padding-right: 12px; }
.row-actions .btn--sm { padding: 6px 6px; }
.nowrap { white-space: nowrap; }
.row-actions form { display: inline; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; line-height: 1.5; }
.badge--active { background: var(--ok-soft); color: var(--ok); }
.badge--inactive { background: var(--surface-3); color: var(--ink-3); }
.badge--invited { background: var(--warn-soft); color: var(--warn-text); }

/* ---------- Forms ---------- */
.form fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.form legend { font-weight: 600; font-size: 16px; margin-bottom: 12px; padding: 0; }
.stack > * + * { margin-top: 16px; }
.field { margin-bottom: 16px; min-width: 0; }
.stack .field { margin-bottom: 0; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--ink-3); }
.input {
    display: block; width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-input); border-radius: 4px;
}
.input:focus { outline: none; border-color: var(--action-text); box-shadow: 0 0 0 3px var(--focus-ring); }
.input[readonly] { background: var(--surface-2); color: var(--ink-2); }
textarea.input { resize: vertical; }
input.input, select.input { height: 44px; }
input[type="search"].input { -webkit-appearance: none; appearance: none; }
.hint { font-size: 13px; color: var(--ink-3); margin: 6px 0 0; }
.hint:not(:last-child) { margin-bottom: 12px; }            /* a hint followed by more content never touches it */
.has-error .input { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 13px; margin: 6px 0 0; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 18px; }
.form__actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.role-help { margin: 4px 0 20px; font-size: 14px; color: var(--ink-2); }
.role-help summary { cursor: pointer; color: var(--action-text); font-weight: 600; }
.role-help dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 12px 0 0; }
.role-help dt { font-weight: 600; color: var(--ink); }
.role-help dd { margin: 0; }
.is-hidden { display: none !important; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 170px; }
.filters .field:first-child { flex: 1 1 220px; }
.filters__actions { display: flex; gap: 4px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: 600 14px/1 var(--font); padding: 11px 16px; border-radius: 4px; cursor: pointer;
    border: 1px solid transparent; text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--steel); color: var(--on-steel); }
.btn--primary:hover { background: var(--steel-dark); color: var(--on-steel); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-input); }
.btn--secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.btn--link { background: none; color: var(--action-text); padding-left: 8px; padding-right: 8px; }
.btn--link:hover { text-decoration: underline; }
.btn--danger-text { color: var(--danger); }
.btn--ghost-light { background: none; color: var(--chrome-fg); border-color: var(--chrome-btn-border); padding: 8px 14px; }
.btn--ghost-light:hover { border-color: var(--chrome-strong); color: var(--chrome-strong); }
.btn--sm { padding: 6px 10px; font-size: 13px; }
.btn--block { width: 100%; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; border: 1px solid; font-size: 14px; }
.alert p { margin: 0 0 8px; }
.alert--success { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok-text); }
.alert--error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
.alert--info { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font-size: 13px; }

/* ---------- Guest (login, invite, reset) ---------- */
.guest { display: grid; grid-template-columns: minmax(280px, 40%) 1fr; min-height: 100vh; }
.guest__panel { position: relative; background: var(--brand-black); color: #fff; padding: 48px; display: flex; align-items: flex-end; overflow: hidden; }
.guest__brand { position: relative; z-index: 1; max-width: 360px; padding-right: 56px; }
.guest__name { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 14px; }
.guest__tag { color: #c9c9c9; font-size: 16px; margin: 0; }
/* A single painted lane line running the height of the panel. */
.lane {
    position: absolute; top: 0; bottom: 0; right: 40px; width: 6px;
    background: repeating-linear-gradient(to bottom, var(--signal) 0 44px, transparent 44px 80px);
    opacity: 0.9;
}
.guest__main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.guest__card { width: 100%; max-width: 420px; }
.guest__title { font-size: 26px; margin-bottom: 8px; }
.guest__lead { color: var(--ink-2); margin-bottom: 20px; }
.guest__card form { margin-top: 20px; }
.guest__alt { margin-top: 18px; font-size: 14px; }
.guest__note { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-3); }

.error-page { max-width: 520px; padding: 48px 0; }
.error-page__code { font-size: 14px; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; }
.error-page h1 { margin-bottom: 12px; }
.guest__card .error-page { padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
    .sidebar.is-open { transform: none; box-shadow: 0 0 0 100vmax var(--backdrop); }
    .shell { margin-left: 0; }
    .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--chrome-bg); color: var(--chrome-strong); border-bottom: 1px solid var(--chrome-rule); position: sticky; top: 0; z-index: 10; }
    .topbar__brand { font-weight: 700; }
    .menu-toggle { font: 600 14px var(--font); background: none; border: 1px solid var(--chrome-btn-border); color: var(--chrome-strong); padding: 6px 12px; border-radius: 4px; }
    .main { padding: 24px 16px 48px; }
    .guest { grid-template-columns: 1fr; }
    .guest__panel { padding: 28px 24px; min-height: 0; }
    .guest__name { font-size: 24px; margin-bottom: 6px; }
    .guest__tag { font-size: 14px; }
    .lane { right: auto; left: 0; top: auto; bottom: 0; width: 100%; height: 5px; background: repeating-linear-gradient(to right, var(--signal) 0 44px, transparent 44px 80px); }
}
@media (max-width: 600px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .details { grid-template-columns: 1fr; gap: 2px; }
    .details dd { margin-bottom: 10px; }
    h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
@media print {
    .sidebar, .topbar, .page-head__actions, .filters, .row-actions { display: none; }
    .shell { margin: 0; }
    body { background: #fff; color: #000; }
}

/* ===================== Phase 2: requests ===================== */
.mono, #f_vin { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; }
#f_vin { text-transform: uppercase; }
.grid-3-even { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.request-form fieldset { border-top: 1px solid var(--rule-soft); padding-top: 20px; }
.request-form fieldset:first-of-type { border-top: 0; padding-top: 0; }

/* Status badges: open states share the steel family, attention states use amber, done states are quiet. */
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
/* Status colors come from the workflow (blue = working, amber = needs someone, green = done, gray = stopped). */
.status--blue { background: var(--info-faint); color: var(--info-text); border-color: var(--info-border); }
.status--amber { background: var(--warn-soft); color: var(--warn-text); }
.status--green { background: var(--ok-soft); color: var(--ok); }
.status--gray { background: var(--surface-3); color: var(--ink-3); }
.status--red { background: var(--danger-soft); color: var(--danger-text); }
.hold-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.5; white-space: nowrap; background: var(--warn-soft); color: var(--warn-text); }

/* High priority: the lane-marker amber, so it reads the same everywhere. */
.flag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--priority); padding-left: 10px; position: relative; white-space: nowrap; }
.flag::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; background: repeating-linear-gradient(to bottom, var(--priority) 0 4px, transparent 4px 6px); }

.stat--attention { box-shadow: inset 4px 0 0 var(--signal); }

.filters--requests { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.filters--requests .filters__search { grid-column: 1 / -1; }
.filters--requests .field { min-width: 0; }
.filters--requests .check, .filters--requests .filters__more, .filters--requests .filters__actions { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--action-text); }
.filters__more summary { cursor: pointer; color: var(--action-text); font-weight: 600; font-size: 14px; }
.filters__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.filters__grid .field { margin: 0; }
.result-count { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.group-row th { background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--rule); }
.table--requests td { font-size: 14px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }
.pager__info { font-size: 14px; color: var(--ink-2); }

.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.req-list li:first-child { border-top: 0; padding-top: 0; }
.req-list__main { flex: 1 1 200px; color: var(--ink-2); font-size: 14px; }

.request-title { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.request-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.request-grid .panel { margin: 0; }
.request-grid .details { grid-template-columns: 150px 1fr; }
.timeline { list-style: none; margin: 0 0 12px; padding: 0; }
.timeline li { padding: 0 0 12px 16px; border-left: 2px solid var(--rule); margin-left: 4px; }
.timeline li span { font-size: 13px; color: var(--ink-3); margin-left: 6px; }
.timeline li p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }

@media (max-width: 960px) {
    .request-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .grid-3-even { grid-template-columns: 1fr; }
    .filters--requests { grid-template-columns: 1fr 1fr; }
    .request-grid .details { grid-template-columns: 1fr; }
}
@media print {
    .request-grid { grid-template-columns: 1fr 1fr; }
    .panel { break-inside: avoid; border-color: #999; }
    .alert, .crumbs { display: none; }
}
.table--requests th, .table--requests td { padding: 10px 12px; }
.table--requests td { line-height: 1.4; }

/* ===================== Phase 3: request workspace ===================== */
.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.workspace .panel { margin-bottom: 20px; }
.detail-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.detail-groups__title { font-size: 14px; color: var(--ink-2); margin: 4px 0 10px; }
.detail-groups .details { grid-template-columns: 140px 1fr; margin-bottom: 16px; }

.callout { background: var(--warn-soft); border: 1px solid var(--warn-border); border-left: 6px solid var(--warn-strong); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.callout h2 { font-size: 16px; margin-bottom: 6px; }
.callout p { margin: 0 0 6px; }

.thread { list-style: none; margin: 0 0 20px; padding: 0; }
.thread__item { padding: 14px 16px; border: 1px solid var(--rule-soft); border-radius: var(--radius); margin-bottom: 10px; background: var(--surface); }
.thread__item--ca { border-left: 3px solid var(--info); }
.thread__item--internal { background: var(--warn-faint); border-color: var(--warn-border); border-left: 3px solid var(--warn-strong); }
.thread__item--system { background: transparent; border-style: dashed; padding: 10px 16px; }
.thread__item--system .thread__body { color: var(--ink-2); font-size: 14px; }
.thread__meta { font-size: 13px; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.thread__meta time { color: var(--ink-3); }
.thread__body { overflow-wrap: anywhere; }
.thread__files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.thread__files img { display: block; max-width: 220px; max-height: 160px; border-radius: 4px; border: 1px solid var(--rule); margin-bottom: 4px; object-fit: cover; }
.tag-internal { font-size: 12px; font-weight: 600; color: var(--warn-text); background: var(--warn-soft); padding: 1px 8px; border-radius: 999px; }

.composer { border-top: 1px solid var(--rule); padding-top: 18px; }
.composer__title { margin-bottom: 10px; }
.composer__row { display: grid; grid-template-columns: 2fr 1fr; gap: 0 16px; }
.input--file { height: auto !important; padding: 8px; }
.visibility { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 20px; flex-wrap: wrap; }

.status-now { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.stack-sm .field { margin-bottom: 12px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }
.files { list-style: none; margin: 0; padding: 0; }
.files li { padding: 10px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; }
.files li:first-child { border-top: 0; padding-top: 0; }
.files__name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.files li .muted { display: block; font-size: 13px; }
.files form { display: inline; }

@media (max-width: 1100px) {
    .workspace { grid-template-columns: 1fr; }
    .detail-groups { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .composer__row { grid-template-columns: 1fr; }
    .detail-groups .details { grid-template-columns: 1fr; }
}
@media print {
    .composer, .workspace__aside form, .inline-form, .files form { display: none; }
    .workspace { grid-template-columns: 1fr; }
}

/* ===================== Phase 4: tasks and board ===================== */
.progress { display: block; width: 100%; height: 6px; margin: 0 0 14px; border: 0; border-radius: 999px; background: var(--rule-soft); overflow: hidden; -webkit-appearance: none; appearance: none; }
.progress::-webkit-progress-bar { background: var(--rule-soft); border-radius: 999px; }
.progress::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
.progress::-moz-progress-bar { background: var(--ok); border-radius: 999px; }

.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.task:first-child { border-top: 0; }
.task__check { flex: none; }
.checkbox { width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 5px; background: var(--surface); cursor: pointer; padding: 0; margin-top: 1px; position: relative; }
.checkbox:hover { border-color: var(--action-text); }
.checkbox.is-checked { background: var(--ok); border-color: var(--ok); }
.checkbox.is-checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--on-steel); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.task__body { flex: 1; min-width: 0; }
.task__title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.task--done .task__title { color: var(--ink-3); text-decoration: line-through; font-weight: 400; }
.task__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.due--overdue { color: var(--danger); font-weight: 600; }
.tag-firm { font-size: 12px; font-weight: 600; color: var(--info-text); background: var(--info-soft); padding: 1px 8px; border-radius: 999px; }
.task__edit summary, .task__add summary { cursor: pointer; font-size: 13px; color: var(--action-text); font-weight: 600; margin-top: 4px; list-style: none; }
.task__add summary { color: var(--ink); display: inline-flex; }
.task__edit summary::-webkit-details-marker, .task__add summary::-webkit-details-marker { display: none; }
.task-form { margin: 10px 0 6px; padding: 12px; background: var(--surface-2); border-radius: var(--radius); }
.task-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.task-form__title { grid-column: 1 / -1; }
.task-form__grid .field { margin-bottom: 10px; }
.tasks__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule-soft); }
.tasks__actions .task__add { flex: 1 1 100%; }
.task-count { font-size: 12px; }
.task-group--overdue { border-left: 4px solid var(--danger); }
.task-banner { display: block; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius); background: var(--danger-soft); border: 1px solid var(--danger-border); color: var(--danger-text); text-decoration: none; font-size: 14px; }
.task-banner:hover { color: var(--danger-text); border-color: var(--danger); }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.main:has(.board) { max-width: none; }
.board__col { background: var(--surface-3); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.board__head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin: 2px 2px 8px; }
.board__count { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.board__note { font-size: 12px; color: var(--ink-3); margin: -4px 2px 8px; }
.board__cards { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; cursor: grab; box-shadow: 0 1px 0 var(--shadow-soft); }
.card:active { cursor: grabbing; }
.card--high { border-left: 4px solid var(--priority); }
.card--ghost { opacity: 0.4; }
.card__ref { font-weight: 700; font-size: 14px; margin-right: 6px; }
.card__client { margin: 6px 0 2px; font-weight: 600; font-size: 14px; }
.card__meta { margin: 0; font-size: 13px; color: var(--ink-2); }
.card__foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.card__tasks { font-size: 12px; color: var(--ink-2); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.avatar--empty { background: var(--rule); color: var(--ink-2); }
.note-dialog { border: 0; border-radius: 8px; padding: 24px; width: min(460px, 92vw); box-shadow: 0 20px 50px var(--shadow); background: var(--surface); color: var(--ink); }
.note-dialog::backdrop { background: var(--backdrop); }
.note-dialog h2 { font-size: 18px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--toast-bg); color: var(--toast-fg); padding: 12px 16px; border-radius: var(--radius); font-size: 14px; max-width: 360px; z-index: 50; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.toast--error { background: var(--danger); }

/* Checklist settings */
.tpl { border-top: 1px solid var(--rule-soft); padding: 14px 0 6px; position: relative; }
.tpl:first-of-type { border-top: 0; }
.tpl--inactive { opacity: 0.6; }
.tpl-grid { display: grid; grid-template-columns: 2.4fr 1.2fr 1.4fr 1.7fr 0.9fr 0.6fr auto; gap: 0 12px; align-items: end; }
.tpl-grid .field { margin-bottom: 8px; }
.tpl-grid__active { margin-bottom: 18px; }
.tpl__actions { display: flex; gap: 8px; }
.tpl__delete { position: absolute; right: 0; bottom: 8px; }
@media (max-width: 1200px) { .tpl-grid { grid-template-columns: 1fr 1fr; } .tpl-grid__title { grid-column: 1 / -1; } }
@media (max-width: 600px) { .task-form__grid { grid-template-columns: 1fr; } }

/* ===================== Phase 4b: task statuses and task board ===================== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin: -8px 0 18px; }
.tabs__link { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs__link:hover { color: var(--ink); }
.tabs__link.is-active { color: var(--ink); border-bottom-color: var(--signal); }
.tstatus { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.tstatus--todo { background: var(--surface-3); color: var(--ink-2); }
.tstatus--in_progress { background: var(--info-soft); color: var(--info-text); }
.tstatus--waiting { background: var(--warn-soft); color: var(--warn-text); white-space: normal; }
.tstatus--done { background: var(--ok-soft); color: var(--ok); }
.board--tasks { grid-auto-columns: minmax(240px, 1fr); }
.card--task .card__title { margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.card__reason { margin: 6px 0 0; font-size: 13px; color: var(--warn-text); background: var(--warn-soft); padding: 4px 8px; border-radius: 4px; }
.card__taskline { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); }
.task-status { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.input--sm { height: 32px !important; padding: 4px 8px; font-size: 13px; width: auto; }
.task-status .input--sm[name="waiting_reason"] { flex: 1 1 160px; }
.check--warn { font-size: 13px; color: var(--danger-text); }
.filters__check { align-self: center; margin-top: 22px; }
.task-controls { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.task-controls form { margin: 0; }

/* ===================== Phase 5a: task details and notifications ===================== */
.task__desc { margin: 4px 0 2px; font-size: 14px; color: var(--ink-2); white-space: normal; overflow-wrap: anywhere; }
.task__desc--clamp, .card__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__desc { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.tpl-grid__desc { grid-column: 1 / -1; }
.nav__badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--signal); color: var(--on-steel); font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.notes { list-style: none; padding: 0; }
.note { border-top: 1px solid var(--rule-soft); }
.note:first-child { border-top: 0; }
.note__link { display: block; padding: 12px 8px 12px 14px; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.note__link:hover { background: var(--surface-2); color: var(--ink); }
.note--unread .note__link { border-left-color: var(--info); background: var(--info-faint); }
.note--unread .note__title { font-weight: 700; }
.note--action .note__link { border-left-color: var(--signal); }
.note__title { display: block; font-weight: 600; }
.note__body { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.note__meta { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.pref-list { display: grid; gap: 10px; margin: 12px 0 16px; }

/* ===================== Phase 5b: reports and email settings ===================== */
.stats--6 { grid-template-columns: repeat(6, 1fr); }
.presets { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart__grid { stroke: var(--rule-soft); stroke-width: 1; }
.chart__axis { fill: var(--ink-3); font-size: 13px; font-family: var(--font); }
.chart__bar--a, .key--a { fill: var(--ink); background: var(--ink); }
.chart__bar--b, .key--b { fill: var(--ok); background: var(--ok); }
.chart__legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 8px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hbars li { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 10px; font-size: 14px; }
.hbars__bar { width: 100%; height: 12px; border: 0; border-radius: 3px; background: var(--rule-soft); -webkit-appearance: none; appearance: none; }
.hbars__bar::-webkit-progress-bar { background: var(--rule-soft); border-radius: 3px; }
.hbars__bar::-webkit-progress-value { background: var(--ink-2); border-radius: 3px; }
.hbars__bar::-moz-progress-bar { background: var(--ink-2); border-radius: 3px; }
.hbars__num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.details--inline { grid-template-columns: repeat(4, auto 1fr); }
@media (max-width: 1100px) { .stats--6 { grid-template-columns: repeat(3, 1fr); } .details--inline { grid-template-columns: auto 1fr; } }
@media (max-width: 600px) { .stats--6 { grid-template-columns: 1fr 1fr; } .hbars li { grid-template-columns: 100px 1fr 32px; } }

/* ===================== Phase 6: two-factor, system check, legal ===================== */
.input--code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 20px; letter-spacing: 0.2em; max-width: 220px; }
.inline-form--code { margin-top: 8px; }
.inline-form--code .input { flex: 0 1 200px; }
.setup-steps { padding-left: 20px; display: grid; gap: 16px; }
.qr { width: 200px; height: 200px; margin: 10px 0; background: #fff; padding: 6px; border: 1px solid var(--rule); border-radius: var(--radius); }
.qr svg { width: 100%; height: 100%; display: block; }
.setup-key { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.codes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(4, max-content); gap: 8px 24px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px; }
.readiness { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; border: 1px solid; }
.readiness--ok { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok-text); }
.readiness--warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn-text); }
.readiness--bad { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
.checks { list-style: none; padding: 0; margin: 0 0 12px; }
.check-row { display: grid; grid-template-columns: 56px 1fr; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; }
.check-row:first-child { border-top: 0; }
.check-row__status { grid-row: span 2; font-size: 12px; font-weight: 700; border-radius: 999px; text-align: center; padding: 2px 0; align-self: start; }
.check-row--ok .check-row__status { background: var(--ok-soft); color: var(--ok); }
.check-row--warn .check-row__status { background: var(--warn-soft); color: var(--warn-text); }
.check-row--bad .check-row__status { background: var(--danger-soft); color: var(--danger); }
.check-row__label { font-weight: 600; }
.check-row__detail { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.backups { margin-top: 12px; }
.log { background: #0b0b0b; color: #e6e6e6; padding: 14px; border-radius: var(--radius); font-size: 12px; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.legal { max-width: 720px; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin: 24px 0 8px; }
.legal__draft { background: var(--warn-soft); border: 1px solid var(--warn-border); padding: 10px 14px; border-radius: var(--radius); font-weight: 600; color: var(--warn-text); }
.guest__card .legal { max-width: none; }
.legal-links { margin-top: 24px; font-size: 13px; display: flex; gap: 14px; }
.legal-links a { color: var(--ink-3); }
.legal-links--dark { margin-top: 12px; }
.legal-links--dark a { color: var(--chrome-muted); }
@media (max-width: 600px) { .codes { grid-template-columns: repeat(2, max-content); } }

/* ===================== 0.9.0: updates and branding ===================== */
.brand__logo { display: block; max-width: 180px; max-height: 48px; margin-bottom: 6px; }
.guest__logo { display: block; max-width: 260px; max-height: 90px; margin-bottom: 14px; }
.version-tag { font-size: 12px; color: var(--chrome-muted); margin: 10px 0 0; }
.version-now { font-size: 30px; font-weight: 700; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.update-done { border-left: 4px solid var(--ok); background: var(--ok-soft); }
.update-review { border-left: 4px solid var(--info); }
.error-list { margin: 0; padding-left: 18px; }
.files-list summary { cursor: pointer; color: var(--action-text); font-weight: 600; font-size: 14px; margin: 8px 0; }
.files-list ul { font-size: 12px; max-height: 200px; overflow: auto; }
.history { list-style: none; margin: 0; padding: 0; }
.history__item { border-top: 1px solid var(--rule-soft); padding: 12px 0; }
.history__item:first-child { border-top: 0; padding-top: 0; }
.history__head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.history__item ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }

/* ===================== 0.9.2: brand, light and dark mode ===================== */
.brand__logo { max-width: 190px; height: auto; max-height: none; margin-bottom: 4px; }
.guest__logo { max-width: 300px; height: auto; max-height: none; }
.topbar__logo { display: inline-block; height: 26px; width: auto; vertical-align: middle; }
.guest__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.guest__foot .legal-links { margin: 0; }
.theme-switch { margin: 12px 0 0; }
.theme-switch fieldset { border: 0; padding: 2px; margin: 0; display: inline-flex; background: var(--surface-3); border-radius: 999px; }
.theme-switch__opt { position: relative; }
.theme-switch__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-switch__opt span { display: inline-block; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); border-radius: 999px; cursor: pointer; }
.theme-switch__opt input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--shadow-soft); }
.theme-switch__opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.sidebar .theme-switch fieldset { background: var(--chrome-hover); }
.sidebar .theme-switch__opt span { color: var(--chrome-muted); }
.sidebar .theme-switch__opt input:checked + span { background: var(--chrome-bg); color: var(--chrome-strong); box-shadow: 0 0 0 1px var(--chrome-rule); }
.guest__foot .theme-switch { margin: 0; }
/* readable form controls and scrollbars in dark mode */
:root[data-theme="dark"] select.input option { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .qr { border-color: #fff; }
:root[data-theme="dark"] .progress, :root[data-theme="dark"] .hbars__bar { background: var(--surface-3); }
@media print {
    .theme-switch { display: none; }
}

/* ===================== 0.9.3: quick views ===================== */
.views { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -6px 0 16px; }
.view-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.view-chip:hover { border-color: var(--ink-3); color: var(--ink); }
.view-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.view-chip--saved a { color: inherit; text-decoration: none; }
.view-chip--saved form { display: inline; margin: 0; }
.view-chip__x { background: none; border: 0; color: inherit; opacity: 0.6; font-size: 15px; line-height: 1; padding: 0 0 0 2px; cursor: pointer; }
.view-chip__x:hover { opacity: 1; }
.view-chip--add { border-style: dashed; color: var(--action-text); list-style: none; }
.view-chip--add::-webkit-details-marker { display: none; }
.view-save[open] .inline-form { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.view-save { display: inline-block; }
.view-save[open] { display: inline-flex; align-items: center; gap: 8px; }
.view-save[open] .inline-form { margin-left: 0; }
.view-save .input--sm { width: 230px; }

/* ===================== 0.9.6: sidebar with icons ===================== */
.icon { width: 18px; height: 18px; flex: none; display: block; }
.brand { padding-bottom: 18px; }

/* the one primary action in the menu */
.nav-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 0 20px 18px; padding: 10px 14px; border-radius: var(--radius);
    background: var(--steel); color: var(--on-steel); font-weight: 700; font-size: 14px; text-decoration: none;
}
.nav-cta:hover { background: var(--steel-dark); color: var(--on-steel); }
.nav-cta.is-active { box-shadow: inset 0 0 0 2px var(--chrome-bg), 0 0 0 2px var(--steel); }
.nav-cta .icon { width: 16px; height: 16px; stroke-width: 2.25; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__link { display: flex; align-items: center; gap: 12px; padding: 9px 24px; position: relative; }
.nav__icon { color: var(--chrome-muted); transition: color .15s ease; }
.nav__link:hover .nav__icon { color: var(--chrome-strong); }
.nav__link.is-active .nav__icon { color: var(--brand-red); }
:root[data-theme="dark"] .nav__link.is-active .nav__icon { color: var(--action-text); }
.nav__label { flex: 1 1 auto; min-width: 0; }
.nav__link .nav__badge { margin-left: 0; }
.nav__group { margin: 18px 24px 6px; padding-top: 14px; border-top: 1px solid var(--chrome-rule); font-size: 12px; font-weight: 600; color: var(--chrome-muted); }

/* account card at the bottom */
.sidebar__foot { padding: 14px 16px 0; }
.account { display: flex; align-items: center; gap: 6px; }
.account form { margin: 0; }
.account__card {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px;
    padding: 8px; border-radius: var(--radius); text-decoration: none; color: var(--chrome-strong);
}
.account__card:hover, .account__card.is-active { background: var(--chrome-hover); color: var(--chrome-strong); }
.account__avatar {
    flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--chrome-strong); color: var(--chrome-bg); font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.account__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.account__text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account__text span { font-size: 12px; color: var(--chrome-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account__logout {
    flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius);
    background: none; border: 1px solid var(--chrome-rule); color: var(--chrome-muted); cursor: pointer;
}
.account__logout:hover { color: var(--brand-red); border-color: var(--brand-red); }
.account__logout:focus-visible, .account__card:focus-visible, .nav-cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sidebar__foot .theme-switch { margin: 12px 8px 0; }
.sidebar__foot .legal-links { margin: 12px 8px 0; align-items: center; }
.legal-links .version-tag { margin: 0 0 0 auto; color: var(--chrome-muted); font-size: 12px; }

.menu-toggle { display: inline-flex; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .nav__icon { transition: none; } }

/* ===================== 0.9.7: Settings > Themes ===================== */
.theme-grid { border: 0; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.theme-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.theme-card:hover { border-color: var(--ink-3); }
.theme-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-card.is-current, .theme-card:has(input:checked) { border-color: var(--p-accent); box-shadow: 0 0 0 2px var(--p-accent); }
.theme-card__name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; margin-top: 4px; }
.theme-card__desc { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.theme-card__check { display: none; font-size: 12px; font-weight: 700; color: #fff; background: var(--p-accent); padding: 1px 8px; border-radius: 999px; }
.theme-card.is-current .theme-card__check, .theme-card:has(input:checked) .theme-card__check { display: inline-block; }
/* mini preview of the portal in that theme */
.theme-card__preview { display: grid; grid-template-columns: 34% 1fr; height: 104px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.12); background: var(--p-paper); }
.tp-side { display: flex; flex-direction: column; gap: 7px; padding: 10px 8px; background: var(--p-chrome); }
.tp-btn { height: 12px; border-radius: 3px; background: var(--p-accent); }
.tp-item { height: 6px; width: 70%; border-radius: 3px; background: rgba(128, 128, 128, 0.35); }
.tp-item--on { background: var(--p-accent); width: 80%; }
.tp-main { display: flex; flex-direction: column; gap: 7px; padding: 12px 10px; }
.tp-line { height: 6px; border-radius: 3px; background: rgba(128, 128, 128, 0.3); }
.tp-line--head { width: 60%; height: 9px; background: rgba(60, 60, 60, 0.55); }
.tp-line--short { width: 45%; }
.tp-chip { margin-top: auto; width: 42%; height: 14px; border-radius: 4px; background: var(--p-accent); }
.theme-saved { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .theme-card { transition: none; } }

/* ===================== 0.9.8: Testing (/qa) and User guide (/guide) ===================== */
:root {
    --qa-passed: #1d7a4f; --qa-failed: #c4161c; --qa-blocked: #d48a00; --qa-skipped: #7a7a7a; --qa-not_run: #d9d9d9;
}
:root[data-theme="dark"] { --qa-passed: #4cc38a; --qa-failed: #ff6b63; --qa-blocked: #e8a92e; --qa-skipped: #8c8c8c; --qa-not_run: #3a3a3a; }
.split--wide { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.panel--flush { padding: 0; overflow: hidden; }
.panel--flush .table { margin: 0; }
.table--compact th, .table--compact td { padding: 8px 10px; }
.qa-small { font-size: 12px; overflow-wrap: anywhere; }

.qa-kpis { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 4px 0 14px; }
.qa-kpis > div { display: flex; flex-direction: column; }
.qa-kpi { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.qa-kpi--bad { color: var(--qa-failed); }
.qa-kpi--warn { color: var(--qa-blocked); }
.qa-progress { display: block; width: 100%; height: 14px; border-radius: 7px; overflow: hidden; background: var(--qa-not_run); }
.qa-fill--passed { fill: var(--qa-passed); } .qa-fill--failed { fill: var(--qa-failed); } .qa-fill--blocked { fill: var(--qa-blocked); }
.qa-fill--skipped { fill: var(--qa-skipped); } .qa-fill--not_run { fill: var(--qa-not_run); }
.qa-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.qa-legend strong { color: var(--ink); margin-left: 2px; }
.qa-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.qa-dot--passed { background: var(--qa-passed); } .qa-dot--failed { background: var(--qa-failed); } .qa-dot--blocked { background: var(--qa-blocked); }
.qa-dot--skipped { background: var(--qa-skipped); } .qa-dot--not_run { background: var(--qa-not_run); border: 1px solid var(--line-input); }

.qa-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.qa-pill--passed, .qa-pill--bug-fixed, .qa-pill--bug-verified { background: var(--ok-soft); color: var(--ok-text); }
.qa-pill--failed, .qa-pill--sev-critical { background: var(--danger-soft); color: var(--danger-text); }
.qa-pill--blocked, .qa-pill--sev-major, .qa-pill--prio-high { background: var(--warn-soft); color: var(--warn-text); }
.qa-pill--bug-new, .qa-pill--bug-open, .qa-pill--bug-in_progress, .qa-pill--prio-medium { background: var(--info-soft); color: var(--info-text); }
.qa-pill--sev-critical { font-weight: 700; }

.qa-list { list-style: none; margin: 0; padding: 0; }
.qa-list li { padding: 8px 0; border-top: 1px solid var(--rule-soft); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; }
.qa-list li:first-child { border-top: 0; }
.qa-list a { text-decoration: none; color: var(--ink); }
.qa-list a:hover { color: var(--link-hover); }
.qa-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qa-people li { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 52px; gap: 10px; align-items: center; font-size: 14px; }
.qa-people__num { text-align: right; font-variant-numeric: tabular-nums; }

.qa-sev { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.qa-sev__item { flex: 1 1 110px; display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink-2); font-size: 13px; }
.qa-sev__item span { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.qa-sev__item--critical { border-left: 4px solid var(--qa-failed); }
.qa-sev__item--major { border-left: 4px solid var(--qa-blocked); }
.qa-sev__item:hover { border-color: var(--ink-3); color: var(--ink); }

.qa-steps { list-style: none; margin: 0 0 8px; padding: 0; counter-reset: none; }
.qa-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule-soft); }
.qa-step:first-child { border-top: 0; }
.qa-step__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--ink); color: var(--paper); }
.qa-step__action { margin: 2px 0 6px; font-weight: 600; }
.qa-step__expected { margin: 0; color: var(--ink-2); }
.qa-step__expected span { font-weight: 700; color: var(--ok-text); }

.qa-step-editor { border: 0; padding: 0; margin: 8px 0 16px; }
.qa-step-editor legend { font-weight: 700; margin-bottom: 8px; }
.qa-step-rows { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 12px; }
.qa-step-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: start; }
.qa-step-row .field { margin: 0; }
.qa-step-row [data-step-remove] { margin-top: 26px; }

.qa-results { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.qa-result { position: relative; }
.qa-result input { position: absolute; opacity: 0; }
.qa-result span { display: block; text-align: center; padding: 10px; border: 1px solid var(--line-input); border-radius: var(--radius); font-weight: 600; cursor: pointer; background: var(--surface); }
.qa-result input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.qa-result--passed input:checked + span { background: var(--qa-passed); border-color: var(--qa-passed); color: #fff; }
.qa-result--failed input:checked + span { background: var(--qa-failed); border-color: var(--qa-failed); color: #fff; }
.qa-result--blocked input:checked + span { background: var(--qa-blocked); border-color: var(--qa-blocked); color: #111; }
.qa-result--skipped input:checked + span, .qa-result--not_run input:checked + span { background: var(--ink-2); border-color: var(--ink-2); color: var(--paper); }
.qa-results:disabled .qa-result span { opacity: .6; cursor: not-allowed; }

.qa-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.qa-missing { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.qa-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.qa-plan-list { display: grid; gap: 14px; }
.qa-plan-card { display: grid; gap: 8px; text-decoration: none; color: var(--ink); }
.qa-plan-card:hover { border-color: var(--ink-3); color: var(--ink); }
.qa-plan-card__head { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 17px; }

/* User guide */
.guide-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; height: 100%; text-decoration: none; color: var(--ink); }
.guide-card strong { font-size: 17px; }
.guide-card span { color: var(--ink-2); font-size: 14px; }
.guide-card:hover { border-color: var(--ink-3); color: var(--ink); }
.guide { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.guide__toc { position: sticky; top: 20px; font-size: 14px; }
.guide__home { display: block; font-weight: 700; margin-bottom: 10px; color: var(--ink); text-decoration: none; }
.guide__toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.guide__toc a { display: block; padding: 6px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.guide__toc a:hover { color: var(--ink); }
.guide__toc a.is-active { border-left-color: var(--signal); color: var(--ink); font-weight: 700; }
.guide__body { max-width: 760px; padding: 32px 40px; line-height: 1.65; }
.guide__body h1 { margin-top: 0; }
.guide__body h2 { margin: 30px 0 8px; font-size: 20px; }
.guide__body h3 { margin: 20px 0 4px; font-size: 16px; }
.guide__body ul, .guide__body ol { padding-left: 22px; }
.guide__body li { margin-bottom: 6px; }
.guide__lead { font-size: 17px; color: var(--ink-2); }
.guide__terms { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0 16px; }
.guide__terms dt { font-weight: 700; }
.guide__terms dd { margin: 0; color: var(--ink-2); }
.guide__pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; font-weight: 600; }

@media (max-width: 900px) {
    .split--wide { grid-template-columns: 1fr; }
    .guide { grid-template-columns: 1fr; }
    .guide__toc { position: static; }
    .guide__body { padding: 22px; }
    .qa-step-row { grid-template-columns: 1fr; }
    .qa-step-row [data-step-remove] { margin-top: 0; justify-self: start; }
    .guide__terms { grid-template-columns: 1fr; }
}
@media print { .no-print, .guide__toc, .guide__pager { display: none !important; } }
.qa-progress--small { height: 8px; border-radius: 4px; min-width: 120px; }
.qa-area-table__bar { width: 34%; }

/* ===================== 0.9.9: pagination ===================== */
.pager { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; margin: 16px 0; }
.pager__info { margin: 0; font-size: 14px; color: var(--ink-2); }
.pager__pages { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pager__link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
a.pager__link:hover { border-color: var(--ink-3); color: var(--ink); }
.pager__link.is-current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pager__link.is-disabled { color: var(--ink-3); opacity: .55; cursor: default; }
.pager__gap { padding: 0 4px; color: var(--ink-3); }
.pager__size { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--ink-2); }
.pager__size .input--sm { width: auto; }
@media (max-width: 700px) { .pager { justify-content: center; } .pager__info, .pager__size { width: 100%; justify-content: center; text-align: center; } }
@media print { .pager { display: none; } }

/* ===================== 0.9.10: storage and undo ===================== */
.storage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 4px 0 12px; }
.storage-grid > div { display: flex; flex-direction: column; }
.storage-grid .qa-kpi { font-size: 24px; }
.purge-box { margin-top: 20px; padding: 16px; border: 1px solid var(--danger-border); border-radius: var(--radius); background: var(--danger-soft); }
.purge-box .field { max-width: 480px; }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { filter: brightness(0.92); color: #fff; }
.undo-panel { border-left: 4px solid var(--warn-strong); }
.row-action { display: inline-flex; align-items: center; margin: 0 4px 0 0; }

.qa-pill--smoke { background: var(--ink); color: var(--paper); }
.smoke-choice { align-items: flex-start; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 16px; }
.smoke-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: var(--radius); }

/* ===================== 0.9.11: spacing fixes, plan editing ===================== */
.danger-zone { border-color: var(--danger-border); }
.danger-zone .panel__title { color: var(--danger-text); }
.panel > form > .check + .check, .stack > .check + .check { margin-top: 12px; }

/* Phones: nothing may push the page sideways */
.split > *, .guide > *, .grid-2 > *, .grid-3 > *, .grid-3-even > *, .storage-grid > *, .qa-kpis > * { min-width: 0; }
.tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tabs__link { white-space: nowrap; flex: none; }
.guide__body code, .hint code, .panel code { overflow-wrap: anywhere; word-break: break-word; }

/* Spacing found by the layout audit */
.form > .check:not(:last-child), .panel > form > .check:not(:last-child) { margin-bottom: 16px; }
.qa-kpi { margin-bottom: 4px; }
.task-controls { margin-top: 8px; row-gap: 8px; }
.task-controls + .task__edit, .task-controls + details { margin-top: 8px; }
/* Positioned content inside a scrolling table (e.g. screen-reader-only labels) stays inside it */
.table-wrap { position: relative; }
.table-wrap--plain { border: 0; border-radius: 0; background: none; }

/* ===================== 0.9.12: workflow ===================== */
.callout { border-radius: 0 var(--radius) var(--radius) 0; }
.callout--review { background: var(--surface); border-color: var(--rule); border-left-color: var(--signal); padding: 20px 24px; }
.callout--review h2 { font-size: 18px; }
.callout--info { background: var(--info-faint); border-color: var(--info-border); border-left-color: var(--info-text); }
.callout--muted { background: var(--surface-2); border-color: var(--rule); border-left-color: var(--ink-3); }
.review-form { margin-top: 14px; max-width: 640px; }
.review-form fieldset { border: 0; padding: 0; margin: 0; }
.review-form legend { font-weight: 700; margin-bottom: 4px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; }
.status-now { flex-wrap: wrap; margin-bottom: 8px; }
.status-desc { margin: 0 0 10px; }
.status-meta { font-size: 13px; margin: 0 0 12px; }
.flow-block { border-top: 1px solid var(--rule-soft); padding-top: 12px; margin-top: 12px; }
.flow-block--hold { background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: var(--radius); padding: 12px; margin: 12px 0; }
.flow-block__title { font-size: 14px; margin: 0 0 8px; }
.flow-block p { margin: 0 0 8px; font-size: 14px; }
.flow-move { border-top: 1px solid var(--rule-soft); padding-top: 14px; margin-top: 4px; }
.flow-more { border-top: 1px solid var(--rule-soft); margin-top: 14px; padding-top: 12px; }
.flow-more > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--action-text); list-style: none; display: flex; align-items: center; gap: 6px; }
.flow-more > summary::-webkit-details-marker { display: none; }
.flow-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 4px; font-size: 13px; line-height: 1; }
.flow-more[open] > summary::before { content: "\2212"; }
.flow-more > form { margin-top: 12px; }
.steps-mini { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.steps-mini__item { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink-3); }
.steps-mini__item::before { content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-input); background: var(--surface); }
.steps-mini__item--done { color: var(--ink-2); }
.steps-mini__item--done::before { background: var(--ok); border-color: var(--ok); }
.steps-mini__item--now { color: var(--ink); font-weight: 700; }
.steps-mini__item--now::before { border-color: var(--signal); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 7px var(--signal); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.pd-edit { margin-top: 16px; }
.pd-edit > summary { list-style: none; display: inline-flex; }
.pd-edit > summary::-webkit-details-marker { display: none; }
.pd-edit[open] > summary { margin-bottom: 12px; }
.pd-form__group { border: 0; padding: 0; margin: 0 0 16px; }
.pd-form__group legend { font-weight: 700; margin-bottom: 8px; }
.card__outcome { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ok); }
.card .hold-badge { margin-top: 4px; }

/* ---------- 0.9.12 Dropdowns in the Collision Assistant style ---------- */
/* The closed dropdown: no OS styling, a thin chevron drawn in the theme's colors. */
select.input {
    -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer;
    padding-right: 36px; text-overflow: ellipsis; white-space: nowrap;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
        linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
    background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
select.input:hover { border-color: var(--ink-3); }
select.input:focus, select.input.is-open {
    outline: none; border-color: var(--action-text); box-shadow: 0 0 0 3px var(--focus-ring);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--action-text) 50%),
        linear-gradient(135deg, var(--action-text) 50%, transparent 50%);
}
select.input:disabled { cursor: not-allowed; background-color: var(--surface-2); color: var(--ink-3); }
select.input.input--sm { padding-right: 28px; background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; }
select.input::-ms-expand { display: none; }

/* The open list (mouse and trackpad devices; phones keep their own picker). */
.dd-menu {
    position: fixed; z-index: 1000; margin: 0; padding: 4px; list-style: none;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line-input); border-radius: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08);
    overflow-y: auto; overscroll-behavior: contain; font-size: 14px;
}
.dd-menu__opt {
    display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 30px; border-radius: 4px;
    cursor: pointer; position: relative; line-height: 1.3; user-select: none;
}
.dd-menu--sm .dd-menu__opt { padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.dd-menu__opt.is-active { background: var(--surface-3); }
.dd-menu__opt[aria-selected="true"] { font-weight: 600; color: var(--action-text); }
.dd-menu__opt[aria-selected="true"]::before {
    content: ""; position: absolute; left: 11px; top: 50%; width: 5px; height: 10px; margin-top: -7px;
    border: solid var(--action-text); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.dd-menu__opt[aria-disabled="true"] { color: var(--ink-3); cursor: default; }
.dd-menu__opt--placeholder { color: var(--ink-3); }
.review-form fieldset.field { padding: 0; margin: 0; min-width: 0; }
.review-form legend { padding: 0; font-weight: 600; font-size: 14px; }
.dd-menu__opt--placeholder[aria-selected="true"] { color: var(--ink-3); font-weight: 400; }
.dd-menu__opt--placeholder[aria-selected="true"]::before { display: none; }
.flow-path { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; padding: 0 !important; margin: 8px 0 12px; }
.flow-path li { display: inline-flex; align-items: center; margin: 0 !important; }
.flow-path li + li::before { content: "\2192"; color: var(--ink-3); margin: 0 8px; }
.guide__terms--status dt { font-weight: 400; }
.board.is-dragging .board__col:not(.board__col--can-drop) { opacity: .55; }
.board__col--can-drop { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.board__head { gap: 8px; }
.board__head .status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-hint { font-size: 13px; color: var(--ink-3); margin: -4px 0 8px; }
.callout h3 { font-size: 16px; margin: 0 0 6px; }

/* ---------- 0.9.13 Settings > Workflow ---------- */
.panel__head--pad { padding: 20px 24px 0; }
.wf-path__title { font-size: 14px; margin: 14px 0 2px; color: var(--ink-2); }
.wf-table td { vertical-align: top; }
.wf-order__btns { display: flex; gap: 4px; }
.wf-order__btns .btn { min-width: 32px; padding-left: 8px; padding-right: 8px; }
.wf-step { min-width: 220px; }
.wf-step__full { display: block; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.wf-step__desc { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; max-width: 420px; }
.wf-types, .wf-rules { font-size: 13px; color: var(--ink-2); min-width: 150px; }
.wf-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); margin-bottom: 2px; }
.wf-tag--core { color: var(--action-text); }
.wf-actions { white-space: nowrap; }
.wf-actions form { display: inline; }
.wf-foot { padding: 0 24px 20px; }
.wf-retired { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wf-log li { margin-bottom: 6px; font-size: 14px; }
.wf-reset { align-items: center; flex-wrap: wrap; }
.wf-reset label { font-weight: 600; font-size: 14px; }
.wf-reset .input { flex: 0 1 140px; }
.wf-form .check { margin-top: 4px; }
.wf-place { padding: 12px 16px; background: var(--surface-2); border-radius: var(--radius); font-size: 14px; }
@media (max-width: 720px) { .panel__head--pad { padding: 16px 16px 0; } .wf-foot { padding: 0 16px 16px; } }
.wf-form-panel { max-width: 860px; }
.wf-form legend { font-size: 14px; margin-bottom: 6px; }
.wf-form fieldset.field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.wf-form .check + .check { margin-top: 8px; }
.wf-head-actions { display: flex; align-items: center; gap: 12px; }
.wf-form .check { font-weight: 400; }
.wf-place p { margin: 0 0 4px; }
.wf-place .hint { margin-top: 6px; }
.wf-list__input { width: 100%; max-width: 420px; }
.wf-list__off .wf-list__input { color: var(--ink-3); }
.wf-list-form .table td { vertical-align: middle; }

/* ---------- 0.9.14 progress tracker ---------- */
.progress-steps { margin: 0 0 20px; overflow-x: auto; padding-bottom: 4px; position: relative; }
.progress-steps ol { list-style: none; margin: 0; padding: 0; display: flex; min-width: max-content; }
.progress-steps__item { display: flex; flex-direction: column; align-items: center; text-align: center; width: 108px; position: relative; font-size: 12px; color: var(--ink-3); }
.progress-steps__item + .progress-steps__item::before { content: ""; position: absolute; top: 13px; right: calc(50% + 15px); width: calc(100% - 30px); height: 2px; background: var(--rule); }
.progress-steps__item--done + .progress-steps__item::before { background: var(--ok); }
.progress-steps__dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; border: 2px solid var(--rule); background: var(--surface); color: var(--ink-3); margin-bottom: 6px; }
.progress-steps__item--done .progress-steps__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.progress-steps__item--done { color: var(--ink-2); }
.progress-steps__item--current .progress-steps__dot { border-color: var(--signal); color: var(--signal); box-shadow: 0 0 0 4px var(--focus-ring); }
.progress-steps__item--current { color: var(--ink); font-weight: 700; }
.progress-steps__item--stopped .progress-steps__dot { background: var(--surface-3); border-color: var(--ink-3); color: var(--ink-2); }
.progress-steps__item--stopped { color: var(--ink-2); font-weight: 700; }
.progress-steps__label { line-height: 1.3; padding: 0 4px; }
@media print { .progress-steps { overflow: visible; } }
.wf-target { max-width: 120px; }
.wf-reqs__group { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; margin-top: 8px; }
.wf-reqs__group summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.wf-reqs__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-top: 10px; }
.wf-reqs__grid .check + .check { margin-top: 0; }
.status-time { font-size: 13px; color: var(--ink-2); margin: 4px 0 0; }
.status-time--over { color: var(--warn-text); font-weight: 600; }
.req-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.req-list__item { display: flex; gap: 8px; padding: 3px 0; }
.req-list__item--met { color: var(--ink-2); }
.req-list__item--met span[aria-hidden] { color: var(--ok); font-weight: 700; }
.req-list__item--todo { color: var(--ink); }
.req-list__item--todo span[aria-hidden] { color: var(--ink-3); }
.packet-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.packet-share { flex: 1 1 260px; }
.packet-share[open] { flex-basis: 100%; }
.packet-share summary { list-style: none; display: inline-flex; }
.packet-share summary::-webkit-details-marker { display: none; }
.packet-share form { margin-top: 10px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius); }
.packet-versions td { vertical-align: middle; }
.packet-dl { margin-top: 10px; }
.packet-form textarea::placeholder, .packet-form input::placeholder { color: var(--ink-3); opacity: 1; }
.stats--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .stats--5 { grid-template-columns: repeat(2, 1fr); } }
.card__over { display: inline-block; font-size: 11px; font-weight: 700; color: var(--warn-text); background: var(--warn-soft); border-radius: 999px; padding: 1px 8px; margin: 4px 4px 0 0; }
.workspace__main, .workspace__aside { min-width: 0; }
@media (max-width: 600px) { .packet-versions__dl { display: none; } }

/* ---------- 0.9.15 Property Damage Specialist ---------- */
.specialist { border-top: 4px solid var(--signal); }
.specialist__who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.specialist__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--signal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; letter-spacing: .02em; }
.specialist__name { font-size: 18px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.specialist__contact { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.specialist__contact li { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.specialist__contact a { overflow-wrap: anywhere; font-weight: 600; }
.specialist__label { flex: none; width: 48px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.specialist__form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.specialist__form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.specialist__form .inline-form { display: flex; gap: 8px; }
.specialist__form .input { flex: 1; min-width: 0; }
