:root {
  color: var(--brand-ink);
  background: var(--brand-paper);
  font-family: var(--font-ui);
  font-synthesis: none;
  --line: rgba(10, 10, 8, .15);
  --muted: #6c665f;
  --success: #16704a;
  --warning: #9b5d00;
  --shadow: 0 18px 60px rgba(10, 10, 8, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--brand-paper); }
[hidden] { display: none !important; }
noscript { display: block; padding: 1rem; color: white; background: var(--brand-control-black); text-align: center; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid var(--brand-polo-red); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 1rem; padding: .8rem 1rem; color: white; background: var(--brand-control-black); }
.skip-link:focus { top: 1rem; }
.eyebrow { margin: 0 0 .55rem; color: var(--brand-red-accessible); font: 750 .72rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 1rem; }
.pulse-mark { width: 2.4rem; aspect-ratio: 1; border: 7px solid var(--brand-polo-red); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(440px, 1.1fr); background: var(--brand-canvas-cream); }
.login-story { position: relative; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(2rem, 7vw, 7rem); color: white; background: var(--brand-control-black); }
.login-story::after { content: ""; position: absolute; width: 33rem; height: 33rem; right: -15rem; bottom: -14rem; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 5rem rgba(220,49,39,.08), 0 0 0 10rem rgba(255,255,255,.035); }
.wordmark { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; font: 800 1.1rem var(--font-display); letter-spacing: -.02em; }
.product-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; color: white; background: var(--brand-polo-red); border: 1px solid currentColor; font: 800 1.25rem/1 var(--font-editorial); }
.wordmark strong { display: block; }
.wordmark small { display: block; color: rgba(255,255,255,.6); font: 650 .58rem var(--font-display); letter-spacing: .16em; }
.attribution { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .55rem; width: max-content; color: inherit; text-decoration: none; font-size: .7rem; opacity: .72; }
.attribution:hover { opacity: 1; }
.attribution img { width: 1.75rem; height: 1.75rem; object-fit: cover; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; }
.attribution strong { font-family: var(--font-display); }
.login-copy { position: relative; z-index: 1; max-width: 39rem; }
.login-copy h1 { margin: 0; max-width: 11ch; font: 500 clamp(3rem, 6vw, 6.6rem)/.91 var(--font-editorial); letter-spacing: -.065em; }
.login-copy h1 em { color: var(--brand-red-dark-accent); font-style: normal; }
.login-copy > p { max-width: 34rem; margin: 2rem 0 0; color: rgba(255,255,255,.67); font: 500 clamp(1rem, 1.4vw, 1.25rem)/1.55 var(--font-display); }
.login-story-bottom { position: relative; z-index: 1; display: grid; gap: 1.25rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.4rem; color: rgba(255,255,255,.58); font: 650 .68rem var(--font-display); letter-spacing: .09em; text-transform: uppercase; }
.trust-row span::before { content: ""; display: inline-block; width: .42rem; height: .42rem; margin-right: .5rem; background: var(--brand-red-dark-accent); border-radius: 50%; }
.login-panel { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(31rem, 100%); padding: clamp(2rem, 5vw, 4.5rem); background: var(--brand-surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card h2 { margin: 0; font: 650 clamp(2rem, 4vw, 3.2rem)/1 var(--font-editorial); letter-spacing: -.045em; }
.login-card > p { margin: 1.25rem 0 2rem; color: var(--muted); line-height: 1.65; }
.field { display: grid; gap: .55rem; margin-bottom: 1rem; }
.field span { font: 700 .75rem var(--font-display); letter-spacing: .05em; text-transform: uppercase; }
.field input { width: 100%; border: 1px solid var(--brand-ink); padding: .9rem 1rem; background: white; }
.field-help { margin: -.35rem 0 1rem !important; color: var(--muted); font-size: .78rem; line-height: 1.4 !important; }
.button-primary, .button-ink, .button-quiet { min-height: 3rem; border: 1px solid transparent; padding: .75rem 1rem; font: 730 .82rem var(--font-display); }
.button-primary { color: white; background: var(--brand-polo-red); }
.button-primary:hover { background: var(--brand-red-accessible); }
.button-ink { color: white; background: var(--brand-control-black); }
.button-quiet { color: var(--brand-ink); border-color: rgba(10,10,8,.45); background: transparent; }
.login-card .button-primary { width: 100%; }
.error-copy { min-height: 1.3rem; color: var(--brand-red-accessible); font-size: .86rem; }

.gallery-page { min-height: 100vh; }
.site-header { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1.2rem, 4vw, 4rem); color: white; background: var(--brand-control-black); border-bottom: 3px solid var(--brand-polo-red); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-actions .button-quiet { color: white; border-color: rgba(255,255,255,.25); }
.gallery-main { padding: clamp(2rem, 6vw, 6rem) clamp(1.2rem, 5vw, 5rem); }
.gallery-intro { display: grid; grid-template-columns: 1fr minmax(20rem, .75fr); gap: 2rem; align-items: end; max-width: 88rem; margin: 0 auto 3rem; }
.gallery-intro h1 { margin: 0; max-width: 12ch; font: 550 clamp(2.8rem, 6vw, 6rem)/.92 var(--font-editorial); letter-spacing: -.065em; }
.gallery-intro p:last-child { max-width: 35rem; color: var(--muted); font: 500 1.08rem/1.65 var(--font-display); }
.persona-grid { max-width: 88rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 auto; border-top: 1px solid var(--brand-ink); border-left: 1px solid var(--brand-ink); }
.persona-card { min-height: 18rem; display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 1.6rem; border: 0; border-right: 1px solid var(--brand-ink); border-bottom: 1px solid var(--brand-ink); background: transparent; transition: background .18s, color .18s, transform .18s; }
.persona-card:hover { z-index: 1; color: white; background: var(--brand-control-black); transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--brand-polo-red); }
.persona-card:focus-visible { z-index: 1; color: white; background: var(--brand-control-black); box-shadow: 4px 4px 0 var(--brand-polo-red); }
.persona-number { color: var(--brand-red-accessible); font: 750 .7rem var(--font-display); letter-spacing: .14em; }
.persona-card h2 { margin: auto 0 .8rem; font: 650 2rem/1.05 var(--font-editorial); letter-spacing: -.04em; }
.persona-card p { min-height: 4.8rem; margin: 0; color: currentColor; opacity: .68; line-height: 1.45; }
.persona-card strong { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4rem; color: var(--brand-ink); font: 750 .78rem var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.persona-card:hover strong, .persona-card:hover .persona-number { color: white; }
.persona-card:focus-visible strong, .persona-card:focus-visible .persona-number { color: white; }
.persona-card:hover p, .persona-card:focus-visible p { color: white; opacity: 1; }
.gallery-main > .simulator { max-width: 88rem; margin-right: auto; margin-left: auto; }
.gallery-footer { max-width: 88rem; margin: 2rem auto 0; }
.gallery-footer .attribution { color: var(--brand-ink); }
.gallery-footer .attribution img { border-color: rgba(10,10,8,.35); }

.shell { min-height: 100vh; display: grid; grid-template-columns: 16rem minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1.5rem; color: white; background: var(--brand-control-black); }
.preview-card { margin-top: 2rem; padding: 1rem; border: 1px solid rgba(255,255,255,.18); }
.preview-card small { color: var(--brand-red-dark-accent); font: 700 .64rem var(--font-display); letter-spacing: .12em; }
.preview-card strong { display: block; margin: .4rem 0; font: 600 1.35rem var(--font-editorial); }
.preview-card span { color: rgba(255,255,255,.58); font-size: .78rem; }
.nav { display: grid; gap: .35rem; margin-top: 2rem; }
.nav a { padding: .75rem; color: rgba(255,255,255,.62); text-decoration: none; font: 650 .8rem var(--font-display); }
.nav a.active { color: white; border-left: 3px solid var(--brand-polo-red); background: rgba(255,255,255,.07); }
.sidebar-bottom { display: grid; gap: .65rem; margin-top: auto; }
.sidebar-bottom button { width: 100%; }
.sidebar-bottom .attribution { margin-top: .35rem; }
.sidebar .button-quiet { color: white; border-color: rgba(255,255,255,.48); }
.workspace { min-width: 0; }
.workspace-header { min-height: 5.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 3rem); border-bottom: 1px solid var(--line); background: rgba(249,243,234,.92); backdrop-filter: blur(12px); }
.property-context { display: flex; align-items: center; gap: .8rem; }
.property-mark { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; color: white; background: var(--brand-control-black); box-shadow: inset 0 -4px 0 var(--property-color, var(--brand-polo-red)); font: 800 .78rem var(--font-display); }
.property-context strong, .property-context small { display: block; }
.property-context small { color: var(--muted); margin-top: .2rem; }
.property-select { border: 1px solid var(--line); padding: .65rem; background: white; max-width: 14rem; }
.live-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .75rem; border: 1px solid var(--line); background: white; font: 730 .67rem var(--font-display); letter-spacing: .07em; }
.live-pill i { width: .48rem; height: .48rem; background: #1d9f68; border-radius: 50%; box-shadow: 0 0 0 .2rem #dff3e9; }
.context-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem clamp(1rem, 3vw, 3rem); color: white; background: var(--brand-polo-red); }
.context-banner p { margin: 0; font: 680 .8rem/1.35 var(--font-display); }
.context-banner button { min-height: auto; padding: .45rem .7rem; color: white; border-color: rgba(255,255,255,.5); }
.dashboard { max-width: 96rem; margin: auto; padding: clamp(1.2rem, 3vw, 3rem); }
.dashboard-hero { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.dashboard-hero h1 { margin: 0; font: 550 clamp(2.6rem, 5vw, 5rem)/.94 var(--font-editorial); letter-spacing: -.06em; }
.dashboard-hero > p { max-width: 32rem; margin: 0; color: var(--muted); line-height: 1.55; }
.simulator { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .75rem 1rem; margin-bottom: 1.4rem; color: white; background: var(--brand-control-black); }
.simulator strong { margin-right: auto; font: 700 .78rem var(--font-display); }
.simulator span { color: rgba(255,255,255,.65); font-size: .75rem; }
.simulator button { min-height: auto; padding: .45rem .7rem; color: white; border-color: rgba(255,255,255,.3); }
.sim-speed { display: inline-flex; align-items: center; gap: .4rem; color: rgba(255,255,255,.7); font: 700 .68rem var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.sim-speed select { min-height: 2rem; border: 1px solid rgba(255,255,255,.42); padding: .25rem 1.75rem .25rem .45rem; color: white; background: var(--brand-control-black); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 1.4rem; border: 1px solid var(--brand-ink); background: var(--brand-ink); }
.metric { min-height: 10rem; padding: 1.2rem; background: var(--brand-surface); }
.metric small { color: var(--muted); }
.metric strong { display: block; margin-top: 1.6rem; font: 650 clamp(2rem, 4vw, 3.4rem)/1 var(--font-editorial); letter-spacing: -.05em; }
.metric.red { color: white; background: var(--brand-polo-red); }
.metric.red small { color: white; }
.limited-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.console { padding: clamp(1.2rem, 2.5vw, 2rem); margin-bottom: 1.4rem; color: white; background: var(--brand-control-black); }
.console-head { display: flex; justify-content: space-between; gap: 1rem; }
.console h2 { margin: 0; font: 600 1.8rem var(--font-editorial); }
.console p { margin: .35rem 0 0; color: rgba(255,255,255,.58); }
.command-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; margin-top: 1.4rem; }
.command-form textarea { min-height: 3.6rem; max-height: 10rem; resize: vertical; border: 1px solid rgba(255,255,255,.3); padding: 1rem; color: white; background: #151314; }
.command-result { margin-top: 1rem; padding: 1rem; border-left: 3px solid var(--brand-red-dark-accent); background: rgba(255,255,255,.07); }
.command-result h3 { margin: 0 0 .4rem; font-family: var(--font-editorial); }
.command-result p { line-height: 1.5; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr); gap: 1.4rem; }
.panel { min-width: 0; padding: 1.3rem; border: 1px solid var(--line); background: var(--brand-surface); }
.panel.wide { grid-row: span 2; }
.panel-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.panel h2 { margin: 0; font: 620 1.65rem var(--font-editorial); letter-spacing: -.025em; }
.count { min-width: 2rem; padding: .3rem .55rem; text-align: center; color: white; background: var(--brand-polo-red); font-weight: 750; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.row strong, .row small { display: block; }
.row small { margin-top: .3rem; color: var(--muted); line-height: 1.35; }
.demo-label { display: inline-block; margin-left: .5rem; padding: .12rem .35rem; color: var(--brand-ink); background: var(--brand-canvas-cream); font: 750 .58rem/1.25 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.badge { align-self: start; padding: .3rem .5rem; color: var(--brand-ink); background: var(--brand-canvas-cream); font: 720 .65rem var(--font-display); text-transform: uppercase; }
.badge.urgent, .badge.failed { color: white; background: var(--brand-polo-red); }
.connector-row { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: .7rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.connector-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; color: white; background: var(--brand-ink); font: 750 .66rem var(--font-display); }
.status-dot { width: .55rem; height: .55rem; background: var(--success); border-radius: 50%; }
.connector-status { display: inline-flex; align-items: center; gap: .35rem; color: var(--success); font: 720 .65rem var(--font-display); text-transform: uppercase; }
.approval { padding: 1rem; margin-top: .8rem; background: var(--brand-canvas-cream); border-left: 3px solid var(--brand-polo-red); }
.approval-actions { display: flex; gap: .6rem; margin-top: .8rem; }
.empty { padding: 2rem 0; color: var(--muted); text-align: center; }
.toast { position: fixed; z-index: 90; right: 1rem; bottom: 1rem; max-width: 24rem; padding: .9rem 1rem; color: white; background: var(--brand-control-black); box-shadow: var(--shadow); }
.toast.error { background: var(--brand-polo-red); }

.executive-portal { display: grid; gap: 1.4rem; }
.executive-metrics { margin-bottom: 0; }
.executive-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .85fr); gap: 1.4rem; }
.executive-wide { grid-column: 1 / -1; }
.fleet-list, .audit-list, .report-list { display: grid; }
.fleet-row { display: grid; grid-template-columns: minmax(12rem, 1.8fr) repeat(2, minmax(6rem, .55fr)) minmax(8rem, .8fr); align-items: center; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.fleet-row strong, .fleet-row small, .audit-row strong, .audit-row small, .report-row strong, .report-row small { display: block; }
.fleet-row small, .audit-row small, .report-row small { margin-top: .2rem; color: var(--muted); line-height: 1.35; }
.health-state { display: inline-flex; align-items: center; gap: .4rem; font: 720 .68rem var(--font-display); text-transform: uppercase; }
.health-state i { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.health-state.healthy { color: var(--success); }
.health-state.attention { color: var(--warning); }
.executive-approval > strong, .executive-approval > small { display: block; margin-top: .45rem; }
.executive-approval > small { color: var(--muted); }
.policy-panel dl { display: grid; margin: 0; }
.policy-panel dl div { display: grid; grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.2fr); gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.policy-panel dt { color: var(--muted); }
.policy-panel dd { margin: 0; font-weight: 650; }
.report-row, .audit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.report-row > span:last-child, .audit-row > span:last-child { text-align: right; }
.audit-search { display: grid; gap: .4rem; margin-bottom: 1rem; font: 700 .7rem var(--font-display); letter-spacing: .05em; text-transform: uppercase; }
.audit-search input { min-height: 2.8rem; border: 1px solid var(--brand-ink); padding: .65rem .8rem; background: white; }

@media (max-width: 950px) {
  .login { grid-template-columns: 1fr; }
  .login-story { min-height: 30rem; }
  .gallery-intro { grid-template-columns: 1fr; }
  .persona-grid { grid-template-columns: repeat(2, 1fr); }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: 1fr auto; gap: 1rem; }
  .preview-card, .nav { display: none; }
  .sidebar-bottom { display: flex; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
  .sidebar-bottom button { width: auto; }
  .sidebar-bottom .attribution { flex-basis: 100%; margin-left: auto; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .executive-grid { grid-template-columns: 1fr; }
  .executive-wide { grid-column: auto; }
  .fleet-row { grid-template-columns: minmax(12rem, 1.5fr) repeat(2, minmax(5.5rem, .5fr)) minmax(8rem, .7fr); }
}

@media (max-width: 640px) {
  .login-story { padding: 2rem 1.25rem; min-height: 34rem; }
  .login-panel { padding: 1rem; }
  .login-card { padding: 1.5rem; }
  .site-header { align-items: flex-start; }
  .header-actions { flex-direction: column; align-items: stretch; }
  .persona-grid { grid-template-columns: 1fr; }
  .persona-card { min-height: 15rem; }
  .workspace-header { align-items: flex-start; flex-wrap: wrap; }
  .property-context { min-width: 0; }
  .property-context > span:last-child { min-width: 0; }
  .property-context strong, .property-context small { overflow-wrap: anywhere; }
  .workspace-header > .header-actions { align-items: flex-end; }
  .context-banner { align-items: flex-start; }
  .dashboard-hero { display: block; }
  .dashboard-hero > p { margin-top: 1rem; }
  .metric-grid, .content-grid { grid-template-columns: 1fr; }
  .fleet-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-row > span:first-child, .health-state { grid-column: 1 / -1; }
  .report-row, .audit-row { grid-template-columns: 1fr; }
  .report-row > span:last-child, .audit-row > span:last-child { text-align: left; }
  .policy-panel dl div { grid-template-columns: 1fr; gap: .3rem; }
  .command-form { grid-template-columns: 1fr; }
  .console-head { display: block; }
  .sidebar { grid-template-columns: 1fr; }
  .sidebar-bottom { justify-content: stretch; }
  .sidebar-bottom button { flex: 1 1 8rem; }
  .sidebar-bottom .attribution { margin-right: auto; margin-left: 0; }
}

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