:root {
  --ink: #19162c;
  --text: #3d3653;
  --muted: #665f7a;
  --line: #e0ddeb;
  --canvas: #f5f4f9;
  --violet: #5538b3;
  --violet-dark: #422990;
  --navy: #15142b;
  --good: #17593f;
  --warn: #8a4a0a;
  color: var(--ink);
  background: var(--canvas);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, input, select, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #a86d0a; outline-offset: 3px; }
a { color: var(--violet-dark); }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { line-height: 1.14; }
h1 { font-size: clamp(1.9rem, 4vw, 3.15rem); letter-spacing: -.055em; font-weight: 800; }
h2 { font-size: 1.21rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
[hidden] { display: none !important; }
small { color: var(--muted); font-size: .86rem; }
.skip { position: fixed; left: 12px; top: -60px; padding: 10px; z-index: 5; background: white; }
.skip:focus { top: 12px; }
.site-header { display: flex; align-items: center; padding: 13px 25px; gap: 20px; min-height: 70px; background: var(--navy); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: white; text-decoration: none; font-size: 1.28rem; letter-spacing: -.04em; }
.workspace-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: #f0ebfc; font-size: .935rem; font-weight: 680; padding-left: 20px; border-left: 1px solid #514961; }
.workspace-name span { color: #c6bddc; font-size: .85rem; font-weight: 500; }
.site-header #reset { margin-left: auto; color: white; background: #2e2946; border-color: #645779; white-space: nowrap; }
.site-header #reset:hover { background: #493d66; }
.notice-strip { color: #40386a; background: #eee9ff; padding: 8px 24px; border-bottom: 1px solid #dcd3f2; font-size: .86rem; }
.shell { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: calc(100vh - 108px); }
.sidebar { padding: 31px 17px 20px; background: #fdfcff; border-right: 1px solid var(--line); }
.sidebar-label, .eyebrow { color: #625184; font-weight: 760; letter-spacing: .11em; font-size: .76rem; }
.sidebar-label { margin: 0 11px 13px; }
nav { display: grid; gap: 4px; }
nav button { border: 0; border-radius: 7px; min-height: 44px; color: #494162; background: none; text-align: left; font-size: .94rem; font-weight: 650; padding: 8px 11px; display: flex; align-items: center; gap: 11px; }
nav button:hover { background: #f2edf9; }
nav button[aria-current] { color: #4a2a9e; background: #ebe3ff; box-shadow: inset 3px 0 #6d48c8; }
nav svg, .asset-icon svg { width: 19px; height: 19px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.sidebar-note { margin: 28px 2px 0; border-top: 1px solid var(--line); padding: 16px 9px 0; font-size: .87rem; color: var(--muted); }
.sidebar-note strong { color: var(--ink); }
.sidebar-note p { margin-top: 5px; }
.workspace { min-width: 0; }
main, #guide, footer { width: min(100%, 1540px); margin: 0 auto; }
main { padding: 29px 31px 14px; }
main:focus, [tabindex="-1"]:focus { outline: none; }
footer { padding: 5px 31px 24px; color: var(--muted); font-size: .85rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 266px; overflow: hidden; border-radius: 13px; background: #1b1733; color: white; margin-bottom: 18px; }
.hero-copy { position: relative; z-index: 1; padding: 28px 30px; }
.hero-copy .eyebrow { color: #d5c3ff; margin-bottom: 13px; }
.hero h1 { font-size: clamp(2.25rem, 4.2vw, 4.15rem); }
.hero-copy > p:not(.eyebrow) { color: #e2dcf0; max-width: 34rem; margin-top: 11px; }
.hero-copy .actions { margin-top: 19px; }
.hero-time { font-size: .88rem; }
.hero-photo { position: relative; min-height: 100%; }
.hero-photo img { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center 57%; }
.hero-photo::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, #1b1733, transparent 42%); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.primary, .secondary, .hero-secondary, .text-button, .small-button { border: 1px solid transparent; min-height: 44px; border-radius: 7px; padding: 8px 13px; font-weight: 700; font-size: .93rem; }
.primary { color: white; background: var(--violet); }
.primary:hover { background: var(--violet-dark); }
.hero .primary { background: #d6c2ff; color: #27194b; }
.hero .primary:hover { background: #e8daff; }
.secondary, .small-button { background: white; border-color: #cfc6e2; color: #4c3680; }
.secondary:hover, .small-button:hover { background: #f2edff; }
.hero-secondary { color: white; background: #32254b; border-color: #847098; }
.hero-secondary:hover { background: #49365f; }
.small-button, .text-button { padding: 6px 10px; font-size: .87rem; }
.text-button { background: none; color: #51408e; text-align: left; }
.text-button:hover { color: #39216d; background: #f0eafd; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 17px; }
.metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; background: white; padding: 16px 17px; border-radius: 9px; border: 1px solid var(--line); }
.metric > span { color: #49415e; font-size: .9rem; font-weight: 650; }
.metric strong { font-size: clamp(1.4rem, 2.35vw, 2.12rem); letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; line-height: 1.27; }
.metric small { font-size: .835rem; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.panel { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 19px; min-width: 0; margin-bottom: 14px; }
.cards .panel { margin: 0; }
.panel > h2 { margin-bottom: 10px; }
.panel h3 { margin-top: 12px; }
.panel p { overflow-wrap: anywhere; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 11px; }
.panel-heading p { color: var(--muted); font-size: .89rem; margin-top: 3px; }
.panel-heading .eyebrow { margin-bottom: 5px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 19px; }
.page-head p { margin-top: 7px; color: var(--muted); max-width: 55rem; font-size: .95rem; }
.page-head .actions { flex-shrink: 0; }
.pill { display: inline-block; padding: 4px 8px; border-radius: 5px; font-size: .82rem; font-weight: 700; line-height: 1.35; color: #4d3b74; background: #f0ebfa; text-align: center; }
.pill.good { color: var(--good); background: #e7f1eb; }
.pill.warn { color: var(--warn); background: #fbecd8; }
.muted, .fine, .empty { color: var(--muted); }
.fine { font-size: .86rem; margin-top: 8px; }
.empty { background: #f7f5fb; border: 1px dashed #d7cee7; border-radius: 7px; padding: 10px; font-size: .9rem; }
.warning-text { color: #902f26; font-size: .89rem; font-weight: 650; }
.event-list, .event-cards { display: grid; gap: 7px; }
.event-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-row, .run-row { color: var(--ink); background: #fbfaff; border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; text-align: left; min-width: 0; width: 100%; }
.event-row:hover, .run-row:hover { background: #f2edff; }
.event-row.selected, .run-row.selected { border-color: #9b81d6; background: #f2edff; }
.event-row small, .run-row small, .line-row small, .alert-row small { display: block; overflow-wrap: anywhere; }
.event-meta { min-width: 0; overflow-wrap: anywhere; }
.date-tile { text-align: center; color: #4e3884; font-weight: 750; background: #eee8fb; border-radius: 6px; padding: 5px 7px; font-size: .82rem; white-space: nowrap; }
.date-tile small { font-size: .78rem; }
.run-row { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 7px; }
.line-row, .alert-row { display: flex; align-items: center; gap: 11px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e9e5f0; }
.line-row:last-child, .alert-row:last-child { border-bottom: 0; }
.line-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.alert-row > div:first-of-type { margin-right: auto; }
.alert-row strong { font-size: .94rem; }
.alert-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #8563c1; }
.alert-dot.urgent { background: #b55713; }
.summary-list > div { display: flex; justify-content: space-between; gap: 9px; padding: 7px 0; border-bottom: 1px solid #e9e5f0; }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); font-size: .9rem; }
.summary-list dd { margin: 0; text-align: right; font-weight: 720; }
.chart { display: block; width: 100%; height: auto; margin-top: 7px; }
.chart .bar { fill: #baa8e4; }
.chart .current { fill: #6242b6; }
.week-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; gap: 4px; }
.week-labels strong { display: block; }
.week-labels small { font-size: .76rem; }
.phase-list { list-style: none; margin: 15px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.phase-list li { border: 1px solid var(--line); color: var(--muted); padding: 4px 10px; border-radius: 5px; font-size: .86rem; }
.phase-list [aria-current] { background: #541fa0; border-color: #541fa0; color: white; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 9px; }
.fields label, .form-inline label, .time-form label { display: grid; gap: 4px; color: #49415e; font-size: .9rem; font-weight: 650; min-width: 0; }
input, select { border: 1px solid #cfc6e2; background: white; border-radius: 6px; min-height: 44px; width: 100%; color: var(--ink); padding: 7px 9px; font-size: 1rem; }
select { appearance: none; padding-right: 34px; background: #fff url('chevron.svg') no-repeat right 10px center; }
select:disabled { background-color: #f1eef7; color: #6b617e; }
.form-actions { margin-top: 12px; }
.form-inline, .time-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 10px 0 0; }
.form-inline label { flex: 1 1 135px; }
.time-form label { max-width: 150px; }
.shift-row { margin-bottom: 8px; }
.asset-icon { width: 36px; height: 36px; border-radius: 7px; background: #eee7fd; color: #6545af; display: grid; place-items: center; margin-bottom: 11px; }
.integration > p { color: var(--text); font-size: .93rem; margin: 8px 0; }
.integration > .pill { margin-top: 2px; }
.integration.feature { grid-column: span 2; background: #f9f6ff; border-color: #d9caef; }
.sync-preview, .quote-preview { background: #f6f2fd; border: 1px solid #e3d9f3; margin-top: 11px; padding: 12px; border-radius: 7px; }
.sync-preview h3, .quote-preview h3 { margin-top: 0; }
.quote-preview p { margin: 6px 0; }
.activity { margin: 0; padding-left: 20px; color: var(--text); }
.activity li { padding: 4px 0; }
.roi-table { width: 100%; border-collapse: collapse; margin-top: 9px; font-size: .88rem; }
.roi-table th, .roi-table td { padding: 7px 5px; text-align: left; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.roi-table td { text-align: right; }
.roi-table th:not(:first-child) { text-align: right; }
#roi-output { margin-top: 8px; }
#guide:not(:empty) { position: sticky; top: 0; padding: 14px 31px 0; z-index: 2; }
.guide { display: flex; justify-content: space-between; gap: 13px; align-items: center; border: 1px solid #c6afea; border-radius: 9px; padding: 13px 15px; background: #f1e9ff; box-shadow: 0 3px 18px #2b16451b; }
.guide h2 { margin: 3px 0 4px; }
.guide p:not(.eyebrow) { font-size: .89rem; color: #4e3b70; }
.guide .actions { flex: 0 1 auto; min-width: min(175px, 30%); justify-content: flex-end; }
.panel[id], #main { scroll-margin-top: 15px; }
.workspace:has(#guide:not(:empty)) .panel[id], .workspace:has(#guide:not(:empty)) #main { scroll-margin-top: 145px; }
.toast { position: fixed; bottom: 15px; right: 15px; width: min(510px, calc(100vw - 30px)); z-index: 4; padding: 12px 15px; border-radius: 8px; background: #202c31; color: white; box-shadow: 0 7px 24px #15142b30; font-size: .94rem; }
.toast.error { background: #842923; }
dialog { color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 9px; padding: 21px; width: min(455px, calc(100% - 24px)); }
dialog::backdrop { background: #15142b8c; }
dialog p { margin: 8px 0 15px; color: var(--muted); }
.missing { padding: 30px; }

@media (max-width: 1120px) {
  .shell { grid-template-columns: 175px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  main, footer { padding-inline: 20px; }
  #guide:not(:empty) { padding-inline: 20px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-copy { padding: 22px; }
  .event-cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .shell { display: block; }
  .site-header { padding: 9px 14px; min-height: 57px; gap: 12px; flex-wrap: wrap; }
  .brand { font-size: 1.12rem; }
  .brand img { width: 29px; height: 29px; }
  .workspace-name { margin-left: auto; font-size: .88rem; border-left: 0; padding-left: 0; }
  .workspace-name span { display: none; }
  .notice-strip { padding-inline: 14px; }
  .sidebar { padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-label, .sidebar-note { display: none; }
  nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  nav button { justify-content: center; gap: 5px; padding-inline: 4px; font-size: .86rem; text-align: center; }
  nav button[aria-current] { box-shadow: inset 0 -2px #6d48c8; }
  nav svg { width: 17px; height: 17px; }
  main { padding: 16px 14px 8px; }
  footer { padding: 8px 14px 18px; }
  #guide:not(:empty) { padding: 8px 14px 0; }
  .hero { min-height: 228px; }
  .page-head p { font-size: .9rem; }
}

@media (max-width: 560px) {
  .workspace-name { order: 3; width: 100%; padding-bottom: 2px; margin: -5px 0 0; }
  .workspace-name span { display: inline; font-size: .78rem; }
  .notice-strip { font-size: .8rem; }
  .hero { display: flex; flex-direction: column; }
  .hero-copy { padding: 19px 17px 13px; }
  .hero-photo { min-height: 132px; }
  .hero-photo::after { background: linear-gradient(180deg, #1b1733, transparent 42%); }
  .hero .actions { margin-top: 13px; }
  .hero-copy .hero-time { margin-top: 6px; }
  .split, .cards { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cards { gap: 10px; }
  .integration.feature { grid-column: auto; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 11px; }
  .panel { padding: 13px; }
  .page-head { display: block; }
  .page-head .actions:not(:empty) { margin-top: 8px; }
  .guide { display: block; padding: 10px 12px; }
  .guide h2 { font-size: 1.04rem; }
  .guide .actions { margin-top: 5px; justify-content: flex-start; }
  .workspace:has(#guide:not(:empty)) .panel[id], .workspace:has(#guide:not(:empty)) #main { scroll-margin-top: 220px; }
  .guide .primary, .guide .text-button { font-size: .84rem; }
  .line-row, .alert-row { flex-wrap: wrap; }
  .event-row { gap: 7px; }
  .event-row .pill { font-size: .76rem; }
  .event-row strong { font-size: .91rem; }
}

@media (max-width: 350px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .week-labels small { font-size: .68rem; }
  .site-header { gap: 8px; }
}
