/* Solva Tickets console. Concept C "Desk" (design/concepts/concept-c.html): a board by owner in
   Rooftop and Mission Control navy. Tokens, markup and styles are ported from the concept; the
   additions (team strip, list, sign-in, dialogs, states) reuse its tokens.
   Polish pass (23 Sep): layered surfaces, soft shadows, translucent chrome, spring motion with a
   reduced-motion guard, a compact rail for narrow windows, and an embedded look that matches
   Mission Control when framed there (data-embed="mc", set by theme.js).
   Status is never colour alone: every state is a glyph shape plus a word. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.32,.72,0,1);         /* Apple sheet motion */
  --ease-out: cubic-bezier(.16,1,.3,1);       /* settle */
  --spring: cubic-bezier(.34,1.36,.64,1);     /* a small overshoot for menus and popovers */
  --orange: #E0742A;
  --on-orange: #1A0D04;
  --jordan-fill: #4CC9E0;
  --on-jordan: #04191F;
  --top-h: 48px;
  --side-w: 212px;
  --r-card: 12px;
  --r-ctl: 8px;

  color-scheme: light;
  --dash: #768196;
  --focus: #9A4A12;
  --bg: #EDF0F4;
  --col: #E4E8EE;
  --panel: #FFFFFF;
  --panel-2: #F6F8FB;
  --line: #D9DFE8;
  --line-2: #BFC9D6;
  --ink: #0E1726;
  --ink-2: #3D495C;
  --ink-3: #56627A;
  --accent-ink: #9A4A12;
  --wash: #FBE9DA;
  --st-us: #B4551A;
  --st-dealer: #56627A;
  --st-done: #0B6076;
  --note-bg: #FFF6DF;
  --note-line: #E3CE95;
  --note-ink: #574417;
  --ai-bg: #F0F6FA;
  --ai-line: #CADCE8;
  --ai-ink: #1B4560;
  --kbd-bg: #FFFFFF;
  --scrim: rgba(14,23,38,.26);
  --thumb-bg: #0A0E14;
  --err-bg: #FDECEC;
  --err-line: #E8B4B4;
  --err-ink: #8A1F1F;
  --flash: #FBE9DA;
  --skel: #E4E8EE;
  --skel-hi: #F1F4F8;
  --chrome: rgba(255,255,255,.80);
  --glass: rgba(255,255,255,.90);
  --toast-bg: rgba(22,31,48,.94);
  --toast-ink: #F4F6FA;
  --toast-act: #F2A66B;
  --shadow-1: 0 1px 1px rgba(14,23,38,.04), 0 1px 3px rgba(14,23,38,.06);
  --shadow-2: 0 1px 2px rgba(14,23,38,.06), 0 8px 20px -8px rgba(14,23,38,.20);
  --pop-shadow: 0 0 0 .5px rgba(14,23,38,.10), 0 18px 44px -14px rgba(14,23,38,.34), 0 3px 8px rgba(14,23,38,.08);
  --sheet-shadow: -1px 0 0 rgba(14,23,38,.04), -28px 0 70px -34px rgba(14,23,38,.42);
  --inset-hi: inset 0 1px 0 rgba(255,255,255,.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark; --dash: #5F7295; --focus: #E0742A;
    --bg: #0A111E; --col: #0E1728; --panel: #121C2F; --panel-2: #172238; --line: #223049; --line-2: #34466A;
    --ink: #EDF1F7; --ink-2: #B3BED0; --ink-3: #8F9CB2;
    --accent-ink: #F2A66B; --wash: #2E2218;
    --st-us: #F2A66B; --st-dealer: #B3BED0; --st-done: #79D7EC;
    --note-bg: #1F1B10; --note-line: #4A3D1E; --note-ink: #E9D6A7;
    --ai-bg: #0F1D2D; --ai-line: #25405A; --ai-ink: #9FD0E6;
    --kbd-bg: #172238; --scrim: rgba(3,7,14,.55);
    --err-bg: #2A1414; --err-line: #5C2A2A; --err-ink: #F4B8B8; --flash: #2E2218; --skel: #172238; --skel-hi: #1F2C46;
    --chrome: rgba(15,24,41,.80); --glass: rgba(23,34,56,.90); --toast-bg: rgba(38,50,76,.96); --toast-ink: #EDF1F7;
    --shadow-1: inset 0 1px 0 rgba(255,255,255,.03), 0 1px 2px rgba(0,0,0,.35);
    --shadow-2: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 24px -10px rgba(0,0,0,.7);
    --pop-shadow: 0 0 0 .5px rgba(255,255,255,.08), 0 22px 50px -14px rgba(0,0,0,.8), 0 4px 10px rgba(0,0,0,.35);
    --sheet-shadow: -1px 0 0 rgba(255,255,255,.03), -30px 0 70px -26px rgba(0,0,0,.85);
    --inset-hi: inset 0 1px 0 rgba(255,255,255,.05);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark; --dash: #5F7295; --focus: #E0742A;
  --bg: #0A111E; --col: #0E1728; --panel: #121C2F; --panel-2: #172238; --line: #223049; --line-2: #34466A;
  --ink: #EDF1F7; --ink-2: #B3BED0; --ink-3: #8F9CB2;
  --accent-ink: #F2A66B; --wash: #2E2218;
  --st-us: #F2A66B; --st-dealer: #B3BED0; --st-done: #79D7EC;
  --note-bg: #1F1B10; --note-line: #4A3D1E; --note-ink: #E9D6A7;
  --ai-bg: #0F1D2D; --ai-line: #25405A; --ai-ink: #9FD0E6;
  --kbd-bg: #172238; --scrim: rgba(3,7,14,.55);
  --err-bg: #2A1414; --err-line: #5C2A2A; --err-ink: #F4B8B8; --flash: #2E2218; --skel: #172238; --skel-hi: #1F2C46;
  --chrome: rgba(15,24,41,.80); --glass: rgba(23,34,56,.90); --toast-bg: rgba(38,50,76,.96); --toast-ink: #EDF1F7;
  --shadow-1: inset 0 1px 0 rgba(255,255,255,.03), 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 24px -10px rgba(0,0,0,.7);
  --pop-shadow: 0 0 0 .5px rgba(255,255,255,.08), 0 22px 50px -14px rgba(0,0,0,.8), 0 4px 10px rgba(0,0,0,.35);
  --sheet-shadow: -1px 0 0 rgba(255,255,255,.03), -30px 0 70px -26px rgba(0,0,0,.85);
  --inset-hi: inset 0 1px 0 rgba(255,255,255,.05);
}

/* ---------- Framed by Mission Control: its surfaces (near-black shell or warm paper), same orange ---------- */
:root[data-embed="mc"] {
  --r-card: 14px; --r-ctl: 6px;
  --dash: #858079; --focus: #8A4413;
  --bg: #F4F3F1; --col: #ECEAE6; --panel: #FFFFFF; --panel-2: #F8F7F5; --line: #E2DFD9; --line-2: #D3CFC7;
  --ink: #141416; --ink-2: #5C5C60; --ink-3: #66625B;
  --accent-ink: #8A4413; --wash: #FBEBDD; --st-us: #B4551A; --st-dealer: #5C5C60; --st-done: #0B6076;
  --kbd-bg: #FFFFFF; --skel: #ECEAE6; --skel-hi: #F6F5F2; --scrim: rgba(20,20,22,.22);
  --chrome: rgba(244,243,241,.82); --glass: rgba(255,255,255,.92); --toast-bg: rgba(28,28,31,.95); --toast-ink: #F4F3F1;
  --shadow-1: 0 1px 1px rgba(30,24,18,.04), 0 1px 3px rgba(30,24,18,.07);
  --shadow-2: 0 1px 2px rgba(30,24,18,.06), 0 10px 24px -12px rgba(30,24,18,.26);
  --pop-shadow: 0 0 0 .5px rgba(30,24,18,.10), 0 22px 50px -20px rgba(30,24,18,.36), 0 2px 8px -4px rgba(30,24,18,.16);
  --sheet-shadow: -1px 0 0 rgba(30,24,18,.04), -28px 0 64px -32px rgba(30,24,18,.34);
}
@media (prefers-color-scheme: dark) {
  :root[data-embed="mc"]:not([data-theme="light"]) {
    --dash: #6E6E73; --focus: #E0742A;
    --bg: #0D0D0F; --col: #141416; --panel: #1C1C1F; --panel-2: #232327; --line: #2C2C30; --line-2: #3D3D42;
    --ink: #F4F3F1; --ink-2: #B9B9BD; --ink-3: #9A9A9E;
    --accent-ink: #F0A363; --wash: #2B1E15; --st-us: #F0A363; --st-dealer: #B9B9BD; --st-done: #79D7EC;
    --ai-bg: #111A20; --ai-line: #25404D; --kbd-bg: #232327; --skel: #1C1C1F; --skel-hi: #26262A; --scrim: rgba(0,0,0,.5);
    --chrome: rgba(13,13,15,.80); --glass: rgba(28,28,31,.92); --toast-bg: rgba(44,44,48,.97); --toast-ink: #F4F3F1;
    --shadow-1: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 2px rgba(0,0,0,.45);
    --shadow-2: inset 0 1px 0 rgba(255,255,255,.05), 0 14px 38px -16px rgba(0,0,0,.7);
    --pop-shadow: 0 0 0 .5px rgba(255,255,255,.10), 0 22px 50px -20px rgba(0,0,0,.8), 0 2px 8px -4px rgba(0,0,0,.55);
    --sheet-shadow: -1px 0 0 rgba(255,255,255,.04), -30px 0 70px -26px rgba(0,0,0,.85);
  }
}
:root[data-embed="mc"][data-theme="dark"] {
  --dash: #6E6E73; --focus: #E0742A;
  --bg: #0D0D0F; --col: #141416; --panel: #1C1C1F; --panel-2: #232327; --line: #2C2C30; --line-2: #3D3D42;
  --ink: #F4F3F1; --ink-2: #B9B9BD; --ink-3: #9A9A9E;
  --accent-ink: #F0A363; --wash: #2B1E15; --st-us: #F0A363; --st-dealer: #B9B9BD; --st-done: #79D7EC;
  --ai-bg: #111A20; --ai-line: #25404D; --kbd-bg: #232327; --skel: #1C1C1F; --skel-hi: #26262A; --scrim: rgba(0,0,0,.5);
  --chrome: rgba(13,13,15,.80); --glass: rgba(28,28,31,.92); --toast-bg: rgba(44,44,48,.97); --toast-ink: #F4F3F1;
  --shadow-1: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 2px rgba(0,0,0,.45);
  --shadow-2: inset 0 1px 0 rgba(255,255,255,.05), 0 14px 38px -16px rgba(0,0,0,.7);
  --pop-shadow: 0 0 0 .5px rgba(255,255,255,.10), 0 22px 50px -20px rgba(0,0,0,.8), 0 2px 8px -4px rgba(0,0,0,.55);
  --sheet-shadow: -1px 0 0 rgba(255,255,255,.04), -30px 0 70px -26px rgba(0,0,0,.85);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 13.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; }
::selection { background: color-mix(in srgb, var(--orange) 30%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 14px; height: 14px; flex-basis: 14px; }
svg.g { width: 10px; height: 10px; flex: 0 0 10px; }
svg.g.us { color: var(--st-us); }
svg.g.dealer { color: var(--st-dealer); }
svg.g.done { color: var(--st-done); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
kbd { font-family: var(--mono); font-size: 10.5px; line-height: 1; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 1.5px; background: var(--kbd-bg); color: var(--ink-2); white-space: nowrap; }
.mono { font-family: var(--mono); }
.cap { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
[data-embed="mc"] .cap { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .16em; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
[data-embed="mc"] .std-only { display: none !important; }
:root[data-switching] *, :root[data-switching] *::before, :root[data-switching] *::after { transition: none !important; }
.rail-only { display: none !important; }

/* Every pressable thing gives a little under the finger, and colours ease rather than snap. */
.btn, .ib, .nv, .pres, .tbtn, .seg2 button, .menu button, .chip button, .more, .sortb, .mebtn, .tact, .pviews button, .pseg button, .prop {
  transition: background-color .16s var(--ease-out), border-color .16s var(--ease-out), color .16s var(--ease-out), box-shadow .2s var(--ease-out), transform .12s var(--ease-out);
}
.btn:active:not([disabled]), .ib:active, .nv:active, .pres:active, .tbtn:active, .seg2 button:active, .menu button:active, .more:active, .mebtn:active, .tact:active, .pviews button:active, .pseg button:active, button.prop:active { transform: scale(.97); }

/* ---------- Top bar with the team strip (borrowed from concept B) ---------- */
.top { height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--line); background: var(--chrome); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); font-size: 12px; color: var(--ink-2); position: relative; z-index: 8; }
.strip { display: flex; gap: 8px; min-width: 0; flex: 1; align-items: center; }
.strip .lbl { color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; margin-right: 2px; }
[data-embed="mc"] .strip .lbl { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .16em; }
.pres { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-1); min-width: 0; min-height: 32px; cursor: pointer; white-space: nowrap; font-size: 12.5px; color: var(--ink-2); }
.pres:hover { border-color: var(--line-2); }
.pres[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pres .nmw { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pres .who { display: inline; color: var(--ink); font-weight: 600; }
.pres .ct { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.pres .ct b { font-family: var(--mono); font-weight: 500; font-size: 11.5px; color: var(--ink); }
.pres.free { border-style: dashed; border-color: var(--dash); box-shadow: none; background: transparent; }
.top .sp { flex: 1; }
.live { display: inline-flex; gap: 7px; align-items: center; color: var(--ink-2); white-space: nowrap; flex: 0 0 auto; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-done); display: inline-block; position: relative; }
.live.off i { background: transparent; border: 1.5px solid var(--st-us); }
.tbtn { display: inline-flex; gap: 6px; align-items: center; border: 0; background: none; color: var(--ink-2); cursor: pointer; padding: 4px 9px; border-radius: 8px; font-size: 12px; min-height: 32px; white-space: nowrap; }
.tbtn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }

/* ---------- App frame ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h)); position: relative; }
.side { border-right: 1px solid var(--line); background: var(--panel); padding: 14px 10px 12px; display: flex; flex-direction: column; gap: 1px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; font-weight: 650; font-size: 14px; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 6px 16px -8px rgba(224,116,42,.55); flex: 0 0 28px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-3); letter-spacing: 0; }
[data-embed="mc"] .side .brand { display: none; }
.side .cap { padding: 14px 8px 5px; }
.nv { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; color: var(--ink-2); font-size: 13px; text-decoration: none; min-height: 32px; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; position: relative; }
.nv:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.nv[aria-current="true"], .nv[aria-pressed="true"] { background: var(--wash); color: var(--ink); font-weight: 600; }
.nv .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv .c { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-2); padding-left: 6px; font-variant-numeric: tabular-nums; }
.nv .k { font-family: var(--mono); font-size: 10px; color: var(--ink-3); margin-left: auto; }
.nv .dotb { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--panel); }
.side .grow { flex: 1; min-height: 12px; }
.mechip { display: flex; }
.mebtn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink); min-height: 40px; text-align: left; }
.mebtn:hover { border-color: var(--line-2); }
.mebtn .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mebtn svg.i { color: var(--ink-3); }
.av { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.av.m { background: var(--orange); color: var(--on-orange); }
.av.j { background: var(--jordan-fill); color: var(--on-jordan); }
.av.none { border: 1.5px dashed var(--dash); box-shadow: none; }
.av.d { background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink-2); box-shadow: none; }
.av.sm { width: 18px; height: 18px; flex-basis: 18px; font-size: 9.5px; }
.av.lg { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }
.av.ai { background: var(--ai-bg); border: 1px solid var(--ai-line); color: var(--ai-ink); box-shadow: none; }

/* ---------- Board ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.bh { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); min-height: 58px; flex-wrap: wrap; }
.bh h1 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.bh .sub { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bh .sp { flex: 1; }
.bh .hint { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.bh .hint span { display: inline-flex; gap: 5px; align-items: center; }
.search { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 0 6px 0 10px; min-height: 34px; color: var(--ink-3); width: 230px; transition: border-color .16s var(--ease-out), box-shadow .2s var(--ease-out), background-color .16s; }
.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); background: var(--panel); }
.search input { border: 0; background: none; outline: none; min-width: 0; flex: 1; font-size: 13px; color: var(--ink); padding: 6px 0; }
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clr { border: 0; background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; padding: 0; }
.chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12px; color: var(--ink); }
.chip button { border: 0; background: none; color: var(--ink-2); cursor: pointer; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; padding: 0; }
.chip button:hover { background: var(--col); color: var(--ink); }
.board { flex: 1; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(236px, 1fr)); gap: 12px; padding: 14px 16px 24px; overflow: auto; align-items: start; }
.col { background: var(--col); border-radius: calc(var(--r-card) + 4px); padding: 6px; min-height: 200px; transition: box-shadow .18s var(--ease-out), background-color .18s; }
.col.drop-on { box-shadow: 0 0 0 2px var(--focus) inset; background: color-mix(in srgb, var(--col) 85%, var(--orange)); }
.colh { display: flex; align-items: center; gap: 8px; padding: 8px 8px 10px; min-width: 0; }
.colh b { font-family: var(--display); font-weight: 650; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
.colh .n { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.colh .sp { flex: 1; }
.colh .drop { font-size: 11px; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane { font-size: 11.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; padding: 8px 8px 6px; font-weight: 550; }
.card { --card-bg: var(--panel); position: relative; display: block; background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 12px 11px; margin-bottom: 7px; color: inherit; cursor: pointer; box-shadow: var(--shadow-1);
  transition: box-shadow .22s var(--ease-out), transform .22s var(--ease-out), border-color .18s var(--ease-out); }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.card.sel { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow-2); }
.card.dragging { opacity: .45; }
.card .l1 { display: flex; gap: 8px; align-items: baseline; }
.card .num { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.card .age { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.card .t { display: block; font-weight: 600; font-size: 13.5px; margin: 4px 0 7px; line-height: 1.36; color: inherit; text-decoration: none; overflow-wrap: anywhere; letter-spacing: -.005em; }
.card .t::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.card .t:focus-visible { outline: none; }
.card .t:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.card .l3 { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
/* The one-click assignment moves. Touch and phone: a row under the card. A mouse: they float in on
   hover, keyboard focus or selection, over the card's last line, so the board keeps its calm shape. */
.card .acts { position: relative; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.btn.sm { min-height: 28px; padding: 3px 9px; font-size: 12px; gap: 5px; border-radius: 7px; }
.btn.tint { background: var(--wash); border-color: color-mix(in srgb, var(--accent-ink) 30%, transparent); color: var(--accent-ink); font-weight: 600; }
.btn.tint:hover { border-color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .card:hover { transform: translateY(-1px); }
  .card .acts { position: absolute; right: 7px; bottom: 7px; margin: 0; padding: 3px 3px 3px 26px; flex-wrap: nowrap; border-radius: 10px; background: linear-gradient(90deg, transparent, var(--card-bg) 22px);
    opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity .16s var(--ease-out), transform .24s var(--ease-out); }
  .card:hover .acts, .card.sel .acts, .card:focus-within .acts { opacity: 1; transform: none; pointer-events: auto; }
}
.card.parked { --card-bg: var(--panel-2); box-shadow: none; }
.card.parked .t { color: var(--ink-2); font-weight: 500; }
.pill { display: inline-flex; gap: 5px; align-items: center; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.pill.none { border-style: dashed; border-color: var(--dash); background: none; }
.pill.ai { border-color: var(--ai-line); background: var(--ai-bg); color: var(--ai-ink); }
.pill.demo { border-color: var(--note-line); background: var(--note-bg); color: var(--note-ink); }
.more { display: flex; align-items: center; gap: 6px; padding: 8px; color: var(--ink-2); font-size: 12px; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; border-radius: 8px; min-height: 34px; }
.more:hover { color: var(--ink); background: color-mix(in srgb, var(--panel) 70%, transparent); }
.emptycol { border: 1.5px dashed var(--dash); border-radius: var(--r-card); padding: 22px 14px; text-align: center; color: var(--ink-2); font-size: 12.5px; margin-bottom: 7px; line-height: 1.5; }
.emptycol b { display: block; color: var(--ink); font-weight: 650; font-size: 14px; margin-bottom: 3px; font-family: var(--display); }

/* ---------- List view (borrowed from concept A) ---------- */
.list { flex: 1; overflow: auto; padding: 14px 16px 24px; }
.lt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-1); }
.lrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px 110px 150px 64px; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); position: relative; cursor: pointer; transition: background-color .14s var(--ease-out); }
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: var(--panel-2); }
.lrow.sel { background: var(--wash); }
.lrow.sel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--orange); }
.lrow.head { padding: 4px 14px; background: var(--panel-2); cursor: default; }
.lrow.head:hover { background: var(--panel-2); }
.sortb { border: 0; background: none; padding: 6px 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-align: left; min-height: 30px; }
.sortb:hover { color: var(--ink); }
.sortb[aria-sort="ascending"], .sortb[aria-sort="descending"] { color: var(--ink); }
.sortb .ar { font-family: var(--mono); font-size: 11px; }
.lrow .num { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.lrow .tt { min-width: 0; }
.lrow .tt a { display: block; font-weight: 600; font-size: 13.5px; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .tt a::after { content: ""; position: absolute; inset: 0; }
.lrow .tt a:focus-visible { outline: none; }
.lrow .tt a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
.lrow .tt small { display: block; color: var(--ink-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .who { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.lrow .who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .age { font-family: var(--mono); font-size: 11px; color: var(--ink-3); text-align: right; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.st.us { color: var(--ink); font-weight: 550; }
.listempty { padding: 40px 16px; text-align: center; color: var(--ink-2); }
.listempty b { display: block; color: var(--ink); font-size: 15px; font-weight: 650; margin-bottom: 3px; font-family: var(--display); }

/* ---------- Sheet ---------- */
.scrim { position: absolute; inset: 0 0 0 var(--side-w); background: var(--scrim); z-index: 3; }
.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(880px, calc(100% - var(--side-w))); background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--sheet-shadow); display: grid; grid-template-columns: minmax(0,1fr) 276px; grid-template-rows: auto minmax(0,1fr); z-index: 4; }
@media (prefers-reduced-motion: no-preference) {
  .sheet.enter { animation: sheetIn .38s var(--ease); }
  .sheet.leave { animation: sheetOut .18s var(--ease) forwards; }
  .scrim:not([hidden]) { animation: fadeIn .28s var(--ease-out); }
  .scrim.leave { animation: fadeOut .18s ease-in forwards; }
  @keyframes sheetIn { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes sheetOut { to { transform: translateX(36px); opacity: 0; } }
  @keyframes fadeIn { from { opacity: 0; } }
  @keyframes fadeOut { to { opacity: 0; } }
}
.sh { grid-column: 1 / -1; padding: 12px 20px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.sh .l1 { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; min-height: 34px; }
.sh .l1 .num { font-family: var(--mono); color: var(--ink-2); }
.sh .l1 .sp { flex: 1; }
.sh h2:focus-visible { outline: none; }
.sh h2 { margin: 6px 0 12px; font-family: var(--display); font-size: 21px; font-weight: 650; letter-spacing: -.022em; line-height: 1.24; overflow-wrap: anywhere; }
.props { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prop { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--panel-2); font-size: 12.5px; min-height: 30px; white-space: nowrap; color: var(--ink); }
button.prop { cursor: pointer; }
button.prop:hover { border-color: var(--line-2); background: var(--panel); }
.prop.owner { font-weight: 550; }
.prop .chev { color: var(--ink-3); width: 12px; height: 12px; flex-basis: 12px; margin-right: -2px; }
.prop.dash { border-style: dashed; border-color: var(--dash); color: var(--ink-2); background: transparent; }
.prop .sug { color: var(--accent-ink); font-weight: 600; }
.prop.flash, .flash-bg { background: var(--flash); }
@media (prefers-reduced-motion: no-preference) {
  .prop.flash, .flash-bg { animation: flash 2.4s ease-out; }
  @keyframes flash { 0%, 55% { box-shadow: 0 0 0 2px var(--focus); } 100% { box-shadow: 0 0 0 0 transparent; } }
}
.props .sp { flex: 1; }
.resolution { margin: 10px 0 0; display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); }
.resolution svg { margin-top: 3px; }
.resolution b { color: var(--ink); font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--panel); font-size: 12.5px; font-weight: 550; cursor: pointer; min-height: 32px; white-space: nowrap; color: var(--ink); text-decoration: none; box-shadow: 0 1px 1px rgba(14,23,38,.04); }
.btn:hover { border-color: var(--ink-3); }
.btn[disabled] { cursor: default; opacity: .6; }
.btn.pri { background: var(--orange); border-color: color-mix(in srgb, var(--orange) 80%, #000); color: var(--on-orange); font-weight: 650; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(122,52,6,.25); }
.btn.pri:hover { background: color-mix(in srgb, var(--orange) 92%, #fff); }
.btn.pri kbd { background: rgba(255,255,255,.36); border-color: rgba(26,13,4,.22); color: var(--on-orange); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: transparent; color: var(--ink); }
.ib { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; text-decoration: none; padding: 0; }
.ib:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.conv { display: flex; flex-direction: column; min-height: 0; }
.scroll { flex: 1; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.scroll > * { flex-shrink: 0; }
.ai { border: 1px solid var(--ai-line); background: var(--ai-bg); border-radius: var(--r-card); }
.ai .aih { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--ai-line); font-size: 12.5px; color: var(--ai-ink); flex-wrap: wrap; }
.ai .aih b { color: var(--ink); font-weight: 650; }
.ai .aih .sp { flex: 1; }
.ai.quiet .aih { border-bottom: 0; }
.ai .why { padding: 0 12px 10px; margin: -2px 0 0; font-size: 12.5px; color: var(--ink-2); }
.conf { font-family: var(--mono); font-size: 11px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.conf i { width: 40px; height: 4px; border-radius: 2px; background: var(--ai-line); position: relative; overflow: hidden; display: inline-block; }
.conf i b { position: absolute; inset: 0 auto 0 0; background: var(--ai-ink); border-radius: 2px; }
.ai dl { display: grid; grid-template-columns: 92px 1fr; gap: 7px 12px; margin: 0; padding: 11px 12px 2px; font-size: 12.5px; }
.ai dt { color: var(--ink-3); font-weight: 550; }
.ai dd { margin: 0; overflow-wrap: anywhere; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.checks li { display: flex; gap: 7px; align-items: flex-start; }
.checks li::before { content: ""; flex: 0 0 12px; height: 12px; margin-top: 3px; border-radius: 3.5px; border: 1.5px solid var(--ink-3); }
.ai .act { display: flex; gap: 6px; align-items: center; padding: 10px 12px 11px; flex-wrap: wrap; }
.ai .act .sp { flex: 1; }
.ai .act small { color: var(--ink-3); font-size: 11.5px; }
.ai .foot { display: flex; gap: 7px; align-items: center; padding: 8px 12px 11px; font-size: 12px; color: var(--ink-2); }
.btn.apply { min-height: 26px; padding: 1px 7px; color: var(--accent-ink); font-weight: 650; }
.needs { color: var(--note-ink); background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 7px; padding: 1px 7px; font-size: 12px; display: inline-flex; gap: 5px; align-items: center; }
.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 11px; }
.msg .hd { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; flex-wrap: wrap; }
.msg .hd b { font-weight: 650; }
.msg .hd .l { color: var(--ink-3); }
.msg .hd .tm { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.msg p, .msg .txt { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.vis { display: inline-flex; gap: 4px; align-items: center; font-size: 11px; color: var(--ink-3); }
.vis.ai { color: var(--ai-ink); }
.msg.note .body { background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 10px; padding: 9px 11px; color: var(--note-ink); margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg.note .vis { color: var(--note-ink); }
.msg.sys { grid-template-columns: 30px minmax(0,1fr); }
.msg .tagline { display: inline-flex; gap: 5px; align-items: center; font-size: 11.5px; color: var(--ai-ink); margin-top: 5px; }
.msg .resol { display: inline-flex; gap: 5px; align-items: center; font-size: 11.5px; color: var(--st-done); margin-top: 5px; font-weight: 550; }
.att { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb { border: 1px solid var(--line-2); border-radius: 10px; background: var(--thumb-bg); padding: 0; cursor: zoom-in; width: 132px; height: 84px; overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow-1); transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.thumb:hover { box-shadow: var(--shadow-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbcap { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-2); margin-top: 5px; }
.comp { border-top: 1px solid var(--line); padding: 10px 20px 12px; background: var(--panel); }
.comp .row { display: flex; gap: 8px; align-items: flex-end; }
.comp .row.tools { align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.comp .row.tools .sp { flex: 1; }
.comp .who2 { font-size: 11.5px; color: var(--ink-3); display: inline-flex; gap: 5px; align-items: center; }
.comp .who2.note { color: var(--note-ink); }
.draftlbl { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ai-ink); font-weight: 650; }
.draftlbl span { font-weight: 400; color: var(--ink-3); }
/* Segmented control: a recessed track with a raised thumb. */
.seg2 { display: inline-flex; border-radius: 9px; padding: 2px; gap: 2px; background: var(--col); border: 1px solid var(--line); }
.seg2 button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; font-size: 12px; display: inline-flex; gap: 5px; align-items: center; cursor: pointer; color: var(--ink-2); min-height: 26px; font-weight: 500; }
.seg2 button:hover { color: var(--ink); }
.seg2 button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(14,23,38,.12), 0 0 0 .5px var(--line-2); }
.inp { flex: 1; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; color: var(--ink); background: var(--panel-2); min-height: 40px; max-height: 30vh; resize: none; line-height: 1.5; font-size: 13.5px; overflow: auto; display: block; width: 100%; transition: border-color .16s var(--ease-out), box-shadow .2s var(--ease-out); }
.inp::placeholder { color: var(--ink-3); opacity: 1; }
.inp:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.inp.note { background: var(--note-bg); border-color: var(--note-line); color: var(--note-ink); }
.inp.note::placeholder { color: var(--note-ink); }
.inp.draft { background: var(--ai-bg); border-color: var(--ai-line); }
.inp[readonly] { cursor: default; }
.comp .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.comp .actions .sp { flex: 1; }
.comp .actions small { color: var(--ink-3); font-size: 11.5px; }
.ctx { border-left: 1px solid var(--line); background: var(--panel-2); overflow: auto; padding: 16px 14px 18px; display: flex; flex-direction: column; gap: 14px; }
/* POLISH-LOCK: ctx-no-shrink. In a short window the panel scrolls; its parts must not squash (the screenshot went to 2px). */
.ctx > * { flex-shrink: 0; }
.shot { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--thumb-bg); aspect-ratio: 16 / 10; margin: 0; padding: 0; display: block; width: 100%; cursor: zoom-in; box-shadow: var(--shadow-1); }
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot .cnt { position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; padding: 2px 6px; border-radius: 5px; background: rgba(10,14,20,.86); color: #F4F1EA; font-family: var(--mono); }
.pt { border: 1px solid var(--line); background: var(--panel); border-radius: 11px; padding: 11px 12px; box-shadow: var(--shadow-1); }
.pt .v { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.pt .v b { font-family: var(--display); font-size: 30px; font-weight: 650; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pt .v span { font-weight: 600; font-size: 13px; }
.pt p { margin: 5px 0 0; color: var(--ink-2); font-size: 12px; }
.refs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.refs span, .refs button { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--ink-2); background: none; }
.refs button { cursor: pointer; }
.kv { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 5px 8px; font-size: 12px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd.mono { font-size: 11px; }
.lnk { color: var(--accent-ink); text-decoration: none; font-weight: 550; font-size: 12.5px; display: inline-flex; gap: 5px; align-items: center; min-height: 28px; }
.lnk:hover { text-decoration: underline; text-underline-offset: 2px; }
.hist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; font-size: 11.5px; color: var(--ink-2); }
.hist li { overflow-wrap: anywhere; }
.hist span { font-family: var(--mono); color: var(--ink-3); margin-right: 6px; }
.quietnote { color: var(--ink-2); font-size: 12px; margin: 0; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--note-line); background: var(--note-bg); color: var(--note-ink); font-size: 12.5px; }
.banner b { color: inherit; }
.banner .sp { flex: 1; }
.banner ul { margin: 4px 0 0; padding-left: 18px; }
.banner.err { border-color: var(--err-line); background: var(--err-bg); color: var(--err-ink); }
.banner .btn { margin-left: auto; }
.banner .ib { margin-left: auto; flex: 0 0 auto; }
.pagebanner { margin: 10px 16px 0; }

/* ---------- Team ---------- */
.work { flex: 1; overflow: auto; padding: 18px 22px 40px; }
.wt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-1); }
.wr { display: grid; grid-template-columns: 170px 1fr 130px 130px; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wr:last-child { border-bottom: 0; }
.wr.head { padding: 9px 16px; background: var(--panel-2); }
.who { display: flex; gap: 10px; align-items: center; font-weight: 650; min-width: 0; }
.load { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.load .bars { display: flex; gap: 3px; flex-wrap: wrap; }
.load .bars i { width: 22px; height: 14px; border-radius: 4px; display: block; }
.load .bars i.us { background: var(--st-us); }
.load .bars i.dealer { border: 1.5px solid var(--st-dealer); }
.load span { font-size: 12.5px; color: var(--ink-2); }
.wr .num2 { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.wr .num2 small { display: block; font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); }
.wr .num2 a { color: inherit; }
.wr .num2 .lbl2 { display: none; }
.flow { margin-top: 16px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 15px 16px; box-shadow: var(--shadow-1); }
.box h3 { margin: 0 0 12px; font-family: var(--display); font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.day .stack { width: 26px; display: flex; flex-direction: column; gap: 2px; }
.day .stack i { display: block; border-radius: 4px; }
.day .stack i.in { background: var(--ink-3); }
.day .stack i.out { background: var(--st-done); }
.day b { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-2); }
.day span { font-size: 11px; color: var(--ink-3); }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.in { background: var(--ink-3); }
.legend i.out { background: var(--st-done); }
.outcome { display: grid; gap: 9px; }
.oc { display: grid; grid-template-columns: 110px 1fr 30px; gap: 10px; align-items: center; font-size: 12.5px; }
.oc .track { height: 10px; border-radius: 5px; background: var(--col); overflow: hidden; }
.oc .track i { display: block; height: 100%; background: var(--ai-ink); border-radius: 5px; }
.oc b { font-family: var(--mono); font-weight: 500; text-align: right; }
.box p.note2 { margin: 12px 0 0; color: var(--ink-2); font-size: 12.5px; }

/* ---------- Sign in ---------- */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background-color: var(--bg);
  background-image: radial-gradient(900px 520px at 80% -10%, color-mix(in srgb, var(--orange) 10%, transparent), transparent 60%), radial-gradient(700px 480px at -10% 110%, color-mix(in srgb, var(--orange) 6%, transparent), transparent 55%); }
.signin form { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px 24px; display: grid; gap: 14px; box-shadow: var(--pop-shadow); }
@media (prefers-reduced-motion: no-preference) { .signin:not([hidden]) form { animation: rise .45s var(--ease-out); } }
.signin .brand { padding: 0 0 6px; font-size: 15px; }
.signin .brand svg { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; }
.signin h1 { margin: 0; font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -.025em; }
.signin p.lead { margin: -8px 0 4px; color: var(--ink-2); font-size: 13px; }
.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.field input { border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); padding: 10px 12px; font-size: 15px; color: var(--ink); min-height: 44px; transition: border-color .16s var(--ease-out), box-shadow .2s var(--ease-out); }
.field input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); background: var(--panel); }
.signin .btn.pri { min-height: 44px; font-size: 14.5px; margin-top: 2px; border-radius: 10px; }
.signin .foot { color: var(--ink-3); font-size: 12px; margin: 0; text-align: center; }

/* ---------- Menus, dialogs, lightbox, toasts: glass over the page ---------- */
.menu { position: fixed; z-index: 30; min-width: 232px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--pop-shadow); padding: 5px; display: grid; gap: 1px; }
@media (prefers-reduced-motion: no-preference) { .menu.enter { animation: pop .2s var(--spring); } @keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-3px); } } }
.menu .mh { padding: 7px 10px 5px; }
.menu .mhead { padding: 9px 10px 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); border-top: 1px solid var(--line); margin-top: 3px; }
.menu .mh + .mhead { border-top: 0; margin-top: 0; padding-top: 2px; }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink); min-height: 36px; }
.menu button:hover, .menu button:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
.menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.menu button .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu button .ct { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.menu button .tick { color: var(--accent-ink); visibility: hidden; stroke-width: 2.4; }
.menu button[aria-checked="true"] { font-weight: 650; }
.menu button[aria-checked="true"] .tick { visibility: visible; }
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); color: var(--ink); padding: 0; box-shadow: var(--pop-shadow); max-width: calc(100vw - 24px); }
dialog::backdrop { background: var(--scrim); }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: dlgIn .26s var(--spring); }
  dialog[open]::backdrop { animation: fadeIn .22s var(--ease-out); }
  @keyframes dlgIn { from { opacity: 0; transform: scale(.95); } }
}
.dlg { width: 460px; max-width: 100%; padding: 20px 20px 18px; display: grid; gap: 12px; }
.dlg h2 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.dlg p { margin: 0; color: var(--ink-2); font-size: 12.5px; }
.dlg .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 2px; }
.dlg .err { color: var(--err-ink); background: var(--err-bg); border: 1px solid var(--err-line); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }
.keys { width: 580px; max-width: 100%; padding: 20px 22px 22px; }
.keys h2 { margin: 0 0 14px; font-family: var(--display); font-size: 17px; font-weight: 650; display: flex; align-items: center; letter-spacing: -.015em; }
.keys h2 .sp { flex: 1; }
.keys .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; }
.keys dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 10px; font-size: 12.5px; align-items: center; }
.keys dt { display: flex; gap: 3px; }
.keys dd { margin: 0; color: var(--ink-2); }
.keys .cap { margin-bottom: 7px; }
.lightbox { width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); background: var(--thumb-bg); border-color: #212C3A; color: #F4F1EA; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lightbox .lbh { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; font-size: 12.5px; }
.lightbox .lbh .sp { flex: 1; }
.lightbox .lbh .ib { color: #F4F1EA; width: 36px; height: 36px; }
.lightbox .lbh .ib:hover { background: #1A2431; }
.lightbox .lbh a { color: #F4F1EA; }
.lightbox .stage { display: grid; place-items: center; padding: 0 12px 12px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; image-rendering: auto; background: #121A26; min-width: 64px; min-height: 64px; border-radius: 6px; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
/* With a ticket open (desktop) the composer owns the bottom edge, so news arrives at the top instead. */
@media (min-width: 761px) { body.sheet-open .toasts { bottom: auto; top: calc(var(--top-h) + 12px); } }
.toast { pointer-events: auto; background: var(--toast-bg); color: var(--toast-ink); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-radius: 14px; padding: 7px 7px 7px 16px; min-height: 42px; font-size: 13px; font-weight: 500; box-shadow: var(--pop-shadow); display: flex; gap: 10px; align-items: center; }
.toast:not(:has(.tact)) { padding-right: 16px; }
.toast .tx { padding: 3px 0; }
.toast .tact { border: 0; background: rgba(255,255,255,.08); color: var(--toast-act); font-weight: 650; font-size: 13px; border-radius: 9px; padding: 5px 11px; min-height: 30px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }
.toast .tact:hover { background: rgba(255,255,255,.16); }
.toast .tact:focus-visible { outline-color: var(--toast-act); }
.toast.err { background: var(--err-bg); color: var(--err-ink); border: 1px solid var(--err-line); -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rise .32s var(--spring); }
  .toast.out { animation: sink .18s ease-in forwards; }
  @keyframes rise { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes sink { to { transform: translateY(6px) scale(.98); opacity: 0; } }
}
.offline { background: var(--note-bg); color: var(--note-ink); border-bottom: 1px solid var(--note-line); font-size: 12.5px; padding: 7px 16px; display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; }

/* ---------- Live, loading ---------- */
@media (prefers-reduced-motion: no-preference) {
  .live:not(.off) i::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--st-done); animation: ping 2.4s var(--ease-out) infinite; }
  @keyframes ping { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.2); opacity: 0; } }
}
.skel { background-color: var(--skel); border-radius: 6px; display: block; }
.card.sk { cursor: default; box-shadow: none; }
.card.sk .skel { height: 10px; margin: 4px 0; }
.card.sk .skel.w1 { width: 30%; }
.card.sk .skel.w2 { width: 85%; height: 13px; margin: 10px 0; }
.card.sk .skel.w3 { width: 55%; }
.skline { height: 12px; margin: 8px 0; }
.skline.w2 { width: 70%; }
.skline.w3 { width: 45%; }
@media (prefers-reduced-motion: no-preference) {
  .skel { background-image: linear-gradient(90deg, transparent 0%, var(--skel-hi) 45%, transparent 90%); background-size: 220% 100%; background-repeat: no-repeat; animation: shimmer 1.5s var(--ease) infinite; }
  @keyframes shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.ptop, .pseg, .pbar, .phone-only { display: none; }

/* ---------- Compact rail: narrow windows, and Mission Control's frame on a laptop ---------- */
@media (min-width: 761px) and (max-width: 1279px), (min-width: 761px) and (max-height: 679px) {
  :root { --side-w: 64px; }
  .side { padding: 10px 9px; align-items: center; gap: 4px; overflow: hidden; }
  .side .brand { padding: 2px 0 10px; }
  .side .brand > div { display: none; }
  .side .cap, #sideViews, #sideApps, #sideTenants { display: none; }
  .side .nv { width: 44px; height: 44px; min-height: 44px; justify-content: center; padding: 0; flex: 0 0 auto; border-radius: 10px; }
  .side .nv svg.i.s { width: 18px; height: 18px; flex-basis: 18px; }
  .side .nv .k { display: none; }
  .side .nv .nm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .side .rail-only { display: flex !important; margin-top: 8px; }
  .side .rail-only::before { content: ""; position: absolute; top: -6px; left: 10px; right: 10px; height: 1px; background: var(--line); }
  .mechip { width: 44px; }
  .mebtn { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; border: 0; background: none; }
  .mebtn .av { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }
  .mebtn .nm, .mebtn svg.i { display: none; }
  .bh .hint { display: none; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --top-h: 56px; }
  kbd, .desk-only { display: none !important; }
  .phone-only { display: block; }
  .top { gap: 4px; padding: 0 8px; position: sticky; top: 0; }
  .strip { gap: 5px; }
  .strip .lbl { display: none; }
  .pres { flex: 1 1 0; justify-content: center; padding: 3px 7px 3px 3px; min-height: 44px; gap: 4px; font-size: 12px; overflow: hidden; }
  .top #themeBtn { display: none; }
  .pres .ct + .ct { display: none; }
  .pres .long { display: none; }
  .pres .ct { gap: 4px; }
  .live .word { display: none; }
  .live { padding: 0 4px; min-height: 44px; }
  .tbtn { min-width: 44px; min-height: 44px; justify-content: center; padding: 4px; }
  .tbtn .word { display: none; }
  .app { display: block; height: auto; min-height: calc(100vh - var(--top-h)); }
  .side, .bh { display: none; }
  .ptop { display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 56px; border-bottom: 1px solid var(--line); background: var(--panel); }
  .ptop .ttl { flex: 1; font-family: var(--display); font-weight: 700; font-size: 17px; min-width: 0; letter-spacing: -.02em; }
  .ptop .ttl small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; }
  .ptop .ib { width: 44px; height: 44px; }
  .ptop .ib svg.i { width: 20px; height: 20px; }
  .psearch { padding: 10px 12px 0; }
  .psearch .search { width: 100%; min-height: 44px; }
  .psearch .search input { font-size: 16px; min-height: 44px; padding: 0; }
  .lnk { min-height: 44px; }
  .wr .num2 small a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .pviews { display: flex; gap: 6px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none; }
  .pviews::-webkit-scrollbar { display: none; }
  .pviews button { flex: 0 0 auto; min-height: 44px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; box-shadow: var(--shadow-1); }
  .pviews button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 650; box-shadow: 0 0 0 1px var(--ink); }
  .pviews .n { font-family: var(--mono); font-size: 11.5px; }
  .pchips { padding: 8px 12px 0; }
  .chip button { width: 44px; height: 44px; margin: -6px -4px -6px -6px; }
  .pseg { display: flex; gap: 2px; margin: 10px 12px; padding: 2px; border-radius: 12px; background: var(--col); border: 1px solid var(--line); }
  .pseg button { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; border: 0; background: none; color: var(--ink-2); font-size: 13px; font-weight: 550; cursor: pointer; min-width: 0; }
  .pseg button span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pseg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 650; box-shadow: 0 1px 3px rgba(14,23,38,.14), 0 0 0 .5px var(--line-2); }
  .pseg .n { font-family: var(--mono); font-size: 11.5px; }
  .board { display: block; padding: 0 12px 24px; overflow: visible; }
  .board .col { display: none; background: none; padding: 0; min-height: 0; }
  .board .col.phone-col { display: block; }
  .board .colh { display: none; }
  .card { padding: 12px 14px; min-height: 44px; margin-bottom: 10px; }
  .card .acts .btn { min-height: 44px; padding: 6px 14px; font-size: 13px; flex: 1 1 auto; }
  .more { min-height: 44px; }
  .list { padding: 10px 12px 24px; overflow: visible; }
  .lrow.head { display: none; }
  .lrow { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 12px 14px; min-height: 72px; }
  .lrow .num { display: none; }
  .lrow .tt { grid-column: 1; grid-row: 1; }
  .lrow .tt a { font-size: 14px; }
  .lrow .age { grid-column: 2; grid-row: 1; align-self: start; }
  .lrow .stc { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .lrow .stc .pill { margin-left: 0; }
  .lrow .whoc { grid-column: 2; grid-row: 2; justify-self: end; }
  .lrow .whoc .who span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lrow .typec { display: none; }
  .scrim { display: none; }
  body.sheet-open .main { display: none; }
  .sheet { position: static; width: auto; display: block; box-shadow: none; border: 0; }
  .sh { padding: 14px 16px; }
  .sh .l1 .desk-act { display: none; }
  .sh h2 { font-size: 21px; }
  .prop { min-height: 44px; }
  .ctx { border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; align-items: start; }
  .ctx .deskctx { display: none; }
  .ctx .shot { grid-column: 2; grid-row: 1; }
  .ctx .pt { grid-column: 1; grid-row: 1; }
  .ctx.noshot { grid-template-columns: minmax(0, 1fr); }
  .ctx .kvphone { grid-column: 1 / -1; }
  .scroll { padding: 14px 16px 16px; overflow: visible; }
  .ai dl { grid-template-columns: 1fr; gap: 2px; }
  .btn.apply { min-height: 44px; }
  .ai dd { margin-bottom: 8px; }
  .comp { padding: 10px 16px 100px; }
  .comp .row { flex-wrap: wrap; }
  .comp .row.tools .seg2 { width: 100%; }
  .seg2 button { flex: 1; min-height: 44px; justify-content: center; }
  .inp { min-height: 48px; font-size: 16px; }
  .comp .actions .btn { flex: 1; min-height: 48px; }
  .comp .row > .btn { min-height: 48px; }
  .lightbox .lbh .ib { width: 44px; height: 44px; flex: 0 0 44px; }
  .lightbox .lbh #imgName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .comp .actions small, .comp .actions .sp { display: none; }
  .thumb { width: 100%; height: 120px; }
  .pbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--chrome); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); z-index: 6; }
  .pbar .btn { flex: 1 1 0; min-width: 0; min-height: 48px; font-size: 14px; padding: 6px 8px; border-radius: 12px; }
  .pbar .btn .lb { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .pbar[data-n="3"] .btn { font-size: 13px; gap: 5px; }
  .pbar[data-n="3"] .btn svg.i { display: none; }
  .work { padding: 14px 12px 40px; }
  .wr.head { display: none; }
  .wr { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .wr .who { grid-column: 1 / -1; }
  .wr .load { grid-column: 1 / -1; }
  .wr .num2 .lbl2 { display: block; font-family: var(--sans); font-size: 11px; color: var(--ink-3); margin-bottom: 1px; }
  .wr .num2.blank { display: none; }
  .flow { grid-template-columns: 1fr; }
  .emptycol { padding: 24px 12px; }
  .menu button { min-height: 44px; }
  .dlg .row .btn { min-height: 44px; flex: 1; }
  .keys .grid { grid-template-columns: 1fr; }
  .pagebanner { margin: 10px 12px 0; }
  .banner .ib { width: 44px; height: 44px; margin: -10px -8px -10px auto; }
  .mephone { display: flex; gap: 8px; align-items: center; padding: 18px 12px 28px; color: var(--ink-2); font-size: 12.5px; }
  .mephone .btn { min-height: 44px; }
  .mephone > span:nth-child(2) { flex: 1; min-width: 0; }
  .toasts { bottom: 88px; }
  .toast .tact { min-height: 44px; padding: 5px 14px; }
}
@media (min-width: 761px) { .mephone { display: none; } }
@media (max-width: 1180px) and (min-width: 761px) {
  .pres .long { display: none; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .sheet { grid-template-columns: minmax(0,1fr) 224px; }
}
/* A touch tablet has no hover: the card moves sit under the card, finger-sized. */
@media (min-width: 761px) and (hover: none), (min-width: 761px) and (pointer: coarse) {
  .card .acts { flex-wrap: nowrap; }
  .card .acts .btn { min-height: 44px; padding: 5px 8px; flex: 1 1 auto; min-width: 0; font-size: 12.5px; }
  .card .acts .btn svg.i { display: none; }
  .nv, .more, .menu button { min-height: 40px; }
}

/* ---------- Sheet parts placed on the grid; on phone they stack in DOM order ---------- */
.sheet > .sh { grid-column: 1 / -1; grid-row: 1; }
.sheet > .conv { grid-column: 1; grid-row: 2; }
.sheet > .ctx { grid-column: 2; grid-row: 2; }
.sh .desk-act { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sh .desk-act .acts { display: inline-flex; gap: 6px; align-items: center; }
.sh .banner { margin-top: 12px; }
.moredetails > summary { display: none; }
.moredetails .mdin { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 760px) {
  .sheet > .ptop { position: sticky; top: var(--top-h); z-index: 5; background: var(--chrome); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
  .ctx .moredetails { grid-column: 1 / -1; }
  .moredetails > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--ink-2); list-style: none; }
  .moredetails > summary::-webkit-details-marker { display: none; }
  .moredetails > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform .2s var(--ease-out); }
  .moredetails[open] > summary::before { transform: rotate(45deg); }
  .moredetails .mdin { padding-top: 6px; }
}

/* The shell is one column: top bar, optional offline banner, then the app fills what is left. */
@media (min-width: 761px) {
  #shell:not([hidden]) { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  #shell > .app { height: auto; flex: 1; min-height: 0; }
}
