/* Showrunner: one stylesheet, CSS variables, no build step. Visual language modelled on ClickUp 3.0. */
:root {
  --brand: #6E3BFF; --brand-hover: #5A26F0; --brand-tint: #F1ECFF; --brand-ring: #6E3BFF33; --brand-ink: #4F1FD6;
  --gradient: linear-gradient(135deg, #FF02F0 0%, #8930FD 50%, #49CCF9 100%);
  --yellow: #FFC800;
  --text: #292D34; --text-2: #656F7D; --text-3: #87909E;
  --bg: #FFFFFF; --sidebar: #F7F8F9; --hover: #F7F8F9; --canvas: #FAFBFC; --border: #E6E8EC;
  --red: #F50000; --amber: #F5A623; --blue: #4466FF; --green: #6BC950; --gray: #87909E;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .05); --shadow-drawer: 0 8px 24px rgba(0, 0, 0, .12);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 240px; --topbar-h: 48px;
  --red-ink: #D10000; --focus: 0 0 0 3px var(--brand-ring);
  /* Showrunner brand tokens (BRAND.md, brand/tokens.json). The product UI above keeps its ClickUp-style layout and status
     palette; --brand is Showrunner Violet so the app and the brand agree. These are for the mark, the sign-in screen and
     brand moments. */
  --sr-violet: #6E3BFF; --sr-violet-deep: #5A26F0; --sr-violet-ink: #4F1FD6; --sr-violet-tint: #F1ECFF; --sr-violet-light: #A98BFF;
  --sr-magenta: #D63AF9; --sr-coral: #FF6B4A; --sr-ink: #0F1222; --sr-night: #1A1D2E;
  --sr-haze: #C9CED9; --sr-mist: #8E94A6; --sr-slate: #6B7186; --sr-line: #E2E5EC; --sr-canvas: #F7F8FA;
  --sr-gradient: linear-gradient(135deg, #6E3BFF 0%, #D63AF9 52%, #FF6B4A 100%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 13.5px/1.5 var(--font); color: var(--text); background: var(--bg); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
:where(a, button, summary, [tabindex], label.btn):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
.skip { position: absolute; left: 8px; top: -40px; z-index: 100; background: var(--text); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: 8px; color: #fff; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; } }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.muted { color: var(--text-3); } .sub { color: var(--text-2); font-size: 12px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.grow { flex: 1; } .row-flex { display: flex; align-items: center; gap: 8px; } .gap-12 { gap: 12px; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: none; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden; transition: width .18s ease; }
.sidebar::before { content: ""; height: 3px; background: linear-gradient(90deg, var(--sr-violet), var(--sr-magenta) 60%, var(--sr-coral)); flex: none; }
.ws { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px 14px; }
.ws-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--sr-ink); border-radius: var(--r-sm); }
.ws-brand:hover { color: var(--sr-ink); }
.sr-mark { display: block; flex: none; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--text); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; letter-spacing: .02em; }
.ws-name { font-weight: 700; font-size: 15px; white-space: nowrap; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; white-space: nowrap; transition: background .12s; }
.nav-item:hover { background: #ECEEF1; color: var(--text); }
.nav-item.active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.nav-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item .count { font-size: 11px; background: var(--red-ink); color: #fff; border-radius: 10px; padding: 0 6px; font-weight: 600; line-height: 16px; }
.nav-section { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 4px; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sdot { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--gray)); flex: none; display: inline-block; }
.sdot.round { border-radius: 50%; }
.nav-foot { padding: 8px; border-top: 1px solid var(--border); }
@media (min-width: 901px) {
body.sidebar-collapsed .sidebar { width: 56px; }
body.sidebar-collapsed .ws-name, body.sidebar-collapsed .nav-item .label, body.sidebar-collapsed .nav-item .count, body.sidebar-collapsed .nav-item .badge, body.sidebar-collapsed .nav-section span { display: none; }
body.sidebar-collapsed .ws { flex-direction: column; gap: 6px; padding: 12px 0 8px; }
body.sidebar-collapsed .ws-brand { flex: none; }
body.sidebar-collapsed .ws .grow { display: none; }
body.sidebar-collapsed .collapse-btn svg { transform: scaleX(-1); }
body.sidebar-collapsed .nav-section { justify-content: center; padding: 0; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 0; position: relative; }
body.sidebar-collapsed .nav-item .count { display: block; position: absolute; top: 2px; right: 6px; width: 8px; height: 8px; padding: 0; font-size: 0; }
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar { height: var(--topbar-h); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; background: var(--bg); z-index: 20; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a:hover { color: var(--brand); } .crumbs .sep { color: var(--text-3); } .crumbs .last { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.search { position: relative; width: 280px; max-width: 30vw; margin-left: auto; }
.search svg { position: absolute; left: 10px; top: 8px; color: var(--text-3); }
.search input[type=search] { width: 100%; padding-left: 32px; background: var(--canvas); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--c, var(--brand)); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; border: 0; cursor: default; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; } .avatar.lg { width: 36px; height: 36px; font-size: 13px; }
button.avatar { cursor: pointer; }
.content { padding: 20px 24px 64px; flex: 1; }
.menu-btn { display: none; }
.mock-badge { background: var(--yellow); color: #5a4300; font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 2px 6px; letter-spacing: .04em; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--hover); color: var(--text); border-color: #D5D8DE; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn.danger { color: var(--red-ink); } .btn.danger:hover { background: #FFF1F1; border-color: #F9C7C7; }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); font-weight: 500; }
.btn.ghost:hover { background: var(--hover); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: #ECEEF1; color: var(--text); }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=datetime-local], input[type=number], input[type=email], input[type=url], input[type=tel], select, textarea { height: 32px; width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 10px; background: #fff; outline: none; }
textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 80px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-ring); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--red); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
label.field { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
label.field > :is(input, select, textarea) { display: block; margin-top: 4px; font-weight: 400; color: var(--text); }
label.field > .toggle-row { display: flex; margin-top: 4px; color: var(--text); }
label.field > .muted { font-weight: 400; }
input[type=file] { font-size: 12.5px; color: var(--text-2); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; height: 28px; padding: 0 10px; margin-right: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--text); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--hover); }
.hint { font-weight: 400; color: var(--text-3); font-size: 12px; margin-top: 3px; display: block; }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #D0D4DA; border-radius: 20px; transition: background .18s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked + span { background: var(--brand); } .switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 2px var(--brand-ring); }
.toggle-row { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; color: var(--text-2); }

/* ---------------------------------------------------------------- pills, chips, bars */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; color: color-mix(in srgb, var(--c) 55%, #000); background: color-mix(in srgb, var(--c) 12%, #fff); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pill.solid { color: var(--ink, #fff); background: var(--bg, var(--c)); } .pill.solid i { background: currentColor; }
.pill.soft { color: var(--text-2); background: #F0F1F4; text-transform: none; letter-spacing: 0; font-weight: 600; }
.pill.bill { height: 18px; padding: 0 6px; font-size: 10px; margin-left: 6px; vertical-align: middle; } .card .meta .pill.bill { margin-left: 0; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .03em; }
.chips { display: flex; gap: 3px; flex-wrap: nowrap; }
.chip { width: 20px; height: 18px; border-radius: 4px; background: var(--bg, var(--c)); color: var(--ink, #fff); font-size: 10px; font-weight: 700; display: grid; place-items: center; opacity: .95; transition: transform .1s; }
.chip.empty { background: #EDEFF2; color: var(--text-3); padding: 0; }  /* .empty is also the empty-state panel class */
.chip:hover { transform: translateY(-1px); }
.bar { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.bar .track { display: block; flex: 1; height: 6px; background: #EDEFF2; border-radius: 3px; overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--brand)); }
.bar .num { font-size: 12px; font-weight: 600; width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 6px; background: #ECEEF1; color: var(--text-2); }
.badge.red { background: var(--red-ink); color: #fff; } .badge.amber { background: var(--amber); color: #3D2A00; } .badge.brand { background: var(--brand); color: #fff; }

/* ---------------------------------------------------------------- page header, tabs, toolbar */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.page-head .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 12px 0 0; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; background: none; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--hover); border-radius: 6px 6px 0 0; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 0; flex-wrap: wrap; }
.toolbar .sep { width: 1px; height: 18px; background: var(--border); margin: 0 6px; }
.toolbar select { width: auto; height: 28px; border-color: transparent; background: transparent; font-weight: 500; color: var(--text-2); padding: 0 6px; cursor: pointer; }
.toolbar select:hover { background: var(--hover); }
.toolbar .tb-label { color: var(--text-3); font-size: 12px; }
.toolbar input[type=search] { height: 28px; width: 180px; }
.panel { display: none; padding-top: 16px; } .panel.active { display: block; }

/* ---------------------------------------------------------------- list rows (ClickUp task rows) */
.list-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); background: #fff; }
.list-wrap.flat { border: 0; box-shadow: none; }
.group-head { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; font-weight: 600; background: #fff; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; position: sticky; left: 0; }
.group-head .chev { transition: transform .15s; color: var(--text-3); }
.group-head:focus-visible { outline-offset: -2px; }
.no-match { padding: 20px 12px; text-align: center; color: var(--text-2); }
.group.collapsed .group-head .chev { transform: rotate(-90deg); } .group.collapsed .group-body { display: none; }
.col-head, .project-row { display: grid; grid-template-columns: 14px minmax(170px, 1.2fr) 104px 232px 100px 30px minmax(130px, 1fr) 120px 52px 64px; align-items: center; gap: 10px; padding: 0 12px; min-width: 1130px; }
.col-head > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-head { height: 28px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); background: var(--canvas); }
.project-row { min-height: 52px; border-bottom: 1px solid var(--border); position: relative; transition: background .1s; }
.project-row:hover { background: var(--hover); }
.project-row:last-child { border-bottom: 0; }
.project-row .name { min-width: 0; } .project-row .name a { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-row .name a:hover { color: var(--brand); }
.project-row .dates { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.project-row .na { font-size: 12.5px; color: var(--text-2); }
.row-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; justify-content: flex-end; }
.project-row:hover .row-actions, .row:hover .row-actions, .row-actions:focus-within { opacity: 1; }
.exc-cell { text-align: center; }
.tone-red { color: var(--red-ink); font-weight: 600; } .tone-gray { color: var(--text-3); }

/* ---------------------------------------------------------------- board (kanban) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--canvas); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px; min-height: 120px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kcol-head .pill { text-transform: uppercase; }
.card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 12px; margin-bottom: 8px; transition: box-shadow .12s, border-color .12s; }
a.card:hover, .card.hoverable:hover { border-color: #D0CBF7; box-shadow: 0 4px 12px rgba(123, 104, 238, .14); color: inherit; }
.card .title { font-weight: 600; display: block; margin-bottom: 2px; }
.card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.card-plain { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 16px; }
.card-plain h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ---------------------------------------------------------------- generic rows / tables */
.row { display: grid; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); position: relative; }
.row:hover { background: var(--hover); } .row:last-child { border-bottom: 0; }
.pipe-row { grid-template-columns: 12px minmax(200px, 1fr) 108px 44px 120px 130px 50px 372px; min-width: 1080px; }
.pipe-head { display: grid; grid-template-columns: 12px minmax(200px, 1fr) 108px 44px 120px 130px 50px 372px; gap: 12px; padding: 6px 12px; min-width: 1080px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; background: var(--canvas); border-bottom: 1px solid var(--border); }
.pipe-row .t a { font-weight: 600; } .pipe-row .acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.t td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.empty { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty .art { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .art svg { width: 26px; height: 26px; } .empty h3 { margin-bottom: 4px; color: var(--text); justify-content: center; } .empty p { margin-bottom: 14px; }

/* exceptions */
.exc-row { grid-template-columns: 22px minmax(200px, 1.2fr) minmax(220px, 2fr) 104px 70px 90px 28px; min-width: 900px; }
.priority { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.priority svg { fill: var(--c); stroke: var(--c); }
.reasons { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-2); }

/* ---------------------------------------------------------------- activity */
.activity { position: relative; }
.act { display: flex; gap: 10px; padding: 8px 0; position: relative; }
.act:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 34px; bottom: -4px; width: 1px; background: var(--border); }
.act .body { flex: 1; min-width: 0; } .act .line { font-size: 13px; } .act .line b { font-weight: 600; }
.act .detail { color: var(--text-2); font-size: 12.5px; margin-top: 1px; overflow-wrap: anywhere; }
.act time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.obj { color: var(--brand); font-weight: 600; }
.type-tag { display: inline-block; background: #F0F1F4; color: var(--text-2); border-radius: 4px; padding: 0 6px; font-size: 11px; margin-left: 4px; }

/* ---------------------------------------------------------------- artifact (task view) */
.task { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.task-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.task-head h1 { font-size: 22px; flex: 1; min-width: 220px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; margin: 12px 0 16px; }
.fields > div { background: #fff; padding: 8px 12px; } .fields .k { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-3); letter-spacing: .04em; } .fields .v { font-weight: 600; margin-top: 2px; }
.banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--brand-tint); color: var(--brand-ink); margin-bottom: 12px; font-size: 12.5px; }
.banner.warn { background: #FFF6E5; color: #8a5a00; } .banner.red { background: #FFF1F1; color: #a30000; }
.doc { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 24px 28px; box-shadow: var(--shadow-card); overflow-wrap: anywhere; }
.doc h1 { font-size: 22px; margin: 0 0 12px; } .doc h2 { font-size: 17px; margin: 24px 0 8px; padding-top: 8px; border-top: 1px solid var(--border); } .doc h3 { margin: 16px 0 6px; } .doc h4 { margin: 12px 0 4px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 10px; } .doc li { margin: 2px 0; }
.doc table { border-collapse: collapse; margin: 8px 0 14px; display: block; overflow-x: auto; font-size: 12.5px; } .doc th, .doc td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; vertical-align: top; } .doc th { background: var(--canvas); }
.doc code { background: #F0F1F4; padding: 1px 5px; border-radius: 4px; font-size: 12px; } .doc pre { background: #F7F8F9; padding: 12px; border-radius: var(--r-sm); overflow-x: auto; }
.doc blockquote { margin: 8px 0; padding: 2px 14px; border-left: 3px solid var(--brand); color: var(--text-2); }
.doc a { color: var(--brand); } .doc hr { border: 0; border-top: 1px solid var(--border); }
/* Rendered ad graphics (stage 11) on the artifact page and the portal deliverable */
.ad-gallery { margin: 16px 0; } .ad-gallery h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 10px; } .ad-gallery h2 .sub { font-weight: 400; }
.ad-sets { display: grid; gap: 14px; }
.ad-set { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; box-shadow: var(--shadow-card); }
.ad-set-head { font-weight: 600; margin-bottom: 8px; } .ad-set-head span { font-weight: 400; color: var(--text-2); margin-left: 6px; }
.ad-set-row { display: flex; gap: 12px; align-items: flex-end; overflow-x: auto; }
.ad-thumb { margin: 0; min-width: 0; }
.ad-thumb img { display: block; height: 240px; width: auto; max-width: 100%; border-radius: var(--r-sm); background: var(--canvas); border: 1px solid var(--border); }
.ad-thumb figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--text-2); }
.ad-thumb.sheet { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; } .ad-thumb.sheet img { height: auto; width: 100%; }
@media (max-width: 640px) { .ad-thumb img { height: 160px; } }
/* Gift and workbook PDFs (stage 12): page previews in a row, the download beside the title */
.ad-set-head .doc-dl { float: right; margin-top: -3px; } .doc-page img { height: 300px; box-shadow: var(--shadow-card); }
@media (max-width: 640px) { .doc-page img { height: 200px; } }
.ad-set-row.wrap { flex-wrap: wrap; overflow-x: visible; } .ad-thumb.slide img { height: 135px; }
@media (max-width: 640px) { .ad-thumb.slide img { height: auto; width: 100%; } .ad-thumb.slide { flex: 1 1 140px; } }
.rail details { border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.rail summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; cursor: pointer; list-style: none; }
.rail summary::-webkit-details-marker { display: none; } .rail summary .chev { margin-left: auto; transition: transform .15s; color: var(--text-3); } .rail details[open] summary .chev { transform: rotate(180deg); }
.rail .sec { padding: 0 14px 14px; }
.verdict { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .verdict .big { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.flagbox { background: #FFF1F1; border: 1px solid #F9C7C7; border-radius: var(--r-sm); padding: 8px 10px; margin: 8px 0; font-size: 12.5px; color: #8a0000; }
.flagbox b { display: block; }
.crit td:nth-child(1) { white-space: nowrap; color: var(--text-2); } .crit td.sc { white-space: nowrap; font-weight: 600; } .crit tr.low td.sc { color: var(--amber); } .crit tr.zero td.sc { color: var(--red); }
.crit .ev { color: var(--text-2); font-size: 12px; }
.rewrite { padding-left: 18px; margin: 6px 0; } .rewrite li { margin: 4px 0; font-size: 12.5px; }
.diff { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; overflow-x: auto; }
.dl { padding: 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; } .dl.add { background: #E9F8E4; color: #1d5e0c; } .dl.del { background: #FFEDED; color: #8a0000; } .dl.hunk { background: var(--brand-tint); color: var(--brand-ink); } .dl.meta { background: var(--canvas); color: var(--text-2); font-weight: 600; }
.diff-empty { padding: 16px; color: var(--text-2); }
.vrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; } .vrow:last-child { border-bottom: 0; }
.req { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 8px; background: #fff; } .req .who { font-size: 12px; color: var(--text-2); margin-bottom: 4px; } .req .actions { display: flex; gap: 6px; margin-top: 8px; }
.menu { position: relative; } .menu > summary { list-style: none; } .menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 36px; min-width: 190px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-drawer); padding: 4px; z-index: 30; }
.menu-pop button, .menu-pop a { display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: none; border-radius: 6px; text-align: left; cursor: pointer; color: var(--text); font-weight: 500; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--hover); color: var(--text); }

/* ---------------------------------------------------------------- dialog, drawer, toast */
dialog { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-drawer); padding: 0; width: min(480px, calc(100vw - 32px)); color: var(--text); }
dialog::backdrop { background: rgba(41, 45, 52, .4); }
dialog form { padding: 20px; } dialog h2 { margin-bottom: 4px; } dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.drawer { position: fixed; right: 16px; bottom: 16px; width: 420px; max-width: calc(100vw - 32px); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-drawer); border: 1px solid var(--border); z-index: 60; overflow: hidden; }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--canvas); font-weight: 600; }
.drawer-log { margin: 0; padding: 10px 12px; max-height: 240px; overflow-y: auto; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; white-space: pre-wrap; }
.drawer-log .ok { color: #2e8a14; } .drawer-log .error { color: var(--red); }
.job-lines { display: grid; gap: 6px; margin: 0 0 12px; }
.job-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 12px; background: #fff; font-size: 13px; }
.job-line.queued { background: #FFF8EC; border-color: #F5D9A8; } .job-line .qdot { width: 10px; height: 10px; border-radius: 50%; background: #F5A623; flex: none; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--brand-tint); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 80; }
.toast { background: #292D34; color: #fff; padding: 10px 14px; border-radius: var(--r-md); box-shadow: var(--shadow-drawer); max-width: 380px; animation: pop .18s ease; }
.toast.err { background: #B3261E; } .toast.ok::before { content: "\2713  "; color: #8EE07A; font-weight: 700; } @keyframes pop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- client portal */
.portal-body { background: var(--canvas); }
.p-bar { background: #fff; border-bottom: 1px solid var(--border); position: relative; }
.p-bar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--text); }
.p-bar .in { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 60px; padding: 3px 20px 0; min-width: 0; }
.p-bar .in > b { white-space: nowrap; } .p-bar .in > .sub { text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-wrap { max-width: 960px; margin: 0 auto; padding: 28px 20px 72px; }
.p-hero h1 { font-size: 26px; letter-spacing: -.02em; } .p-hero p { color: var(--text-2); margin-top: 4px; font-size: 14.5px; }
.p-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 20px 22px; margin-top: 20px; }
.p-card > h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; } .p-card h2 .badge { margin-left: 4px; }
/* every step stays in view: up to seven in one row, more wrap onto two even rows (12 steps: 6 + 6), each row with its own line */
.stepper { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); row-gap: 18px; padding: 6px 2px 10px; }
.step { text-align: center; position: relative; padding: 0 4px; min-width: 0; overflow-wrap: anywhere; }
.step::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; } .step:first-child::before, .step.row-start::before { display: none; }
.step.delivered::before, .step.delivered + .step::before { background: var(--green); }
.step .dot { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; background: #fff; border: 2px solid var(--border); color: var(--text-3); position: relative; z-index: 1; font-weight: 700; font-size: 12px; }
.step.delivered .dot { background: var(--green); border-color: var(--green); color: #fff; } .step.review .dot { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); } .step.progress .dot { border-color: #FF7800; color: #FF7800; background: #FFF4E8; }
.step .nm { font-weight: 600; font-size: 12.5px; line-height: 1.3; } .step .st { font-size: 11.5px; color: var(--text-3); margin-top: 2px; } .step.delivered .st { color: #3f9a25; } .step.review .st { color: var(--brand); } .step.progress .st { color: #d96500; }
.progressbar { height: 8px; background: #EDEFF2; border-radius: 4px; overflow: hidden; margin: 4px 0 8px; } .progressbar > div { height: 100%; background: var(--green); border-radius: 4px; }
.date-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; } .date-tile { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; } .date-tile .k { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; } .date-tile .v { font-size: 17px; font-weight: 700; margin-top: 2px; } .date-tile .cd { font-size: 12.5px; color: var(--text-2); }
.todo { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; } .todo:last-child { border-bottom: 0; padding-bottom: 0; }
.todo .ico { width: 28px; height: 28px; border-radius: 8px; background: #FFF4E8; color: #d96500; display: grid; place-items: center; flex: none; } .todo .tx { flex: 1; min-width: 0; } .todo .tx b { font-weight: 600; display: block; } .todo form { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.todo form input[type=file] { width: auto; flex: 0 1 auto; }
.dcard { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; } .dcard:last-child { border-bottom: 0; }
.dcard .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; } .dcard .tx { flex: 1; min-width: 180px; } .dcard .tx a.t { font-weight: 600; font-size: 14.5px; } .dcard .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.change { width: 100%; } .change summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 12.5px; list-style: none; } .change summary::-webkit-details-marker { display: none; } .change form { margin-top: 10px; display: grid; gap: 8px; max-width: 560px; }
.cl { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); } .cl:last-child { border-bottom: 0; } .cl input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; flex: none; } .cl.done span { color: var(--text-3); text-decoration: line-through; }
.status-text { font-size: 12px; font-weight: 600; } .status-text.received { color: var(--brand); } .status-text.done { color: #3f9a25; } .status-text.closed { color: var(--text-3); }
.notice { background: #EAF8E4; border: 1px solid #C9EBBD; color: #226a0c; border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 16px; font-weight: 500; }
.p-foot { text-align: center; color: var(--text-3); margin-top: 28px; font-size: 12.5px; }
.denied { max-width: 440px; margin: 18vh auto 0; text-align: center; padding: 0 20px; } .denied .art { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) { .task { grid-template-columns: minmax(0, 1fr); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-drawer); }
  body.nav-open .sidebar { transform: none; } .collapse-btn { display: none; }
  .menu-btn { display: inline-grid; } .content { padding: 16px 16px 56px; } .search { display: none; } .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 0 12px; gap: 8px; } .doc { padding: 16px; }
  .topbar .btn.primary .btn-label { display: none; } .topbar .btn.primary { width: 32px; padding: 0; }
  .crumbs > a, .crumbs > .sep { display: none; } .crumbs { flex: 1; }
  body.nav-open .scrim { display: block; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .task-head h1 { min-width: 0; flex-basis: 100%; }
}
.scrim { display: none; position: fixed; inset: 0; background: rgba(41, 45, 52, .4); z-index: 45; }
@media (max-width: 640px) {
  .p-bar .in > .muted { display: none; }
  .p-wrap { padding: 20px 16px 56px; } .p-card { padding: 16px; } .p-hero h1 { font-size: 22px; }
  .stepper { display: flex; flex-direction: column; overflow: visible; padding: 0; row-gap: 0; }
  .step { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; text-align: left; padding: 0 0 12px; flex: none; }
  .step::before { top: -12px; left: 15px; width: 2px; height: 12px; } .step.row-start::before { display: block; } .step:first-child::before { display: none; }
  .step .dot { grid-row: span 2; margin: 0; }
  .dcard .ops { width: 100%; } .dcard .ops .btn { flex: 1; }
  .date-tile .v { font-size: 15px; }
}

/* ---------------------------------------------------------------- onboarding: new client form, intake card, outbox */
.req-star { color: var(--red-ink); font-weight: 700; }
.tone-green { color: #3f9a25; font-weight: 600; } .tone-amber { color: #b36b00; font-weight: 600; }
input[type=url] { height: 32px; width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 10px; background: #fff; outline: none; }
input[type=url]:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-ring); }
.form-wide { max-width: 760px; margin-top: 16px; }
.alert { display: flex; gap: 8px; align-items: flex-start; border-radius: var(--r-md); padding: 10px 14px; margin: 14px 0; font-weight: 500; }
.alert.err { background: #FFF1F1; border: 1px solid #F9C7C7; color: #9a1111; }
.tip { display: inline-block; cursor: not-allowed; } .tip .btn:disabled { pointer-events: none; }
.intake-card { margin-top: 14px; }
.intake-card h3 { margin: 0; }
.intake-top { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.intake-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.intake-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 10px; color: var(--text-2); font-size: 12.5px; }
.mail-preview { width: 100%; height: 420px; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; margin-top: 8px; }
.qa { padding: 10px 0; border-top: 1px solid var(--border); } .qa:first-of-type { border-top: 0; }
.qa .q { font-weight: 600; font-size: 12.5px; color: var(--text-2); margin-bottom: 3px; } .qa .a { color: var(--text); }
/* client intake form */
.istep { display: none; } .istep.active { display: block; }
.istep h2 .step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-size: 13px; font-weight: 700; }
.intake-wrap .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.intake-wrap .q { margin-bottom: 4px; }
.intake-wrap label.field > textarea, .intake-wrap label.field > select, .intake-wrap label.field > input { margin-top: 6px; }
.intake-wrap .q.invalid .field input, .intake-wrap .q.invalid .field textarea, .intake-wrap .q.invalid .field select { border-color: var(--red); box-shadow: 0 0 0 2px #F5000022; }
.q-err { color: var(--red-ink); font-size: 12px; font-weight: 600; margin: -6px 0 12px; }
.steps-nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px; }
.sn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border: 1px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; white-space: nowrap; color: var(--text-2); font-size: 12px; font-weight: 500; }
.sn .n { width: 20px; height: 20px; border-radius: 50%; background: #EDEFF2; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-2); }
.sn.done .n { background: var(--green); color: #fff; } .sn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); font-weight: 600; } .sn.on .n { background: var(--brand); color: #fff; }
.sn:hover { border-color: #D5D8DE; }
.step-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.row-item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; background: var(--canvas); }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.uploader { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.uploader .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.upload-btn { cursor: pointer; } .upload-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-btn:focus-within { box-shadow: 0 0 0 2px var(--brand-ring); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-tint); color: var(--text); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 12px; font-weight: 500; }
.chip-x { border: 0; background: transparent; cursor: pointer; color: var(--text-3); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; } .chip-x:hover { background: #fff; color: var(--red); }
.next-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: ns; }
.next-steps li { counter-increment: ns; display: grid; grid-template-columns: 32px 1fr; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--border); } .next-steps li:first-child { border-top: 0; }
.next-steps li::before { content: counter(ns); grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-weight: 700; display: grid; place-items: center; }
.thanks { text-align: center; padding: 20px 0 4px; } .thanks .art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 14px; } .thanks .art.ok { background: #EAF8E4; color: #3f9a25; }
.thanks .art svg { width: 30px; height: 30px; }
.intake-cta { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
@media (max-width: 640px) { .intake-actions .btn { flex: 1 1 auto; } .intake-wrap .grid-2 { grid-template-columns: 1fr; } .sn .t { display: none; } .sn.on .t { display: inline; } }

/* ---------------------------------------------------------------- Showrunner brand moments: sign-in and error pages */
.content:focus { outline: none; }
.login-body { min-height: 100vh; margin: 0; color: var(--sr-ink); background:
  radial-gradient(ellipse 52% 40% at 50% 0%, rgba(110, 59, 255, .34), transparent 72%),
  radial-gradient(ellipse 40% 34% at 82% 100%, rgba(255, 107, 74, .14), transparent 70%),
  radial-gradient(ellipse 36% 30% at 12% 92%, rgba(214, 58, 249, .10), transparent 70%), var(--sr-ink); }
.login-body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 20%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 60% 50% at 50% 20%, #000 10%, transparent 75%); }
.login { position: relative; max-width: 400px; margin: 0 auto; padding: 12vh 16px 48px; }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; color: #fff; }
.login-mark { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px; }
.login-mark::before { content: ""; position: absolute; inset: -22px; border-radius: 50%; background: var(--sr-gradient); filter: blur(30px); opacity: .5; }
.login-mark img { position: relative; display: block; }
.login-brand h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.login-tagline { margin: 6px 0 0; color: var(--sr-haze); font-size: 14.5px; }
.login-card { background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 64px rgba(5, 6, 20, .5); }
.login-card h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.login-card .sub { font-size: 13px; color: var(--sr-slate); }
.login-form { display: grid; gap: 4px; margin-top: 16px; }
.login-form .btn { height: 40px; justify-content: center; }
.login-card .btn.primary, .error-card .btn.primary { background: var(--sr-violet); border-color: var(--sr-violet); }
.login-card .btn.primary:hover, .error-card .btn.primary:hover { background: var(--sr-violet-deep); border-color: var(--sr-violet-deep); }
.login-card .alert { margin: 12px 0 0; }
.error-card { position: relative; overflow: hidden; max-width: 560px; margin: 40px auto; text-align: center; padding: 40px 24px 36px; }
.error-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sr-gradient); }
.error-card h1 { margin: 14px 0 6px; font-size: 22px; letter-spacing: -.02em; }
.error-code { display: inline-flex; align-items: center; gap: 14px; font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.error-code span { background: linear-gradient(135deg, var(--sr-violet), var(--sr-magenta)); /* large text: both stops clear 3:1 on white */ -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-code img { display: block; }

.banner-warn { background: #FFF4E5; border: 1px solid #F5A623; color: #5C3B00; border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; font-size: 14px; line-height: 1.5; }

/* onboarding form: the "?" guides, the answer helper and the offer builder */
.q-help-btn { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; padding: 0; vertical-align: 1px; border-radius: 50%; border: 1px solid var(--brand); background: var(--bg); color: var(--brand); font: 700 11px/1 var(--font); cursor: pointer; }
.q-help-btn:hover, .q-help-btn[aria-expanded="true"] { background: var(--brand); color: #fff; }
.q-help-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.q-help-btn.static { cursor: default; margin-left: 0; }
.qh-panel { border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--r-md); background: var(--canvas); padding: 12px 14px; margin: -4px 0 14px; font-size: 13px; }
.qh-why { margin: 0 0 10px; color: var(--text); }
.qh-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.qh-cols > div { min-width: 0; }
.qh-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 4px; }
.qh-tips { margin: 0; padding-left: 18px; color: var(--text-2); } .qh-tips li { margin-bottom: 3px; }
.qh-example { margin: 0; color: var(--text-2); white-space: pre-line; font-style: italic; }
.qh-chat { margin-top: 12px; }
.qh-log { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; margin-bottom: 8px; }
.qh-msg { max-width: 85%; padding: 7px 11px; border-radius: 12px; white-space: pre-line; line-height: 1.45; }
.qh-msg.helper { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); }
.qh-msg.client { align-self: flex-end; background: var(--brand-tint); color: var(--brand-ink); }
.qh-msg.wait { color: var(--text-3); font-style: italic; } .qh-msg.err { color: var(--red-ink); }
.qh-draft { background: var(--bg); border: 1px dashed var(--brand); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px; }
.qh-draft-text { margin: 0 0 8px; white-space: pre-line; }
.qh-input { display: flex; gap: 8px; align-items: flex-end; } .qh-input textarea { flex: 1; min-width: 0; }
.qh-note { margin: 6px 0 0; font-size: 12px; }
.ob-card { border: 1px solid var(--brand-ring); background: var(--brand-tint); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; }
.ob-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ob-head > div { min-width: 0; flex: 1 1 240px; } .ob-head p { margin: 2px 0 0; }
.ob-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--brand-ring); }
.ob-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.ob-option { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; min-width: 0; }
.ob-option.picked { border-color: var(--brand); box-shadow: var(--focus); }
.ob-option ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.ob-option p { margin: 0; } .ob-option .btn { align-self: flex-start; margin-top: auto; }
.ob-name { font-size: 15px; } .ob-price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; margin-right: 6px; }
.qh-panel[hidden], .qh-talk[hidden], .qh-draft[hidden], .qh-used[hidden], .ob-body[hidden], .ob-options[hidden], .qh-chat [hidden] { display: none !important; }
.confirm-box { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--canvas); font-size: 13px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.confirm-box b { color: var(--text); } .confirm-box input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--brand); }
.confirm-box:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.btn[data-submit]:disabled { opacity: .55; cursor: not-allowed; }
.locked-note { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13px; }
/* the shareable sign-up page (/start/<key>) */
.start-wrap { max-width: 640px; }
.start-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: st; }
.start-steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: start; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.start-steps li::before { content: counter(st); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-weight: 700; }
.start-steps b { font-size: 14px; } .start-steps span { color: var(--text-2); font-size: 13px; }
.start-form label.field > input { width: 100%; font-size: 16px; padding: 11px 12px; }
.start-form .btn.lg { width: 100%; justify-content: center; padding: 13px 16px; font-size: 15px; margin-top: 6px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* phones: 16px inputs in the client portal, so iOS does not zoom the page on every tap */
@media (max-width: 640px) {
  .portal-body input:not([type=checkbox]):not([type=radio]):not([type=file]), .portal-body select, .portal-body textarea { font-size: 16px; }
  .portal-body input[type=text], .portal-body input[type=email], .portal-body input[type=url], .portal-body select { height: 44px; }
  .portal-body .btn { min-height: 40px; }
  .step-actions { flex-wrap: wrap; } .step-actions .btn.primary { flex: 1 1 100%; justify-content: center; order: -1; }
  .q-help-btn { width: 24px; height: 24px; font-size: 12px; }
}
.pub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; align-items: end; }
.pub-grid .toggle-line { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text); }
.pub-grid .toggle-line input { width: 16px; height: 16px; }
.pub-link { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; } .pub-link input { flex: 1; min-width: 240px; font-family: var(--mono, monospace); }
.pub-link[hidden] { display: none; }
/* Sign in with Google */
.google-btn { display: flex; width: 100%; justify-content: center; gap: 10px; padding: 10px 14px; height: auto; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.google-btn:hover { background: #f8f9fa; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; color: var(--text-3); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
