:root {
  color-scheme: light;
  --bg: #edf2f5;
  --surface: #ffffff;
  --surface-2: #f5f8fa;
  --ink: #14232e;
  --muted: #566874;
  --line: #d4dee4;
  --accent: #007c9f;
  --accent-ink: #ffffff;
  --nav: #0d2838;
  --nav-ink: #eaf5fb;
  --nav-muted: #8fa8b8;
  --good: #167c5a;
  --warn: #b76b00;
  --danger: #bd3a45;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(9, 30, 43, .06), 0 8px 24px rgba(9, 30, 43, .045);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="shop"] {
  color-scheme: dark;
  --bg: #0c0e0d; --surface: #151816; --surface-2: #1b1f1c; --ink: #f1f4ed; --muted: #9ba49c;
  --line: #303630; --accent: #c7f13f; --accent-ink: #10140a; --nav: #080a09; --nav-ink: #f3f8ea;
  --nav-muted: #899188; --good: #a9dc3e; --warn: #ffb546; --danger: #ff6573; --radius: 4px;
  --shadow: 0 14px 36px rgba(0, 0, 0, .3);
}

html[data-theme="warm"] {
  --bg: #f3efe8; --surface: #fffdf9; --surface-2: #f8f3eb; --ink: #28241f; --muted: #756b60;
  --line: #ded5c8; --accent: #b84d24; --accent-ink: #fffaf4; --nav: #292821; --nav-ink: #fffaf0;
  --nav-muted: #c5bcae; --good: #287a68; --warn: #a8640b; --danger: #b13d48; --radius: 16px;
  --shadow: 0 10px 30px rgba(72, 53, 33, .1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 2px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 244px; display: flex; flex-direction: column; background: var(--nav); color: var(--nav-ink); padding: 24px 16px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 900; border-radius: var(--radius); transform: skew(-7deg); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--nav-muted); letter-spacing: .14em; font-size: .62rem; margin-top: 3px; }
.main-nav { display: grid; gap: 5px; }
.nav-item, .sidebar-foot button { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--nav-muted); display: flex; align-items: center; gap: 11px; padding: 0 12px; border-radius: var(--radius); text-align: left; cursor: pointer; }
.nav-item span { width: 22px; text-align: center; color: var(--nav-muted); }
.nav-item b { margin-left: auto; min-width: 22px; padding: 2px 6px; text-align: center; border-radius: 99px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); font-size: .72rem; }
.nav-item i { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.nav-item:hover, .nav-item.active { color: var(--nav-ink); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.nav-item.active span { color: var(--accent); }
.sidebar-foot { margin-top: auto; }
.sidebar-foot button { min-height: 36px; }
.user { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 15px 8px 0; border-top: 1px solid color-mix(in srgb, var(--nav-muted) 25%, transparent); }
.user > span, .avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent); font-weight: 800; font-size: .76rem; }
.user strong, .user small { display: block; }.user small { color: var(--nav-muted); }

.topbar { position: fixed; inset: 0 0 auto 244px; z-index: 8; height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 14px 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); }
.topbar h1 { margin: 1px 0 0; font-size: 1.45rem; }
.eyebrow { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.top-actions, .detail-actions { display: flex; gap: 9px; align-items: center; }
button { border: 1px solid var(--line); background: var(--surface); padding: 9px 13px; border-radius: calc(var(--radius) - 2px); cursor: pointer; }
button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
button.primary, .package.featured span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 750; }
.icon-button { width: 42px; height: 42px; padding: 0; font-size: 1.35rem; }
.text-button { border: 0; background: transparent; color: var(--accent); font-weight: 700; padding-inline: 0; }

.workspace { margin-left: 244px; padding: 106px 32px 50px; max-width: 1560px; }
.workspace, .screen, .direction-picker, .segmented, .alert-panel, .panel { min-width: 0; }
.direction-picker { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; align-items: center; margin-bottom: 22px; padding: 16px 18px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); border-radius: var(--radius); }
.direction-picker h2 { margin: 2px 0 0; font-size: 1rem; }
.direction-picker > p { grid-column: 2; margin: 0; color: var(--muted); font-size: .84rem; }
.segmented { display: flex; justify-self: end; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); background: var(--surface-2); }
.segmented button { border: 0; background: transparent; white-space: nowrap; }
.segmented button.active { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.screen { display: none; }.screen.active { display: block; animation: enter .18s ease-out; }
@keyframes enter { from { opacity: .4; transform: translateY(4px); } }

.alert-panel, .panel, .package, .job-hero { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.alert-panel, .panel, .job-hero { padding: 22px; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 16px; }
.section-head h2, .detail-head h2, .job-hero h2, .booking-layout h2 { margin: 3px 0; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.section-head p:not(.eyebrow), .detail-head p, .job-hero p { color: var(--muted); margin: 4px 0 0; }
.alert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.alert-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; text-align: left; min-height: 76px; padding: 14px; background: var(--surface-2); }
.alert-card strong, .alert-card small { display: block; }.alert-card small { color: var(--muted); margin-top: 3px; }
.alert-card em { color: var(--accent); font-style: normal; font-weight: 800; font-size: .78rem; }
.alert-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.danger .alert-icon { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }.neutral .alert-icon { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.metric-grid article { padding: 17px 18px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.metric-grid span, .metric-grid small, .fact-grid small { display: block; color: var(--muted); }.metric-grid strong { display: block; font-size: 1.65rem; margin: 5px 0 2px; }
.next-job { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 188px; padding: 30px 32px; color: #f4fbff; background: linear-gradient(125deg, #0d2a3c 0%, #11465e 68%, #0b647f 100%); border-radius: 18px; box-shadow: 0 18px 42px rgba(9, 37, 51, .18); }
.next-job .overline { margin: 0 0 10px; color: #91cbdc; font-size: .72rem; font-weight: 850; letter-spacing: .15em; }
.next-job-time { display: flex; align-items: center; gap: 10px; }.next-job-time strong { font-size: 2rem; line-height: 1; }.next-job-time span { padding: 5px 9px; color: #c9eff8; background: rgba(255,255,255,.1); border-radius: 99px; font-size: .75rem; font-weight: 750; }
.next-job h2 { margin: 14px 0 5px; font-size: 1.35rem; }.next-job p:last-child { margin: 0; color: #c5d6de; }.next-job p span { margin: 0 5px; color: #6e9bad; }
.next-job-action { min-width: 145px; padding: 13px 16px; color: var(--nav); background: #fff; border: 0; font-weight: 800; }.next-job-action span { margin-left: 12px; }
.today-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.today-summary button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; min-height: 96px; padding: 18px 22px; text-align: left; border: 0; border-right: 1px solid var(--line); border-radius: 0; }.today-summary button:last-child { border-right: 0; }.today-summary strong { grid-row: 1 / 3; align-self: center; color: var(--ink); font-size: 1.7rem; }.today-summary span { align-self: end; color: var(--ink); font-weight: 750; }.today-summary small { color: var(--muted); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 18px; }
.agenda-panel, .focus-panel { padding: 22px; }.agenda-panel .section-head, .focus-panel .section-head { align-items: center; }.agenda-panel .section-head h2, .focus-panel .section-head h2 { margin-top: 0; }
.focus-row { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; align-items: center; min-height: 74px; padding: 12px 0; text-align: left; border-width: 1px 0 0; border-radius: 0; }.focus-row strong, .focus-row small { display: block; }.focus-row small { margin-top: 4px; color: var(--muted); }.focus-row em { color: var(--accent); font-size: .75rem; font-style: normal; font-weight: 800; }.focus-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-radius: 50%; font-weight: 900; }.focus-icon.warning { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.focus-divider { height: 1px; margin: 14px 0 18px; background: var(--line); }.section-head.compact { margin-bottom: 2px; }.section-head.compact h3 { margin: 0; font-size: 1rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr); gap: 14px; }
.schedule-row { display: grid; grid-template-columns: 52px 13px 1fr auto; gap: 12px; align-items: center; min-height: 66px; border-top: 1px solid var(--line); }
.schedule-row time { font-weight: 800; }.schedule-row strong, .schedule-row small { display: block; }.schedule-row small { color: var(--muted); margin-top: 3px; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }.timeline-dot.success { background: var(--good); }.timeline-dot.warning { background: var(--warn); }
.chip { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 99px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--accent); font-size: .73rem; font-weight: 800; white-space: nowrap; }
.chip.success { color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }.chip.warning { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }.chip.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }.chip.muted { color: var(--muted); background: var(--surface-2); }
.person-row { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; text-align: left; border-width: 1px 0 0; border-radius: 0; padding: 12px 0; }
.person-row strong, .person-row small { display: block; }.person-row small { color: var(--muted); margin-top: 2px; }.person-row em { font-style: normal; color: var(--accent); font-size: .72rem; font-weight: 800; }

.detail-head, .job-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }.detail-head .large { width: 54px; height: 54px; font-size: 1rem; }.detail-head .detail-actions, .job-hero .detail-actions { margin-left: auto; }
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }.detail-layout .timeline { grid-column: 1 / -1; }
.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }.fact-grid > div { padding: 12px; background: var(--surface-2); border-radius: calc(var(--radius) - 2px); }.fact-grid strong { display: block; margin-top: 4px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; margin: 14px 0; }dt { color: var(--muted); }dd { margin: 0; font-weight: 650; text-align: right; }
.timeline > div { display: grid; grid-template-columns: 12px 1fr auto; gap: 11px; align-items: start; padding: 10px 0; }.timeline > div > span { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--accent); }.timeline p { margin: 0; }.timeline p strong, .timeline p small { display: block; }.timeline p small, .timeline time { color: var(--muted); }

.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }.package { position: relative; padding: 23px; text-align: left; }.package.featured { border: 2px solid var(--accent); transform: translateY(-5px); }.package h3 { font-size: 1.3rem; margin: 6px 0; }.package > strong { font-size: 2rem; }.package p { color: var(--muted); min-height: 44px; }.package li { margin: 9px 0; }.package span { display: block; text-align: center; margin-top: 18px; padding: 10px; border: 1px solid var(--line); border-radius: calc(var(--radius) - 2px); font-weight: 750; }
.proposal-total { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 18px; align-items: center; }.proposal-total small, .proposal-total strong { display: block; }.proposal-total small { color: var(--muted); }.proposal-total strong { margin-top: 4px; }

.booking-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: 20px; }.lede { color: var(--muted); }.calendar-strip, .slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0; }.calendar-strip button small { display: block; margin-top: 5px; }.calendar-strip button.active, .slot-grid button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }.slot-grid { grid-template-columns: repeat(3, 1fr); }.slot-grid button { min-height: 54px; }.slot-grid button small { display: block; color: var(--danger); }.slot-grid button:disabled { opacity: .65; cursor: not-allowed; }.booking-summary h3 { font-size: 1.25rem; }.sync-state { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }.sync-state strong, .sync-state small { display: block; }.sync-state small { color: var(--muted); }.pulse { width: 11px; height: 11px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 13%, transparent); }
.inline-error { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; margin-top: 18px; padding: 13px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-radius: var(--radius); }.inline-error > span { color: var(--danger); font-weight: 900; }.inline-error p { margin: 3px 0; color: var(--muted); }

.job-hero { justify-content: space-between; }.job-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; }.checklist label { display: flex; align-items: center; gap: 11px; min-height: 48px; border-top: 1px solid var(--line); }.checklist input { width: 20px; height: 20px; accent-color: var(--accent); }.checklist .primary { width: 100%; margin-top: 14px; }.upload { width: 100%; min-height: 70px; border-style: dashed; color: var(--accent); background: var(--surface-2); }

.builder-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; }.field-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; min-height: 60px; border-top: 1px solid var(--line); }.field-row strong, .field-row code { display: block; }.field-row code { color: var(--accent); margin-top: 3px; }.field-row em { color: var(--muted); font-size: .73rem; font-style: normal; }.tabs { display: flex; gap: 5px; }.tabs button { border: 0; background: transparent; }.tabs button.active { color: var(--accent); border-bottom: 2px solid var(--accent); }pre { overflow: auto; margin: 10px 0; padding: 17px; border-radius: calc(var(--radius) - 2px); background: var(--nav); color: var(--nav-ink); line-height: 1.55; }.test-result { display: flex; gap: 11px; padding: 12px; border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line)); background: color-mix(in srgb, var(--good) 8%, var(--surface)); border-radius: calc(var(--radius) - 2px); }.test-result > span { color: var(--good); font-weight: 900; }.test-result strong, .test-result small { display: block; }.test-result small { color: var(--muted); margin-top: 3px; }

.health-list { display: grid; gap: 9px; margin-bottom: 14px; }.health-list article { display: grid; grid-template-columns: 42px 1fr auto auto; gap: 13px; align-items: center; min-height: 68px; padding: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }.health-list article.issue { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }.health-list strong, .health-list small { display: block; }.health-list small { color: var(--muted); margin-top: 3px; }.provider { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-weight: 900; background: var(--surface-2); }.provider.cal { color: #7047eb; }.provider.google { color: #2878da; }.provider.sms { color: var(--danger); }.provider.web { color: var(--accent); }.failure-detail { display: grid; grid-template-columns: 1fr 2fr auto; gap: 18px; align-items: center; }.failure-detail .fact-grid { margin: 0; grid-template-columns: repeat(4, 1fr); }

.mobile-nav { display: none; }

html[data-theme="blueprint"] .workspace { background-image: none; }
html[data-theme="shop"] .eyebrow { font-family: ui-monospace, monospace; } html[data-theme="shop"] .panel, html[data-theme="shop"] .alert-panel { background-image: linear-gradient(135deg, transparent 75%, rgba(255,255,255,.015)); }
html[data-theme="warm"] .metric-grid article, html[data-theme="warm"] .panel { border-color: #e4dbcf; }

@media (max-width: 1050px) {
  .sidebar { width: 78px; }.brand span:last-child, .nav-item:not(.active) b, .nav-item { font-size: 0; }.brand { padding-inline: 5px; }.nav-item span { font-size: 1rem; }.nav-item b { font-size: .7rem; }.sidebar-foot { display: none; }
  .topbar { left: 78px; }.workspace { margin-left: 78px; }.alert-grid { grid-template-columns: 1fr; }.failure-detail { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar { display: none; }.topbar { position: sticky; inset: 0 0 auto; height: 68px; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 96%, transparent); }.topbar .eyebrow { display: none; }.topbar h1 { font-size: 1.2rem; }.top-actions .icon-button { display: none; }.top-actions .primary { display: flex; align-items: center; gap: 4px; padding: 9px 12px; white-space: nowrap; font-size: .82rem; }
  .workspace { margin: 0; padding: 14px 14px 94px; overflow: hidden; }.direction-picker { grid-template-columns: 1fr; padding: 12px; overflow: hidden; }.direction-picker > p { grid-column: 1; }.segmented { justify-self: stretch; width: 100%; max-width: 100%; overflow-x: auto; }.segmented button { flex: 1 0 auto; font-size: .76rem; }
  .next-job { display: block; min-height: 0; padding: 20px; border-radius: 16px; }.next-job-time { align-items: flex-start; flex-direction: column; gap: 8px; }.next-job-time strong { font-size: 1.8rem; }.next-job h2 { font-size: 1.15rem; }.next-job p:last-child { font-size: .84rem; line-height: 1.5; }.next-job-action { width: 100%; margin-top: 18px; }
  .today-summary { display: none; }.today-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }.agenda-panel, .focus-panel { padding: 17px; }.focus-divider, .focus-panel .compact, .focus-panel .person-row { display: none; }
  .alert-panel, .panel, .job-hero { padding: 15px; }.section-head { display: grid; grid-template-columns: 1fr; gap: 8px; }.section-head h2 { font-size: 1.1rem; }.section-head .text-button { justify-self: start; }.alert-grid, .metric-grid, .dashboard-grid, .detail-layout, .package-grid, .booking-layout, .job-grid, .builder-grid { grid-template-columns: 1fr; }.alert-card { grid-template-columns: 34px minmax(0, 1fr); }.alert-card em { grid-column: 2; justify-self: start; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.metric-grid article { padding: 13px; }.metric-grid article:last-child { grid-column: 1 / -1; }.metric-grid strong { font-size: 1.35rem; }
  .schedule-row { grid-template-columns: 42px 10px minmax(0, 1fr); padding: 9px 0; }.schedule-row .chip { grid-column: 3; }.lead-panel { display: none; }.detail-head, .job-hero { display: grid; grid-template-columns: auto 1fr; }.detail-head .detail-actions, .job-hero .detail-actions { grid-column: 1 / -1; margin: 5px 0 0; }.detail-actions button { flex: 1; }.detail-layout .timeline { grid-column: 1; }.fact-grid { grid-template-columns: repeat(2, 1fr); }.package.featured { transform: none; }.package p { min-height: 0; }.proposal-total { grid-template-columns: repeat(3, 1fr); }.proposal-total .primary { grid-column: 1 / -1; }.calendar-strip { overflow-x: auto; grid-template-columns: repeat(4, minmax(82px, 1fr)); }.slot-grid { grid-template-columns: repeat(2, 1fr); }.inline-error { grid-template-columns: 26px 1fr; }.inline-error button { grid-column: 2; justify-self: start; }.job-hero { box-shadow: none; }.code-panel { overflow: hidden; }.health-list article { grid-template-columns: 38px 1fr auto; }.health-list article > button { grid-column: 2 / -1; justify-self: start; }.failure-detail .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px max(7px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: 0 -8px 24px rgba(12, 34, 46, .06); backdrop-filter: blur(14px); }.mobile-nav button { display: grid; place-items: center; gap: 2px; border: 0; background: transparent; padding: 7px 2px; color: var(--muted); }.mobile-nav button span { font-size: 1rem; line-height: 1; }.mobile-nav button small { font-size: .66rem; }.mobile-nav button.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); font-weight: 800; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

/* Research-led workspace direction: quiet canvas, compact rows, contextual detail. */
html[data-theme="blueprint"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --ink: #18191b;
  --muted: #707276;
  --line: #e5e5e7;
  --accent: #176b87;
  --accent-ink: #ffffff;
  --nav: #f2f2f3;
  --nav-ink: #202124;
  --nav-muted: #73757a;
  --good: #21845a;
  --warn: #b96b20;
  --danger: #c2414d;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .025);
  --font: Lato, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="blueprint"] body { background: var(--surface); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="blueprint"] .sidebar {
  width: 220px;
  padding: 18px 12px 14px;
  color: var(--nav-ink);
  background: var(--nav);
  border-right: 1px solid var(--line);
}
html[data-theme="blueprint"] .brand { padding: 0 8px 20px; }
html[data-theme="blueprint"] .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  transform: none;
  font-size: .8rem;
}
html[data-theme="blueprint"] .brand-mark img { width: 30px; height: 30px; display: block; }
html[data-theme="blueprint"] .brand strong { font-size: .86rem; letter-spacing: -.01em; }
html[data-theme="blueprint"] .brand small { color: #8a8c90; letter-spacing: .08em; }
html[data-theme="blueprint"] .main-nav { gap: 2px; }
html[data-theme="blueprint"] .nav-item,
html[data-theme="blueprint"] .sidebar-foot button {
  min-height: 38px;
  padding: 0 10px;
  color: var(--nav-muted);
  border-radius: 6px;
  font-size: .85rem;
}
html[data-theme="blueprint"] .nav-item span { display: grid; place-items: center; }
html[data-theme="blueprint"] .nav-item span svg { width: 16px; height: 16px; }
html[data-theme="blueprint"] .nav-item:hover { background: #e9e9eb; color: var(--nav-ink); }
html[data-theme="blueprint"] .nav-item.active { background: #e4e4e6; color: #17181a; font-weight: 700; }
html[data-theme="blueprint"] .nav-item.active span { color: #17181a; }
html[data-theme="blueprint"] .nav-item b { background: #dddde0; color: #5c5e62; }
html[data-theme="blueprint"] .user { border-color: #dedee0; }
html[data-theme="blueprint"] .user small { color: var(--nav-muted); }
html[data-theme="blueprint"] .sidebar-foot button { gap: 11px; }
html[data-theme="blueprint"] .sidebar-foot button svg { width: 15px; height: 15px; }
.settings-group { margin-bottom: 2px; }
.settings-toggle .settings-chevron { width: 13px !important; height: 13px !important; margin-left: auto; transition: transform .16s ease; }
.settings-group.open .settings-chevron { transform: rotate(90deg); }
.settings-subnav { display: none; gap: 2px; margin: 2px 0 5px 14px; padding-left: 13px; border-left: 1px solid #d7d7da; }
.settings-group.open .settings-subnav { display: grid; }
html[data-theme="blueprint"] .settings-subnav button { position: relative; min-height: 34px; padding: 0 8px; font-size: .78rem; }
html[data-theme="blueprint"] .settings-subnav button.active { color: var(--nav-ink); background: #e4e4e6; font-weight: 700; }
.settings-subnav button i { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

html[data-theme="blueprint"] .topbar {
  left: 220px;
  height: 62px;
  padding: 10px 24px;
  justify-content: center;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
}
.mobile-brand { display: none; }
.mobile-brand small { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.command-search {
  width: min(480px, 46vw);
  min-height: 36px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: #8a8c90;
}
.command-search > svg { width: 14px; height: 14px; }
.command-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .8rem; }
.command-search input::placeholder { color: #8a8c90; }
.command-search kbd { padding: 2px 5px; border: 1px solid #dddde0; border-radius: 4px; background: #fff; color: #8a8c90; font: 650 .63rem var(--font); }
html[data-theme="blueprint"] .top-actions { position: absolute; right: 24px; }
html[data-theme="blueprint"] .top-actions button { min-height: 36px; padding-block: 7px; border-radius: 7px; font-size: .8rem; }
.notification-button { font-size: 1.4rem !important; position: relative; }
.notification-button svg { width: 15px; height: 15px; }
.notification-button::after { content: ""; position: absolute; top: 8px; right: 9px; width: 5px; height: 5px; background: var(--danger); border-radius: 50%; }

html[data-theme="blueprint"] .workspace {
  max-width: none;
  margin-left: 220px;
  padding: 94px 36px 48px;
  background: var(--surface);
}
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.page-heading h1 { margin: 5px 0 6px; font-size: clamp(1.65rem, 2.3vw, 2.05rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: .92rem; }
.inline-summary { display: flex; align-items: stretch; }
.inline-summary button { display: grid; grid-template-columns: auto auto; gap: 5px; align-items: baseline; padding: 2px 18px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--muted); }
.inline-summary button:last-child { border-right: 0; padding-right: 0; }
.inline-summary strong { color: var(--ink); font-size: .98rem; }
.inline-summary span { font-size: .76rem; }

.date-strip { display: flex; align-items: stretch; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.date-strip button { position: relative; width: 74px; min-height: 58px; display: grid; grid-template-columns: 1fr; place-items: center; gap: 1px; padding: 7px 12px 10px; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.date-strip button span { font-size: .66rem; }
.date-strip button strong { color: var(--ink); font-size: .9rem; }
.date-strip button i { position: absolute; bottom: -21px; display: none; }
.date-strip button.active::after { content: ""; position: absolute; inset: auto 8px -1px; height: 2px; background: var(--ink); }
.date-strip button.active span, .date-strip button.active strong { color: var(--ink); font-weight: 800; }

.dashboard-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 316px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.agenda-workspace { min-width: 0; }
.agenda-toolbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 16px 11px 20px; border-bottom: 1px solid var(--line); }
.agenda-toolbar h2 { display: inline; margin: 0 7px 0 0; font-size: .94rem; }
.agenda-toolbar > div:first-child > span { color: var(--muted); font-size: .76rem; }
.view-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.view-switch button { min-height: 28px; padding: 4px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: .72rem; }
.view-switch button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 700; }
.agenda-columns { display: grid; grid-template-columns: 90px minmax(210px, 1fr) minmax(120px, .45fr) 110px; min-height: 34px; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--line); background: #fafafa; color: #95979b; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.agenda-columns span:first-child { padding-left: 2px; }
.appointment-row { position: relative; width: 100%; min-height: 82px; display: grid; grid-template-columns: 72px 18px minmax(210px, 1fr) minmax(120px, .45fr) 104px 14px; gap: 0; align-items: center; padding: 0 16px 0 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); text-align: left; }
.appointment-row:hover { background: #fafbfb; }
.appointment-row.selected { background: #f4f8f9; box-shadow: inset 3px 0 0 var(--accent); }
.appointment-time strong, .appointment-time small { display: block; }
.appointment-time strong { font-size: .9rem; letter-spacing: -.01em; }
.appointment-time small { margin-top: 1px; color: var(--muted); font-size: .62rem; }
.appointment-line { height: 100%; display: grid; place-items: center; }
.appointment-line::before { content: ""; position: absolute; width: 1px; height: 100%; background: #e5e5e7; }
.appointment-line i { position: relative; z-index: 1; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.appointment-line i.warning { background: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.appointment-main { padding-left: 12px; min-width: 0; }
.appointment-main strong, .appointment-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appointment-main strong { font-size: .87rem; }
.appointment-main small { margin-top: 5px; color: var(--muted); font-size: .73rem; }
.appointment-assignee { display: flex; align-items: center; gap: 7px; color: #55575b; font-size: .75rem; }
.small-avatar { width: 24px; height: 24px; background: #ececef; color: #5e6065; font-size: .58rem; }
.status-dot { display: flex; align-items: center; gap: 6px; color: #55575b; font-size: .71rem; }
.status-dot i { width: 6px; height: 6px; border-radius: 50%; background: #9a9ca0; }
.status-dot.confirmed i { background: var(--good); }.status-dot.conflict { color: var(--warn); }.status-dot.conflict i { background: var(--warn); }.status-dot.paid i { background: var(--accent); }
.row-arrow { color: #a3a5a8; font-size: 1.15rem; }
.add-block { margin: 10px 20px 14px 110px; padding: 6px 0; border: 0; background: transparent; color: var(--muted); font-size: .73rem; }

.day-context { padding: 20px; border-left: 1px solid var(--line); background: #fafafa; }
.context-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .07em; }
.context-head button { margin-left: auto; padding: 2px 4px; border: 0; background: transparent; color: var(--muted); }
.context-head button svg { width: 16px; height: 16px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 12%, transparent); }
.context-time { display: flex; align-items: baseline; gap: 5px; margin-top: 28px; }
.context-time strong { font-size: 2.15rem; letter-spacing: -.06em; line-height: 1; }
.context-time span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.day-context h2 { margin: 20px 0 4px; font-size: 1.14rem; letter-spacing: -.02em; }
.day-context > p { margin: 0; color: var(--muted); font-size: .8rem; }
.day-context dl { margin: 24px 0 20px; padding: 16px 0; border-block: 1px solid var(--line); gap: 11px 15px; font-size: .76rem; }
.day-context dd { color: #343538; }
.context-action { width: 100%; display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 7px; }
.context-note { display: flex; gap: 9px; align-items: center; margin-top: 14px; color: var(--good); }
.context-note > span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--good) 10%, white); font-size: .7rem; }
.context-note p { margin: 0; }.context-note strong, .context-note small { display: block; }.context-note strong { color: #45474b; font-size: .72rem; }.context-note small { margin-top: 2px; color: var(--muted); font-size: .64rem; }

.attention-list { max-width: calc(100% - 334px); margin-top: 28px; }
.attention-title { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.attention-title h2 { margin: 0; font-size: .88rem; }
.attention-title > span { min-width: 18px; padding: 2px 5px; border-radius: 99px; background: #ededee; color: var(--muted); text-align: center; font-size: .62rem; }
.attention-list > button { width: 100%; min-height: 56px; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); border-radius: 0; text-align: left; }
.attention-list > button strong, .attention-list > button small { display: block; }
.attention-list > button strong { font-size: .78rem; }.attention-list > button small { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.attention-list > button em { color: var(--accent); font-size: .7rem; font-style: normal; font-weight: 700; }
.attention-symbol { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: #edf4f6; color: var(--accent); font-size: .7rem; font-weight: 800; }.attention-symbol.warning { background: #fff3e8; color: var(--warn); }

@media (max-width: 1050px) and (min-width: 761px) {
  html[data-theme="blueprint"] .sidebar { width: 70px; }
  html[data-theme="blueprint"] .topbar { left: 70px; }
  html[data-theme="blueprint"] .workspace { margin-left: 70px; }
  .dashboard-workspace { grid-template-columns: minmax(0, 1fr) 280px; }
  .agenda-columns { grid-template-columns: 90px 1fr 100px; }.agenda-columns span:nth-child(3) { display: none; }
  .appointment-row { grid-template-columns: 72px 18px minmax(170px, 1fr) 100px 14px; }.appointment-assignee { display: none; }
  .attention-list { max-width: calc(100% - 298px); }
}

@media (max-width: 760px) {
  html[data-theme="blueprint"] body { background: #fff; }
  html[data-theme="blueprint"] .topbar { position: sticky; left: 0; height: 58px; justify-content: space-between; padding: 9px 14px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }.mobile-brand .brand-mark { display: grid; }
  .command-search { width: 36px; min-height: 36px; display: grid; grid-template-columns: 1fr; place-items: center; margin-left: auto; padding: 0; border: 0; background: transparent; font-size: 1.1rem; }
  .command-search > svg { width: 17px; height: 17px; }
  .command-search input, .command-search kbd { display: none; }
  html[data-theme="blueprint"] .top-actions { position: static; margin-left: 5px; }
  .notification-button { display: none; }
  html[data-theme="blueprint"] .top-actions .primary { min-height: 34px; padding: 7px 10px; font-size: .75rem; }
  html[data-theme="blueprint"] .workspace { margin: 0; padding: 22px 14px 92px; overflow: visible; }
  .page-heading { display: block; margin-bottom: 20px; }
  .page-heading h1 { margin-top: 5px; font-size: 1.5rem; letter-spacing: -.02em; }
  .page-heading > div > p:last-child { font-size: .82rem; }
  .inline-summary { display: none; }
  .date-strip { gap: 4px; margin-inline: -14px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
  .date-strip::-webkit-scrollbar { display: none; }
  .date-strip button { flex: 1 0 62px; width: auto; min-height: 54px; padding-inline: 8px; }
  .dashboard-workspace { display: block; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
  .agenda-workspace { border-top: 1px solid var(--line); }
  .agenda-toolbar { min-height: 57px; padding: 10px 0; }
  .agenda-toolbar h2 { font-size: .9rem; }.agenda-toolbar > div:first-child > span { display: block; margin-top: 3px; font-size: .66rem; }
  .view-switch { display: none; }.agenda-columns { display: none; }
  .appointment-row { min-height: 88px; grid-template-columns: 54px 16px minmax(0, 1fr) 12px; padding: 0; }
  .appointment-row.selected { margin-inline: -8px; width: calc(100% + 16px); padding-inline: 8px; background: #f4f8f9; box-shadow: none; border-radius: 8px; border-bottom-color: transparent; }
  .appointment-time strong { font-size: .82rem; }.appointment-time small { font-size: .58rem; }
  .appointment-line::before { height: 88px; }
  .appointment-main { padding-left: 10px; }
  .appointment-main strong { font-size: .84rem; }.appointment-main small { margin-top: 4px; font-size: .68rem; }
  .appointment-assignee, .status-dot { display: none; }
  .row-arrow { justify-self: end; }
  .add-block { margin: 8px 0 0 80px; padding: 7px 0; }
  .day-context { display: none; }
  .attention-list { max-width: none; margin-top: 30px; }
  .attention-list > button { min-height: 62px; }
  .attention-list > button strong { font-size: .76rem; }.attention-list > button small { font-size: .66rem; }
  .mobile-nav { min-height: 58px; box-shadow: 0 -1px 0 rgba(0,0,0,.04); }
  .mobile-nav button { gap: 4px; }
  .mobile-nav button svg { width: 17px; height: 17px; }
  .mobile-nav button.active { background: transparent; }
}
