/* ==========================================================================
   Primora Hub - "Quiet ground, one signal."
   Brand tokens live here. Change colours/fonts in this block only.
   ========================================================================== */
/* Self-hosted brand fonts (SIL OFL): Geist, Geist Mono, Instrument Serif */
@font-face { font-family: "Geist"; src: url("../fonts/geist-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  /* Brand palette */
  --obsidian: #0D0E10;
  --graphite: #1F2125;
  --stone: #8A877F;
  --mist: #DCD8D0;
  --bone: #F3F1EC;
  --vermilion: #FF4F1F;

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --side-w: 248px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Dark (default) - Obsidian ground, Graphite raised */
:root, [data-theme="dark"] {
  --bg: var(--obsidian);
  --surface: #141518;
  --raised: var(--graphite);
  --raised-2: #2A2C31;
  --line: rgba(243, 241, 236, .09);
  --line-strong: rgba(243, 241, 236, .16);
  --text: var(--bone);
  --text-2: #C9C6BE;
  --muted: #9A978F;
  --signal: var(--vermilion);
  --signal-text: #FF6A3D;       /* vermilion tuned for small text on dark (AA) */
  --signal-soft: rgba(255, 79, 31, .12);
  --on-signal: var(--obsidian);
  --good: #BFD9C6;
  --focus: var(--vermilion);
  --shadow: 0 20px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* Light - Bone ground, white cards, Mist dividers */
[data-theme="light"] {
  --bg: var(--bone);
  --surface: #FBFAF7;
  --raised: #FFFFFF;
  --raised-2: #ECE9E2;
  --line: var(--mist);
  --line-strong: #C9C4BA;
  --text: var(--obsidian);
  --text-2: #33342F;
  --muted: #5F5C55;             /* darker stone for AA on bone */
  --signal: var(--vermilion);
  --signal-text: #C23510;       /* vermilion darkened for small text on bone (AA) */
  --signal-soft: rgba(255, 79, 31, .1);
  --on-signal: var(--obsidian);
  --good: #2F6B45;
  --focus: #C23510;
  --shadow: 0 20px 60px rgba(13, 14, 16, .14);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/1.55 var(--font-sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -.025em; line-height: 1.15; margin: 0; }
h1 em, h2 em, h3 em, .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
a { color: inherit; text-decoration-color: var(--signal); text-underline-offset: 3px; }
a:hover { color: var(--text); }
img { max-width: 100%; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--raised); padding: 1px 5px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.mono { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--signal); color: var(--on-signal); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 500; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.ico { width: 18px; height: 18px; flex: none; }
.only-light { display: none; }
[data-theme="light"] .only-light { display: inline; }
[data-theme="light"] .only-dark { display: none; }
::selection { background: var(--signal); color: var(--on-signal); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--obsidian) var(--side-w), transparent var(--side-w)); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--obsidian); border-right: 1px solid rgba(243,241,236,.07); padding: 22px 14px 14px; color: var(--bone);
}
[data-theme="light"] .side { background: var(--obsidian); }
.side__brand { display: block; padding: 4px 10px 18px; }
.side__brand img { height: 22px; width: auto; display: block; }
.logo-light { display: none !important; }
.side__label { color: #8A877F; padding: 14px 10px 8px; font-size: 11px; }
.side__nav { display: flex; flex-direction: column; gap: 1px; }
.side__nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: #C9C6BE; text-decoration: none; font-size: 14px; transition: background .15s, color .15s; position: relative;
}
.side__nav a .num { font-size: 10.5px; color: #6E6B64; width: 24px; letter-spacing: .06em; }
.side__nav a:hover { background: rgba(243,241,236,.05); color: var(--bone); }
.side__nav a.is-active { background: var(--graphite); color: var(--bone); }
.side__nav a.is-active .num { color: var(--vermilion); }
.side__nav .count { margin-left: auto; background: var(--vermilion); color: var(--obsidian); font: 500 11px/1 var(--font-mono); padding: 3px 6px; border-radius: 20px; }
.side__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(243,241,236,.07); display: flex; align-items: center; gap: 6px; }
.side__me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; padding: 6px; border-radius: var(--radius-sm); }
.side__me:hover { background: rgba(243,241,236,.05); }
.side__me > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.side__me b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__me small { color: #8A877F; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .iconbtn { color: #C9C6BE; }
.side .iconbtn:hover { background: rgba(243,241,236,.06); color: var(--bone); }
.side__scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .top__menu { display: none; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search-trigger {
  display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 420px; flex: 1; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font: inherit; cursor: pointer; text-align: left;
}
.search-trigger:hover { border-color: var(--line-strong); }
.search-trigger kbd { margin-left: auto; font-size: 10.5px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; letter-spacing: .04em; }
.content { padding: 28px 28px 80px; width: 100%; max-width: 1480px; outline: none; }

/* ---------- Timer ---------- */
.timer { display: flex; align-items: center; gap: 8px; margin-right: 6px; }
.timer.is-running { background: var(--raised); border: 1px solid var(--line); border-radius: 30px; padding: 3px 4px 3px 12px; }
.timer__label { display: flex; align-items: center; gap: 8px; text-decoration: none; max-width: 220px; }
.timer__what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.timer__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: blink 1.6s infinite; flex: none; }
.timer__clock { font-size: 13px; letter-spacing: .04em; color: var(--text); }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--raised); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  background: var(--b); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: 500 13.5px/1 var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--raised-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 16px; height: 16px; }
.btn--signal { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.btn--signal:hover { background: #FF6236; color: var(--on-signal); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--raised); }
.btn--danger { color: var(--signal-text); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn--lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.iconbtn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 0; background: transparent;
  color: var(--text-2); cursor: pointer; text-decoration: none; position: relative; flex: none;
}
.iconbtn:hover { background: var(--raised); color: var(--text); }
.bell .dot { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 10px; background: var(--signal); color: var(--on-signal); font: 600 10px/16px var(--font-mono); text-align: center; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Page head ---------- */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.phead h1 { font-size: clamp(28px, 3.2vw, 40px); }
.phead__sub { color: var(--muted); margin: 8px 0 0; max-width: 680px; }
.phead__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow b { color: var(--signal-text); font-weight: 400; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--text); }
.h-sec { color: var(--muted); font-size: 11.5px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.h-sec span { color: var(--text-2); }
.h-sec .h-sec__more { margin-left: auto; text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 12.5px; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card__head h2, .card__head h3 { font-size: 15px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.split--wide { grid-template-columns: minmax(0, 1fr) 380px; }
.stack > * + * { margin-top: 16px; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.stat__k { color: var(--muted); font-size: 11px; }
.stat__v { font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.stat__v small { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.stat__s { color: var(--muted); font-size: 12.5px; }
.stat--signal { border-color: color-mix(in srgb, var(--signal) 45%, var(--line)); }
.stat--signal .stat__v { color: var(--signal-text); }

/* ---------- Badges, status, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 20px; background: var(--raised); color: var(--text-2); font-size: 12px; white-space: nowrap; }
.badge--outline { background: transparent; border: 1px solid var(--line-strong); height: 20px; font-size: 11px; }
.badge--signal { background: var(--signal-soft); color: var(--signal-text); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; }
.status--signal { color: var(--text); }
.status--signal i { border-color: var(--signal); background: var(--signal); }
.status--done i { background: var(--text-2); border-color: var(--text-2); }
.status--in_progress i, .status--reviewing i, .status--active i, .status--review i { border-color: var(--text); background: linear-gradient(90deg, var(--text) 50%, transparent 50%); }
.status--approved i, .status--done i { box-shadow: inset 0 0 0 2px var(--surface); }
.prio { font: 400 10.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; padding: 4px 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); }
.prio--urgent { border-color: var(--signal); color: var(--signal-text); }
.prio--high { color: var(--text); }
.ball { display: inline-flex; align-items: center; gap: 6px; font: 400 10.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; padding: 5px 8px; border-radius: 20px; background: var(--raised); color: var(--text-2); white-space: nowrap; }
.ball::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ball--client { color: var(--text); }
.ball--client.is-stale { background: var(--signal-soft); color: var(--signal-text); }
.due { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.due .ico { width: 14px; height: 14px; }
.due.is-late { color: var(--signal-text); }
.due.is-soon { color: var(--text); }
.tag { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }

/* ---------- Avatars ---------- */
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 500 11.5px/1 var(--font-sans); letter-spacing: .02em; flex: none; color: var(--bone); background: #2B2D31; }
.avatar--0 { background: #2B2D31; } .avatar--1 { background: #3D3530; } .avatar--2 { background: #2E3A36; } .avatar--3 { background: #35313F; } .avatar--4 { background: #3E3A2C; }
.avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.avatar--empty { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.avatar--empty .ico { width: 13px; height: 13px; }
.avatars { display: flex; } .avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); } .avatars .avatar:first-child { margin-left: 0; }

/* ---------- Pulse ring & meter ---------- */
.ring { --deg: 0deg; --c: var(--text); position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) var(--deg), var(--line) 0); }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font: 500 13px/1 var(--font-mono); }
.ring--risk { --c: var(--signal); } .ring--risk b { color: var(--signal-text); }
.ring--watch { --c: var(--text-2); }
.ring--good { --c: var(--text); }
.ring--muted { background: var(--raised); color: var(--muted); }
.ring--lg { width: 88px; height: 88px; } .ring--lg::before { inset: 7px; } .ring--lg b { font-size: 24px; letter-spacing: -.02em; }
.meter { display: block; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; background: var(--text-2); border-radius: 4px; }
.meter.is-warn i { background: var(--text); }
.meter.is-over i { background: var(--signal); }
.progress-line { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.progress-line .meter { flex: 1; }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font: 400 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--raised) 55%, transparent); }
.tbl a.rowlink { text-decoration: none; font-weight: 500; }
.tbl a.rowlink:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl small { display: block; color: var(--muted); font-size: 12px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows .title { display: block; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows a.title:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.rows .sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kind { font: 400 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); width: 48px; flex: none; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.form small { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; height: 38px; padding: 0 12px; background: var(--raised); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font: 400 14px/1.4 var(--font-sans); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239A978F' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 3px var(--signal-soft); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.6); }
[data-theme="light"] input[type=date]::-webkit-calendar-picker-indicator { filter: none; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; color: var(--text-2); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--signal); width: 16px; height: 16px; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; }
legend { color: var(--muted); padding: 0 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg label { margin: 0 !important; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 12px; font-size: 13px; cursor: pointer; color: var(--text-2); border-right: 1px solid var(--line-strong); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--text); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }

/* ---------- Flash, toasts, empty ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--raised); margin-bottom: 16px; font-size: 13.5px; }
.flash .iconbtn { margin-left: auto; width: 28px; height: 28px; }
.flash--error { border-color: var(--signal); }
.flash--error > .ico { color: var(--signal-text); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; box-shadow: var(--shadow); animation: up .25s var(--ease); }
.toast--error { background: var(--signal); color: var(--on-signal); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty > .ico { width: 28px; height: 28px; margin-bottom: 10px; color: var(--muted); }
.empty h3, .empty h1 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty p { max-width: 380px; margin: 0 auto 14px; }
.empty--page { padding: 100px 20px; }
.empty--page h1 { font-size: 28px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; }
.tabs a .ico { width: 16px; height: 16px; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--text); border-bottom-color: var(--signal); }
.tabs a .n { font: 400 11px/1 var(--font-mono); color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters select, .filters input { width: auto; max-width: 100%; min-width: 0; height: 32px; font-size: 13px; }
.filters form { flex-wrap: wrap; max-width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line-strong); text-decoration: none; font-size: 12.5px; color: var(--text-2); }
.chip:hover { color: var(--text); border-color: var(--text-2); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Project cards ---------- */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; transition: border-color .15s, transform .2s var(--ease); }
.pcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pcard__top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.pcard h3 { font-size: 17px; margin-top: 6px; }
.pcard__meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Kanban ---------- */
.board { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(236px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-height: 160px; }
.col__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.col__head .n { color: var(--muted); font: 400 11px var(--font-mono); margin-left: auto; }
.col__body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 60px; transition: background .15s; }
.col__body.is-over { background: var(--signal-soft); }
.col--waiting_client .col__head { box-shadow: inset 0 2px 0 var(--signal); border-radius: var(--radius) var(--radius) 0 0; }
.tcard { position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: grab; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.tcard:hover { border-color: var(--line-strong); }
.tcard.is-dragging { opacity: .4; }
.tcard a { text-decoration: none; font-weight: 500; line-height: 1.35; }
.tcard a:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.tcard__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tcard__meta .avatar { margin-left: auto; }
.tcard__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.tcard__meta .ico { width: 13px; height: 13px; }
.tcard__ms { font: 400 10px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.quickadd { padding: 8px 10px 10px; }
.quickadd input { height: 32px; font-size: 13px; background: transparent; border-style: dashed; }

/* ---------- Timeline ---------- */
.tl { --n: 30; position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tl__grid { display: grid; grid-template-columns: 250px 1fr; min-width: calc(250px + var(--n) * 24px); }
.tl__days { display: grid; grid-template-columns: repeat(var(--n), 1fr); border-bottom: 1px solid var(--line); }
.tl__days span { font: 400 10px/1.2 var(--font-mono); color: var(--muted); text-align: center; padding: 8px 0; display: flex; flex-direction: column; justify-content: flex-end; min-height: 44px; }
.tl__days span b { font-weight: 400; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.tl__days span.is-weekend { background: color-mix(in srgb, var(--raised) 50%, transparent); }
.tl__days span.is-today { color: var(--signal-text); box-shadow: inset 0 -2px 0 var(--signal); }
.tl__label { padding: 0 14px; height: 38px; display: flex; align-items: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 13px; position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 0; }
.tl__label a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl__label a:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.tl__label--head { color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line); height: auto; }
.tl__label--ms { font: 400 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.tl__track { position: relative; height: 38px; border-bottom: 1px solid var(--line); background-image: linear-gradient(to right, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px); background-size: calc(100% / var(--n)) 100%; }
.tl__track--ms { background-color: var(--bg); }
.tl__today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--signal); opacity: .7; z-index: 0; }
.tl__bar { position: absolute; top: 9px; height: 20px; border-radius: 4px; background: var(--text-2); z-index: 1; font: 500 10px/20px var(--font-mono); color: var(--bg); padding: 0 6px; white-space: nowrap; overflow: hidden; text-decoration: none; min-width: 8px; }
.tl__bar:hover { filter: brightness(1.1); }
.tl__bar--done { background: var(--raised-2); color: var(--muted); }
.tl__bar--waiting_client { background: var(--signal); color: var(--on-signal); }
.tl__bar--late { background: transparent; border: 1.5px solid var(--signal); color: var(--signal-text); line-height: 17px; }
.tl__bar--backlog, .tl__bar--todo { background: transparent; border: 1.5px solid var(--text-2); color: var(--text-2); line-height: 17px; }
.tl__diamond { position: absolute; top: 13px; width: 12px; height: 12px; background: var(--signal); transform: rotate(45deg); z-index: 1; }

/* ---------- Detail pages ---------- */
.detail-title { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 8px; }
.meta-list { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; font-size: 13.5px; align-items: center; margin: 0; }
.meta-list dt { color: var(--muted); font-size: 12.5px; }
.meta-list dd { margin: 0; min-width: 0; }
.meta-list select, .meta-list input { height: 32px; font-size: 13px; }
.prose { color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--text); }
.checklist { list-style: none; padding: 0; margin: 0 0 10px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.checklist li.is-done span { color: var(--muted); text-decoration: line-through; }
.checklist .iconbtn { margin-left: auto; width: 26px; height: 26px; opacity: 0; }
.checklist li:hover .iconbtn, .checklist .iconbtn:focus { opacity: 1; }

/* Thread */
.thread__list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 16px; }
.cmt { display: flex; gap: 12px; }
.cmt__body { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 10px 14px; }
.cmt__body p { margin: 4px 0 0; color: var(--text-2); overflow-wrap: anywhere; }
.cmt__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.cmt__meta b { font-weight: 500; }
.cmt__meta time { color: var(--muted); margin-left: auto; }
.cmt--internal .cmt__body { border-style: dashed; background: transparent; }
.cmt--client .cmt__body { border-left: 2px solid var(--signal); }
.composer { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--raised); overflow: hidden; }
.composer textarea { border: 0; background: transparent; min-height: 70px; box-shadow: none !important; }
.composer__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); }
.composer__bar .btn { margin-left: auto; }

/* Files */
.files__list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.files__list li { display: flex; gap: 10px; align-items: center; }
.files__list li > div { min-width: 0; display: flex; flex-direction: column; }
.files__list a { text-decoration: none; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files__thumb { width: 40px; height: 40px; border-radius: 6px; background: var(--raised); display: grid; place-items: center; overflow: hidden; flex: none; border: 1px solid var(--line); }
.files__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dropzone label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; font-size: 13px; transition: border-color .15s, background .15s; }
.dropzone label:hover, .dropzone.is-over label { border-color: var(--signal); color: var(--text); background: var(--signal-soft); }

/* ---------- Scope guard / quote ---------- */
.scope-card { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px; background: var(--surface); position: relative; overflow: hidden; }
.scope-card--locked::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--signal); }
.scope-card h3 { font-size: 15px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.quote { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin: 14px 0; }
.quote > div { background: var(--surface); padding: 14px; }
.quote b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.retainer-pill { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.retainer-pill .meter { flex: 1; height: 6px; }

/* ---------- Proof viewer ---------- */
.proof { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); min-height: 70vh; }
.proof__stage { background: var(--bg); padding: 24px; overflow: auto; position: relative; display: flex; justify-content: center; align-items: flex-start; }
.proof__canvas { position: relative; display: inline-block; max-width: 100%; box-shadow: var(--shadow); line-height: 0; }
.proof__canvas img { max-width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
.proof__canvas.is-pinning { cursor: crosshair; }
.proof__canvas.is-pinning::after { content: "Click to drop a pin"; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: var(--signal); color: var(--on-signal); font: 500 12px/1 var(--font-sans); padding: 8px 12px; border-radius: 20px; pointer-events: none; line-height: 1; }
.pin { position: absolute; width: 28px; height: 28px; margin: -28px 0 0 -14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--signal); border: 2px solid var(--obsidian); display: grid; place-items: center; cursor: pointer; z-index: 2; padding: 0; transition: transform .15s; }
.pin span { transform: rotate(45deg); font: 600 11px/1 var(--font-mono); color: var(--obsidian); }
.pin.is-resolved { background: var(--stone); }
.pin.is-active, .pin:hover { transform: rotate(-45deg) scale(1.18); }
.pin--draft { background: var(--bone); }
.proof__side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; max-height: 80vh; }
.proof__side-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.proof__pins { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; }
.proof__pins > li { padding: 12px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; }
.proof__pins > li:hover, .proof__pins > li.is-active { background: var(--raised); border-color: var(--line); }
.proof__pins > li.is-resolved { opacity: .6; }
.pinhead { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.pinnum { width: 22px; height: 22px; border-radius: 50%; background: var(--signal); color: var(--on-signal); font: 600 11px/22px var(--font-mono); text-align: center; flex: none; }
.is-resolved .pinnum { background: var(--stone); }
.pinhead time { color: var(--muted); margin-left: auto; }
.pinform { position: absolute; z-index: 5; width: 280px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); line-height: 1.4; }
.pinform textarea { min-height: 70px; margin-bottom: 8px; }
.versions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Sign-off / certificate ---------- */
.signbox { border: 1px solid var(--signal); border-radius: var(--radius); padding: 18px; background: var(--signal-soft); }
.signbox h3 { font-size: 16px; margin-bottom: 6px; }
.signbox .sigline { font-family: var(--font-serif); font-style: italic; font-size: 22px; height: 46px; }
.cert { max-width: 820px; margin: 0 auto; background: var(--bone); color: var(--obsidian); border-radius: var(--radius); padding: 56px 60px; position: relative; }
.cert__logo { height: 26px; }
.cert h1 { font-size: 40px; margin: 36px 0 6px; }
.cert .mono { color: #5F5C55; }
.cert__grid { display: grid; grid-template-columns: 160px 1fr; gap: 12px 20px; margin: 30px 0; font-size: 14px; }
.cert__grid dt { color: #5F5C55; font: 400 11px/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.cert__grid dd { margin: 0; }
.cert__sig { font-family: var(--font-serif); font-style: italic; font-size: 34px; border-bottom: 1px solid var(--obsidian); padding-bottom: 6px; display: inline-block; min-width: 300px; }
.cert__hash { font: 400 11.5px/1.5 var(--font-mono); word-break: break-all; background: #E8E5DE; padding: 12px; border-radius: 6px; }
.cert__seal { position: absolute; top: 48px; right: 56px; width: 96px; height: 96px; border-radius: 50%; border: 1.5px solid var(--vermilion); display: grid; place-items: center; text-align: center; font: 500 10px/1.3 var(--font-mono); letter-spacing: .12em; color: #C23510; transform: rotate(-8deg); }
.cert__seal b { display: block; font-size: 22px; letter-spacing: 0; color: var(--vermilion); }

/* ---------- Update / palette ---------- */
.update-text { font-family: var(--font-mono); font-size: 13px; text-transform: none; letter-spacing: 0; min-height: 520px; line-height: 1.65; }
.palette { position: fixed; inset: 0; z-index: 80; background: rgba(13,14,16,.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette__box { width: 100%; max-width: 620px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: up .2s var(--ease); }
.palette__input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette__input input { border: 0; background: transparent; height: 30px; font-size: 16px; padding: 0; box-shadow: none !important; }
.palette__input kbd { font-size: 10px; border: 1px solid var(--line); padding: 2px 5px; border-radius: 4px; color: var(--muted); }
.palette__results { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette__results li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.palette__results li a small { color: var(--muted); margin-left: auto; font-size: 12px; white-space: nowrap; }
.palette__results li a .kind { width: 64px; }
.palette__results li.is-sel a { background: var(--raised-2); }
.palette__results .empty-row { padding: 18px; color: var(--muted); text-align: center; font-size: 13px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(255,79,31,.08), transparent 60%), var(--bg); }
.auth__card { width: 100%; max-width: 420px; }
.auth--wide .auth__card { max-width: 640px; }
.auth__logo { height: 28px; margin-bottom: 48px; display: block; }
[data-theme="light"] .auth__logo { content: url("../img/primora-lockup-horizontal-color-on-light.svg"); }
.auth h1 { font-size: 40px; margin-bottom: 10px; }
.auth .form { margin-top: 28px; }
.auth__foot { margin-top: 28px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 10px; }
.checks { list-style: none; padding: 0; margin: 18px 0; font: 400 12px/1.9 var(--font-mono); }
.checks .ok { color: var(--text-2); } .checks .bad { color: var(--signal-text); }

/* ---------- Activity ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .avatar { margin-top: 1px; }
.feed p { margin: 0; color: var(--text-2); }
.feed b { color: var(--text); font-weight: 500; }
.feed time { display: block; font-size: 12px; color: var(--muted); }

/* Greeting hero */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.hello h1 { font-size: clamp(30px, 3.6vw, 46px); }
.hello .eyebrow b { color: var(--signal-text); }

/* Timesheet */
.ts td, .ts th { text-align: center; }
.ts td:first-child, .ts th:first-child { text-align: left; }
.ts .is-today { box-shadow: inset 0 -2px 0 var(--signal); }
.ts tfoot td { font-weight: 500; border-top: 1px solid var(--line-strong); }
.ts .zero { color: var(--muted); opacity: .5; }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px; align-items: flex-start; }
.notice > .ico { margin-top: 1px; }
.notice--signal { border-color: var(--signal); background: var(--signal-soft); }
.notice--signal > .ico { color: var(--signal-text); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.reasons { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.reasons li { display: flex; gap: 8px; padding: 5px 0; color: var(--text-2); }
.reasons li::before { content: "-"; color: var(--signal-text); }

details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .split, .split--wide { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .proof { grid-template-columns: 1fr; }
  .proof__side { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .25s var(--ease); }
  body.side-open .side { transform: none; }
  body.side-open .side__scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }
  .top { padding: 10px 16px; }
  .top .top__menu { display: inline-grid; }
  .search-trigger { min-width: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { flex: 0; }
  .timer__what { display: none; }
  .content { padding: 20px 16px 60px; }
  .g2, .g3, .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .rows > li { flex-wrap: wrap; padding: 12px 16px; }
  .rows .grow { flex-basis: 100%; }
  .card__head { padding: 14px 16px; }
  .inline-form { flex-wrap: wrap; }
  .phead__actions { width: 100%; }
  .cert { padding: 32px 22px; }
  .cert__seal { position: static; margin-bottom: 10px; }
  .cert__grid { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px; }
  .stat__k { font-size: 10px; letter-spacing: .08em; }
  .stat__v { font-size: 24px; }
  .timer .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Print (certificates, updates) ---------- */
@media print {
  .side, .top, .no-print, .flash, .toasts { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .cert { box-shadow: none; border-radius: 0; padding: 20px; }
}

/* ---------- Steps & scope options ---------- */
.steps { list-style: none; margin-bottom: 0; padding: 0; display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.steps li { flex: 1; padding: 12px 14px; font-size: 13px; color: var(--muted); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; position: relative; }
.steps li:last-child { border-right: 0; }
.steps li .mono { font-size: 10.5px; }
.steps li.is-done { color: var(--text-2); }
.steps li.is-done .mono::after { content: " ✓"; }
.steps li.is-current { color: var(--text); background: var(--raised); box-shadow: inset 0 -2px 0 var(--signal); }
.steps li.is-current .mono { color: var(--signal-text); }
.scope-opts { display: flex; flex-direction: column; gap: 8px; }
.scope-opt { cursor: pointer; }
.scope-opt input { position: absolute; opacity: 0; pointer-events: none; }
.scope-opt > span { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s, background .15s; }
.scope-opt > span .ico { grid-row: span 2; margin-top: 1px; color: var(--muted); }
.scope-opt b { font-weight: 500; color: var(--text); font-size: 13.5px; }
.scope-opt small { color: var(--muted); font-weight: 400; font-size: 12px; }
.scope-opt:hover > span { border-color: var(--text-2); }
.scope-opt input:checked + span { border-color: var(--signal); background: var(--signal-soft); }
.scope-opt input:checked + span .ico { color: var(--signal-text); }
.scope-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.h-sec .ico { width: 14px; height: 14px; }
@media (max-width: 860px) { .steps { flex-direction: column; } .steps li { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; } }
@media (max-width: 860px) {
  .search-trigger { border: 0; background: transparent; padding: 8px; width: 34px; height: 34px; justify-content: center; }
}
