/* Layout: a light table. A floating glass bar on top, soft colored light spilling in from the edges,
   rounded cards that lift when touched. The signature is the color-temperature gradient, tungsten to
   daylight, used only where something moves: the main button, progress, shoot days. */
:root {
  --bg: #f2f3f6;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --glass: rgba(255, 255, 255, .72);
  --ink: #15161b;
  --muted: #5d6270;
  --faint: #676d7c;
  --line: #e3e5eb;
  --line-strong: #cdd1da;
  --tungsten: #f59a3a;
  --daylight: #4b72f5;
  --gel: #e44d86;
  --accent: #3b5de7;
  --accent-soft: #e8edff;
  --accent-ink: #ffffff;
  --warm-soft: #fff0df;
  --good: #177347; --good-soft: #e1f4e9;
  --warn: #935600; --warn-soft: #fcefd8;
  --bad: #c1352b; --bad-soft: #fde5e2;
  --own-m: #f2c230; --own-c: #34b67f; --own-s: #ec5b9b;
  --spill-a: rgba(245, 154, 58, .22);
  --spill-b: rgba(75, 114, 245, .18);
  --spill-c: rgba(228, 77, 134, .10);
  --paper: #ffffff; --paper-ink: #1b1c20;
  --chart: #3b5de7; --chart-track: #e8edff;
  --shadow-sm: 0 1px 2px rgba(21, 22, 27, .05), 0 2px 8px rgba(21, 22, 27, .04);
  --shadow: 0 2px 6px rgba(21, 22, 27, .05), 0 12px 32px rgba(21, 22, 27, .08);
  --shadow-lg: 0 24px 60px rgba(21, 22, 27, .18);
  --grad: linear-gradient(100deg, var(--tungsten) 0%, var(--gel) 48%, var(--daylight) 100%);
  /* The same sweep, deep enough for white text to read on every part of it. */
  --grad-deep: linear-gradient(100deg, #b85a14 0%, #c8356f 48%, #3b5de7 100%);

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Onest", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --r: 18px; --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0e12; --surface: #16181e; --surface-2: #1c1f26; --glass: rgba(22, 24, 30, .72);
    --ink: #eef0f5; --muted: #a2a8b5; --faint: #8b92a1; --line: #272b34; --line-strong: #363b46;
    --accent: #8099ff; --accent-soft: #1d2547; --accent-ink: #0b0f22;
    --warm-soft: #33230f; --good: #5fd09a; --good-soft: #12301f; --warn: #f3b75a; --warn-soft: #36290f; --bad: #ff8a80; --bad-soft: #3c1916;
    --spill-a: rgba(245, 154, 58, .16); --spill-b: rgba(75, 114, 245, .20); --spill-c: rgba(228, 77, 134, .12);
    --paper: #1b1d23; --paper-ink: #eef0f5;
    --chart: #6f8af5; --chart-track: #232b4d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 2px 8px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0e12; --surface: #16181e; --surface-2: #1c1f26; --glass: rgba(22, 24, 30, .72);
  --ink: #eef0f5; --muted: #a2a8b5; --faint: #8b92a1; --line: #272b34; --line-strong: #363b46;
  --accent: #8099ff; --accent-soft: #1d2547; --accent-ink: #0b0f22;
  --warm-soft: #33230f; --good: #5fd09a; --good-soft: #12301f; --warn: #f3b75a; --warn-soft: #36290f; --bad: #ff8a80; --bad-soft: #3c1916;
  --spill-a: rgba(245, 154, 58, .16); --spill-b: rgba(75, 114, 245, .20); --spill-c: rgba(228, 77, 134, .12);
  --paper: #1b1d23; --paper-ink: #eef0f5;
  --chart: #6f8af5; --chart-track: #232b4d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 2px 8px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(60vw 42vw at -8% -12%, var(--spill-a), transparent 62%),
    radial-gradient(55vw 40vw at 108% -6%, var(--spill-b), transparent 60%),
    radial-gradient(40vw 30vw at 50% 118%, var(--spill-c), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--display); letter-spacing: -.02em; }
em.s { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.num, .n { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { flex: none; display: inline-block; vertical-align: -3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- top bar ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; padding: 12px 16px 0; }
.top-in {
  max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px;
  background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 17px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 3px var(--surface), 0 0 18px var(--spill-a); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav button {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; cursor: pointer; white-space: nowrap;
  padding: 8px 13px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; transition: background .2s var(--ease), color .2s;
}
.nav button:hover { color: var(--ink); background: var(--surface-2); }
.nav button[aria-current="page"] { background: var(--ink); color: var(--bg); }
.nav .count { font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.nav button[aria-current="page"] .count { background: var(--bg); color: var(--ink); }
.top-cta { display: flex; align-items: center; gap: 10px; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px var(--surface-2); }
.live.ok { background: var(--good); }
.live.bad { background: var(--bad); }

main { padding: 28px 16px 72px; }
.view { max-width: 1280px; margin: 0 auto; display: grid; gap: 22px; }
.view.enter { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: .6; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.foot { max-width: 1280px; margin: 0 auto; padding: 0 16px 32px; color: var(--faint); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- headings ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 28px; padding-top: 8px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: .98; font-weight: 700; max-width: 18ch; }
.hero p { margin: 10px 0 0; color: var(--muted); font-size: 16px; max-width: 60ch; }
.eyebrow { font: 600 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
h2.t { font-size: 20px; font-weight: 650; }
h3.t { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.grad { background: var(--grad-deep); color: #fff; border: 0; box-shadow: 0 6px 20px var(--spill-b); }
.btn.grad:hover { box-shadow: 0 8px 26px var(--spill-a); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.danger { color: var(--bad); border-color: var(--bad); background: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.icon { padding: 7px; width: 34px; height: 34px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.field small { color: var(--faint); font-size: 12.5px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; min-width: 0; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.3;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.form .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.4; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-size: 13.5px; color: var(--muted); font-weight: 500; transition: all .15s; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .c { font-size: 11.5px; opacity: .65; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); min-width: 0; }
.card > .hd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 18px 20px 0; }
.card > .bd { padding: 16px 20px 20px; min-width: 0; }
.card > .bd.flush { padding: 8px 0; }
.card.glow { position: relative; overflow: hidden; }
.card.glow::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 140%; background: radial-gradient(closest-side, var(--spill-b), transparent); pointer-events: none; }
.card.glow > * { position: relative; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.stack { display: grid; gap: 16px; min-width: 0; }
.sticky { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.big { font: 700 44px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mid { font: 650 26px/1.05 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv .tot { font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); padding-top: 10px; }

/* ---------- status bits ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warm { background: var(--warm-soft); color: var(--warn); }
.pill.live { background: var(--ink); color: var(--bg); }
.pill.grad { background: var(--grad-deep); color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--line-strong); flex: none; }
.dot.M { background: var(--own-m); } .dot.C { background: var(--own-c); } .dot.S { background: var(--own-s); }
.who { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.note { border-radius: var(--r-sm); background: var(--warm-soft); padding: 12px 14px; font-size: 14px; }
.note.info { background: var(--accent-soft); }
.note.bad { background: var(--bad-soft); }
.note.good { background: var(--good-soft); }
.flag { font-size: 12.5px; font-weight: 600; color: var(--warn); }
.flag.bad { color: var(--bad); }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .6s var(--ease); }
.icon-tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--ink); background: color-mix(in srgb, var(--tc, var(--daylight)) 16%, var(--surface)); }
.icon-tile.sm { width: 34px; height: 34px; border-radius: 11px; }
.t-Camera, .t-Media, .t-Accessory, .t-Support { --tc: var(--daylight); }
.t-Lens { --tc: #8a63f0; }
.t-Electric { --tc: var(--tungsten); }
.t-Power { --tc: var(--good); }
.t-Grip, .t-Consumable { --tc: #7d8594; }
.t-Sound, .t-Kit { --tc: var(--gel); }

/* ---------- lists ---------- */
.li { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li.click { cursor: pointer; transition: background .15s; }
.li.click:hover { background: var(--surface-2); }
.li .ttl { font-weight: 600; }
.li .sub { color: var(--muted); font-size: 13px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty b { color: var(--ink); font: 650 17px var(--display); }
.issue { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.issue:first-child { border-top: 0; }
.issue:hover { background: var(--surface-2); }
.issue .mk { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--warn); flex: none; box-shadow: 0 0 0 4px var(--warn-soft); }
.issue.bad .mk { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.issue.info .mk { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.issue .ttl { font-weight: 600; }
.issue .sub { color: var(--muted); font-size: 13.5px; }

/* ---------- week strip ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-height: 150px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.day.today { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm); }
.day .d { display: flex; align-items: baseline; justify-content: space-between; }
.day .d b { font: 700 24px/1 var(--display); }
.day .d span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.day .none { color: var(--faint); font-size: 12.5px; margin-top: auto; }
.ev { display: grid; gap: 1px; padding: 7px 9px; border-radius: 10px; font-size: 12.5px; cursor: pointer; background: var(--surface-2); border-left: 3px solid var(--faint); transition: transform .15s var(--ease); min-width: 0; }
.ev:hover { transform: translateX(2px); }
.ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { color: var(--muted); }
.ev.out { border-left-color: var(--tungsten); background: var(--warm-soft); }
.ev.shoot { border-left-color: var(--daylight); background: var(--accent-soft); }
.ev.in { border-left-color: var(--good); background: var(--good-soft); }
.ev.tent { border-left-style: dashed; }

/* ---------- schedule timeline ---------- */
.tl { overflow-x: auto; }
.tl-grid { display: grid; grid-template-columns: 230px repeat(var(--days), minmax(42px, 1fr)); min-width: calc(230px + var(--days) * 42px); }
.tl-h { font-size: 11.5px; color: var(--muted); text-align: center; padding: 10px 0 8px; border-bottom: 1px solid var(--line); font-weight: 600; text-transform: uppercase; }
.tl-h b { display: block; font: 700 18px/1.1 var(--display); color: var(--ink); text-transform: none; }
.tl-h.today b { color: var(--accent); }
.tl-h.wk, .tl-c.wk { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.tl-label { padding: 10px 14px; display: grid; align-content: center; gap: 3px; cursor: pointer; min-width: 0; position: sticky; left: 0; background: var(--surface); z-index: 1; border-bottom: 1px solid var(--line); }
.tl-label .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-c { position: relative; border-bottom: 1px solid var(--line); min-height: 58px; }
.tl-c.today::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .5; }
.span { position: absolute; top: 18px; height: 22px; left: 0; right: 0; }
.span.shoot { background: var(--grad); }
.span.held { background: repeating-linear-gradient(135deg, var(--warm-soft) 0 6px, color-mix(in srgb, var(--tungsten) 35%, transparent) 6px 8px); }
.span.tent { opacity: .45; }
.span.first { left: 5px; border-top-left-radius: 11px; border-bottom-left-radius: 11px; }
.span.last { right: 5px; border-top-right-radius: 11px; border-bottom-right-radius: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 26px; height: 12px; border-radius: 6px; vertical-align: -1px; margin-right: 7px; }

/* ---------- job workspace ---------- */
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.path .st { font-size: 13px; color: var(--faint); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.path .st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.path .st.on { color: var(--muted); } .path .st.on::before { background: var(--good); }
.path .st.now { color: var(--ink); } .path .st.now::before { background: var(--grad); box-shadow: 0 0 0 4px var(--accent-soft); }
.path .ln { width: 18px; height: 2px; background: var(--line); border-radius: 1px; }
.statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; }
.statusbar .path { flex: 1 1 560px; min-width: 0; }
.statusbar .path .st { white-space: nowrap; }
.statusbar .actions { margin-left: auto; }
.path-compact { display: none; gap: 8px; flex: 1 1 100%; min-width: 0; }
.path-compact .segs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.path-compact .segs i { height: 6px; border-radius: 3px; background: var(--line-strong); }
.path-compact .segs i.on { background: var(--good); }
.path-compact .segs i.now { background: var(--grad); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 1px solid var(--line); background: var(--surface); padding: 9px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; transition: all .15s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs .ok { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.tabs .ok.y { background: var(--good); }
.gear-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.gear-row:first-child { border-top: 0; }
.gear-row .ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.gear-row .ctl input[type="number"] { width: 70px; padding: 7px 8px; text-align: right; }
.gear-row .ctl select { width: auto; padding: 7px 10px; }
.mini { display: grid; gap: 2px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.stepper button { border: 0; background: none; width: 30px; height: 34px; cursor: pointer; font-size: 17px; color: var(--muted); }
.stepper button:hover { background: var(--surface-2); color: var(--ink); }
.stepper b { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.lt { font-weight: 650; min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.x { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 20px; line-height: 1; width: 30px; height: 30px; border-radius: 50%; }
.x:hover { color: var(--bad); background: var(--bad-soft); }
.budgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.budget { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; cursor: pointer; display: grid; gap: 6px; transition: all .2s var(--ease); color: var(--ink); }
.budget:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.budget[aria-pressed="true"] { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.budget .nm { font-weight: 650; }
.budget .pr { font: 700 28px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.budget .ds { font-size: 12.5px; color: var(--muted); }
.checklist { display: grid; gap: 10px; }
.checklist > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checklist > div::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 2px; background: var(--warn-soft); box-shadow: inset 0 0 0 2px var(--warn); }
.checklist > .ok::before { background: var(--good); box-shadow: inset 0 0 0 4px var(--good-soft); }
.checklist > .bad::before { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); }
.checklist .sub { display: block; color: var(--muted); font-size: 12.5px; }
.option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.option:has(input:checked) { border-color: transparent; box-shadow: 0 0 0 2px var(--accent); }
.option[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.option b { font-weight: 650; }
.option span { grid-column: 2; color: var(--muted); font-size: 13px; }

/* agreement on paper */
.paper { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 4vw, 52px); box-shadow: var(--shadow); max-width: 860px; font-size: 14.5px; }
.paper h2 { font: 700 30px/1.05 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.paper h3 { font: 650 15px/1.3 var(--body); margin: 20px 0 6px; letter-spacing: 0; }
.paper p { max-width: 72ch; margin: 0; }
.paper table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.paper th, .paper td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.paper th { font-weight: 600; color: var(--muted); font-size: 12px; }
.paper td.n, .paper th.n { text-align: right; }
.paper tr.total td { font-weight: 700; border-top: 2px solid var(--paper-ink); }
.paper .sig { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-top: 32px; }
.paper .sig div { border-top: 1px solid var(--paper-ink); padding-top: 6px; font-size: 12.5px; }
.paper .draft { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); margin-bottom: 10px; }
.paper .tbl { overflow-x: auto; }
pre.letter { white-space: pre-wrap; font: 14px/1.6 var(--body); background: var(--surface-2); border-radius: var(--r-sm); padding: 16px; margin: 0; }

/* ---------- gear ---------- */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; align-content: space-between; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; min-height: 170px; color: var(--ink); text-align: left; }
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gcard.in { box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm); }
.gcard h3 { font: 600 15.5px/1.3 var(--body); letter-spacing: 0; }
.gcard .price { font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.gcard .price small { font: 500 12.5px var(--body); color: var(--muted); letter-spacing: 0; }
.gcard .foot2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sec-h { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; }
.sec-h h2 { font-size: 22px; font-weight: 650; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.plain td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.plain tr:last-child td { border-bottom: 0; }
table.plain td.n, table.plain th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.plain tr.click { cursor: pointer; } table.plain tr.click:hover td { background: var(--surface-2); }
table.plain tr.total td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.tbl { overflow-x: auto; }

/* ---------- kits ---------- */
.kit { display: grid; gap: 14px; padding: 20px; }
.kit h3 { font: 650 21px/1.1 var(--display); }
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ladder div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; }
.ladder span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ladder b { font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- fund ---------- */
.fund-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--tungsten), var(--gel) calc(var(--p) * .5%), var(--daylight) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; align-content: center; }
.ring b { font: 700 28px/1 var(--display); }
.ring span { font-size: 12px; color: var(--muted); }
.q-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.q-item:first-child { border-top: 0; }
.q-item.next { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.q-item.done { opacity: .62; }
.q-no { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface-2); }
.q-item.next .q-no { background: var(--grad-deep); color: #fff; }
.q-item .ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.q-item .ctl input { width: 100px; padding: 6px 8px; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 11, 15, .32); backdrop-filter: blur(3px); z-index: 50; animation: fade .2s ease both; }
.drawer {
  position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(560px, calc(100% - 20px)); z-index: 51; background: var(--surface);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); overflow-y: auto; animation: slide .32s var(--ease) both;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 22px calc(env(safe-area-inset-bottom, 0px) + 24px); display: grid; gap: 18px; align-content: start;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer h2 { font-size: 28px; font-weight: 700; }
.drawer .close { justify-self: end; }
.pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pick:first-child { border-top: 0; }

/* ---------- storefront ---------- */
.store-hero { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(26px, 5vw, 64px); background: #101116; color: #f3f4f8; display: grid; gap: 18px; }
.store-hero::before { content: ""; position: absolute; inset: -30%; background:
  radial-gradient(35% 45% at 18% 30%, rgba(245, 154, 58, .55), transparent 70%),
  radial-gradient(35% 45% at 82% 20%, rgba(75, 114, 245, .55), transparent 70%),
  radial-gradient(30% 40% at 60% 90%, rgba(228, 77, 134, .40), transparent 70%); filter: blur(10px); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(3%, -2%, 0) rotate(3deg); } }
.store-hero > * { position: relative; }
.store-hero h1 { font-size: clamp(40px, 7vw, 84px); line-height: .92; font-weight: 700; max-width: 12ch; letter-spacing: -.035em; }
.store-hero p { margin: 0; max-width: 54ch; color: rgba(243, 244, 248, .82); font-size: 17px; }
.store-hero .meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: rgba(243, 244, 248, .72); }
.store-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 22px; align-items: start; }
.banner { border-radius: var(--r); padding: 14px 18px; background: var(--grad-deep); color: #fff; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-weight: 500; }
.banner b { font: 700 17px var(--display); }
details.faq { border-top: 1px solid var(--line); padding: 14px 20px; }
details.faq:first-child { border-top: 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 10px 0 0; color: var(--muted); max-width: 70ch; }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); z-index: 60; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); max-width: min(92vw, 560px); font-size: 14px; }
.q { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; }
.q .w { grid-column: 2; color: var(--muted); font-size: 14px; }
ol.seq { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
ol.seq li::marker { font: 700 16px var(--display); color: var(--accent); }
.opp { display: grid; gap: 8px; padding: 18px 20px; border-top: 1px solid var(--line); }
.opp:first-child { border-top: 0; }
.opp h3 { font: 650 17px/1.25 var(--display); }
.opp p { margin: 0; color: var(--muted); font-size: 14px; max-width: 80ch; }
.opp .mv { color: var(--ink); }
.src { font-size: 12.5px; color: var(--faint); }
.src a { color: var(--muted); }

@media (max-width: 1100px) {
  .split, .store-grid, .fund-hero { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .week { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 760px) {
  .top { padding: 8px 10px 0; }
  .top-in { flex-wrap: wrap; border-radius: 22px; padding: 8px 10px; gap: 8px; }
  .nav { order: 3; flex-basis: 100%; }
  .brand { flex: 1; }
  main { padding: 20px 16px 64px; }
  .budgets { grid-template-columns: minmax(0, 1fr); }
  .gear-row { grid-template-columns: auto minmax(0, 1fr); }
  .gear-row .ctl { grid-column: 1 / -1; justify-content: flex-start; }
  .big { font-size: 38px; }
  .ring { width: 124px; height: 124px; } .ring > div { width: 96px; height: 96px; }
}
select { max-width: 100%; }
.actions { min-width: 0; max-width: 100%; }
.actions select { min-width: 0; flex: 1 1 150px; }
@media (max-width: 1480px) { .nav .ic { display: none; } .nav button { padding: 8px 11px; } }

/* ---------- Start page ---------- */
.welcome { padding: clamp(24px, 5vw, 56px); }
.welcome h1 { font-size: clamp(38px, 6vw, 72px); line-height: .95; font-weight: 700; max-width: 16ch; }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.flow .fs { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.flow .fs b { font-weight: 650; }
.flow .fs span { color: var(--muted); font-size: 13px; }
.flow .fs .k { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-deep); color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.tour { display: grid; grid-template-columns: 250px minmax(0, 1fr); overflow: hidden; scroll-margin-top: 110px; }
.tour-list { border-right: 1px solid var(--line); padding: 10px; display: grid; gap: 2px; align-content: start; background: var(--surface-2); }
.tour-list button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 10px; display: flex; gap: 10px; align-items: center; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 14px; }
.tour-list button:hover { color: var(--ink); }
.tour-list button[aria-current="step"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tour-list .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface); flex: none; }
.tour-list button[aria-current="step"] .n { background: var(--grad-deep); color: #fff; }
.tour-body { padding: clamp(20px, 4vw, 40px); display: grid; gap: 18px; align-content: start; min-width: 0; }
/* Every stop sits in the same grid cell, so the card is as tall as the longest stop and the buttons never move. */
.tour-stage { display: grid; }
.tour-stage > .stop { grid-area: 1 / 1; visibility: hidden; display: grid; gap: 16px; align-content: start; min-width: 0; }
.tour-stage > .stop.on { visibility: visible; }
.tour-ctl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tour-ctl .btn { width: 100%; min-height: 46px; padding-inline: 8px; }
.tour-ctl .btn[disabled] { opacity: .35; }
.tour-list { position: relative; }
.dock-wrap { max-width: 1280px; margin: 28px auto 0; }
.tour-dock { padding: 20px; display: grid; gap: 14px; border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.nextup { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; font-size: 14.5px; }
.nextup .ic { margin-top: 3px; color: var(--accent); }
.pvbar.tourbar { border-style: solid; border-color: transparent; box-shadow: 0 0 0 2px var(--accent); color: var(--ink); }
.tour-body h2 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 700; }
.tour-body ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15.5px; max-width: 64ch; }
.tour-body ol li::marker { font: 700 15px var(--display); color: var(--accent); }

/* ---------- public preview ---------- */
.pv { max-width: 1280px; margin: 0 auto 18px; }
.pvbar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 16px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line-strong); font-size: 13.5px; color: var(--muted); }
.pvbar b { color: var(--ink); }
.pvbar span { flex: 1 1 260px; }
.note.pvn { background: var(--surface-2); border: 1px dashed var(--line-strong); display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.note.pvn .ic { color: var(--ink); margin-top: 2px; }

/* ---------- job rows ---------- */
.job-li { flex-wrap: wrap; }
.job-li .meta { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin-left: auto; }
.job-li .tot { min-width: 80px; text-align: right; font-size: 15px; }

/* iOS Safari gives date and time fields a fixed intrinsic width that ignores width: 100% */
@supports (-webkit-touch-callout: none) {
  input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 44px; }
  input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
}
@media (max-width: 760px) {
  .tour { grid-template-columns: minmax(0, 1fr); }
  .tour-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .tour-list button { white-space: nowrap; }
}
@media (max-width: 640px) {
  .job-li .meta { flex-basis: 100%; justify-content: flex-start; padding-left: 48px; }
  .job-li .tot { margin-left: auto; }
  .q-item { grid-template-columns: auto minmax(0, 1fr); }
  .q-item .ctl { grid-column: 1 / -1; justify-content: flex-start; padding-left: 44px; }
}
.tour-ctl .btn:hover, .tour-ctl .btn:active { transform: none; }

/* ---------- dropdown sections (Gear, Kits) ---------- */
.sec { overflow: hidden; }
.sec-btn { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); transition: background .15s; }
.sec-btn:has(.sec-price) { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.sec-btn:hover { background: var(--surface-2); }
.sec-t { font: 650 18px/1.25 var(--display); letter-spacing: -.01em; }
.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sec-price { font: 700 20px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; text-align: right; }
.sec-price small { font: 500 12px var(--body); color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.chev { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: transform .25s var(--ease); flex: none; }
.sec.open .chev { transform: rotate(180deg); color: var(--ink); }
.sec-list { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.sec-body { border-top: 1px solid var(--line); padding: 18px; display: grid; gap: 16px; }
.kit-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.g-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); transition: background .15s; }
.g-row:hover { background: var(--surface-2); }
.g-row .ttl { font-weight: 600; }
.g-row .pill { margin-top: 6px; }
.g-side { display: grid; justify-items: end; gap: 5px; text-align: right; }
.g-price { font: 700 17px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.g-price small { font: 500 12px var(--body); color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.card > .hd h2.t { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .statusbar .path { display: none; }
  .path-compact { display: grid; }
  .statusbar .actions { margin-left: 0; }
  .sec-btn { gap: 12px; padding: 14px 16px; }
  .chev { width: 28px; height: 28px; }
  .sec-price { font-size: 18px; }
  .g-row { padding: 12px 16px; }
}
.head-total { text-align: right; }
@media (max-width: 760px) { .head-total { text-align: left; } }

/* ---------- accounts ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.top-btns { display: flex; align-items: center; gap: 8px; }
.acct { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; color: var(--ink); font-weight: 600; font-size: 13.5px; max-width: 220px; }
.acct:hover { border-color: var(--line-strong); }
.acct .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--grad-deep); color: #fff; font: 700 12px/1 var(--body); letter-spacing: .02em; }
.av.lg { width: 52px; height: 52px; font-size: 18px; }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.pv-who { display: inline-flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto !important; }
.pv-who .chip { padding: 4px 11px; font-size: 13px; }
.option-btn { display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 14px 16px; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s; }
.option-btn:hover { border-color: var(--line-strong); }
.option-btn[aria-pressed="true"] { border-color: transparent; box-shadow: 0 0 0 2px var(--accent); }
.option-btn b { font-weight: 650; }
.option-btn span { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.auth-alt { display: grid; gap: 8px; }
.auth-alt a { color: var(--accent); }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.linkish:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- client portal ---------- */
b.todo { color: var(--warn); font-weight: 600; }
.todo-list > div { justify-content: space-between; align-items: center; }
.todo-list > div > span { flex: 1; }
.todo-list a { font-weight: 600; font-size: 13.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.portal-paper { max-height: 560px; overflow-y: auto; box-shadow: none; font-size: 13.5px; }
.esig { display: flex; gap: 16px; align-items: center; margin-top: 24px; border-top: 1px solid var(--paper-ink); padding-top: 12px; font-size: 12.5px; flex-wrap: wrap; }
.esig img { height: 64px; max-width: 240px; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.sigpad-wrap { position: relative; }
.sigpad { width: 100%; height: 170px; display: block; background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); touch-action: none; cursor: crosshair; }
.sig-clear { position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, .9) !important; color: #444 !important; }
.upl { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.upl .field { flex: 1 1 220px; }
.upl input[type="file"] { font-size: 13.5px; max-width: 100%; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); flex-wrap: wrap; }
.doc-row > .ic { color: var(--muted); }
.cal-btns { gap: 6px; }

/* ---------- payments ---------- */
.pay-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pay-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pay-row .pm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.pay-acts { flex-basis: 100%; padding-left: 40px; }
.pay-acts input { width: 90px; padding: 6px 8px; }
.copyrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.tempw { font-size: 1.15rem; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); user-select: all; white-space: nowrap; }
details.report summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.report .mini input { width: 110px; }

/* ---------- photos ---------- */
.icon-tile.photo { background: var(--surface-2); overflow: hidden; }
.icon-tile.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery { display: grid; gap: 8px; }
.g-main { position: relative; display: block; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); height: 0; padding-top: 75%; }
.g-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.g-th { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.g-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-acts { position: absolute; right: 2px; top: 2px; display: flex; gap: 2px; }
.g-acts .x { width: 24px; height: 24px; font-size: 15px; background: rgba(255, 255, 255, .92); color: #333; }
.g-add { position: relative; width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--line-strong); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 11.5px; color: var(--muted); cursor: pointer; text-align: center; }
.g-thumbs:not(:has(.g-th)) .g-add { width: 100%; height: 92px; flex-direction: row; }
.g-add:hover { border-color: var(--accent); color: var(--accent); }
.g-add:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.g-add.busy { opacity: .6; cursor: progress; }
.gphoto { position: relative; display: block; margin: -16px -16px 0; height: 0; padding-top: 75%; border: 0; padding: 0; background: var(--surface-2); overflow: hidden; border-radius: var(--r) var(--r) 0 0; cursor: pointer; }
.gphoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.gcard:hover .gphoto img { transform: scale(1.03); }
.serials { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.serials input { padding: 8px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* ---------- scanning ---------- */
/* Ratio boxes use padding, not aspect-ratio: inside a grid, an aspect-ratio box with no in-flow content gets a zero-height row. */
.scan-view { position: relative; border-radius: var(--r); overflow: hidden; background: #0b0c10; height: 0; padding-top: 75%; }
.scan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); }
.scan-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.scan-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.scan-list > div:first-child { border-top: 0; }
.scan-list > div.ok { background: var(--good-soft); }
.scan-list b { font-variant-numeric: tabular-nums; }

/* ---------- money ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 6px; box-shadow: var(--shadow-sm); }
.stat .lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .val { font: 650 30px/1 var(--body); letter-spacing: -.02em; font-variant-numeric: proportional-nums; }
.stat:first-child .val { font-size: 40px; }
.stat .sub { font-size: 12.5px; color: var(--faint); }
.colchart { display: grid; gap: 6px; }
.cc-plot { position: relative; height: 220px; margin: 18px 0 0 48px; }
.cc-tick { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.cc-tick span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; }
.cc-col { position: relative; display: flex; align-items: flex-end; justify-content: center; outline: none; border-radius: 6px; }
.cc-col:hover, .cc-col:focus-visible { background: color-mix(in srgb, var(--chart) 7%, transparent); }
.cc-col:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.cc-bar { position: relative; width: min(24px, 70%); background: color-mix(in srgb, var(--chart) 72%, var(--surface)); border-radius: 4px 4px 0 0; min-height: 0; }
.cc-bar.now { background: var(--chart); }
.cc-val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 650; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; white-space: nowrap; display: none; z-index: 2; pointer-events: none; font-variant-numeric: tabular-nums; }
.cc-tip b { display: block; font-weight: 600; opacity: .8; font-size: 11.5px; }
.cc-col:hover .cc-tip, .cc-col:focus-visible .cc-tip { display: block; }
.cc-col:hover .cc-val, .cc-col:focus-visible .cc-val { visibility: hidden; }
.cc-x { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; margin-left: 48px; font-size: 11.5px; color: var(--muted); text-align: center; }
.cc-table summary { cursor: pointer; color: var(--muted); margin-top: 6px; }
.cc-table table { margin-top: 8px; max-width: 420px; }
.meter { display: inline-block; width: 84px; height: 8px; border-radius: 4px; background: var(--chart-track); overflow: hidden; vertical-align: middle; }
.meter i { display: block; height: 100%; background: var(--chart); border-radius: 4px; }
.money-tbl td { vertical-align: middle; }
.money-tbl td:first-child { min-width: 220px; }
.sug { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.sug:first-child { border-top: 0; padding-top: 0; }
.client-li .meta { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin-left: auto; }
.client-li { flex-wrap: wrap; }
@media (max-width: 760px) {
  .acct .nm { display: none; }
  .acct { padding: 3px; }
  .cc-plot { height: 180px; margin-left: 40px; }
  .cc-x { margin-left: 40px; font-size: 10.5px; }
  .client-li .meta { flex-basis: 100%; justify-content: flex-start; padding-left: 44px; }
  .pay-acts { padding-left: 0; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tbl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* The team's nav has thirteen places to go: on anything wider than a phone it gets its own row, so none hide off the end. */
@media (min-width: 761px) {
  body[data-role="admin"] .top-in { flex-wrap: wrap; border-radius: 24px; row-gap: 2px; padding: 8px 8px 6px 16px; }
  body[data-role="admin"] .brand { flex: 1; }
  body[data-role="admin"] .nav { order: 3; flex-basis: 100%; margin-left: -8px; }
  body[data-role="admin"] .nav .ic { display: none; }
  body[data-role="admin"] .nav button { padding: 7px 12px; }
  body[data-role="admin"] .sticky { top: calc(env(safe-area-inset-top, 0px) + 128px); }
  body[data-role="admin"] .tour { scroll-margin-top: 140px; }
}

/* ---------- the studio: workspaces, productions, talent, pro bono ---------- */
.ws-pick { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); flex: none; }
.ws-pick select { border: 0; background: transparent; font: 600 13.5px var(--body); color: var(--ink); padding: 7px 6px; width: auto; max-width: 180px; cursor: pointer; }
.sec-title { font: 650 20px/1.2 var(--display); margin: 6px 2px -4px; }
/* A board of columns that scrolls sideways inside itself, never the page. */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.board:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r); }
.bcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; align-content: start; min-width: 0; scroll-snap-align: start; }
.bcol-h { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 4px; font-size: 14px; }
.bcol-h .c { color: var(--faint); font-size: 12.5px; font-weight: 600; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 5px; overflow-wrap: anywhere; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .15s; min-width: 0; }
.bcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bcard .ttl { font-weight: 650; line-height: 1.25; }
.bcard .next { color: var(--ink); overflow-wrap: anywhere; }
.bcard .next .ic { vertical-align: -2px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* A production's stages are its tabs: one bar that scrolls sideways inside itself when it runs out of room. */
.stagebar { padding: 0; overflow: hidden; }
.stabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px; scrollbar-width: thin; }
.stab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: 600 13.5px var(--body); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.stab:hover { background: var(--surface-2); color: var(--ink); }
.stab .sn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line-strong); flex: none; }
.stab.done .sn { background: var(--good); border-color: var(--good); color: #fff; }
.stab.now { color: var(--ink); }
.stab.now .sn { background: var(--grad); border: 0; color: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.stab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.stab[aria-selected="true"]:hover { background: var(--ink); color: var(--bg); }
.stage-foot { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; padding: 10px 16px 12px; border-top: 1px solid var(--line); }
.stage-foot .actions, .stage-end .actions { margin: 0; }
.stage-end { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.lead-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.lead-row .lr { font-size: 13.5px; font-weight: 600; overflow-wrap: break-word; min-width: 0; }
.lead-row select, .lead-row input, .ptask select { width: 100%; min-width: 0; padding: 7px 10px; }
.ptask { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.ptask:first-child { border-top: 0; padding-top: 0; }
.ptask input[type="checkbox"] { width: 18px; height: 18px; }
.ptask input.grow { min-width: 0; padding: 7px 10px; }
.ptask.done input.grow { text-decoration: line-through; color: var(--faint); }
.ptask .task-meta { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.ptask .task-meta select { flex: 1 1 110px; width: auto; }
.ptask .task-meta input[type="date"] { flex: 0 1 auto; width: auto; padding: 7px 10px; }
details.act-card > summary { cursor: pointer; list-style: none; }
details.act-card > summary::-webkit-details-marker { display: none; }
details.act-card > summary.hd { padding-bottom: 18px; }
details.act-card[open] > summary.hd { padding-bottom: 0; }
.srow.done b { color: var(--muted); }
.srow .check { white-space: nowrap; font-size: 13.5px; }
.srow .mini input[type="time"] { width: 104px; }
.task { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; }
.task input[type="checkbox"] { width: 18px; height: 18px; flex: none; }
.task input[type="text"] { min-width: 140px; }
.task input[type="date"] { width: auto; }
.task.done input[type="text"].grow { text-decoration: line-through; color: var(--faint); }

.deliv, .inv { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.deliv:first-child, .inv:first-child { border-top: 0; padding-top: 0; }
.drawer.wide-drawer { width: min(720px, calc(100% - 20px)); }
/* Talent cards and profiles */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; display: grid; grid-template-rows: auto 1fr; transition: transform .2s var(--ease), box-shadow .2s; }
.tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tcard.in { box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm); }
.tcard .tbody { padding: 14px 16px 16px; display: grid; gap: 5px; align-content: start; }
.tcard .ttl { font: 650 18px/1.2 var(--display); }
.tcover { display: block; position: relative; width: 100%; padding-top: 66%; background: var(--surface-2); overflow: hidden; }
.tcover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcover.none { background: var(--grad-deep); }
.tcover.none b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 34px var(--display); letter-spacing: .02em; }
.tcover.big { width: 140px; padding-top: 0; height: 140px; border-radius: 18px; flex: none; }
.tcover.sm { width: 44px; padding-top: 0; height: 44px; border-radius: 12px; flex: none; }
.tcover.sm.none b { font-size: 15px; }
.tprofile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.reel { position: relative; padding-top: 56.25%; border-radius: var(--r-sm); overflow: hidden; background: #000; }
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.work { display: grid; gap: 6px; color: inherit; text-decoration: none; font-size: 13.5px; min-width: 0; }
.work img, .work .wph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
a.work:hover b { text-decoration: underline; }
.wph { display: grid; place-items: center; color: var(--faint); background: var(--surface-2); border-radius: var(--r-sm); }
.work-edit { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.work-edit:first-child { border-top: 0; }
.work-edit > img, .work-edit > .wph { width: 88px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
ul.credits { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
@media (max-width: 760px) {
  .board { grid-auto-columns: minmax(78%, 1fr); }
  .stab { flex: 0 0 auto; }
  .work-edit { flex-wrap: wrap; }
}
.todo { color: var(--warn); }
.srow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.srow:first-child { border-top: 0; padding-top: 0; }
.srow > .grow { flex: 2 1 160px; min-width: 0; }
.srow > select, .srow > input[type="date"], .srow > input[type="url"] { flex: 1 1 130px; width: auto; min-width: 0; }
.srow .mini input { width: 76px; }
.srow > .num { min-width: 76px; text-align: right; }
