:root {
  color-scheme: dark;
  --bg: #090c10;
  --surface: #11161e;
  --surface-2: #171e28;
  --surface-3: #202936;
  --line: #2a3442;
  --line-strong: #3a4758;
  --ink: #f2f5f8;
  --muted: #9aa6b6;
  --muted-2: #748194;
  --orange: #ff6828;
  --orange-soft: rgba(255, 104, 40, .12);
  --green: #4de296;
  --green-soft: rgba(77, 226, 150, .11);
  --blue: #67a8ff;
  --blue-soft: rgba(103, 168, 255, .12);
  --yellow: #ffc45f;
  --yellow-soft: rgba(255, 196, 95, .12);
  --red: #ff6b78;
  --red-soft: rgba(255, 107, 120, .12);
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --radius: 16px;
  --sidebar: 236px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% -10%, rgba(255, 104, 40, .07), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font: 1rem/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; font-size: 1rem; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; }
h1 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -.02em; }
h3 { font-size: 1rem; }
small { color: var(--muted); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(103, 168, 255, .75); outline-offset: 2px; }

/* Brand and authentication */
.brand { display: inline-flex; align-items: center; font-weight: 900; letter-spacing: .07em; font-size: 1.15rem; }
.brand i {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-left: 1px;
  border: 3px solid var(--orange);
  border-radius: 50%;
  color: transparent;
  font-size: 0;
  position: relative;
}
.brand i::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.brand-large { font-size: 1.55rem; }
.brand-large i { width: 27px; height: 27px; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(480px, 1.1fr); }
.auth-aside {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: clamp(36px, 6vw, 88px);
  background: linear-gradient(145deg, #111821, #090c10 70%);
  border-right: 1px solid var(--line);
}
.auth-aside::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -160px;
  right: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 104, 40, .22), transparent 67%);
}
.auth-orbit { position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.orbit-one { width: 320px; height: 320px; top: 70px; right: -80px; }
.orbit-two { width: 190px; height: 190px; top: 135px; right: -15px; border-color: rgba(255,104,40,.28); }
.auth-story { position: relative; z-index: 1; max-width: 560px; }
.auth-story h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; max-width: 12ch; }
.auth-steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 18px; color: var(--muted); }
.auth-steps li { display: flex; align-items: center; gap: 14px; }
.auth-steps span { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); font-weight: 800; }
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: clamp(20px, 5vw, 64px); }
.auth-card { width: min(100%, 540px); }
.auth-kicker { margin: 7px 0 26px; color: var(--muted); }
.auth-card h1 { margin-bottom: 7px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 30px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.segmented button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.segmented button[aria-selected="true"] { background: var(--surface-3); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.auth-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.google-sign-in { margin-top: 18px; }
.auth-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--line); }
#google-sign-in-button, #google-signup-button { min-height: 44px; display: grid; place-items: center; }
#google-sign-in-button > div, #google-signup-button > div { max-width: 100%; }
.back-button { margin-bottom: 20px; }

/* Forms and buttons */
.form-stack { display: grid; gap: 10px; margin-top: 24px; }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid > div { min-width: 0; }
label { display: block; color: #dce3eb; font-weight: 700; font-size: 1rem; }
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 45px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0c1118;
  color: var(--ink);
}
textarea { min-height: 104px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:disabled, select:disabled, textarea:disabled { opacity: .58; cursor: not-allowed; }
.field-help { margin: -5px 0 4px; color: var(--muted); font-size: .78rem; }
.check-row { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: center; min-height: 44px; font-weight: 500; line-height: 1.45; margin: 8px 0; }
.check-row input { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; accent-color: var(--orange); }
.form-error { margin: 4px 0; color: var(--red); padding: 9px 11px; border: 1px solid rgba(255,107,120,.25); background: var(--red-soft); border-radius: 9px; }
.form-success { color: var(--green); padding: 9px 11px; border: 1px solid rgba(77,226,150,.25); background: var(--green-soft); border-radius: 9px; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button:hover:not(:disabled) { border-color: #59687a; background: var(--surface-3); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { border-color: var(--orange); background: var(--orange); color: var(--bg); }
.button-primary:hover:not(:disabled) { border-color: #ff834f; background: #ff7740; color: var(--bg); }
.button-success { border-color: rgba(77,226,150,.5); background: var(--green-soft); color: var(--green); }
.button-danger { border-color: rgba(255,107,120,.48); background: var(--red-soft); color: var(--red); }
.button-quiet { background: transparent; }
.button-small { min-height: 44px; padding: 7px 10px; font-size: 1rem; }
.button-block { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.text-button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 4px 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 700; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.3rem; }

/* App chrome */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  border-right: 1px solid var(--line);
  background: rgba(12, 16, 22, .96);
  backdrop-filter: blur(18px);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 22px; }
#primary-nav { display: grid; gap: 4px; }
.nav-button { min-height: 44px; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; font-weight: 700; }
.nav-button:hover { background: var(--surface); color: var(--ink); }
.nav-button.active { border-color: rgba(255,104,40,.25); background: var(--orange-soft); color: #fff; }
.nav-icon { width: 26px; color: var(--muted-2); text-align: center; font-size: 1.05rem; }
.nav-button.active .nav-icon { color: var(--orange); }
.nav-count { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink); text-align: center; font-size: .72rem; }
.nav-divider { height: 1px; margin: 10px; background: var(--line); }
.sidebar-foot { display: grid; grid-template-columns: 10px 1fr; align-items: center; column-gap: 8px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.sidebar-foot small { grid-column: 2; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.workspace-shell { min-width: 0; }
.topbar { min-height: 78px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 13px clamp(18px, 3vw, 38px); border-bottom: 1px solid var(--line); background: rgba(9,12,16,.9); backdrop-filter: blur(18px); }
.topbar h1 { margin: 0; font-size: 1.22rem; }
.top-org { margin: 0 0 2px; color: var(--muted); font-size: .76rem; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.account-pill { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .73rem; font-weight: 800; text-transform: capitalize; }
.user-summary { display: grid; text-align: right; line-height: 1.2; }
.user-summary span { font-weight: 750; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-banner { padding: 10px clamp(18px, 3vw, 38px); border-bottom: 1px solid; font-size: .85rem; }
.workspace-banner.info { color: var(--blue); border-color: rgba(103,168,255,.28); background: var(--blue-soft); }
.workspace-banner.warn { color: var(--yellow); border-color: rgba(255,196,95,.28); background: var(--yellow-soft); }
.workspace-banner.danger { color: var(--red); border-color: rgba(255,107,120,.28); background: var(--red-soft); }
#view-root { padding: clamp(22px, 3vw, 38px); min-width: 0; }
.mobile-only { display: none; }

/* Page building blocks */
.page { max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h2 { margin: 0 0 5px; }
.page-head p { margin: 0; color: var(--muted); max-width: 68ch; }
.eyebrow { margin: 0 0 6px; color: var(--orange); font-size: .72rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.quiet { color: var(--muted-2); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface), rgba(17,22,30,.65)); }
.metric span { display: block; color: var(--muted); font-size: .78rem; }
.metric strong { display: block; margin-top: 5px; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1; }
.metric small { display: block; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 35px rgba(0,0,0,.08); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3, .panel-head p { margin: 0; }
.panel-body { padding: 18px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 16px; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 12px; }
.stack-large { display: grid; gap: 20px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.toolbar .search-field { flex: 1 1 240px; margin: 0; }
.toolbar select { width: auto; min-width: 155px; margin: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.tab-button { flex: none; min-height: 44px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.tab-button.active { border-color: var(--orange); background: var(--orange-soft); color: #fff; }
.inline-note { margin: 0; padding: 11px 13px; border-left: 3px solid var(--blue); background: var(--blue-soft); color: #bcd6f8; border-radius: 4px 9px 9px 4px; font-size: .84rem; }
.inline-note.warn { border-color: var(--yellow); background: var(--yellow-soft); color: #ffe1aa; }
.inline-note.danger { border-color: var(--red); background: var(--red-soft); color: #ffc2c8; }
.empty-state { padding: 42px 22px; text-align: center; color: var(--muted); }
.empty-icon { width: 46px; height: 46px; margin: 0 auto 12px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--orange); font-size: 1.3rem; }
.empty-state h3 { margin-bottom: 5px; }
.loading { display: grid; place-items: center; min-height: 220px; color: var(--muted); }
.loading::before { content: ""; width: 26px; height: 26px; margin-right: 10px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Lists, tables, statuses */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.row-primary { font-weight: 750; color: var(--ink); }
.row-secondary { display: block; color: var(--muted); font-size: .78rem; }
.list-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.012); }
.list-card > * { min-width: 0; }
.row-primary, .row-secondary, .list-card h3, .list-card p { overflow-wrap: anywhere; }
.list-card:hover { border-color: var(--line-strong); }
.list-card h3 { margin: 0 0 4px; }
.list-card p { margin: 0; color: var(--muted); }
.list-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 9px; color: var(--muted); font-size: .78rem; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .7rem; font-weight: 850; text-transform: capitalize; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-new, .status-unassigned, .status-requested, .status-evaluation { color: var(--yellow); border-color: rgba(255,196,95,.28); background: var(--yellow-soft); }
.status-draft, .status-offered, .status-en_route { color: var(--blue); border-color: rgba(103,168,255,.28); background: var(--blue-soft); }
.status-approved, .status-confirmed, .status-assigned, .status-arrived, .status-picked_up, .status-completed, .status-sold, .status-active, .status-available { color: var(--green); border-color: rgba(77,226,150,.28); background: var(--green-soft); }
.status-canceled, .status-cancelled, .status-suspended, .status-deactivated, .status-offline { color: var(--red); border-color: rgba(255,107,120,.28); background: var(--red-soft); }
.status-viewer, .status-archived, .status-used, .status-expired { color: var(--muted); }
.tag { display: inline-flex; min-height: 23px; align-items: center; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: .69rem; font-weight: 750; }
.money { color: var(--green); font-weight: 850; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
input.mono { font-size: 1rem; }

/* Workflow-specific */
.workflow { display: grid; gap: 0; }
.workflow-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.workflow-step:last-child { border-bottom: 0; }
.step-number { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: .76rem; font-weight: 850; }
.workflow-step.done .step-number { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.workflow-step strong { display: block; }
.workflow-step small { display: block; margin-top: 2px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), #ff9f57); }
.quote-box { padding: 17px; border: 1px solid rgba(77,226,150,.24); border-radius: 13px; background: linear-gradient(135deg, var(--green-soft), transparent 65%); }
.quote-amount { margin: 4px 0; color: var(--green); font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; letter-spacing: -.04em; }
.assumption-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.assumption { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.12); }
.assumption span { display: block; color: var(--muted); font-size: .7rem; }
.assumption strong { display: block; margin-top: 2px; font-size: .9rem; }
.details-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr); gap: 16px; }
.definition-list { display: grid; grid-template-columns: minmax(110px, .45fr) 1fr; gap: 8px 14px; margin: 0; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; overflow-wrap: anywhere; }
.timeline { position: relative; display: grid; gap: 0; margin-left: 7px; }
.timeline-item { position: relative; padding: 0 0 18px 23px; border-left: 1px solid var(--line-strong); }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item::before { content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.timeline-item strong { display: block; text-transform: capitalize; }
.timeline-item small { display: block; margin-top: 2px; }
.split-summary { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.action-zone { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.danger-zone { padding: 16px; border: 1px solid rgba(255,107,120,.26); border-radius: 12px; background: var(--red-soft); }
.danger-zone h3 { color: var(--red); }
.usage-row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; align-items: center; gap: 12px; }
.usage-row .progress-track { min-width: 80px; }
.copy-output { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0c1118; }
.copy-output code { white-space: pre-wrap; overflow-wrap: anywhere; color: #dbe5f0; }
.sr-copy-field { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; opacity: 0; }

/* WreckRadar */
.radar-page > .inline-note { margin-bottom: 12px; }
.radar-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 16px; align-items: stretch; }
.radar-map-panel, .radar-rail { overflow: hidden; }
.radar-map-panel { display: flex; flex-direction: column; }
.radar-plot {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(103,168,255,.09), transparent 42%),
    linear-gradient(145deg, rgba(77,226,150,.035), transparent 58%),
    #0b1017;
}
.radar-grid {
  position: absolute;
  inset: 0;
  opacity: .72;
  background-image:
    linear-gradient(rgba(58,71,88,.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,71,88,.26) 1px, transparent 1px),
    linear-gradient(28deg, transparent 47%, rgba(103,168,255,.12) 48%, rgba(103,168,255,.12) 50%, transparent 51%),
    linear-gradient(-34deg, transparent 47%, rgba(77,226,150,.09) 48%, rgba(77,226,150,.09) 50%, transparent 51%);
  background-size: 54px 54px, 54px 54px, 170px 120px, 210px 150px;
}
.radar-base-marker {
  position: absolute;
  z-index: 2;
  left: var(--radar-x);
  top: var(--radar-y);
  width: 18px;
  height: 18px;
  border: 4px solid var(--blue);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 6px rgba(103,168,255,.13);
  transform: translate(-50%, -50%);
}
.radar-marker {
  position: absolute;
  z-index: 3;
  left: var(--radar-x);
  top: var(--radar-y);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.radar-marker > span { width: 13px; height: 13px; border: 3px solid #071018; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(255,196,95,.17); }
.radar-marker-crash > span { background: var(--red); box-shadow: 0 0 0 5px rgba(255,107,120,.18); }
.radar-marker-closure > span { background: var(--muted); box-shadow: 0 0 0 5px rgba(154,166,182,.16); }
.radar-marker.selected > span { background: var(--green); box-shadow: 0 0 0 7px rgba(77,226,150,.22); }
.radar-marker:hover > span, .radar-marker:focus-visible > span { transform: scale(1.2); }
.radar-map-note { min-height: 44px; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.radar-rail { display: flex; flex-direction: column; max-height: 680px; }
.radar-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.radar-list-stack { display: grid; gap: 10px; }
.radar-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.014); }
.radar-card.selected { border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.radar-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.radar-card-link { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font-weight: 800; overflow-wrap: anywhere; }
.radar-distance { flex: none; color: var(--muted); font-size: .76rem; }
.radar-card > p { margin: 8px 0; color: var(--muted); font-size: .84rem; }
.radar-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.radar-tag { white-space: normal; }
.radar-tag-synthetic { color: var(--yellow); background: var(--yellow-soft); }
.radar-tag-danger { color: var(--red); background: var(--red-soft); }
.radar-tag-positive { color: var(--green); background: var(--green-soft); }
.radar-tag-warn { color: var(--yellow); background: var(--yellow-soft); }
.radar-card .radar-observed { color: var(--muted); font-size: .73rem; }
.radar-card-action { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.radar-dispatch-button { margin-top: 11px; width: 100%; }
.radar-unavailable { min-height: 220px; display: grid; align-content: center; justify-items: center; padding: 28px; text-align: center; color: var(--muted); }
.radar-unavailable .empty-icon { margin-bottom: 12px; }
.radar-unavailable h3 { margin-bottom: 5px; }
.radar-unavailable p { max-width: 50ch; margin: 4px 0; }
.radar-refreshed { margin: 10px 2px 0; color: var(--muted-2); font-size: .75rem; text-align: right; }

/* Website booking owner console */
.booking-admin-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: start; }
.booking-service-list { display: grid; gap: 9px; margin-top: 10px; }
.booking-service-option, .publish-toggle { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.booking-service-option strong, .publish-toggle strong { display: block; }
.booking-service-option .row-secondary, .publish-toggle .row-secondary { margin-top: 3px; }
.booking-admin input[type="color"] { min-height: 47px; padding: 5px; }
.booking-admin .embed-output { min-height: 120px; }
.booking-service-mix { margin: 0; color: var(--ink); font-size: 1.08rem; font-weight: 700; line-height: 1.55; }
.empty-state.compact { min-height: 230px; }

/* Owner-only client readiness console */
.readiness-console {
  --runway-green: #64efaa;
  --runway-orange: #ff8a4f;
  --runway-red: #ff7782;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
.readiness-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  min-height: 220px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(100deg, rgba(8, 12, 17, .96) 0 48%, rgba(8, 12, 17, .45)),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(255, 255, 255, .035) 63px 64px),
    linear-gradient(145deg, #25384a, #111820);
}
.readiness-hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: 28px;
  width: 58%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  box-shadow: 0 0 28px rgba(255, 104, 40, .65);
  transform: rotate(-8deg);
}
.readiness-hero > * { position: relative; z-index: 1; }
.readiness-hero h2 { max-width: 11ch; margin-bottom: 10px; font-size: clamp(2.35rem, 6vw, 5.7rem); line-height: .9; letter-spacing: -.075em; }
.readiness-hero p:not(.eyebrow) { max-width: 58ch; margin-bottom: 0; color: var(--muted); }
.readiness-freshness { display: grid; justify-items: end; gap: 8px; text-align: right; }
.readiness-freshness > span { color: var(--muted); font-size: .8rem; }
.readiness-journey { position: relative; margin: 20px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #090a09; }
.readiness-journey picture { display: block; min-height: clamp(180px, 42vw, 680px); }
.readiness-journey img { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 788; object-fit: cover; opacity: 0; transition: opacity .2s ease; }
.readiness-journey[data-loaded="true"] picture { min-height: 0; }
.readiness-journey[data-loaded="true"] img { opacity: 1; }
.readiness-journey-loading { position: absolute; inset: 0 0 43px; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: .82rem; letter-spacing: .03em; }
.readiness-journey[data-loaded="true"] .readiness-journey-loading { display: none; }
.readiness-journey[data-load-error="true"] .readiness-journey-loading { color: var(--runway-red); }
.readiness-journey figcaption { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.readiness-journey figcaption strong { color: var(--ink); }
.readiness-runway { margin-top: 20px; padding: clamp(20px, 3vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: #0c1117; }
.readiness-runway-head { display: flex; justify-content: space-between; gap: 24px; }
.readiness-runway-head h3 { font-size: 1.3rem; }
.readiness-runway-head > p { max-width: 54ch; color: var(--muted); font-size: .82rem; }
.readiness-gates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 28px 0 0; padding: 0; list-style: none; }
.readiness-gate { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 11px; min-width: 0; padding-right: 18px; }
.readiness-gate:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: 31px; right: -1px; height: 2px; background: var(--line-strong); }
.readiness-gate-marker { position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--line-strong); border-radius: 50%; background: #0c1117; color: var(--muted); font: 800 .75rem/1 ui-monospace, monospace; }
.readiness-gate.verified .readiness-gate-marker { border-color: var(--runway-green); color: var(--runway-green); box-shadow: 0 0 0 5px rgba(100, 239, 170, .08); }
.readiness-gate.pending .readiness-gate-marker { border-color: var(--runway-orange); color: var(--runway-orange); box-shadow: 0 0 0 5px rgba(255, 138, 79, .08); }
.readiness-gate.blocked .readiness-gate-marker { border-color: var(--runway-red); color: var(--runway-red); box-shadow: 0 0 0 5px rgba(255, 119, 130, .08); }
.readiness-gate-title { display: grid; gap: 3px; min-height: 48px; }
.readiness-gate-title span { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.readiness-gate p { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.readiness-activation { margin-top: 20px; }
.readiness-activation-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.readiness-activation-body p { margin: 0 0 14px; color: var(--muted); }
.readiness-activation-body p strong { color: var(--ink); }
.readiness-activation-body code { color: var(--blue); overflow-wrap: anywhere; }
.readiness-activation-body ol, .readiness-activation-body ul { margin: 0; padding-left: 20px; }
.readiness-activation-body li { margin-bottom: 10px; color: #d8dfe7; }
.readiness-activation-body li span, .readiness-activation-body li small { display: block; color: var(--muted); }
.readiness-grid { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 20px; margin-top: 20px; }
.readiness-sha { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #0b1016; }
.readiness-sha code { color: var(--green); font-size: 1.08rem; }
.readiness-sha span { color: var(--muted); overflow-wrap: anywhere; }
.readiness-cycle pre, .readiness-artifact pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #c8d0da; font: .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.readiness-evidence, .readiness-library, .readiness-commits { margin-top: 20px; }
.readiness-evidence ul { columns: 2; column-gap: 34px; margin: 0; padding-left: 20px; }
.readiness-evidence li { break-inside: avoid; margin-bottom: 11px; color: #d8dfe7; }
.readiness-evidence-overflow { margin-top: 14px; border-top: 1px solid var(--line); }
.readiness-evidence-overflow > summary, .readiness-artifact-overflow > summary { min-height: 48px; display: flex; align-items: center; padding: 12px 20px; color: var(--blue); font-weight: 750; cursor: pointer; }
.readiness-evidence-overflow[open] > summary, .readiness-artifact-overflow[open] > summary { border-bottom: 1px solid var(--line); }
.readiness-evidence-overflow ul { margin-top: 16px; }
.readiness-filter { width: min(360px, 100%); color: var(--muted); font-size: 1rem; }
.readiness-filter input { min-height: 44px; }
.readiness-artifact-list { border-top: 1px solid var(--line); }
.readiness-artifact { border-bottom: 1px solid var(--line); }
.readiness-artifact-overflow { border-bottom: 1px solid var(--line); }
.readiness-artifact summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; cursor: pointer; }
.readiness-artifact summary:hover { background: rgba(255,255,255,.025); }
.readiness-artifact summary span { min-width: 0; }
.readiness-artifact summary strong, .readiness-artifact summary small { display: block; overflow-wrap: anywhere; }
.readiness-artifact summary time { flex: none; color: var(--muted); font-size: .75rem; }
.readiness-artifact-body { padding: 0 20px 18px 40px; }
.readiness-artifact-body pre { max-height: 240px; overflow: auto; padding: 14px; border-radius: 10px; background: #080c11; }
.readiness-artifact-body p { margin: 10px 0 0; color: var(--muted); font-size: .73rem; }
.readiness-commits ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.readiness-commits li { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.readiness-commits li:last-child { border-bottom: 0; }
.readiness-commits code { color: var(--blue); }
.readiness-commits time { color: var(--muted); font-size: .75rem; }

/* Dialog and notifications */
.app-dialog { width: min(920px, calc(100vw - 28px)); max-height: min(90vh, 900px); margin: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: auto; }
.app-dialog::backdrop { background: rgba(2,5,8,.75); backdrop-filter: blur(5px); }
.dialog-head { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: rgba(17,22,30,.95); backdrop-filter: blur(12px); }
.dialog-head h2, .dialog-head p { margin-bottom: 0; }
#dialog-body { padding: 20px; }
.dialog-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.dialog-section:first-child { padding-top: 0; }
.dialog-section:last-child { padding-bottom: 0; border-bottom: 0; }
.toast-stack { position: fixed; z-index: 100; right: 18px; bottom: 18px; width: min(390px, calc(100vw - 36px)); display: grid; gap: 9px; }
.toast { padding: 13px 15px; border: 1px solid var(--line-strong); border-left: 4px solid var(--green); border-radius: 11px; background: var(--surface-2); box-shadow: 0 15px 45px rgba(0,0,0,.35); }
.toast.error { border-left-color: var(--red); }
.toast strong { display: block; }
.toast span { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; }

@media (max-width: 1120px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details-grid { grid-template-columns: 1fr; }
  .radar-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr); }
  .radar-plot { min-height: 500px; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { padding: 28px 20px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; visibility: hidden; transform: translateX(-105%); width: min(290px, calc(100vw - 46px)); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.45); }
  .sidebar.open { visibility: visible; transform: translateX(0); }
  .nav-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.6); }
  .mobile-only { display: inline-grid; }
  .topbar { min-height: 68px; }
  .dashboard-grid, .content-grid { grid-template-columns: 1fr; }
  .booking-admin-grid { grid-template-columns: 1fr; }
  .readiness-grid { grid-template-columns: 1fr; }
  .readiness-activation-body { grid-template-columns: 1fr; }
  .readiness-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 0; }
  .readiness-gate:nth-child(2)::after { display: none; }
  .radar-layout { grid-template-columns: 1fr; }
  .radar-plot { min-height: 340px; }
  .radar-rail { max-height: none; }
  .radar-list { max-height: none; overflow: visible; }
}

@media (max-width: 640px) {
  .readiness-journey figcaption { align-items: flex-start; flex-direction: column; gap: 4px; }
  .field-grid.two, .field-grid.three, .metrics, .content-grid.three, .assumption-grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .top-org { display: none; }
  .topbar h1 { font-size: 1.05rem; }
  .user-summary, .account-pill { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .button { min-height: 44px; padding: 8px 10px; }
  #view-root { padding: 20px 14px 34px; }
  .workspace-banner { padding: 9px 14px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head .button-row > .button { flex: 1; }
  .toolbar { align-items: stretch; }
  .toolbar select { width: 100%; }
  .list-card { grid-template-columns: 1fr; }
  .list-card > .button-row { justify-content: flex-start; }
  .workflow-step { grid-template-columns: 30px minmax(0, 1fr); }
  .workflow-step > .button { grid-column: 2; justify-self: start; }
  .usage-row { grid-template-columns: 1fr auto; }
  .usage-row .progress-track { grid-column: 1 / -1; grid-row: 2; }
  .definition-list { grid-template-columns: 1fr; gap: 2px; }
  .definition-list dd { margin-bottom: 8px; }
  .copy-output { grid-template-columns: 1fr; }
  .radar-plot { min-height: 280px; }
  .radar-card-head { display: grid; gap: 4px; }
  .radar-dispatch-button { min-height: 44px; }
  .readiness-hero, .readiness-runway-head { align-items: stretch; flex-direction: column; }
  .readiness-freshness { justify-items: start; text-align: left; }
  .readiness-gates { grid-template-columns: 1fr; gap: 20px; }
  .readiness-gate::after { display: none; }
  .readiness-evidence ul { columns: 1; }
  .readiness-library .panel-head { align-items: stretch; flex-direction: column; }
  .readiness-commits li { grid-template-columns: 72px minmax(0, 1fr); }
  .readiness-commits time { grid-column: 2; }
  .app-dialog { width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  #dialog-body { padding: 17px 15px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
