/* LookExpress — stylesheet
   Idea: a press sheet's colour bar. Each workflow step owns one process colour
   (AI check = magenta, team review = cyan, customer = yellow, print = key/black).
   Everything else stays quiet so the step colours carry the meaning. */

:root {
  --paper: #f3f4f2;
  --surface: #ffffff;
  --sunk: #eceeec;
  --ink: #172030;
  --ink-2: #4c5768;
  --ink-3: #7b8595;
  --line: #d9dde0;
  --line-2: #e8ebec;

  --cyan: #0a7c91;
  --cyan-strong: #07677a;
  --cyan-bg: #e2f1f4;
  --magenta: #b8235a;
  --magenta-bg: #fae7ee;
  --yellow: #e2aa00;
  --yellow-ink: #6f5300;
  --yellow-bg: #fff4d2;
  --key: #172030;
  --green: #1d7747;
  --green-bg: #e3f2e9;
  --orange: #b85600;
  --orange-bg: #fdeedf;

  --r-sm: 6px;
  --r: 9px;
  --shadow: 0 1px 2px rgba(23, 32, 48, .06), 0 4px 14px rgba(23, 32, 48, .05);
  --shadow-pop: 0 10px 40px rgba(23, 32, 48, .18);
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --top: 58px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink);
  background: var(--paper); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
a { color: var(--cyan-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 15.5px; font-weight: 650; }
p { margin: 0; }
:where(svg[aria-hidden="true"]) { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.nav a svg { width: 17px; height: 17px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.code { font-weight: 600; letter-spacing: .01em; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a {
  padding: 7px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 550;
}
.nav a:hover { background: var(--sunk); text-decoration: none; color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--sunk); }
.who {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.who:hover { border-color: var(--ink-3); }
.who .lbl { font-size: 12px; color: var(--ink-3); }
.who .nm { font-weight: 650; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--key); flex: none;
}
.avatar.rev { background: var(--cyan); }
.avatar.cust { background: var(--yellow); color: var(--key); }
.avatar.sm { width: 22px; height: 22px; font-size: 10.5px; }

/* ------------------------------------------------------------ layout */
main { min-height: calc(100vh - var(--top)); }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 22px 60px; }
.page.wide { max-width: none; padding: 0; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { margin-top: 6px; color: var(--ink-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.panel-pad { padding: 18px 20px; }
.section { margin-top: 30px; }
.section > h2 { margin-bottom: 4px; }
.section > .hint { color: var(--ink-3); font-size: 13px; margin-bottom: 12px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn.primary:hover { background: var(--cyan-strong); border-color: var(--cyan-strong); }
.btn.dark { background: var(--key); border-color: var(--key); color: #fff; }
.btn.dark:hover { background: #000; }
.btn.good { background: var(--green); border-color: var(--green); color: #fff; }
.btn.warn { background: var(--surface); border-color: var(--magenta); color: var(--magenta); }
.btn.warn:hover { background: var(--magenta-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunk); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.icon { width: 34px; padding: 0; }
.btn.icon.sm { width: 28px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--cyan-strong); font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* ------------------------------------------------------------ forms */
label.f { display: block; }
label.f > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
label.f > span em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.in, select.in, textarea.in {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface);
}
textarea.in { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.in:focus { border-color: var(--cyan); outline: 0; box-shadow: 0 0 0 3px var(--cyan-bg); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--cyan); flex: none; }
.search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; min-width: 240px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
}
.search input { border: 0; outline: 0; flex: 1; background: transparent; }
.search svg { width: 16px; color: var(--ink-3); }

/* ------------------------------------------------------------ pills & badges */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--sunk); color: var(--ink-2);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.s-upload { background: var(--sunk); color: var(--ink-2); }
.pill.s-ai_check { background: var(--magenta-bg); color: var(--magenta); }
.pill.s-team_review { background: var(--cyan-bg); color: var(--cyan-strong); }
.pill.s-customer { background: var(--yellow-bg); color: var(--yellow-ink); }
.pill.s-print { background: var(--key); color: #fff; }
.pill.s-fail { background: var(--magenta-bg); color: var(--magenta); }
.pill.s-old { background: transparent; color: var(--ink-3); border: 1px dashed var(--line); }
.pill.plain::before { display: none; }
.tag {
  display: inline-flex; align-items: center; height: max-content; padding: 0 8px; border-radius: 5px;
  background: var(--sunk); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.itemcode { background: var(--key); color: #fff; }
.lock { display: inline-flex; align-items: center; gap: 4px; color: var(--key); font-weight: 650; font-size: 12.5px; }
.lock svg { width: 14px; height: 14px; }
.sev { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: .02em; }
.sev.CRITICAL { background: var(--magenta); color: #fff; }
.sev.MAJOR { background: var(--orange-bg); color: var(--orange); }
.sev.MINOR { background: var(--sunk); color: var(--ink-2); }
.sev.INFO { background: transparent; color: var(--ink-3); border: 1px solid var(--line); }

/* ------------------------------------------------------------ the colour bar (journey rail) */
.rail { display: grid; grid-template-columns: 26px repeat(5, 1fr); gap: 4px; align-items: end; }
.rail .reg { align-self: start; color: var(--ink-3); padding-top: 1px; }
.rail .reg svg { width: 18px; height: 18px; }
.rail .st { min-width: 0; }
.rail .bar { height: 10px; border-radius: 2px; background: var(--line-2); position: relative; }
.rail .st.done .bar, .rail .st.now .bar { background: var(--c); }
.rail .st.done .bar { opacity: .45; }
.rail .st.now .bar { height: 16px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--c); }
.rail .nm { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); font-weight: 550; }
.rail .st.done .nm { color: var(--ink-2); }
.rail .st.now .nm { color: var(--ink); font-weight: 700; }
.rail .st.now .nm small { display: block; font-weight: 500; color: var(--ink-2); font-size: 12px; }
.rail .c-upload { --c: #8e97a4; }
.rail .c-ai_check { --c: var(--magenta); }
.rail .c-team_review { --c: var(--cyan); }
.rail .c-customer { --c: var(--yellow); }
.rail .c-print { --c: var(--key); }
.rail.mini { grid-template-columns: repeat(5, 1fr); gap: 3px; width: 120px; }
.rail.mini .bar { height: 5px; }
.rail.mini .st.now .bar { height: 7px; box-shadow: none; }
.rail.mini .nm, .rail.mini .reg { display: none; }

/* ------------------------------------------------------------ next step card */
.next {
  display: grid; grid-template-columns: 6px 1fr auto; gap: 0 18px; align-items: center;
  padding: 16px 20px 16px 0; overflow: hidden;
}
.next .stripe { align-self: stretch; background: var(--c, var(--cyan)); }
.next .who-lbl { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.next h3 { font-size: 17px; margin: 2px 0 3px; }
.next p { color: var(--ink-2); max-width: 64ch; }
.next .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ------------------------------------------------------------ home */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.hello h1 { font-size: 30px; }
.totals { display: flex; gap: 26px; margin-top: 10px; color: var(--ink-2); font-size: 13.5px; }
.totals b { color: var(--ink); font-size: 15px; margin-right: 4px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; margin-top: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 9px; cursor: pointer; color: inherit; position: relative;
}
.card:hover { border-color: var(--ink-3); text-decoration: none; }
.card .top { display: flex; gap: 8px; align-items: center; }
.card .name { font-weight: 650; font-size: 15px; }
.card .todo { font-size: 13.5px; color: var(--ink); display: flex; gap: 6px; align-items: baseline; }
.card .todo::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--cyan)); transform: translateY(-1px); }
.card .meta { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: 12.5px; }
.empty {
  border: 1.5px dashed var(--line); border-radius: var(--r); padding: 26px; text-align: center; color: var(--ink-2);
}
.empty h3 { margin-bottom: 6px; color: var(--ink); }
.empty .btn { margin-top: 14px; }
.feed { display: flex; flex-direction: column; }
.feed .it { padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.feed .it:last-child { border-bottom: 0; }
.feed .it .when { color: var(--ink-3); font-size: 12px; }
.howto { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 18px; }
.howto .s { padding: 14px 14px 16px; background: var(--surface); border-top: 6px solid var(--c); }
.howto .s:first-child { border-radius: var(--r) 0 0 var(--r); }
.howto .s:last-child { border-radius: 0 var(--r) var(--r) 0; }
.howto .s b { display: block; margin-bottom: 4px; }
.howto .s span { color: var(--ink-2); font-size: 13px; }
.banner {
  display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: var(--r);
  background: var(--yellow-bg); color: var(--yellow-ink); margin-top: 18px;
}
.banner.info { background: var(--cyan-bg); color: var(--cyan-strong); }
.banner .grow { color: var(--ink); }

/* ------------------------------------------------------------ files */
.files { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.tree { position: sticky; top: calc(var(--top) + 20px); padding: 10px 8px; }
.tree .node {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer;
  color: var(--ink-2); font-weight: 550; font-size: 13.5px;
}
.tree .node:hover { background: var(--sunk); color: var(--ink); }
.tree .node.on { background: var(--cyan-bg); color: var(--cyan-strong); }
.tree .node svg { width: 16px; height: 16px; flex: none; }
.tree .node .n { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.tree .kids { padding-left: 14px; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: 13.5px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); }
.crumbs .cur { color: var(--ink); font-weight: 650; }
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td { background: #fafbfa; }
.fname { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.fname svg { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
.fname.folder svg { color: var(--yellow); }
.fname small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12.5px; }

/* ------------------------------------------------------------ menus */
.menu {
  position: fixed; z-index: 80; min-width: 190px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 5px;
}
.menu button, .menu .mi {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: var(--r-sm); cursor: pointer; text-align: left; font-weight: 500;
}
.menu button:hover { background: var(--sunk); }
.menu button.danger { color: var(--magenta); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.menu .hd { font-size: 12px; color: var(--ink-3); padding: 6px 10px 4px; font-weight: 600; }
.menu button.on { background: var(--cyan-bg); color: var(--cyan-strong); }
.menu svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------ modal */
.scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(23, 32, 48, .42);
  display: grid; place-items: center; padding: 20px; animation: fade .12s ease-out;
}
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); animation: pop .16s ease-out;
}
.modal.wide { width: min(820px, 100%); }
.modal .mh { padding: 20px 22px 6px; }
.modal .mh p { color: var(--ink-2); margin-top: 5px; }
.modal .mb { padding: 14px 22px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.modal .mf { padding: 14px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .scrim, .modal { animation: none; } }

/* drop zones */
.drops { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drop {
  border: 1.5px dashed var(--line); border-radius: var(--r); padding: 16px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 4px; min-height: 128px; background: #fbfbfa;
}
.drop:hover, .drop.over { border-color: var(--cyan); background: var(--cyan-bg); }
.drop.has { border-style: solid; border-color: var(--cyan); background: var(--surface); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop b { font-size: 14.5px; }
.drop .req { font-size: 11.5px; font-weight: 700; color: var(--magenta); }
.drop .opt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.drop .fmt { color: var(--ink-3); font-size: 12.5px; }
.drop .picked { margin-top: auto; display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.drop .picked svg { width: 18px; color: var(--cyan); flex: none; }

/* ------------------------------------------------------------ toast */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--key); color: #fff; padding: 11px 16px; border-radius: var(--r); box-shadow: var(--shadow-pop);
  font-weight: 550; max-width: 560px; animation: pop .16s ease-out;
}
.toast.err { background: var(--magenta); }

/* ------------------------------------------------------------ artwork page */
.art-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.art-head .ids { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.vlist { display: flex; flex-direction: column; }
.vrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line-2); align-items: start; }
.vrow:last-child { border-bottom: 0; }
.vrow .vn { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1; padding-top: 3px; }
.vrow.old .vn { color: var(--ink-3); }
.vrow .files { display: flex; flex-direction: column; gap: 3px; margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.vrow .files a { color: var(--ink-2); }
.vrow .note { margin-top: 6px; font-size: 13.5px; }
.sends .s { padding: 13px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.sends .s:last-child { border-bottom: 0; }
.sends .k { font-weight: 650; }
.dl { display: flex; align-items: center; gap: 5px; }
.dl svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------ workspace */
.ws { display: grid; grid-template-rows: auto auto 1fr; height: calc(100vh - var(--top)); }
.ws-head { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ws-head .title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws-head .title h1 { font-size: 18px; }
.ws-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ws-sub { display: flex; gap: 22px; align-items: center; padding: 10px 20px 12px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ws-sub .rail { flex: 1; min-width: 420px; max-width: 760px; }
.ws-sub .nexthint { flex: 1; min-width: 240px; font-size: 13px; color: var(--ink-2); }
.ws-sub .nexthint b { color: var(--ink); }
.ws-body { display: grid; grid-template-columns: minmax(0, 1fr) 6px min(var(--side-w, 500px), 48vw); min-height: 0; }
.stage { display: flex; flex-direction: column; min-height: 0; background: #e7e9e6; position: relative; }
.vtools { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vtools .sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 0 11px; height: 30px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--key); color: #fff; }
.seg button svg { width: 15px; height: 15px; }
.panes { flex: 1; display: grid; grid-template-columns: 1fr; gap: 2px; min-height: 0; }
.panes.split { grid-template-columns: minmax(0, var(--l, 1fr)) 8px minmax(0, var(--r, 1fr)); gap: 0; }
.pane { overflow: auto; position: relative; min-width: 0; scrollbar-gutter: stable; }
.pane-label {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(4px);
}
.pane-label .x { margin-left: auto; }
.sheets { padding: 18px 18px 92px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.sheet { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 6px 22px rgba(0, 0, 0, .08); }
.sheet img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.sheet .pno { position: absolute; top: -14px; left: 0; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.sheet.pinning { cursor: crosshair; }
.panes.panning .pane { cursor: grab; }
.panes.panning .pane:active { cursor: grabbing; }
/* one colour for every mark, comment pin and AI-finding box; the selected one turns teal (--cyan) */
:root { --mark: #e11d2e; --mark-bg: rgba(225, 29, 46, .07); }
.hl {
  --hlc: var(--mark); --hlb: var(--mark-bg);
  position: absolute; border: 0; outline: 1.5px solid var(--hlc); outline-offset: 2px; background: var(--hlb);
  border-radius: 2px; cursor: pointer; transition: outline-width .12s, background-color .12s;
}
/* (severity no longer changes the box colour) */
/* change type wins over severity for version differences */
.hl.k-added { --hlc: #1d7747; --hlb: rgba(29, 119, 71, .09); }
.hl.k-removed { --hlc: #c3262f; --hlb: rgba(195, 38, 47, .08); }
.hl.k-changed { --hlc: #c98a00; --hlb: rgba(226, 170, 0, .12); }
.hl:hover { outline-width: 2.5px; --hlb: rgba(10, 124, 145, .10); z-index: 2; }
.hl.approx { outline-style: dashed; }
.hl.rejected { opacity: .35; outline-style: dotted; }
.hl.focus { outline: 2.5px solid var(--cyan); box-shadow: 0 0 0 6px rgba(10, 124, 145, .22); background: rgba(10, 124, 145, .12); z-index: 3; }
.pin {
  position: absolute; width: 26px; height: 26px; margin: -26px 0 0 -2px; border-radius: 13px 13px 13px 2px;
  background: var(--mark); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); border: 2px solid #fff; z-index: 4;
}
.pin.focus, .mk-badge.focus { background: var(--cyan); }
.pin.done { opacity: .45; }
.pin.focus { transform: scale(1.2); }
.mk-badge {
  position: absolute; width: 19px; height: 19px; margin: -9px 0 0 -9px; border-radius: 999px;
  background: var(--mark); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  cursor: default; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); border: 2px solid #fff; z-index: 4;
}
.nopreview { margin: 40px auto; max-width: 480px; background: var(--surface); border-radius: var(--r); padding: 22px; }

/* markup / annotation layer + floating toolbar */
.markup-canvas { position: absolute; inset: 0; touch-action: none; }
.marktools {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 15;
  display: flex; align-items: center; gap: 2px; background: var(--key); border-radius: 999px;
  padding: 6px; box-shadow: var(--shadow-pop);
}
.mt-btn {
  border: 0; background: none; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  color: #b9c0cc; cursor: pointer; flex: none;
}
.mt-btn svg { width: 18px; height: 18px; }
.mt-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.mt-btn.on { color: var(--key); background: #fff; }
.mt-caret {
  border: 0; background: none; width: 14px; height: 34px; margin-right: 2px; cursor: pointer; flex: none;
  display: grid; place-items: center;
}
.mt-caret::after { content: ""; width: 11px; height: 11px; border-radius: 999px; background: var(--sw, #fff); border: 2px solid rgba(255, 255, 255, .7); margin-top: 0; }
.mt-caret { width: 18px; }
.mt-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .18); margin: 0 4px; flex: none; }
.mt-pop {
  position: fixed; z-index: 40; display: flex; gap: 6px; background: var(--key); border-radius: 999px;
  padding: 7px; box-shadow: var(--shadow-pop);
}
.mt-swatch { width: 22px; height: 22px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .25); background: var(--sw); cursor: pointer; }
.mt-swatch.on { border-color: #fff; }
.txtpop {
  position: absolute; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-pop); padding: 6px;
}
.txtpop input { border: 0; outline: 0; font-size: 13px; font-weight: 600; min-width: 140px; }
@media (max-width: 860px) {
  .marktools { max-width: calc(100vw - 24px); overflow-x: auto; bottom: 10px; }
}
.nopreview pre { white-space: pre-wrap; font: inherit; font-size: 13px; max-height: 60vh; overflow: auto; background: var(--sunk); padding: 12px; border-radius: var(--r-sm); }

.side { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  border: 0; background: none; padding: 10px 10px 11px; font-weight: 600; color: var(--ink-3); cursor: pointer;
  border-bottom: 2.5px solid transparent; white-space: nowrap; font-size: 13.5px;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .cnt { font-size: 11.5px; background: var(--sunk); padding: 1px 6px; border-radius: 999px; margin-left: 4px; color: var(--ink-2); }
.side-body { overflow: auto; flex: 1; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 14px; background: #fafbfa; }

.progress { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.progress .ppl { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.progress .p { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.progress .p .st { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.progress .p .st.ok { color: var(--green); }
.progress .p .st.ch { color: var(--orange); }
.progress .p .st.wait { color: var(--yellow-ink); }
.progress .p .st.skip { color: var(--ink-3); }
.meter { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--cyan); }

.filters { display: flex; gap: 6px; padding: 12px 14px 4px; flex-wrap: wrap; align-items: center; }
.chipf { border: 1px solid var(--line); background: var(--surface); height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chipf.on { background: var(--key); border-color: var(--key); color: #fff; }

.fnd { padding: 13px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.fnd:hover { background: #fafbfa; }
.fnd.focus { background: var(--cyan-bg); }
.fnd.rejected .sum { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.fnd .hd { display: flex; gap: 7px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.fnd .cat { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.fnd .ai { font-size: 11px; font-weight: 700; color: var(--magenta); border: 1px solid var(--magenta); border-radius: 4px; padding: 0 5px; }
.fnd .sum { font-size: 13.5px; }
.fnd .diff { margin-top: 8px; font-size: 13px; display: grid; gap: 3px; }
.fnd .diff .o { background: var(--magenta-bg); padding: 3px 7px; border-radius: 4px; text-decoration: line-through; text-decoration-color: rgba(184,35,90,.45); }
.fnd .diff .n { background: var(--green-bg); padding: 3px 7px; border-radius: 4px; }
.fnd .ainote { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.fnd .dec { display: flex; gap: 6px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.dec-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.dec-badge.ACCEPTED { background: var(--green-bg); color: var(--green); }
.dec-badge.REJECTED { background: var(--sunk); color: var(--ink-3); }
.dec-badge.PENDING { background: var(--yellow-bg); color: var(--yellow-ink); }
/* approve / reject by everyone: one chip per person (coordinator + each reviewer) */
.votes { display: flex; gap: 5px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.cmt .votes, .cmt > .dec { margin-left: 30px; }
.cmt > .dec { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.vchip { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 10px; background: var(--sunk); color: var(--ink-3); white-space: nowrap; }
.vchip.APPROVED { background: var(--green-bg); color: var(--green); }
.vchip.REJECTED { background: var(--sunk); color: var(--magenta); text-decoration: line-through; }
.thread { margin-top: 10px; border-left: 2px solid var(--line); padding-left: 10px; display: flex; flex-direction: column; gap: 8px; }

.cmt { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.cmt.focus { background: var(--cyan-bg); }
.cmt .hd { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cmt .hd b { font-weight: 650; }
.cmt .hd .when { color: var(--ink-3); font-size: 12px; }
.cmt .hd .acts { margin-left: auto; display: flex; gap: 2px; }
.cmt .txt { margin: 5px 0 0 30px; font-size: 13.8px; white-space: pre-wrap; word-wrap: break-word; }
.cmt .where { margin: 4px 0 0 30px; font-size: 12px; color: var(--ink-3); }
.cmt .replies { margin: 8px 0 0 30px; display: flex; flex-direction: column; gap: 8px; }
.cmt.resolved .txt { color: var(--ink-3); }
.mini-c { font-size: 13px; }
.mini-c b { font-weight: 650; margin-right: 4px; }
.composer { display: flex; flex-direction: column; gap: 8px; }
.composer textarea { min-height: 62px; }
.composer .row { justify-content: space-between; }
.popcomp {
  position: absolute; z-index: 20; width: 280px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-pop);
  padding: 10px; border: 1px solid var(--line);
}

.chg { padding: 10px 16px; border-bottom: 1px solid var(--line-2); font-size: 13px; display: grid; grid-template-columns: 84px 1fr; gap: 10px; }
.chg .t { font-weight: 700; font-size: 11.5px; }
.chg .t.TEXT_ADDED { color: var(--green); }
.chg .t.TEXT_REMOVED { color: var(--magenta); }
.chg .t.TEXT_CHANGED { color: var(--orange); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; padding: 14px 16px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; word-break: break-word; }

.ai-run { max-width: 460px; margin: 60px auto; background: var(--surface); border-radius: var(--r); padding: 24px 26px; }
.ai-run ol { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 9px; }
.ai-run li { display: flex; gap: 10px; align-items: center; color: var(--ink-3); }
.ai-run li.done { color: var(--ink-2); }
.ai-run li.now { color: var(--ink); font-weight: 650; }
.ai-run li i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.ai-run li.done i { background: var(--magenta); border-color: var(--magenta); }
.ai-run li.now i { border-color: var(--magenta); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--cyan); animation: spin .8s linear infinite; display: inline-block; }
.loading { display: grid; place-items: center; padding: 80px; }

/* ------------------------------------------------------------ team */
.people { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.person:last-child { border-bottom: 0; }
.person .num { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.addline { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 14px 16px; background: #fafbfa; border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r) var(--r); }

/* team page */
.tm-big { background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; overflow: hidden; box-shadow: var(--shadow); }
.tm-big + .tm-big { margin-top: 16px; }
.tm-phead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.tm-phead h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.tm-phead .hint { margin: 2px 0 0; line-height: 1.45; }
.tm-tile { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--cyan-bg); color: var(--cyan); }
.tm-tile svg { width: 25px; height: 25px; }
.tm-tile.y { background: var(--yellow-bg); color: var(--yellow-ink); }
.tm-tile.k { background: var(--sunk); color: var(--key); }
.tm-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--cyan-bg); color: var(--cyan-strong); font-size: 12px; font-weight: 650; }
.tm-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; background: var(--sunk); color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* reviewer cards */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 16px; align-items: stretch; }
.tm-rc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.tm-rc:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23, 32, 48, .06), 0 14px 26px -12px rgba(23, 32, 48, .25); }
.tm-rc-top { display: flex; align-items: center; gap: 12px; padding: 15px 14px 15px 16px; background: var(--cyan-bg); border-bottom: 1px solid var(--line-2); }
.tm-rc-top .avatar { width: 48px; height: 48px; font-size: 15px; box-shadow: 0 0 0 3px var(--surface); }
.tm-rc-id { flex: 1; min-width: 0; }
.tm-rc-id .num { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--cyan-strong); }
.tm-rc-id b { display: block; font-size: 16.5px; line-height: 1.3; overflow-wrap: anywhere; }
.tm-acts { display: flex; align-items: center; gap: 6px !important; }
.tm-acts .btn.ghost { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: var(--surface); color: var(--ink); }
.tm-acts .btn.ghost:hover { background: var(--line); }
.tm-acts .tm-del:hover { background: var(--magenta-bg); color: var(--magenta); }
.tm-rc-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; flex: 1; }
.tm-mail { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.tm-mail svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.tm-mail .ellipsis { min-width: 0; }
.tm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm-stat { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); min-width: 0; }
.tm-stat b { font-size: 22px; line-height: 1; color: var(--ink); }
.tm-stat span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tm-stat.warn { background: var(--yellow-bg); }
.tm-stat.warn b, .tm-stat.warn span { color: var(--yellow-ink); }
.tm-stat.ok { background: var(--green-bg); }
.tm-stat.ok b, .tm-stat.ok span { color: var(--green); }
.tm-invrow { margin-top: auto; display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--sunk); }
.tm-invrow.sent { background: var(--yellow-bg); }
.tm-ic { flex: none; display: grid; place-items: center; color: var(--ink-3); }
.tm-ic svg { width: 16px; height: 16px; }
.tm-invrow.sent .tm-ic { color: var(--yellow-ink); }
.tm-invtxt { flex: 1 1 130px; min-width: 0; overflow-wrap: anywhere; }
.tm-invite { height: 30px; padding: 0 13px; font-size: 12.5px; font-weight: 650; border-radius: 99px; color: var(--cyan-strong); background: var(--surface); border: 1.5px solid var(--cyan); }
.tm-invite:hover { background: var(--cyan); color: #fff; }
.tm-invite svg { width: 14px; height: 14px; }

/* add reviewer strip */
.tm-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; margin: 20px -22px -22px; padding: 18px 22px; background: var(--cyan-bg); }
.tm-field { position: relative; display: block; min-width: 0; }
.tm-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--cyan-strong); pointer-events: none; }
.tm-field .in { width: 100%; padding-left: 42px; height: 44px; background: var(--surface); border-radius: 10px; }
.tm-add .btn.primary { height: 44px; padding: 0 22px; border-radius: 10px; font-weight: 650; justify-content: center; }

/* customers / printers */
.tm-crow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.tm-crow .avatar { width: 40px; height: 40px; }
.tm-crow .tm-acts .btn.ghost { background: var(--sunk); }
.tm-crow .tm-acts .btn.ghost:hover { background: var(--line); }
.tm-crow .tm-acts .tm-del:hover { background: var(--magenta-bg); }
.tm-cname { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14.5px; }
.tm-info { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--cyan-bg); color: var(--cyan-strong); font-size: 13.5px; line-height: 1.45; }
.tm-info p { margin: 0; }
.tm-i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); color: #fff; font-size: 13px; font-weight: 700; font-style: italic; font-family: Georgia, serif; }
.tm-cfoot { padding-top: 14px; }
.tm-addbtn { height: 40px; padding: 0 18px; border-radius: 12px; font-weight: 650; }
@media (max-width: 760px) {
  .tm-big { padding: 16px; }
  .tm-add { grid-template-columns: 1fr; margin: 16px -16px -16px; padding: 14px 16px; }
}

/* account page */
.ac-card { margin-top: 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.page-head + .ac-card { margin-top: 0; }
.ac-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.ac-head h2 { margin: 0; font-size: 18px; }
.ac-head .hint { margin: 2px 0 0; }
.ac-tile { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--cyan-bg); color: var(--cyan); }
.ac-tile svg { width: 23px; height: 23px; }
.ac-body { padding: 20px 22px; }
.ac-inline { display: flex; align-items: center; gap: 12px; }
.ac-field { position: relative; flex: 1; display: block; min-width: 0; }
.ac-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--cyan-strong); pointer-events: none; }
.ac-field .in { width: 100%; padding-left: 42px; }
.ac-card .in { height: 44px; border-radius: 10px; }
.ac-card .f > span { font-weight: 600; }
.ac-card .btn.primary { height: 44px; padding: 0 22px; border-radius: 10px; font-weight: 650; }
.ac-orgs { display: flex; flex-direction: column; }
.ac-org { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.ac-org:last-child { border-bottom: 0; }
.ac-org.now { background: var(--cyan-bg); }
.ac-org .avatar { width: 42px; height: 42px; flex: none; }
.ac-oi { flex: 1; min-width: 0; }
.ac-oi b { font-size: 15px; }
.ac-now { display: inline-block; margin-left: 6px; padding: 0 9px; line-height: 20px; border-radius: 99px; background: var(--cyan); color: #fff; font-size: 11.5px; font-weight: 650; }
.ac-ren { height: 32px; padding: 0 14px; border-radius: 99px; font-weight: 650; color: var(--cyan-strong); background: var(--surface); border: 1.5px solid var(--cyan); }
.ac-ren:hover { background: var(--cyan); color: #fff; }
@media (max-width: 560px) {
  .ac-inline { flex-direction: column; align-items: stretch; }
  .ac-head, .ac-body, .ac-org { padding-left: 16px; padding-right: 16px; }
}

/* ------------------------------------------------------------ send dialog */
.meta-box { background: var(--sunk); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13px; }
.meta-box table { border-collapse: collapse; }
.meta-box td { padding: 2px 14px 2px 0; vertical-align: top; }
.meta-box td:first-child { color: var(--ink-3); white-space: nowrap; }
.lockwarn { display: flex; gap: 12px; padding: 12px 14px; background: var(--key); color: #fff; border-radius: var(--r-sm); }
.lockwarn svg { width: 20px; height: 20px; flex: none; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; }
.choice label:has(input:checked) { border-color: var(--cyan); background: var(--cyan-bg); }
.choice input { accent-color: var(--cyan); margin-top: 3px; }
.choice b { display: block; }
.choice span { font-size: 12.5px; color: var(--ink-2); }

/* ------------------------------------------------------------ approval (public) */
.approve { max-width: 980px; margin: 0 auto; padding: 30px 22px 60px; }
.approve .card-a { background: var(--surface); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.approve .ah { padding: 22px 26px; border-bottom: 1px solid var(--line-2); border-top: 6px solid var(--yellow); }
.approve .abody { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.approve .apages { background: #e7e9e6; padding: 18px; max-height: 76vh; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.approve .aside { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.approve .done { padding: 50px 26px; text-align: center; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .ws-body { grid-template-columns: minmax(0, 1fr) 6px min(var(--side-w, 420px), 44vw); }
  .home-grid, .two { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav a span { display: none; }
  .files { grid-template-columns: 1fr; }
  .tree { position: static; }
  .ws { height: auto; }
  .ws-body, .ws-body.noside { grid-template-columns: 1fr; }
  .side-resizer, .pane-divider { display: none; }
  .stage { height: 70vh; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .panes.split { grid-template-columns: 1fr; }
  .howto { grid-template-columns: 1fr; }
  .howto .s, .howto .s:first-child, .howto .s:last-child { border-radius: 0; }
  .drops, .grid2, .choice, .addline { grid-template-columns: 1fr; }
  .ws-sub .rail { min-width: 0; }
  .approve .abody { grid-template-columns: 1fr; }
  .who .lbl { display: none; }
  table.list .hide-m { display: none; }
  .next { grid-template-columns: 6px 1fr; }
  .next .acts { grid-column: 2; justify-content: flex-start; margin-top: 10px; }
}

/* overlay layer for highlight boxes & pins */
.sheet .ov { position: absolute; inset: 0; pointer-events: none; }
.sheet .ov .hl, .sheet .ov .pin, .sheet .ov .mk-badge { pointer-events: auto; }
.sheet.pinning .ov .hl { pointer-events: none; }

/* ------------------------------------------------------------ small-screen polish */
html, body { overflow-x: hidden; }
.modal { min-width: 0; }
.modal .mb .btn { white-space: normal; text-align: left; height: auto; min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
.modal .mb .btn > span { min-width: 0; }
@media (max-width: 860px) {
  .brand span { display: none; }
  .who .nm { display: none; }
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .ws-head { padding: 10px 12px; }
  .ws-head .acts { margin-left: 0; width: 100%; }
  .ws-head .acts .btn { flex: 1 1 auto; }
  .ws-sub { padding: 10px 12px; gap: 10px; }
  .ws-sub .rail .nm { font-size: 0; }
  .ws-sub .rail .st.now .nm { font-size: 11px; }
  .ws-sub .rail .st.now .nm small { display: none; }
  .vtools { padding: 8px 10px; }
  .ws-sub .nexthint { min-width: 0; flex-basis: 100%; }
  .ws-sub .rail { flex-basis: 100%; }
  .pane-label { flex-wrap: wrap; }
  .ws, .ws-body, .stage, .side { max-width: 100vw; }
  .page { padding-left: 14px; padding-right: 14px; }
  .scrim { padding: 10px; }
  .modal .mh { padding: 16px 16px 4px; }
  .modal .mb { padding: 12px 16px; }
  .modal .mf { padding-left: 16px; padding-right: 16px; flex-wrap: wrap; }
  .approve { padding: 12px 10px 40px; }
}

/* ------------------------------------------------------------ sign-in pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 14px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-pop); padding: 28px 26px; border-top: 4px solid var(--cyan); }
.auth-card h1 { font-size: 22px; margin-top: 14px; }
.auth-card > p { margin-top: 6px; font-size: 14px; }
.auth-brand { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 16px; }
.auth-brand svg { width: 22px; height: 22px; }
.auth-card .btn.lg { width: 100%; }

/* ------------------------------------------------------------ marks share the comment numbering */
.mk-badge[data-c] { cursor: pointer; }
.mk-badge.done { opacity: .5; }
.mk-badge.focus { transform: scale(1.25); box-shadow: 0 0 0 3px rgba(15, 124, 144, .35), 0 2px 5px rgba(0, 0, 0, .3); }

/* ------------------------------------------------------------ full-screen review */
.ws-fullbar { display: none; }
body.review-full .topbar { display: none; }
.ws.full { height: 100vh; grid-template-rows: auto 1fr; }
.ws.full .ws-head, .ws.full .ws-sub { display: none; }
.ws.full .ws-fullbar {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-height: 46px;
  background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; flex-wrap: nowrap;
}
.ws-fullbar .fb-name { font-size: 14.5px; max-width: 260px; flex: none; }
.ws-fullbar .fb-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; overflow: hidden; white-space: nowrap; }
.ws-fullbar .fb-meta > * { flex: none; }
.ws-fullbar .fb-file { display: inline-flex; align-items: center; gap: 4px; max-width: 260px; flex: 0 1 auto !important; }
.ws-fullbar .fb-dot { color: var(--ink-4, #b3b9c2); }
.ws-fullbar .acts { display: flex; gap: 6px; flex: none; }
.ws-fullbar .acts .btn { height: 32px; padding: 0 12px; font-size: 13px; }
.ws-body.noside { grid-template-columns: minmax(0, 1fr); }
.ws-body.noside .side { display: none; }
@media (max-width: 860px) {
  .ws.full .ws-fullbar { flex-wrap: wrap; }
  .ws-fullbar .fb-meta { flex-basis: 100%; order: 5; }
}

/* ------------------------------------------------------------ progress steps: one straight line */
.rail { align-items: start; }
.rail .reg { margin-top: -4px; }
.rail .st.now .bar { height: 10px; }
.rail .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.rail .st.now .nm small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail.mini { align-items: center; }
.rail.mini .st.now .bar { height: 5px; filter: saturate(1.4); }


/* ============================================================ review screen — layout & readability pass
   More room for the artwork, same scale in compare, resizable panels, readable highlights. */

/* header: name, item code, version and status on one line */
.ws-head { padding: 9px 20px; }
.ws-head .title-main { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.ws-head .title-main h1 { max-width: 38vw; }
.ws-head .pill.s-ai_check { background: var(--surface); border: 1px solid rgba(184, 35, 90, .28); }

/* steps bar: slim by default, one click for the full version */
.ws-sub { position: relative; padding-right: 52px; }
.ws-sub .sub-toggle { position: absolute; right: 12px; top: 8px; }
.ws-sub .sub-toggle svg { transition: transform .15s; }
.ws-sub .sub-toggle.up svg { transform: rotate(180deg); }
.ws-sub.slim { padding-top: 6px; padding-bottom: 7px; gap: 18px; }
.ws-sub.slim .sub-toggle { top: 4px; }
.ws-sub.slim .rail { max-width: 520px; min-width: 300px; }
.ws-sub.slim .rail .reg { display: none; }
.ws-sub.slim .rail { grid-template-columns: repeat(5, 1fr); }
.ws-sub.slim .rail .bar, .ws-sub.slim .rail .st.now .bar { height: 5px; box-shadow: none; }
.ws-sub.slim .rail .nm { margin-top: 3px; font-size: 11.5px; }
.ws-sub.slim .rail .st.now .nm small { display: none; }
.ws-sub.slim .nexthint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 12.5px; }
.ws-sub.slim .nexthint .nh-br { display: none; }
.ws-sub.slim .nexthint .nh-who { margin-right: 6px; padding: 2px 8px; border-radius: 999px; background: var(--cyan-bg); color: var(--cyan-strong); }
.ws-sub.slim .nexthint .nh-who:empty { display: none; }

/* viewer toolbar */
.vtools { padding: 6px 14px; gap: 6px; }
.zoomgrp { display: inline-flex; align-items: center; gap: 0; }
.zoomval {
  display: inline-flex; align-items: center; gap: 2px; height: 30px; min-width: 64px; justify-content: center;
  border: 1px solid transparent; background: none; border-radius: var(--r-sm); font: inherit; font-size: 12.5px; font-weight: 650; color: var(--ink-2); cursor: pointer;
}
.zoomval:hover { border-color: var(--line); background: var(--surface); }
.zoomval svg { width: 13px; height: 13px; }
.fitseg button { height: 28px; font-size: 12.5px; padding: 0 10px; }
.hltoggle { color: var(--ink-3); }
.hltoggle.on { color: var(--ink); }
.hltoggle:not(.on) svg { opacity: .45; }
.hl-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.hl-legend .lg { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 6px; border: 1.5px solid; }
.hl-legend .lg:first-child { margin-left: 0; }
.hl-legend .lg.added { border-color: #1d7747; background: rgba(29, 119, 71, .15); }
.hl-legend .lg.removed { border-color: #c3262f; background: rgba(195, 38, 47, .14); }
.hl-legend .lg.changed { border-color: #c98a00; background: rgba(226, 170, 0, .2); }
.hl-legend .lg.issue { border-color: var(--orange); background: rgba(184, 86, 0, .12); }

.kbd-btn { font-weight: 750; font-size: 14px; }
@media (max-width: 1380px) { .hl-legend { display: none; } }

/* highlights on/off (comments & marks always stay) */
.panes.hide-hl .hl { display: none; }

/* pane headers: one line, same height on both sides → pages line up */
.pane-label { height: 40px; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.pane-label > * { flex: none; }
.pane-label .pl-name { flex: 0 1 auto; min-width: 3.5em; overflow: hidden; text-overflow: ellipsis; }
/* when space runs out, the status pill and counters shrink first; "Close compare" always stays */
.pane-label .pill, .pane-label .pl-count, .pane-label > .faint { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-label .x { flex: none; }
.vtag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 750;
  letter-spacing: .02em; flex: none;
}
.vtag.old { background: var(--sunk); color: var(--ink-2); border: 1px dashed #aab1bb; }
.vtag.cur { background: var(--cyan); color: #fff; }
.vtag.src, .vtag.other { background: var(--yellow-bg); color: var(--yellow-ink); }

/* compare divider */
.pane-divider { background: var(--line); cursor: col-resize; position: relative; z-index: 6; }
.pane-divider::after { content: ""; position: absolute; left: 2px; top: 50%; width: 4px; height: 36px; margin-top: -18px; border-radius: 3px; background: #b7bec7; }
.pane-divider:hover, .pane-divider:focus-visible, .panes.resizing .pane-divider { background: var(--cyan); outline: none; }
.panes.resizing { cursor: col-resize; user-select: none; }
/* drawing only happens on this version — say so on the older side */
.panes.drawing .pane[data-pane="left"] .sheet { cursor: not-allowed; }

/* sheets reserve their height until the page image arrives */
.sheet:not(.loaded) { background: #fbfbfa; }
.sheet .pno { top: -17px; }

/* hold Space = move the page */
.panes.space-pan .pane { cursor: grab; }
.panes.space-pan .pane:active { cursor: grabbing; }
.panes.space-pan .markup-canvas, .panes.space-pan .ov * { pointer-events: none !important; }

/* older version's comments / marks (compare) */
.pin.old, .mk-badge.old { border-style: dashed; opacity: .82; }
.pin.old { background: var(--mark); }
.pin.old.focus, .mk-badge.old.focus { opacity: 1; transform: scale(1.2); background: var(--cyan); }
.markup-canvas.old { opacity: .8; }
.oldpop {
  position: absolute; z-index: 22; width: 280px; background: var(--surface); border: 1px solid var(--line); border-left: 3px dashed #aab1bb;
  border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 10px 12px; font-size: 13px;
}
.oldpop .op-hd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oldpop { padding-right: 34px; }
.oldpop .op-hd .btn { position: absolute; top: 6px; right: 6px; }
.oldpop .op-txt { margin-top: 6px; white-space: pre-wrap; word-wrap: break-word; }
.oldpop .op-reps { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.pl-count { margin-left: 2px; }
.ocmt { cursor: pointer; }
.ocmt:hover { background: #fafbfa; }
.ocmt.focus { background: var(--cyan-bg); }

/* annotation toolbar: sits over this version in compare; the artwork keeps a free strip below it */
.marktools { transition: left .15s; }
.panes.resizing ~ .marktools { transition: none; }
.mt-note { color: #fff; font-size: 11.5px; font-weight: 650; padding: 0 10px 0 8px; white-space: nowrap; opacity: .85; border-right: 1px solid rgba(255, 255, 255, .18); margin-right: 4px; }

/* side panel: resizable + collapsible */
.side-resizer { background: var(--line); cursor: col-resize; position: relative; z-index: 6; }
.side-resizer::after { content: ""; position: absolute; left: 1px; top: 50%; width: 4px; height: 36px; margin-top: -18px; border-radius: 3px; background: #b7bec7; }
.side-resizer:hover, .side-resizer:focus-visible, .ws-body.resizing .side-resizer { background: var(--cyan); outline: none; }
.ws-body.resizing { cursor: col-resize; user-select: none; }
.ws-body.noside .side-resizer { display: none; }
.side { border-left: 0; }
.tabs { align-items: flex-end; }


/* findings list: filters stay visible while scrolling */
.side-body .filters { position: sticky; top: 0; z-index: 4; background: var(--surface); padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.step-tips { margin-top: 6px; }
.kbd-hint { margin-left: 10px; }
.skipnote { display: block; margin: 12px 14px 0; padding: 0; }
.skipnote > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; min-width: 0; }
.skipnote > summary::-webkit-details-marker { display: none; }
.skipnote > summary > svg:last-child { width: 15px; height: 15px; flex: none; transition: transform .15s; }
.skipnote[open] > summary > svg:last-child { transform: rotate(180deg); }
.skipnote > summary .grow { min-width: 0; color: var(--ink); }
.skipnote .skipbody { padding: 0 12px 10px 36px; color: var(--ink); }

/* finding cards: colour stripe = kind of change, same colour as its box on the artwork */
.fnd { border-left: 3px solid transparent; padding-left: 13px; }
.fnd.k-added { border-left-color: rgba(29, 119, 71, .55); }
.fnd.k-removed { border-left-color: rgba(195, 38, 47, .5); }
.fnd.k-changed { border-left-color: rgba(201, 138, 0, .6); }
.fnd.focus { border-left-color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(10, 124, 145, .25); }

/* changes: rows that can be shown on the artwork */
.chg.go { cursor: pointer; }
.chg.go:hover { background: #fafbfa; }
.chg.go:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.chg.focus { background: var(--cyan-bg); }
.chg .chg-go { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 11.5px; font-weight: 650; color: var(--cyan-strong); opacity: 0; }
.chg .chg-go svg { width: 13px; height: 13px; }
.chg.go:hover .chg-go, .chg.focus .chg-go { opacity: 1; }
.btn.on-state { border-color: var(--cyan); color: var(--cyan-strong); background: var(--cyan-bg); }

/* shortcuts list */
.kbd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kbd-table td { padding: 6px 4px; border-bottom: 1px solid var(--line-2); }
.kbd-table td:first-child { width: 130px; }
kbd { display: inline-block; font: inherit; font-size: 12px; font-weight: 700; padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--sunk); }

@media (max-width: 860px) {
  .ws-sub.slim .rail { min-width: 0; }
  .pane-label { height: auto; flex-wrap: wrap; white-space: normal; }
  .kbd-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hl, .marktools, .ws-sub .sub-toggle svg, .skipnote > summary > svg { transition: none; }
}

/* toolbar adapts to the space the artwork actually has (panel open / closed, wide / narrow screen) */
.stage { container-type: inline-size; container-name: stage; }
/* two groups: viewing controls on the left, screen / panel controls pinned to the right edge (next to the panel).
   Labels collapse to icons first; only if it still doesn't fit does the right group drop to a second line. */
.vtools { flex-wrap: wrap; row-gap: 6px; overflow: visible; }
.vt-left, .vt-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vt-left { flex: 1 1 auto; flex-wrap: wrap; row-gap: 6px; }
.vt-left > *, .vt-right > * { flex: none; }
.vt-right { margin-left: auto; flex: 0 0 auto; }
.drop .types { font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
.vt-right .vt-hint { flex: 0 1 auto; max-width: 280px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-tg { gap: 6px; }
.side-tg svg { width: 17px; height: 17px; }
.side-tg.on { color: var(--cyan-strong); background: var(--cyan-bg); border-color: rgba(10, 124, 145, .35); }
.side-tg:not(.on) { color: var(--ink); }
@container stage (max-width: 1240px) { .hl-legend { display: none; } }
@container stage (max-width: 1060px) { .vt-right .vt-hint { max-width: 150px; } }
@container stage (max-width: 980px) { .vtools .lbl { display: none; } .vtools .hltoggle, .vtools #fullbtn, .vtools .side-tg { padding: 0 8px; } .vt-right .vt-hint { display: none; } }
@container stage (max-width: 760px) { .fitseg button { padding: 0 7px; } .vtools label.check { font-size: 0; gap: 0; } .vtools label.check input { margin: 0; } .vtools .sep { display: none; } }
@container stage (max-width: 620px) { .pane-label .x .lbl { display: none; } .seg button { padding: 0 8px; } }
@container stage (max-width: 520px) { .seg:not(.fitseg) button { font-size: 0; gap: 0; } .seg:not(.fitseg) button svg { width: 16px; height: 16px; } }

/* header: the title block shares the row properly and wraps on phones */
.ws-head .title { flex: 1 1 auto; min-width: 0; }
.ws-head .title-main { min-width: 0; }
.ws-head .title-main h1 { min-width: 0; }
@media (max-width: 860px) {
  .ws-head .title { flex-basis: 100%; }
  .ws-head .title-main h1 { max-width: 100%; }
}
/* keep every review-screen row inside the window (long names / many buttons wrap instead of pushing wider) */
.ws { grid-template-columns: minmax(0, 1fr); }
.ws-head .title-meta { flex-wrap: wrap; }

/* toolbar compaction steps (set by fitToolbar in workspace.js) */
.vtools.t1 .hl-legend { display: none; }
.vtools.t2 .lbl, .vtools.t2 .vt-hint { display: none; }
.vtools.t2 .hltoggle, .vtools.t2 #fullbtn, .vtools.t2 .side-tg { padding: 0 8px; }
.vtools.t3 .sep { display: none; }
.vtools.t3 label.check { font-size: 0; gap: 0; }
.vtools.t3 label.check input { margin: 0; }
.vtools.t3 .fitseg button { padding: 0 7px; }

/* side panel tabs: tighten instead of hiding "Details" when the panel is narrow */
.side { container-type: inline-size; container-name: side; }
@container side (max-width: 470px) { .tabs { gap: 0; padding: 8px 8px 0; } .tabs button { padding: 10px 7px 11px; font-size: 13px; } }
@container side (max-width: 400px) { .tabs button { padding: 10px 5px 11px; font-size: 12.5px; } .tabs .cnt { margin-left: 3px; padding: 1px 5px; } }
.vtools.t3 .viewseg .lbl2 { display: none; }
.vtools.t3 .viewseg button { padding: 0 9px; }
/* phones: back button + title share the first row; viewing controls stay on one swipeable line */
@media (max-width: 860px) {
  .ws-head { flex-wrap: wrap; row-gap: 8px; }
  .ws-head .title { flex: 1 1 0%; min-width: 0; }
  .ws-head .acts { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .vt-left { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; }
  .vt-left::-webkit-scrollbar { display: none; }
}
/* ------------------------------------------------------------ selected comment -> its mark on the artwork */
/* leader line: from the selected comment / AI finding in the side panel to the mark, like a PDF reader */
.leader { position: fixed; inset: 0; pointer-events: none; z-index: 60; display: none; }
.leader.on { display: block; }
.leader svg { width: 100%; height: 100%; overflow: visible; }
.leader .ld-under { fill: none; stroke: #fff; stroke-width: 6.5; stroke-linecap: round; opacity: .92; }
.leader .ld-line { fill: none; stroke: var(--cyan); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 7 6; animation: ld-flow .9s linear infinite; }
.leader marker path { fill: var(--cyan); }
.leader .ld-dot { fill: var(--cyan); stroke: #fff; stroke-width: 2.5; }
@keyframes ld-flow { to { stroke-dashoffset: -13; } }
/* a dashed frame around the whole selected mark */
.sheet .ov .mk-halo { position: absolute; border: 2px dashed var(--cyan); border-radius: 6px; background: rgba(10, 124, 145, .07);
  box-shadow: 0 0 0 4px rgba(10, 124, 145, .16); pointer-events: none; z-index: 2; animation: mk-pulse 1.5s ease-in-out infinite; }
@keyframes mk-pulse { 50% { box-shadow: 0 0 0 9px rgba(10, 124, 145, .05); } }
/* the selected pin / mark number gets a pulsing ring */
.pin.focus, .mk-badge.focus { z-index: 4; animation: pin-pulse 1.5s ease-in-out infinite; }
@keyframes pin-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(10, 124, 145, .45), 0 2px 5px rgba(0, 0, 0, .3); } 50% { box-shadow: 0 0 0 10px rgba(10, 124, 145, .08), 0 2px 5px rgba(0, 0, 0, .3); } }
.cmt.focus, .fnd.focus { box-shadow: inset 4px 0 0 var(--cyan); }
@media (prefers-reduced-motion: reduce) { .leader .ld-line, .sheet .ov .mk-halo, .pin.focus, .mk-badge.focus { animation: none; } }

/* the item's number in the top-left corner of every comment / AI finding card (same number as on the artwork) */
.no-badge { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; margin-right: 2px;
  border-radius: 13px; background: var(--cyan); color: #fff; font-size: 13.5px; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .25); }
.fnd .hd .no-badge, .cmt .hd .no-badge { color: #fff; font-size: 13.5px; font-weight: 800; }
.no-badge.plain { background: var(--ink-3); }      /* a comment that is not placed on the artwork */
.no-badge.fno { background: var(--key); border-radius: 7px; }   /* AI finding: F1, F2, ... */

/* Valid changes tab */
.vc-sec { padding: 10px 16px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.vc-row { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.vc-row:hover { background: var(--cyan-bg); }
.vc-main { min-width: 0; flex: 1; }
.vc-txt { font-size: 13.5px; margin: 2px 0; overflow-wrap: anywhere; }
.vc-row.focus { background: var(--cyan-bg); box-shadow: inset 4px 0 0 var(--cyan); }
.vc-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--sunk); color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }

/* approval chip: status + "Approved by n/m" + eye -> who approved */
.vsum { font-size: 12px; color: var(--ink-3); }
.vq-eye { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-3); cursor: pointer; padding: 0; }
.vq-eye svg { width: 15px; height: 15px; }
.vq-eye:hover, .vq-eye.on { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-bg); }
.vlist { margin-top: 6px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; overflow: hidden; }
.cmt .vlist { margin-left: 30px; }
.vp { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.vp:last-child { border-bottom: 0; }
.vp-av { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--ink); color: #fff; }
.vp-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-role { flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.vp-role.coordinator { background: var(--cyan-bg); color: var(--cyan); }
.vp-role.reviewer { background: var(--yellow-bg); color: var(--yellow-ink); }
.vp .vchip { margin-left: auto; }

/* Valid changes: "Approved by n/m" + eye */
.vc-by { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.vc-row .vlist { margin-top: 6px; }

/* searchable dropdown (Compare side by side) */
.cb-lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cb-lbl em { font-weight: 400; color: var(--ink-3); }
.cb-btn { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.cb-btn:hover, .cb-btn.open { border-color: var(--cyan); }
.cb-btn > svg { width: 16px; height: 16px; margin-left: auto; flex: none; color: var(--ink-3); }
.cb-val { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.cb-file { min-width: 0; color: var(--ink-3); font-size: 13px; }
.cb-sub { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.cb-pop { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px; }
.cb-list { margin-top: 8px; max-height: 230px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.cb-g { padding: 8px 8px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.cb-it { display: flex; align-items: center; gap: 8px; padding: 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; font: inherit; text-align: left; width: 100%; }
.cb-it:hover { background: var(--sunk); }
.cb-it.on { background: var(--cyan-bg); }
.cb-empty { padding: 12px 8px; font-size: 13px; color: var(--ink-3); }

/* side-panel tabs: all tabs visible (wrap instead of a hidden horizontal scroll); compare mode shows version tags */
.tabs { flex-wrap: wrap; row-gap: 0; overflow-x: visible; }
.tabs button { padding: 9px 8px 10px; display: inline-flex; align-items: center; }
.tabs .vtag.tv { height: 17px; padding: 0 5px; font-size: 10.5px; margin-right: 5px; }
@media (max-width: 600px) {
  .tabs { padding: 6px 8px 0; gap: 2px; }
  .tabs button { font-size: 12.5px; padding: 8px 6px 9px; }
}

/* send dialog: company → tick the contact persons who get the email */
.rcp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
.rcp-hd { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.rcp-hd > span { flex: 1; min-width: 0; }
.rcp-hd em { font-weight: 400; font-style: normal; color: var(--ink-3); }
.rcp-list { border: 1px solid var(--line); border-radius: var(--r-sm, 8px); max-height: 196px; overflow: auto; background: var(--surface); }
.rcp-empty { padding: 11px 12px; margin: 0; }
.rcp-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.rcp-row:last-child { border-bottom: 0; }
.rcp-row:hover { background: var(--sunk); }
.rcp-row input { width: 16px; height: 16px; accent-color: var(--cyan); flex: none; margin: 0; }
.rcp-av { width: 28px; height: 28px; border-radius: 50%; background: var(--sunk); color: var(--ink-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.rcp-row:has(input:checked) .rcp-av { background: var(--cyan); color: #fff; }
.rcp-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rcp-txt b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcp-txt .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .rcp { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  .modal .mf > .btn { flex: 1 1 auto; justify-content: center; }
  .modal .mf > a.btn.ghost { flex-basis: 100%; margin-right: 0 !important; }
}

/* ================= compare panel: asked in v1 / v1 comments / changes in v2 ================= */
:root { --cx-old: #c2570c; --cx-old-bg: rgba(194, 87, 12, .10); --cx-new: var(--cyan); }
.cx-sum { padding: 14px 16px 12px; border-bottom: 1px solid var(--line-2); display: grid; gap: 10px; }
.cx-vs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cx-vs svg, .progress .row > svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.cx-vs .small { flex-basis: 100%; }
.cx-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cx-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 9px; text-align: left; cursor: pointer; font-size: 12px; color: var(--ink-2); line-height: 1.25; }
.cx-chip b { display: block; font-size: 18px; line-height: 1.1; color: var(--ink); }
.cx-chip.done b { color: var(--green); } .cx-chip.open b { color: var(--magenta); } .cx-chip.extra b { color: var(--yellow-ink, #8a5a00); }
.cx-chip:hover { border-color: var(--ink-3); }
.cx-chip.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.cx-filt { padding: 8px 16px; background: var(--sunk); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.cx { position: relative; padding: 12px 16px 13px 19px; border-bottom: 1px solid var(--line-2); cursor: pointer; outline: none; }
.cx::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.cx.st-done::before { background: var(--green); } .cx.st-open::before { background: var(--magenta); } .cx.st-manual::before { background: #b7bec7; }
.cx.chg-changed::before { background: #c98a00; } .cx.chg-added::before { background: #1d7747; } .cx.chg-removed::before { background: #c3262f; }
.cx:hover { background: #fafbfa; }
.cx:focus-visible { box-shadow: 0 0 0 2px var(--cyan) inset; }
.cx.focus { background: #eef7f8; }
.cx-hd { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; row-gap: 4px; }
.cx-hd .ellipsis { max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-txt { margin-top: 6px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.cx-meta { margin-top: 6px; }
.cx-st { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 8px 2px 6px; border-radius: 999px; white-space: nowrap; }
.cx-st svg { width: 12px; height: 12px; }
.cx-st.done { background: var(--green-bg); color: var(--green); }
.cx-st.open { background: var(--magenta-bg); color: var(--magenta); }
.cx-st.manual { background: var(--sunk); color: var(--ink-2); }
.cx-st.extra { background: var(--yellow-bg); color: var(--yellow-ink, #8a5a00); }
.cx-rv { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.cx-rv.ok { background: var(--green-bg); color: var(--green); } .cx-rv.no { background: var(--sunk); color: var(--ink-3); } .cx-rv.wait { background: var(--yellow-bg); color: var(--yellow-ink, #8a5a00); }
.cx-type { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .03em; }
.cx-type.changed { color: #a06c00; } .cx-type.added { color: #1d7747; } .cx-type.removed { color: #c3262f; }
.cx-ba { margin-top: 8px; display: grid; gap: 4px; }
.cx-l1 { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 13px; }
.cx-l1 .vtag { height: 19px; margin-top: 1px; }
.cx-l1 .o { background: var(--magenta-bg); padding: 2px 7px; border-radius: 4px; text-decoration: line-through; text-decoration-color: rgba(184,35,90,.45); overflow-wrap: anywhere; }
.cx-l1 .n { background: var(--green-bg); padding: 2px 7px; border-radius: 4px; overflow-wrap: anywhere; }
.cx-l1 .vtag.old { border-color: var(--cx-old); color: var(--cx-old); background: var(--cx-old-bg); }
.cx-note { margin-top: 8px; font-size: 12.5px; display: flex; gap: 6px; align-items: flex-start; color: var(--ink-2); }
.cx-note svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.cx-note.warn { color: var(--magenta); }
.cx-sum .vtag.old, .progress .vtag.old { border-color: var(--cx-old); color: var(--cx-old); background: var(--cx-old-bg); }

/* pages: change boxes + the selected spot framed on both sides */
.sheet .ov .hl.cxg { outline-width: 1.5px; opacity: .85; }
.sheet .ov .hl.cxg.on { opacity: 1; }
.sheet .ov .cxf { position: absolute; border-radius: 4px; pointer-events: none; z-index: 4; animation: cxf-in .35s ease-out; }
.sheet .ov .cxf.cx-l { border: 2.5px solid var(--cx-old); box-shadow: 0 0 0 5px rgba(194, 87, 12, .18); background: rgba(194, 87, 12, .07); }
.sheet .ov .cxf.cx-r { border: 2.5px solid var(--cx-new); box-shadow: 0 0 0 5px rgba(10, 124, 145, .2); background: rgba(10, 124, 145, .07); }
.sheet .ov .cxf.ghost { border-style: dashed; box-shadow: none; background: repeating-linear-gradient(45deg, rgba(0,0,0,.035) 0 6px, transparent 6px 12px); }
.sheet .ov .cxf-tag { position: absolute; left: -2px; bottom: calc(100% + 4px); white-space: nowrap; font-size: 11px; font-weight: 750; color: #fff; padding: 2px 7px; border-radius: 4px; line-height: 1.4; }
.sheet .ov .cx-l .cxf-tag { background: var(--cx-old); }
.sheet .ov .cx-r .cxf-tag { background: var(--cx-new); }
.sheet .ov .cxf.ghost .cxf-tag { background: #59616c; }
@keyframes cxf-in { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
.leader .ld-line.old { stroke: var(--cx-old, #c2570c); }
.leader marker path.o { fill: var(--cx-old, #c2570c); }
@media (prefers-reduced-motion: reduce) { .sheet .ov .cxf { animation: none; } }
@media (max-width: 600px) {
  .cx { padding: 11px 12px 12px 15px; }
  .cx-chip b { font-size: 16px; }
  .cx-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* compare: older page marks that are NOT a valid change are faded grey (legend in the panel explains it) */
.sheet .ov .pin.old.faded, .sheet .ov .mk-badge.old.faded { background: #b7bec7; color: #fff; border-color: #9aa1ab; opacity: .6; box-shadow: none; }
.sheet .ov .pin.old.faded.focus, .sheet .ov .mk-badge.old.faded.focus { opacity: 1; background: #8a929c; }
.cx-legend { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: start; font-size: 12px; color: var(--ink-2); line-height: 1.4;
  background: var(--sunk); border-radius: 8px; padding: 8px 10px; margin-top: 2px; }
.progress .cx-legend { margin-top: 8px; }
.cx-legend .lg { width: 14px; height: 14px; border-radius: 50%; margin-top: 1px; border: 1.5px dashed; }
.cx-legend .lg.red { background: var(--mark, #e11d2e); border-color: #b3121f; }
.cx-legend .lg.grey { background: #b7bec7; border-color: #9aa1ab; opacity: .75; }
.cx.st-none::before { background: #d3d8de; }
.cx.st-none .cx-txt { color: var(--ink-2); }

/* compare: the v1 pin / mark of the selected card stands out, the other v1 marks step back */
.sheet .ov .pin.old.picked, .sheet .ov .mk-badge.old.picked { background: var(--cx-old, #c2570c) !important; border: 2px solid #fff; opacity: 1;
  transform: scale(1.35); z-index: 6; box-shadow: 0 0 0 3px rgba(194, 87, 12, .35), 0 2px 8px rgba(0, 0, 0, .25); }
.sheet .ov .pin.old.dim, .sheet .ov .mk-badge.old.dim { opacity: .35; }
.sheet .ov .pin.old.faded.dim, .sheet .ov .mk-badge.old.faded.dim { opacity: .25; }

/* compare: tinted page headers, same colours as the arrows (v1 orange, v2 teal) */
.panes.cmpv .pane[data-pane="left"] .pane-label { background: rgba(253, 240, 228, .96); border-bottom: 2px solid #f0b98d; }
.panes.cmpv .pane[data-pane="right"] .pane-label { background: rgba(228, 243, 246, .96); border-bottom: 2px solid #8fcbd6; }
.panes.cmpv .pane[data-pane="left"] .pane-label .vtag.old { border-color: var(--cx-old, #c2570c); color: var(--cx-old, #c2570c); background: #fff; }
.panes.cmpv .pane[data-pane="left"] { background: #fdf8f3; }
.panes.cmpv .pane[data-pane="right"] { background: #f3f9fa; }

/* page header strip stays fully in view when a zoomed page is scrolled sideways:
   the pane's single grid column grows to the page width, so the sticky header can stick to the left edge too,
   and its width is the pane's visible width (container units). */
.pane { display: grid; grid-template-columns: minmax(100%, max-content); grid-auto-rows: max-content; align-content: start; container-type: inline-size; }
.pane > .pane-label { position: sticky; top: 0; left: 0; width: 100cqw; max-width: 100cqw; box-sizing: border-box; min-width: 0; }
