/* Waypoint — Alexi Hall
   Brand: Archivo (headings), Josefin Sans (body), Space Mono (eyebrows, numbers).
   The UI stays quiet so the content leads. */

:root {
  --bg: #F2F1EE;
  --surface: #FFFFFF;
  --surface-2: #F8F7F4;
  --line: #DEDCD6;
  --line-soft: #ECEAE5;
  --ink: #131313;
  --ink-2: #1C1C1C;
  --muted: #64635F;
  --grey: #929292;
  --ochre: #C9A876;
  --teal: #4A5C5A;
  --rust: #B3703F;
  --canvas: #8A8A86;
  --focus: #4A5C5A;

  --review-bg: #E2E9E8; --review-fg: #2F3D3B;
  --changes-bg: #F5E7DB; --changes-fg: #85471B;
  --muted-bg: #ECEAE5; --muted-fg: #55544F;

  --radius: 10px;
  --radius-sm: 7px;
  --head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, monospace;
  --shadow: 0 1px 2px rgba(19, 19, 19, 0.04), 0 2px 10px rgba(19, 19, 19, 0.05);
  --on-ink: #FFFFFF;            /* text on an ink-filled button or chip */
  --danger: #85471B;
  --tint-teal: #EEF2F1;
  --info-bg: #E0F6FF; --info-fg: #00597A;
  --logo-filter: none;
  --swatch-ring: rgba(0, 0, 0, 0.18);
  color-scheme: light;
}

/* Dark mode: follows the computer until someone picks with the toggle. */
:root[data-theme="dark"] {
  --bg: #121211;
  --surface: #1B1B19;
  --surface-2: #232320;
  --line: #3A3934;
  --line-soft: #2B2A27;
  --ink: #EEECE7;
  --ink-2: #E2E0DA;
  --muted: #A6A49D;
  --grey: #7C7B76;
  --teal: #93B3AF;
  --rust: #D48D59;
  --focus: #93B3AF;
  --review-bg: #22302E; --review-fg: #BBD4D0;
  --changes-bg: #3A2A1D; --changes-fg: #EBB78E;
  --muted-bg: #2B2A27; --muted-fg: #BDBBB4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 12px rgba(0, 0, 0, 0.25);
  --on-ink: #131313;
  --danger: #B9612C;
  --tint-teal: #1F2A29;
  --info-bg: #10303D; --info-fg: #8FD8F5;
  --logo-filter: invert(1) brightness(0.93);
  --swatch-ring: rgba(255, 255, 255, 0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --surface: #1B1B19;
    --surface-2: #232320;
    --line: #3A3934;
    --line-soft: #2B2A27;
    --ink: #EEECE7;
    --ink-2: #E2E0DA;
    --muted: #A6A49D;
    --grey: #7C7B76;
    --teal: #93B3AF;
    --rust: #D48D59;
    --focus: #93B3AF;
    --review-bg: #22302E; --review-fg: #BBD4D0;
    --changes-bg: #3A2A1D; --changes-fg: #EBB78E;
    --muted-bg: #2B2A27; --muted-fg: #BDBBB4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 12px rgba(0, 0, 0, 0.25);
    --on-ink: #131313;
    --danger: #B9612C;
    --tint-teal: #1F2A29;
    --info-bg: #10303D; --info-fg: #8FD8F5;
    --logo-filter: invert(1) brightness(0.93);
  --swatch-ring: rgba(255, 255, 255, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.eyebrow { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.pad { padding: 16px; }
.error-text { color: var(--changes-fg); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-xs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.boot, .loading { padding: 64px 24px; text-align: center; color: var(--muted); }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font: 600 14px/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { border-color: #C9C6BE; background: var(--surface-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); opacity: 0.9; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.warn { border-color: var(--rust); color: var(--changes-fg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-soft); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 44px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; flex: none;
}
.icon-btn:hover { background: var(--line-soft); }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }
.icon { display: inline-flex; line-height: 0; }

.link-btn { border: 0; background: none; padding: 2px 0; color: var(--ink-2); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.link-btn:hover { text-decoration-color: currentColor; }

.input {
  width: 100%; min-height: 40px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); line-height: 1.4;
}
textarea.input { resize: vertical; }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.select-sm { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; max-width: 220px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; }
.field-error { color: var(--changes-fg); font-size: 13px; }
.check, .confirm-box { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input, .confirm-box input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.confirm-box { padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.switch-row input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; cursor: pointer; margin: 0; transition: background 0.15s; }
.switch-row input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch-row input:checked { background: var(--teal); }
.switch-row input:checked::after { transform: translateX(16px); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--muted-bg); color: var(--muted-fg); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.review { background: var(--review-bg); color: var(--review-fg); }
.chip.changes { background: var(--changes-bg); color: var(--changes-fg); }
.chip.approved { background: var(--ink); color: var(--on-ink); }

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted-fg); }
.fchip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  min-height: 56px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--line-soft);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 24px; }
.topbar-right { gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { display: block; height: 20px; width: auto; }
.login-header .brand-logo { height: 22px; }
.brand-name { font: 700 15px/1 var(--head); }
.brand-sep { width: 1px; height: 16px; background: var(--line); }
.brand-product { font: 500 15px/1 var(--head); color: var(--muted); }
.topnav { display: flex; gap: 20px; }
.topnav a { text-decoration: none; font-weight: 600; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.topnav a.on, .topnav a:hover { color: var(--ink); }
.topnav a.on { border-bottom-color: var(--ochre); }
.user-email { font-size: 13px; color: var(--muted); }

.page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px; display: flex; flex-direction: column; gap: 24px; }
.page.wide { max-width: 1320px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 30px; font-weight: 700; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 600; }

.empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty h2 { font-size: 20px; }
.empty p { color: var(--muted); max-width: 46ch; }
.empty .row { margin-top: 8px; }

/* ---------- Home ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.12s, transform 0.12s; }
.project-card:hover { border-color: var(--ochre); }
.project-card-head { display: flex; align-items: center; gap: 10px; }
.type-badge { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; color: var(--teal); }
.project-card-title { font-size: 18px; font-weight: 600; }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.segs { display: flex; gap: 4px; }
.seg { flex: 1; height: 4px; border-radius: 2px; background: var(--line-soft); }
.seg.done { background: var(--ink); }
.seg.now { background: var(--ochre); }

.table-wrap { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; min-width: 820px; }
.table th { text-align: left; font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: 14px; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table a { text-decoration: none; }

/* ---------- Project ---------- */
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.stage-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.stage-card.current { border-color: var(--ochre); box-shadow: 0 0 0 1px var(--ochre), var(--shadow); }
.stage-card.locked { background: var(--surface-2); box-shadow: none; }
.stage-top { display: flex; align-items: center; gap: 10px; }
.stage-num { width: 26px; height: 26px; border-radius: 50%; background: var(--line-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.stage-card.current .stage-num { background: var(--ochre); color: var(--ink); }
.stage-name { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.vpills { display: flex; gap: 6px; flex-wrap: wrap; }
.vpill { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font: 400 12px/1 var(--mono); cursor: pointer; color: var(--muted-fg); }
.vpill.draft { border-style: dashed; }
.vpill.review { background: var(--review-bg); border-color: transparent; color: var(--review-fg); }
.vpill.changes { color: var(--grey); text-decoration: line-through; }
.vpill.approved { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.vpill.on { outline: 2px solid var(--ochre); outline-offset: 1px; }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line-soft); }

.split { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.split > .card:first-child { flex: 999 1 600px; min-width: 0; }
.split > .activity { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.asset-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.asset-thumb { aspect-ratio: 4 / 3; border-radius: 8px; background: var(--canvas); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.asset-thumb img { max-width: 92%; max-height: 92%; object-fit: contain; }
.asset-thumb:hover { outline: 2px solid var(--ochre); outline-offset: 1px; }
.thumb-ph { width: 40%; height: 40%; border-radius: 4px; background: rgba(255, 255, 255, 0.15); }
.asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.asset-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }

.dropzone { border: 1.5px dashed #BDBAB2; border-radius: var(--radius); background: var(--surface-2); padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; color: var(--muted-fg); }
.dropzone strong { color: var(--ink); font-size: 15px; }
.dropzone:hover, .dropzone.over { border-color: var(--teal); background: var(--tint-teal); }
.upload-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.upload-list li { display: flex; flex-direction: column; gap: 6px; }
.bar { height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--teal); transition: width 0.2s; }
.upload-list li.failed .bar-fill { background: var(--rust); }

.decision-note { margin: 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--changes-bg); display: flex; flex-direction: column; gap: 6px; }
.decision-note p { white-space: pre-wrap; }

.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.events li { display: flex; gap: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grey); margin-top: 6px; flex: none; }
.dot.approved { background: var(--ink); }
.dot.changes { background: var(--rust); }
.dot.review { background: var(--teal); }
.dot.warn { background: var(--ochre); }

/* ---------- Clients ---------- */
.login-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.login-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.invite-form { flex-wrap: wrap; }
.invite-form .input { min-width: 220px; }
.login-list li .row { flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }
.login-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 24px 32px; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-soft); border-top: 3px solid var(--ochre); border-radius: 14px; padding: 40px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.login-card-inner { display: flex; flex-direction: column; gap: 18px; }
.login-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.login-card .link-btn { align-self: center; font-weight: 500; color: var(--muted); }
.login-card .link-btn.inline { align-self: auto; display: inline; padding: 0; color: inherit; font-weight: 600; }
.auth-eyebrow { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.auth-lede { margin: 0; line-height: 1.55; }
.auth-msgs:empty { display: none; }
.auth-notice { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--line-soft); }
.auth-notice.warn { background: var(--changes-bg); border-color: transparent; color: var(--changes-fg); }
.auth-notice.ok { background: var(--review-bg); border-color: transparent; color: var(--review-fg); }
.auth-notice strong { font-weight: 700; word-break: break-all; }
.auth-notice .block-line { display: block; margin-top: 6px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.google-btn { gap: 10px; background: var(--surface); }
.google-btn .g-mark { display: inline-flex; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { width: 100%; padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px 8px; font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); cursor: pointer; border-radius: 6px; }
.pw-toggle:hover { color: var(--ink); background: var(--surface-2); }
.pw-rules { list-style: none; margin: -6px 0 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pw-rules li::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; border: 1.5px solid var(--line); vertical-align: 0; }
.pw-rules li.ok { color: var(--review-fg); }
.pw-rules li.ok::before { background: var(--teal); border-color: var(--teal); }
.account-email { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.account-email-value { font-weight: 600; word-break: break-all; }
.center { text-align: center; align-self: center; }
.acct-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.acct-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grey); flex: none; }
.acct-status.ok .dot { background: var(--teal); }
.acct-status.warn { color: var(--changes-fg); }
.acct-status.warn .dot { background: var(--rust); }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.login-footer { text-align: center; padding: 24px; font-size: 12px; color: var(--muted); }
.login-legal { display: block; margin-top: 6px; font-family: var(--body); }
.login-legal a { color: var(--muted); }

/* ---------- Dialogs and toasts ---------- */
.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(19, 19, 19, 0.5); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 100%; background: var(--surface); border-radius: 14px; padding: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; gap: 20px; max-height: calc(100vh - 48px); overflow: auto; }
.modal-title { font-size: 21px; font-weight: 700; }
.modal-body { display: flex; flex-direction: column; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.summary { margin: 0; display: flex; flex-direction: column; }
.summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.summary > div:last-child { border-bottom: 1px solid var(--line-soft); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.note.warn { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--changes-bg); color: var(--changes-fg); font-size: 13px; }
.shortcuts { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.shortcuts div { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.shortcuts dt { width: 130px; flex: none; }
.shortcuts dd { margin: 0; }
kbd { font: 400 11.5px/1 var(--mono); padding: 4px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--on-ink); padding: 11px 16px; border-radius: 9px; font-size: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); max-width: min(520px, 90vw); transition: opacity 0.3s, transform 0.3s; }
.toast.error { background: var(--changes-fg); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- Review screen ---------- */
.viewer-loading { min-height: 100vh; }
.viewer { height: 100vh; display: flex; flex-direction: column; background: var(--canvas); overflow: hidden; }
.v-bar { flex: none; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 6px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.v-bar-left, .v-bar-mid, .v-bar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v-bar-left { flex: 1; }
.v-bar-right { flex: 1; justify-content: flex-end; }
.v-crumb { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.v-body { flex: 1; min-height: 0; display: flex; }

.v-tools { width: 52px; flex: none; background: var(--surface); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; overflow-y: auto; }
.tool { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.tool:hover { background: var(--line-soft); }
.tool.on { background: var(--review-bg); color: var(--teal); }
.tool-sep { width: 24px; height: 1px; background: var(--line-soft); margin: 6px 0; flex: none; }
.swatches { display: flex; flex-direction: column; gap: 9px; padding: 4px 0; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--swatch-ring); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.wline { display: block; width: 18px; background: currentColor; border-radius: 2px; }
.v-tools .grow { flex: 1; min-height: 8px; }

.rail { flex: none; width: 36px; border: 0; background: var(--surface); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 12px; cursor: pointer; color: var(--ink-2); }
.rail.right { border-right: 0; border-left: 1px solid var(--line-soft); }
.rail:hover { background: var(--surface-2); }
.rail-count { font: 700 11px/1 var(--mono); color: var(--changes-fg); }

.v-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background: var(--canvas); cursor: crosshair; touch-action: none; outline: none; user-select: none; }
.v-stage[data-tool="select"] { cursor: default; }
.v-stage[data-tool="hand"], .v-stage.space { cursor: grab; }
.v-stage.panning { cursor: grabbing; }
.v-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.v-world.pixelated .v-img { image-rendering: pixelated; }
.v-img { max-width: none; user-select: none; -webkit-user-drag: none; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); }
.v-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.v-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; padding: 24px; text-align: center; }

.v-status { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 10px 0 14px; background: var(--surface); border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.v-status .mono { font-size: 12px; }
.zoom-val { width: 48px; text-align: center; }
.bg-swatch { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.15); cursor: pointer; padding: 0; }
.bg-swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }

.v-panel { width: 340px; flex: none; background: var(--surface); border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; min-height: 0; }
.v-panel-head { flex: none; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line-soft); }
.v-panel-title { font-size: 15px; font-weight: 600; }
.c-filter { flex: none; display: flex; gap: 6px; padding: 12px 16px; }
.c-list { flex: 1; min-height: 0; overflow-y: auto; }
.thread { padding: 14px 16px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.thread:hover { background: var(--surface-2); }
.thread.on { background: var(--tint-teal); box-shadow: inset 3px 0 0 var(--teal); }
.thread.resolved .thread-text { color: var(--muted); }
.thread-head { display: flex; align-items: center; gap: 10px; }
.num { width: 22px; height: 22px; border-radius: 50%; color: #fff; font: 700 11px/22px var(--mono); text-align: center; flex: none; }
.num.general { background: var(--line-soft); color: var(--muted-fg); display: inline-flex; align-items: center; justify-content: center; }
.thread-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.thread-kinds { margin-left: auto; text-align: right; }
.thread-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; padding-left: 32px; }
.thread > .mono { padding-left: 32px; }
.reply { margin-left: 32px; padding: 8px 0 0 12px; border-left: 2px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; }
.reply .thread-text { padding-left: 0; }
.reply .link-btn { align-self: flex-start; }
.reply-form { margin-left: 32px; display: flex; flex-direction: column; gap: 8px; }
.thread-actions { display: flex; gap: 16px; padding-left: 32px; }
.c-composer { flex: none; border-top: 1px solid var(--line-soft); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.c-pending { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.c-pending .link-btn { margin-left: auto; }
.c-input { min-height: 72px; }
/* A mark has just been drawn: the comment box is ready for typing. */
.c-composer.armed { background: var(--tint-teal); box-shadow: inset 0 2px 0 var(--teal); }
.c-composer.armed .c-input { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.c-armed-hint { color: var(--teal); font-weight: 600; }
/* Editing a comment */
.thread.editing { background: var(--tint-teal); box-shadow: inset 3px 0 0 var(--teal); cursor: default; }
.edit-form { display: flex; flex-direction: column; gap: 8px; padding-left: 32px; }
.edit-input { min-height: 64px; }
.edit-marks { display: flex; flex-wrap: wrap; gap: 6px; }
.mark-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--surface); }
.mark-chip.on { border-color: #2F6BFF; box-shadow: 0 0 0 1px #2F6BFF; }
.mark-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px; }
.mark-x:hover { color: var(--text, inherit); background: var(--surface-2); }
.v-stage.dragging-mark { cursor: grabbing; }
.v-stage[data-tool="text"] { cursor: text; }
/* The box you type a text mark into, on the image */
.v-textmark { position: absolute; z-index: 3; transform: translateY(-50%); min-width: 160px; max-width: 60%; padding: 2px 6px; border: 1.5px solid #2F6BFF; border-radius: 5px; background: rgba(255, 255, 255, 0.92); font-family: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif; font-weight: 700; line-height: 1.2; outline: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
.v-textmark::placeholder { color: #8A8A86; font-weight: 500; }
/* Dictation: mic button, scrolling level bars, live words */
.mic-btn.on { background: #C8442B; color: #FFFFFF; animation: mic-pulse 1.4s ease-in-out infinite; }
.mic-btn.on:hover { background: #B23A23; }
.mic-btn.on svg, .mic-btn.on svg * { color: #FFFFFF; fill: #FFFFFF; stroke: #FFFFFF; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 4px rgba(200, 68, 43, 0.25); } }
.mic-panel { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-soft); }
.mic-top { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.mic-meter { width: 120px; height: 28px; flex: none; color: var(--teal); }
.mic-panel.tidying .mic-meter { opacity: 0.35; }
.mic-status { font-weight: 600; color: var(--teal); white-space: nowrap; }
.mic-panel.tidying .mic-status::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: mic-spin 0.8s linear infinite; }
@keyframes mic-spin { to { transform: rotate(360deg); } }
.mic-actions { margin-left: auto; display: flex; gap: 12px; white-space: nowrap; }
.mic-round { width: 30px; height: 30px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-soft); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.mic-round:hover { background: var(--surface-2); }
.mic-round.done { background: var(--teal); border-color: var(--teal); color: #FFFFFF; }
.mic-round.done:hover { filter: brightness(1.08); }
.mic-round.done svg, .mic-round.done svg * { stroke: #FFFFFF; }
.mic-keys { font-size: 12px; }
.mic-live { margin: 0; font-size: 14px; line-height: 1.45; max-height: 7.5em; overflow-y: auto; }
.mic-before { color: var(--muted); }
.mic-interim { color: var(--muted); font-style: italic; }
.mic-hint { font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .mic-btn.on, .mic-panel.tidying .mic-status::after { animation: none; } }

/* Phones: simple centred preview */
.simple-viewer { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--canvas); overflow: hidden; }
.simple-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); min-width: 0; }
.simple-head .strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* The file always fits inside the space between the header and the note: never cropped. */
.simple-stage { flex: 1 1 auto; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; }
.simple-media { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; display: block; }
.preview-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 16px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info-fg); }
.preview-notice .btn { flex: none; }
.simple-note { flex: none; background: var(--surface); border-radius: 18px 18px 0 0; padding: 22px 20px 30px; display: flex; flex-direction: column; gap: 10px; }
@media (orientation: landscape) and (max-height: 520px) {
  .simple-note { flex-direction: row; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 0; }
  .simple-note p { display: none; }
  .simple-note .btn { width: auto; margin-left: auto; }
  .simple-stage { padding: 6px; }
  .simple-media { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
}

@media (max-width: 899px) {
  .topbar { padding: 8px 16px; row-gap: 4px; }
  .topbar-left { gap: 14px; min-width: 0; max-width: 100%; flex-wrap: wrap; row-gap: 2px; }
  .topnav { gap: 16px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { white-space: nowrap; }
  .topbar-right { flex-wrap: wrap; gap: 8px; }
  .user-email { display: none; }
  .page { padding: 24px 16px 64px; }
  .page-title { font-size: 26px; }
  .login-card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ===================== Phase 2 ===================== */
.block { display: block; }
.bar-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.segctl { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--line-soft); }
.segctl-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-fg); font: 600 13px/1 var(--body); cursor: pointer; white-space: nowrap; }
.segctl-btn:hover { color: var(--ink); }
.segctl-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(19, 19, 19, 0.08); }
.ghost-btn.on { background: var(--info-bg); color: var(--info-fg); border-color: transparent; }

/* Project tabs and file tags */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font: 600 14px/1 var(--body); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--ochre); }
.asset-tag { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 7px; border-radius: 5px; background: var(--muted-bg); color: var(--muted-fg); font: 400 11px/1.4 var(--mono); white-space: nowrap; }
.asset-tag.warn { background: var(--changes-bg); color: var(--changes-fg); }
.asset-thumb { position: relative; }
.thumb-badge { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 5px; background: rgba(19, 19, 19, 0.78); color: #fff; font: 400 11px/1 var(--mono); }
.thumb-figma { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; opacity: 0.85; }

/* Colourway matrix */
.matrix-card { overflow: hidden; }
.matrix-wrap { display: flex; flex-direction: column; gap: 10px; }
.matrix-product { font-size: 16px; font-weight: 700; margin: 6px 0 0; }
.matrix-scroll { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 8px; margin: -8px; }
.matrix th { font: 400 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); text-align: center; padding: 0 2px; white-space: nowrap; }
.matrix tbody th { text-align: right; text-transform: none; letter-spacing: 0; font: 600 13px/1.3 var(--body); color: var(--ink); padding-right: 6px; }
.matrix td { width: 118px; min-width: 96px; }
.cell, .cell-empty { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; }
.cell { background: var(--canvas); }
.cell img { max-width: 90%; max-height: 90%; object-fit: contain; }
.cell:hover { outline: 2px solid var(--ochre); outline-offset: 1px; }
.cell-empty { border: 1.5px dashed var(--line); }
.cell-tag { position: absolute; right: 5px; bottom: 5px; padding: 1px 6px; border-radius: 4px; font: 400 10px/1.5 var(--mono); background: rgba(255, 255, 255, 0.9); color: #131313; }
.cell-tag.approved { background: #131313; color: #fff; }
.cell-tag.review { background: var(--review-bg); color: var(--review-fg); }
.cell-tag.changes { background: var(--changes-bg); color: var(--changes-fg); }
.cell-tag.draft { background: rgba(255, 255, 255, 0.7); color: var(--muted-fg); }

/* Downloads */
.dl-files { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.dl-files .check { gap: 8px; }
.dl-progress { display: flex; flex-direction: column; gap: 6px; }

/* Viewer: modes, ghost, figma */
.v-modebar { flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.v-modebar .segctl-btn { height: 26px; }
.v-stage[data-tool="crop"] { cursor: move; }
.v-ghost { position: absolute; left: 0; top: 0; pointer-events: none; image-rendering: auto; }
.v-figma { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #1E1E1E; }

/* Live web pages (design review). The page is drawn at full height; Waypoint scrolls it.
   In Comment mode clicks go to Waypoint's marks; in Interact mode they go to the page. */
.v-html { display: block; border: 0; background: #fff; pointer-events: none; }
/* A page's thumbnail shows the top of the page, edge to edge. */
img.thumb-page { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: top center; }
/* A web page sits on a plain off-white board, like a frame in a Figma file. */
.v-stage.board { background-color: #F2F1EE !important; }
.v-stage.interact { cursor: default; }
.v-stage.interact .v-html { pointer-events: auto; }
.v-stage.interact .v-overlay { pointer-events: none; }
/* Files attached to a comment */
.c-attach { display: flex; flex-wrap: wrap; gap: 6px; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 4px 3px 8px; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--surface); font-size: 12.5px; }
.attach-chip.error { border-color: var(--danger); color: var(--danger); }
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.thread-files { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 32px; margin-top: 6px; }
.reply .thread-files { padding-left: 0; }
.thread-file { display: flex; flex-direction: column; gap: 3px; width: 92px; color: inherit; text-decoration: none; }
.thread-file img, .thread-file-ic { width: 92px; height: 68px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); background: var(--surface-2); }
.thread-file img { object-fit: cover; display: block; }
.thread-file-ic { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.thread-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.thread-file:hover img, .thread-file:hover .thread-file-ic { border-color: var(--line); }
/* Phones: a live page scrolls inside the frame */
.simple-stage.page { padding: 0; }
.simple-page { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.c-screen { height: 34px; }
.frame-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 5px; background: var(--info-bg); color: var(--info-fg); font: 400 11px/1.5 var(--mono); border: 0; }
.frame-chip.link { cursor: pointer; }
.frame-chip.link:hover { background: #C8EEFF; }
.c-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Video player */
.player { flex: none; display: flex; align-items: center; gap: 14px; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line-soft); }
.pl-left, .pl-right { flex: none; gap: 4px; }
.pl-time { min-width: 108px; padding-left: 4px; }
.pl-tc { font-size: 13px; }
.pl-track { position: relative; height: 34px; cursor: pointer; outline: none; }
.pl-track:focus-visible { box-shadow: 0 0 0 2px var(--focus); border-radius: 6px; }
.pl-rail { position: absolute; left: 0; right: 0; top: 20px; height: 4px; border-radius: 2px; background: var(--line); }
.pl-range { position: absolute; top: 18px; height: 8px; border-radius: 3px; background: rgba(201, 168, 118, 0.55); }
.pl-markers { position: absolute; left: 0; right: 0; top: 4px; height: 10px; }
.pl-marker { position: absolute; top: 0; min-width: 6px; height: 8px; margin-left: -3px; border: 0; border-radius: 3px; background: #FF5A1F; cursor: pointer; padding: 0; }
.pl-marker.resolved { background: var(--grey) !important; }
.pl-marker.on { outline: 2px solid #2F6BFF; outline-offset: 1px; }
.pl-head { position: absolute; top: 12px; width: 2px; height: 20px; margin-left: -1px; background: var(--ink); border-radius: 1px; pointer-events: none; }
.pl-head::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.pl-rangetext { min-width: 0; color: var(--muted); }
.icon-btn.on { background: var(--line-soft); color: var(--ink); }

/* In situ mockups */
.v-insitu { flex: 1; min-height: 0; overflow: auto; background: #E4E3DF; }
.mk-desk { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; box-sizing: border-box; }
.mk-laptop { width: min(1100px, 92%); display: flex; flex-direction: column; align-items: center; }
.mk-lid { position: relative; width: 100%; aspect-ratio: 16 / 10.4; padding: 2.2% 2.2% 3%; border-radius: 18px 18px 6px 6px; background: #CFCEC9; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); box-sizing: border-box; }
.mk-cam { position: absolute; top: 0.9%; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #9C9B97; }
.mk-lid .mk-screen { width: 100%; height: 100%; overflow: hidden; border-radius: 4px; background: #fff; display: flex; flex-direction: column; }
.mk-base { position: relative; width: 112%; height: 16px; border-radius: 2px 2px 14px 14px; background: linear-gradient(#DAD9D5, #BDBCB8); }
.mk-notch { position: absolute; left: 50%; top: 0; width: 13%; height: 6px; margin-left: -6.5%; border-radius: 0 0 8px 8px; background: #B0AFAB; }
.mk-browser { flex: none; height: 4.2%; min-height: 18px; display: flex; align-items: center; gap: 12px; padding: 0 1.4%; background: #ECEBE8; border-bottom: 1px solid #DEDDD9; }
.mk-dots { display: flex; gap: 5px; }
.mk-dots i { width: 8px; height: 8px; border-radius: 50%; background: #CFCEC9; display: block; }
.mk-url { width: 32%; height: 52%; border-radius: 5px; background: #fff; margin: 0 auto; }
.mk-site { flex: 1; min-height: 0; overflow: hidden; background: #F3F3F1; display: flex; flex-direction: column; container-type: inline-size; }
.mk-nav { flex: none; height: 6.5cqw; max-height: 64px; background: #fff; display: flex; align-items: center; }
.mk-nav-in { width: 70%; margin: 0 auto; display: flex; align-items: center; gap: 2.2cqw; }
.mk-logo { width: 5.2cqw; height: 1.6cqw; border-radius: 2px; background: #2B2B2B; transform: skewX(-12deg); }
.mk-logo.light { background: rgba(255, 255, 255, 0.92); }
.mk-links { display: flex; gap: 1.6cqw; flex: 1; }
.mk-bar { display: block; height: 0.9cqw; border-radius: 2px; background: #C9C8C4; }
.mk-bar.link { height: 0.75cqw; background: #8E8D89; flex: none; }
.mk-search { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; border: 0.22cqw solid #555; flex: none; }
.mk-pill { display: block; height: 2.6cqw; width: 11cqw; border-radius: 999px; flex: none; }
.mk-pill.dark { background: #1A1A1A; }
.mk-pill.light { background: rgba(255, 255, 255, 0.95); width: 7cqw; }
.mk-pill.light.wide { width: 15cqw; }
.mk-pill.outline { border: 0.15cqw solid rgba(255, 255, 255, 0.9); width: 7cqw; box-sizing: border-box; }
.mk-hero { position: relative; flex: none; height: 32cqw; overflow: hidden; background: #9A9994; }
.mk-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-missing { background: repeating-linear-gradient(45deg, #A9A8A3 0 12px, #B3B2AD 12px 24px); }
.mk-grad { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0) 70%); }
.mk-grad.bottom { background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0) 60%); }
.mk-copy { position: absolute; left: 2.9cqw; bottom: 5.4cqw; width: 26cqw; display: flex; flex-direction: column; gap: 0.9cqw; }
.mk-copy .mk-bar { background: rgba(255, 255, 255, 0.9); }
.mk-copy .eyebrow { height: 0.7cqw; background: rgba(255, 255, 255, 0.75); margin-bottom: 0.6cqw; }
.mk-copy .title { height: 2.2cqw; border-radius: 3px; }
.mk-copy .body { height: 0.7cqw; background: rgba(255, 255, 255, 0.65); }
.mk-copy .body:first-of-type { margin-top: 0.6cqw; }
.mk-copy .mk-pill { margin-top: 1.4cqw; }
.mk-slider { position: absolute; left: 2.9cqw; right: 2.9cqw; bottom: 1.6cqw; display: flex; align-items: center; gap: 0.6cqw; }
.mk-arrow { width: 1.1cqw; height: 1.1cqw; border-radius: 3px; background: #1A1A1A; flex: none; }
.mk-track { flex: 1; height: 0.12cqw; min-height: 1px; background: rgba(255, 255, 255, 0.45); }
.mk-track.on { background: rgba(255, 255, 255, 0.95); }
.mk-cards { width: 70%; margin: 0.5cqw auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5cqw; }
.mk-card { position: relative; aspect-ratio: 1 / 0.82; background: #1B1B22; display: flex; align-items: flex-end; justify-content: center; }
.mk-card.warm { background: #8F6A4E; }
.mk-card-copy { width: 70%; margin-bottom: 2cqw; display: flex; flex-direction: column; align-items: center; gap: 0.8cqw; }
.mk-card-copy .mk-bar { background: rgba(255, 255, 255, 0.88); }
.mk-card-copy .mk-bar.title { height: 2cqw; }
.mk-card-copy .mk-bar.body { height: 0.7cqw; background: rgba(255, 255, 255, 0.6); }
.row-c { display: flex; gap: 0.5cqw; justify-content: center; margin-top: 0.6cqw; }

.mk-phone { position: relative; flex: none; border-radius: 46px; padding: 12px; background: #CFCEC9; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 30px 60px rgba(0, 0, 0, 0.12); }
.mk-phone.portrait { width: min(340px, 80vw); aspect-ratio: 9 / 19.5; }
.mk-phone.landscape { height: min(340px, 50vh); aspect-ratio: 19.5 / 9; }
.mk-phone .mk-screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.mk-island { position: absolute; z-index: 2; width: 28%; height: 22px; left: 36%; top: 22px; border-radius: 12px; background: #1A1A1A; }
.mk-phone.landscape .mk-island { width: 22px; height: 26%; left: 22px; top: 37%; }
.mk-site.mobile .mk-status { flex: none; height: 9cqw; display: flex; align-items: center; padding: 0 7cqw; gap: 4cqw; }
.mk-site.mobile .mk-bar.tiny { height: 2.2cqw; background: #1A1A1A; }
.mk-site.mobile .mk-nav { height: 14cqw; max-height: none; border-bottom: 1px solid #EEE; }
.mk-site.mobile .mk-nav-in { width: 88%; gap: 4cqw; }
.mk-site.mobile .mk-logo { width: 17cqw; height: 4.5cqw; }
.mk-site.mobile .mk-search { width: 4cqw; height: 4cqw; border-width: 0.7cqw; }
.mk-burger { display: flex; flex-direction: column; gap: 1.1cqw; flex: none; }
.mk-burger i { display: block; width: 5.5cqw; height: 0.7cqw; background: #1A1A1A; border-radius: 1px; }
.mk-burger.light i { background: #fff; }
.mk-hero.tall { height: 128cqw; }
.mk-site.mobile .mk-copy { left: 6cqw; right: 6cqw; width: auto; bottom: 11cqw; gap: 2.4cqw; }
.mk-site.mobile .mk-copy .eyebrow { height: 1.8cqw; }
.mk-site.mobile .mk-copy .title { height: 6.4cqw; }
.mk-site.mobile .mk-copy .body { height: 1.9cqw; }
.mk-site.mobile .mk-copy .mk-pill { height: 9cqw; width: 30cqw; margin-top: 3cqw; }
.mk-site.mobile .mk-slider { left: 6cqw; right: 6cqw; bottom: 4.5cqw; }
.mk-site.mobile .mk-track { height: 0.5cqw; }
.mk-site.mobile .mk-card { margin: 1.5cqw 0 0; aspect-ratio: 1 / 1; }
.mk-site.mobile .mk-card-copy { gap: 2.4cqw; margin-bottom: 8cqw; }
.mk-site.mobile .mk-card-copy .mk-bar.title { height: 5.4cqw; }
.mk-site.mobile .mk-card-copy .mk-bar.body { height: 1.9cqw; }
.mk-site.mobile .mk-card-copy .mk-pill { height: 9cqw; width: 38cqw; }
.mk-site.landscape { height: 100%; }
.mk-hero.full { height: 100%; }
.mk-nav.overlay { position: absolute; left: 0; right: 0; top: 0; height: 9cqw; max-height: none; background: transparent; z-index: 1; }
.mk-nav.overlay .mk-nav-in { width: 86%; }
.mk-nav.overlay .mk-logo { width: 9cqw; height: 2.6cqw; }
.mk-nav.overlay .mk-burger i { width: 3cqw; height: 0.4cqw; }
.mk-nav.overlay .mk-burger { gap: 0.6cqw; }
.mk-site.landscape .mk-copy { left: 7cqw; bottom: 8cqw; width: 38cqw; gap: 1.3cqw; }
.mk-site.landscape .mk-copy .title { height: 3.4cqw; }
.mk-site.landscape .mk-copy .body { height: 1cqw; }
.mk-site.landscape .mk-copy .eyebrow { height: 1cqw; }
.mk-site.landscape .mk-copy .mk-pill { height: 4.4cqw; width: 14cqw; }

.v-bar-mid { flex: none; }
.v-bar-left > * { flex: none; }
.v-bar-left .v-crumb { flex: 0 1 auto; min-width: 72px; }
@media (max-width: 1480px) { .v-bar-left .asset-tag, .v-bar-left .v-crumb.muted { display: none; } }
@media (max-width: 1220px) { .segctl-btn { padding: 0 8px; } .segctl-btn .icon { display: none; } }

/* Client home with the client's background image */
.ch-backdrop { position: fixed; inset: 0; z-index: 0; background: var(--bg) center / cover no-repeat; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.ch-backdrop.on { opacity: 1; }
.ch-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19, 19, 19, 0.66) 0%, rgba(19, 19, 19, 0.34) 34%, rgba(19, 19, 19, 0.22) 62%, rgba(19, 19, 19, 0.6) 100%); }
.client-home { position: relative; z-index: 1; padding-top: 64px; gap: 8px; }
.ch-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 28px; }
.ch-eyebrow { margin: 0; font: 400 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); }
.ch-title { margin: 0; font: 700 clamp(36px, 5vw, 56px)/1.04 var(--head); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.ch-lede { margin: 0 0 6px; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 52ch; }
.client-home .card-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.client-home .project-card { padding: 22px; }
.client-home .empty { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.client-home.on-image .ch-eyebrow { color: var(--ochre); }
.client-home.on-image .ch-title { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28); }
.client-home.on-image .ch-lede { color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3); }
.client-home.on-image .fchip { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.34); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.client-home.on-image .fchip:hover { background: rgba(255, 255, 255, 0.24); }
.client-home.on-image .fchip.on { background: #fff; border-color: #fff; color: #131313; }
.client-home.on-image .project-card { border-color: transparent; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08); }
.client-home.on-image .project-card:hover { transform: translateY(-2px); }
.client-home.on-image .pad { color: #fff; }
@media (prefers-reduced-motion: reduce) { .ch-backdrop { transition: none; } .client-home.on-image .project-card:hover { transform: none; } }

/* Brand settings: background preview */
.bg-preview { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 7; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.bg-preview.has { border-style: solid; border-color: var(--line-soft); }
.bg-preview img { width: 100%; height: 100%; object-fit: cover; }

/* New project: what it includes */
.type-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.type-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; }
.type-toggle:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.type-toggle input { accent-color: var(--ink); margin: 0; }
.type-badges { display: inline-flex; gap: 4px; }

/* Project settings: stage list */
.head-actions { gap: 16px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.stage-edit { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.stage-edit-row { display: flex; align-items: center; gap: 6px; }
.stage-edit-row .input { flex: 1; min-width: 0; height: 38px; }
.stage-edit-row .stage-num { flex: none; }
.stage-edit-row .nowrap { white-space: nowrap; padding: 0 4px; min-width: 76px; text-align: right; }
.icon-btn.danger:hover { color: var(--rust, #b5502f); }
.rot-up, .rot-down { display: inline-flex; }
.rot-up { transform: rotate(90deg); }
.rot-down { transform: rotate(-90deg); }

/* Assets: project page */
.dropzone.slim { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 14px 18px; gap: 6px 12px; }
.dropzone.slim strong { font-size: 14px; }
.list-tools { gap: 12px; margin-bottom: -8px; }
.fchip { display: inline-flex; align-items: center; gap: 7px; }
.fchip-count { font: 400 11px/1 var(--mono); opacity: 0.6; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.group-title { display: flex; align-items: center; gap: 8px; font: 700 15px/1.2 var(--head); margin: 0; }
.group-title .muted { font-family: var(--mono); font-weight: 400; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.item-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: inherit; text-decoration: none; transition: border-color .12s, transform .12s; min-width: 0; }
.item-card:hover { border-color: var(--ochre); transform: translateY(-1px); }
.item-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.item-card.attention { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), var(--shadow); }
.item-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--canvas); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.item-thumb.portrait { aspect-ratio: 9 / 16; }
/* The content fills the frame edge to edge, cropped from the centre. */
.item-frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.item-frame img, .item-frame .item-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-frame .item-video.hover { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; }
.item-thumb.playing .item-video.hover { opacity: 1; }
.item-thumb.playing .thumb-badge { opacity: 0; }
.thumb-type { color: rgba(255, 255, 255, 0.75); display: inline-flex; }
.item-ver { position: absolute; top: 8px; right: 8px; padding: 3px 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.9); color: #131313; font-size: 11px; line-height: 1; }
.item-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; min-width: 0; }
.item-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-stage { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-body .row.between { margin-top: 6px; }
.item-upload { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 14px; }
.list-activity { max-width: 640px; }

/* New project: asset rows */
.asset-setup { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 8px; }
.asset-setup:empty { display: none; }
.asset-setup-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
.asset-setup-stages { grid-column: 1 / -1; margin-top: -4px; }

/* Video: in/out range */
.pl-trackwrap { position: relative; flex: 1; min-width: 0; }
.pl-track.awaiting { cursor: col-resize; }
.pl-track.awaiting .pl-rail { background: linear-gradient(90deg, var(--line), var(--ochre)); }
.pl-flag { position: absolute; top: 6px; width: 2px; height: 26px; margin-left: -1px; background: var(--ochre); pointer-events: none; z-index: 1; }
.pl-flag-label { position: absolute; top: -2px; padding: 1px 4px; border-radius: 3px; background: var(--ochre); color: var(--ink); font-size: 9px; line-height: 1.2; letter-spacing: .04em; white-space: nowrap; }
.pl-flag.in .pl-flag-label { left: 2px; border-bottom-left-radius: 0; }
.pl-flag.out .pl-flag-label { right: 2px; border-bottom-right-radius: 0; }
.pl-range { background: rgba(201, 168, 118, 0.7); }
.pl-hint { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 3; padding: 9px 12px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: 13px; line-height: 1.4; box-shadow: 0 6px 20px rgba(19, 19, 19, 0.25); }
.pl-hint.done { background: var(--surface); color: var(--ink); border: 1px solid var(--ochre); }
.pl-hint .link-btn { color: inherit; text-decoration: underline; margin-left: 4px; }
.pl-right .btn.on { background: rgba(201, 168, 118, 0.25); border-color: var(--ochre); }
.pl-right .btn.pulse { animation: pl-pulse 1.2s ease-in-out infinite; border-color: var(--ochre); }
@keyframes pl-pulse { 50% { box-shadow: 0 0 0 4px rgba(201, 168, 118, 0.45); } }
@media (prefers-reduced-motion: reduce) { .pl-right .btn.pulse { animation: none; } }
.pl-right .icon-btn.on { background: var(--line-soft); color: var(--ink); }

/* Back navigation */
.backbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: -8px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: var(--shadow); max-width: 100%; }
.back-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn:hover { border-color: var(--ink); }
.back-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.backbar .crumbs { margin: 0; }
.v-back { height: 30px; box-shadow: none; flex: none; }

/* Theme toggle */
.brand-logo { filter: var(--logo-filter); }
/* The Waypoint logo in the brand ink: #131313 in light mode, #EEECE7 in dark (follows the theme). */
.brand-mark { display: block; height: 20px; aspect-ratio: 206 / 40; background: var(--ink); filter: none;
  -webkit-mask: url(/brand/waypoint.svg) center / contain no-repeat; mask: url(/brand/waypoint.svg) center / contain no-repeat; }
.login-header .brand-mark { height: 22px; }
.theme-btn { flex: none; }
.v-bar .theme-btn { margin-left: 2px; }

/* Upload review: renaming before upload */
.ur-top { display: grid; grid-template-columns: 1fr 240px; gap: 12px; }
.ur-scroll { max-height: min(56vh, 560px); overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.ur-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ur-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font: 600 11px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line-soft); }
.ur-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.ur-row.off td:not(.ur-check) { opacity: 0.45; }
.ur-check { width: 28px; padding-top: 14px !important; }
.ur-file { width: 22%; max-width: 220px; }
.ur-file .mono { display: block; overflow-wrap: anywhere; }
.ur-names { display: flex; flex-direction: column; gap: 4px; min-width: 260px; }
.ur-asset { font-weight: 700; font-size: 14px; margin-top: 2px; }
.ur-filename { overflow-wrap: anywhere; }
.ur-flag { display: flex; gap: 5px; align-items: flex-start; margin-top: 6px; color: var(--changes-fg); font-size: 12px; line-height: 1.35; }
.ur-flag svg { flex: none; margin-top: 1px; }
.input.input-sm { height: 34px; padding: 0 10px; font-size: 13px; }
select.input.input-sm { padding-right: 26px; }
@media (max-width: 760px) { .ur-top { grid-template-columns: 1fr; } }

.ur-table td:nth-child(3) { min-width: 178px; }
.ur-folder td { background: var(--surface-2); font: 600 12px/1 var(--body); color: var(--muted); padding: 8px 10px !important; }
.ur-folder svg { vertical-align: -2px; margin-right: 6px; }
.ur-loop { display: flex; align-items: center; gap: 6px; margin-top: 8px; cursor: pointer; }
.ur-loop input { margin: 0; accent-color: var(--ink); }
.dropzone .btn { margin-top: 4px; }
.dropzone.slim .btn { margin-top: 0; }

/* Activity: admin can hide entries */
.activity-head { margin-bottom: 4px; }
.events li.event { position: relative; padding-right: 24px; }
.event-x { position: absolute; right: -6px; top: -4px; width: 26px; height: 26px; opacity: 0; color: var(--muted); }
.events li.event:hover .event-x, .event-x:focus-visible { opacity: 1; }
@media (hover: none) { .event-x { opacity: 1; } }
.page-file { margin: -4px 0 2px; overflow-wrap: anywhere; }

/* Download all */
.project-card { position: relative; }
.card-dl { position: absolute; top: 14px; right: 14px; background: var(--surface-2); }
.card-dl:hover { background: var(--line-soft); }
.dl-cell { width: 44px; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Dragging a round between stages (admin) */
.asset-card.can-drag { cursor: grab; }
.asset-card.can-drag:active { cursor: grabbing; }
.dragging-round .stage-card { outline: 1.5px dashed var(--line); outline-offset: -1px; }
.stage-card.drop-over { outline: 2px solid var(--ochre) !important; background: color-mix(in srgb, var(--ochre) 10%, var(--surface)); }
.stage-card.drop-over::after { content: attr(data-drop-label); position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.stage-card { position: relative; }
.asset-card.can-drag { padding: 6px; margin: -6px; border-radius: 10px; border: 2px solid transparent; }
.asset-card.can-drag:hover { border-color: var(--line); }
.asset-card.drag-source { border-color: var(--ochre); background: var(--surface); box-shadow: var(--shadow); }
.asset-card.drag-left-behind { opacity: 0.4; }
.asset-card.can-drag img, .asset-card.can-drag a { -webkit-user-drag: none; user-select: none; }

/* Bulk selection */
.list-tools-right { gap: 10px; align-items: center; }
.item-check { position: absolute; top: 8px; left: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, 0.95); background: rgba(19, 19, 19, 0.35); color: #131313; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .12s; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.item-card:hover .item-check, .item-check:focus-visible, .has-selection .item-check, .item-check.on { opacity: 1; }
.item-check:hover { background: rgba(19, 19, 19, 0.55); }
.item-check.on { background: var(--ochre); border-color: var(--ochre); }
.item-check:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.item-card.selected { border-color: var(--ochre); box-shadow: 0 0 0 1px var(--ochre), var(--shadow); }
.has-selection { padding-bottom: 120px; }
.bulk-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28); max-width: calc(100vw - 32px); flex-wrap: wrap; }
.bulk-count { font-weight: 700; margin-right: 6px; white-space: nowrap; }
.btn.danger-ghost { color: var(--danger); }
/* Bulk move dialog */
.bm-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bm-mode { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.bm-mode:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.bm-mode input[type=radio] { margin-top: 3px; accent-color: var(--ink); }
.bm-mode .stack-xs { flex: 1; min-width: 0; }
.bm-mode select { flex-basis: 100%; }
.bm-scroll { max-height: 40vh; }
.bm-name { font-weight: 600; }
.ur-table tr.off td { opacity: 0.5; }
.bm-lock { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: var(--changes-bg); color: var(--changes-fg); }
@media (max-width: 640px) { .bm-modes { grid-template-columns: 1fr; } }
.backbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: -8px; }
.backbar-row .backbar { margin-bottom: 0; }
.asset-nav { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.asset-nav .mono { min-width: 48px; text-align: center; }
.decision-note { position: relative; padding-right: 48px; }
.note-x { position: absolute; top: 8px; right: 8px; color: var(--changes-fg); }

/* ---------- Help tips (tour.js) ---------- */
.tour-ring { position: fixed; z-index: 900; pointer-events: none; border-radius: 10px; border: 2px solid var(--ochre);
  box-shadow: 0 0 0 9999px rgba(19, 19, 19, 0.32); transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease; }
.tour-box { position: fixed; z-index: 901; width: 300px; max-width: calc(100vw - 24px); padding: 16px 18px 14px; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(19, 19, 19, 0.22);
  display: flex; flex-direction: column; gap: 6px; transition: left .2s ease, top .2s ease; }
.tour-count { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.tour-title { margin: 0; font-family: var(--head); font-size: 16px; line-height: 1.25; font-weight: 700; }
.tour-body { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.tour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.tour-arrow { position: absolute; width: 14px; height: 14px; background: var(--surface); border: 1px solid var(--line); transform: rotate(45deg); }
.tour-box[data-side="bottom"] .tour-arrow { top: -8px; border-right: 0; border-bottom: 0; }
.tour-box[data-side="top"] .tour-arrow { bottom: -8px; border-left: 0; border-top: 0; }
.tour-box[data-side="right"] .tour-arrow { left: -8px !important; border-right: 0; border-top: 0; }
.tour-box[data-side="left"] .tour-arrow { right: -8px; left: auto !important; border-left: 0; border-bottom: 0; }
.tour-box[data-side="none"] .tour-arrow { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-box { transition: none; } }

/* ---------- Email settings ---------- */
.set-row, .set-choice { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.set-row { justify-content: space-between; align-items: center; }
.set-text { display: flex; flex-direction: column; gap: 3px; }
.set-choice input[type="radio"] { margin: 3px 0 0; accent-color: var(--teal); width: 16px; height: 16px; flex: none; }
.set-summary { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); margin-left: 30px; }
.set-summary[hidden] { display: none; }
.set-field { display: flex; flex-direction: column; gap: 6px; }
.set-times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.set-time { display: inline-flex; align-items: center; gap: 2px; }
.set-tz { max-width: 360px; width: 100%; }
.set-save { gap: 12px; }
.topbar-right .btn.on { background: var(--surface-2); }

/* ---------- Legal pages (terms.html, privacy.html) ---------- */
.legal { padding-top: 32px; padding-bottom: 64px; line-height: 1.6; }
.legal h1 { font-family: var(--head); font-size: 34px; letter-spacing: -0.02em; margin: 8px 0 6px; }
.legal h2 { font-family: var(--head); font-size: 19px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 15px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; background: var(--surface-2); }
.legal a { color: var(--teal); }
.legal-nav { font-size: 14px; color: var(--muted); }
.legal-draft { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--changes-bg); color: var(--changes-fg); font-weight: 600; }
.legal-todo { background: var(--changes-bg); color: var(--changes-fg); padding: 0 3px; border-radius: 3px; }
.legal-foot { margin-top: 40px; }
@media (max-width: 600px) { .legal table { display: block; overflow-x: auto; } }
/* Agree to the terms (account creation and the one-time prompt) */
.terms-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.terms-check input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--teal); }
.terms-check a { color: var(--teal); }
.terms-check.need { color: var(--danger); }
.app-legal { display: flex; justify-content: center; gap: 14px; padding: 28px 16px 36px; font-size: 12px; color: var(--muted); }
.app-legal a { color: var(--muted); }

/* ---------- Tester bar ----------
   feedback.js puts a full-width bar along the bottom of the window for testers and sets
   --tester-h on <html> (0 when hidden). Lift what's pinned to the bottom and keep full-height
   screens clear of it. */
html.tester-on .viewer { height: calc(100vh - var(--tester-h, 0px)); }
html.tester-on .simple-viewer { height: calc(100vh - var(--tester-h, 0px)); height: calc(100dvh - var(--tester-h, 0px)); }
html.tester-on .viewer-loading, html.tester-on .login-page { min-height: calc(100vh - var(--tester-h, 0px)); }
html.tester-on #toasts { bottom: calc(20px + var(--tester-h, 0px)); }
html.tester-on .bulk-bar { bottom: calc(24px + var(--tester-h, 0px)); }

/* ---------- Feedback inbox (admin) ---------- */
.fb-self { font-weight: 600; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.fb-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: border-color .15s; }
.fb-card:hover { border-color: var(--line); }
.fb-card img, .fb-noimg { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--muted-bg); }
.fb-noimg { display: flex; align-items: center; justify-content: center; color: var(--muted-fg); font-size: 13px; }
.fb-noimg.big { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.fb-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.fb-chips { gap: 6px; flex-wrap: wrap; align-items: center; }
.fb-comment { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.fb-comment.full { font-size: 16px; display: block; -webkit-line-clamp: unset; }
.fb-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.fb-shot { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); background: var(--muted-bg); }
.fb-shot img { display: block; width: 100%; height: auto; }
.fb-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.fb-meta dt { font-family: var(--mono, 'Space Mono', monospace); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-fg); padding-top: 2px; }
.fb-meta dd { margin: 0; word-break: break-word; }
.fb-errors summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.fb-errors pre { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--muted-bg); font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; }
@media (max-width: 899px) { .fb-detail { grid-template-columns: 1fr; } }

.fb-head-actions { gap: 14px; flex-wrap: wrap; }

/* Nothing on a page may push it wider than the screen (phones would let it slide sideways). */
html, body { overflow-x: clip; }
.card-head .muted.small { white-space: nowrap; }
/* The phone preview is pinned to the window: Back stays at the top, nothing scrolls away. */
.simple-viewer { position: fixed; top: 0; left: 0; right: 0; bottom: var(--tester-h, 0px); height: auto; }
html.tester-on .simple-viewer { height: auto; }
.simple-head { padding-top: calc(8px + env(safe-area-inset-top)); }

/* Website pages: what the reviewer saw, with their marks */
.sp-top .sp-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.sp-top .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.sp-open { gap: 6px; }
.sp-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px; overflow: auto; background: var(--bg); }
.sp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink-2); max-width: 380px; }
.sp-frame { max-width: min(100%, 1100px); width: 100%; display: flex; justify-content: center; }
.sp-frame.laptop .sp-screen { border: 12px solid #1C1C1C; border-bottom-width: 18px; border-radius: 14px; }
.sp-frame.phone { max-width: 360px; }
.sp-frame.phone .sp-screen { border: 10px solid #1C1C1C; border-radius: 30px; overflow: hidden; }
.sp-screen { position: relative; line-height: 0; box-shadow: 0 8px 30px rgba(19, 19, 19, 0.18); max-height: calc(100vh - 170px); }
.sp-shot { display: block; max-width: 100%; max-height: calc(100vh - 200px); width: auto; height: auto; }
.sp-marks { position: absolute; inset: 0; pointer-events: none; }
.sp-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-pin { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #FF5A1F; border: 2px solid #fff; color: #fff; font: 700 11px/22px var(--mono); text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.sp-head { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #FF5A1F; }
.sp-text { position: absolute; transform: translateY(-80%); color: #FF5A1F; font: 700 15px/1.2 var(--body); background: rgba(255,255,255,.85); padding: 1px 4px; border-radius: 3px; white-space: nowrap; }
.sp-caption { text-align: center; }
.sp-pick { border: 0; background: none; padding: 0; text-align: left; color: inherit; cursor: pointer; width: 100%; }
.sp-on { padding-left: 32px; }
/* Project page: review the website */
.site-card { display: flex; flex-direction: column; gap: 14px; }
.site-devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.site-device { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; min-height: 64px; }
.site-device:hover { border-color: var(--ink); }
.site-qr { width: 220px; height: 220px; align-self: center; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 8px; padding: 6px; }
.site-qr svg { width: 100%; height: 100%; }
.site-snippet { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px; white-space: pre-wrap; word-break: break-all; font-size: 12.5px; user-select: all; }
.site-steps { padding-left: 20px; margin: 0; }
.item-path { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .sp-viewer .v-body { flex-direction: column; overflow-y: auto; }
  .sp-viewer .v-panel { width: auto; border-left: 0; border-top: 1px solid var(--line-soft); }
  .sp-stage { padding: 12px; flex: none; }
  .sp-top .mono, .sp-open .small, .sp-top .chip { display: none; }
  .sp-viewer { height: auto; min-height: 100vh; overflow: visible; }
}

/* The website in a clay laptop or phone (views/sitePreview.js) */
.sv-stage { flex: 1; min-height: 0; position: relative; background: #E4E3DF; overflow: auto; }
.sv-desk { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 28px 24px 36px; box-sizing: border-box; }
.sv-laptop { width: min(1200px, 100%, calc((100vh - 52px - 110px) * 1.5)); display: flex; flex-direction: column; align-items: center; }
.sv-lid { position: relative; width: 100%; padding: 2.4% 2.4% 3%; border-radius: 18px 18px 6px 6px; background: #CFCEC9; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); box-sizing: border-box; }
.sv-cam { position: absolute; top: 1%; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #9C9B97; }
.sv-screen { position: relative; width: 100%; overflow: hidden; border-radius: 4px; background: #fff; }
.sv-frame { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.sv-base { position: relative; width: 112%; height: 16px; border-radius: 2px 2px 14px 14px; background: linear-gradient(#DAD9D5, #BDBCB8); }
.sv-notch { position: absolute; left: 50%; top: 0; width: 13%; height: 6px; margin-left: -6.5%; border-radius: 0 0 8px 8px; background: #B0AFAB; }
.sv-phone { position: relative; width: min(380px, 100%, calc((100vh - 52px - 110px) * 0.44)); padding: 14px; border-radius: 46px; background: #CFCEC9; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); box-sizing: border-box; }
.sv-glass { border-radius: 34px; overflow: hidden; background: #fff; }
.sv-phone .sv-screen { border-radius: 0; }
.sv-status { height: 34px; display: flex; align-items: center; justify-content: center; background: #fff; }
.sv-island { width: 30%; height: 20px; border-radius: 999px; background: #1C1C1C; }
.sv-note { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(19, 19, 19, 0.2); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.sv-viewer .v-bar-mid .segctl-btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) { .sv-viewer .v-bar-mid { display: none; } .sv-viewer .v-crumb, .sv-viewer .v-bar-left .mono { display: none; } }
