:root {
  color-scheme: dark;
  --ink: #13110f;
  --rail: #191613;
  --surface: #201c17;
  --lift: #27211a;
  --line: #43392c;
  --gold: #e2be79;
  --gold-dim: #9e8050;
  --warm: #f4e8d4;
  --muted: #bcad97;
  --green: #b0d4b1;
  --rose: #efb6a6;
  font: 16px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--warm); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, select, input, textarea, summary, .table-scroll { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(2rem, 4.6vw, 3.45rem); font-weight: 560; line-height: 1.03; letter-spacing: -.035em; max-width: 18ch; }
h2 { font-size: 1.22rem; line-height: 1.3; font-weight: 630; margin-block-end: 1.15rem; }
h3 { font-size: 1rem; line-height: 1.4; font-weight: 620; }
small, .muted, .metadata, .field-hint, .empty { color: var(--muted); }
small { display: block; font-size: .86rem; }
.muted, .empty { margin-block: .2rem 1rem; font-size: .95rem; }
.metadata, .field-hint { font-size: .83rem; }
.startup { min-height: 100vh; display: grid; align-content: center; justify-content: center; gap: .5rem; color: var(--muted); }
.startup strong { color: var(--gold); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: fixed; inset-block-start: .5rem; inset-inline-start: .5rem; z-index: 20; padding: .7rem 1rem; color: var(--ink); background: var(--gold); }
.shell { display: grid; grid-template-columns: 233px minmax(0, 1fr); min-height: 100vh; }
.rail {
  display: flex; flex-direction: column; position: sticky; inset-block-start: 0; height: 100vh;
  background: var(--rail); border-inline-end: 1px solid var(--line); padding: 2rem 1.15rem 1.3rem;
}
.brand { display: flex; align-items: center; gap: .72rem; font-weight: 690; font-size: 1.2rem; line-height: 1.12; margin-block-end: 2.5rem; padding-inline: .3rem; }
.brand small { font-size: .75rem; font-weight: 480; margin-block-start: .34rem; }
.brand-symbol { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: 0 0 2.4rem; border: 1px solid #9f814d; color: var(--gold); border-radius: .45rem; font-size: 1rem; letter-spacing: -.03em; }
.role-nav { display: grid; gap: .2rem; }
.role-nav button {
  display: block; width: 100%; padding: .7rem .75rem; min-height: 45px; border: 1px solid transparent;
  border-radius: .35rem; color: var(--muted); background: transparent; text-align: start; font-size: .9rem; line-height: 1.3;
}
.role-nav button:hover { color: var(--warm); background: var(--lift); }
.role-nav button[aria-pressed=true] { color: var(--gold); background: #33281a; border-color: #614e33; }
.rail-bottom { margin-block-start: auto; padding-inline: .3rem; padding-block-start: 1.25rem; }
.rail-bottom p { color: var(--muted); font-size: .8rem; max-width: 23ch; margin-block-start: .55rem; }
.badge { display: inline-block; color: var(--gold); border: 1px solid #6b5537; padding: .2rem .5rem; border-radius: .3rem; font-size: .78rem; }
#main { width: 100%; max-width: 1460px; padding: 0 clamp(1rem, 3vw, 3rem) 1.25rem; margin-inline: auto; min-width: 0; }
.topbar {
  min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: .85rem; border-block-end: 1px solid var(--line);
}
.top-role { display: flex; align-items: center; gap: .55rem; font-size: .87rem; color: var(--muted); }
.status-dot { display: inline-block; flex: 0 0 .4rem; height: .4rem; border-radius: 50%; background: var(--gold); }
.top-actions { display: flex; align-items: end; justify-content: flex-end; gap: .55rem; flex-wrap: wrap; }
.top-actions .field span:not(.sr-only) { font-size: .73rem; }
.top-actions select, .top-actions button, .top-actions .button-link { min-height: 40px; font-size: .86rem; }
.hero {
  display: grid; align-items: center; margin-block: 1.5rem 1rem; overflow: hidden; border: 1px solid var(--line);
  border-radius: .6rem; background-color: #231b13;
}
.hero-executive {
  min-height: 317px;
  background-image: linear-gradient(90deg, #231b13 8%, #231b13 33%, #231b13f5 46%, #231b1340 68%, #231b1310),
    url('./owner-demo.webp');
  background-size: cover, 65% auto;
  background-position: center, right 38%;
  background-repeat: no-repeat;
}
[dir=rtl] .hero-executive {
  background-image: linear-gradient(270deg, #231b13 8%, #231b13 33%, #231b13f5 46%, #231b1340 68%, #231b1310), url('./owner-demo.webp');
  background-position: center, left 38%;
}
.hero-copy { max-width: min(650px, 61%); padding: clamp(1.6rem, 4vw, 3.1rem); }
.hero-role .hero-copy { max-width: 60rem; }
.hero-role h1 { font-size: clamp(1.9rem, 3.5vw, 2.85rem); max-width: none; }
.hero-copy > p:not(.eyebrow) { margin-block-start: 1rem; color: #e3d2ba; max-width: 47ch; }
.eyebrow { font-size: .82rem; font-weight: 610; color: var(--gold); margin-block-end: .75rem; }
.walkthrough { margin-block-start: 1.25rem; font-size: .87rem; }
.walkthrough summary { color: var(--gold); cursor: pointer; width: fit-content; font-weight: 560; padding: .2rem 0; }
.walkthrough ol { padding-inline-start: 1.15rem; margin-block: .55rem 0; color: var(--warm); }
.walkthrough li + li { margin-block-start: .25rem; }
.metric-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: .5rem;
  background: #1d1915; margin-block: 0 1rem; overflow: hidden;
}
.metric-strip > div { padding: .8rem 1rem 1rem; display: flex; flex-direction: column-reverse; gap: .15rem; }
.metric-strip > div:not(:last-child) { border-inline-end: 1px solid var(--line); }
.metric-strip dd { font-size: 2rem; line-height: 1; font-weight: 560; font-variant-numeric: tabular-nums; }
.metric-strip dt { color: var(--muted); font-size: .81rem; }
.metric-strip .highlight dd { color: var(--gold); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: start; gap: 1rem; margin-block: 1rem; }
.stack { display: grid; gap: 1rem; }
.panel { min-width: 0; padding: clamp(1rem, 2vw, 1.55rem); background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; }
main > .panel { margin-block: 1rem; }
.field { display: grid; gap: .4rem; min-width: 0; font-size: .89rem; }
.field > span:not(.sr-only) { color: #decdb6; font-weight: 520; }
input:not([type=hidden]), select, textarea {
  display: block; min-width: 0; width: 100%; max-width: 100%; min-height: 43px; border: 1px solid #665643;
  border-radius: .35rem; color: var(--warm); background: #171410; padding: .55rem .7rem;
}
select { padding-inline-end: 1.6rem; }
textarea { resize: vertical; min-height: 74px; }
input::placeholder, textarea::placeholder { color: #ac9d88; }
.action-form { display: grid; gap: .86rem; align-content: start; margin-block-start: 1rem; }
.action-form:first-child { margin-block-start: 0; }
.action-form > button { justify-self: start; }
.field-pair, .split-actions { display: grid; gap: .8rem; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.split-actions { margin-block-start: .35rem; align-items: center; }
.split-actions .action-form { margin-block-start: 0; }
.split-actions + .action-form { border-block-start: 1px solid var(--line); padding-block-start: 1rem; }
.primary, .secondary {
  min-height: 43px; padding: .64rem .92rem; border-radius: .36rem; border: 1px solid transparent;
  font-weight: 620; line-height: 1.25; text-align: center; background: var(--gold); color: #24190f;
}
.primary:hover { background: #f1d197; }
.secondary { background: #201b15; border-color: #6b563b; color: var(--gold); }
.secondary:hover { background: #352a1b; border-color: var(--gold-dim); }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.demo-login { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-card { width: min(100%, 470px); padding: clamp(1.25rem, 4vw, 2.65rem); }
.login-header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-block-end: 1.5rem; }
.login-header .brand { margin: 0; padding: 0; }
.login-header select { min-height: 38px; }
.login-card h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
.login-card h1 + p { margin-block: .7rem 1.2rem; }
.login-error { color: var(--rose); font-size: .9rem; }
.login-explore { display: inline-block; color: var(--gold); margin-block-start: 1.2rem; text-underline-offset: .22em; }
.login-footer { color: var(--muted); border-block-start: 1px solid var(--line); margin-block-start: 1.2rem; padding-block-start: .75rem; font-size: .82rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.dot-report { margin-block-start: .9rem; padding: 1rem; border: 1px solid #594831; border-radius: .45rem; background: #1a1611; }
.dot-person { display: flex; align-items: center; gap: .65rem; }
.dot-orbit { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; border-radius: 50%; border: 1px solid var(--gold-dim); color: var(--gold); font-size: .79rem; }
.dot-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: .5rem; margin-block: .85rem .25rem; }
.dot-metrics > div { display: grid; grid-template-rows: auto 1fr; gap: .15rem; }
.dot-metrics dt { color: var(--muted); font-size: .76rem; }
.dot-metrics dd { font-size: 1.32rem; font-variant-numeric: tabular-nums; }
.dot-focus { list-style: none; padding: .72rem 0 0; margin: .6rem 0 0; border-block-start: 1px solid var(--line); font-size: .84rem; display: grid; gap: .28rem; }
.dot-focus li { display: flex; flex-wrap: wrap; gap: .6rem; }
.dot-focus li strong { color: var(--gold); font-weight: 520; }
.dot-focus li span { min-width: 0; overflow-wrap: anywhere; }
.task-list, .partner-list, .activity-list, .sales-outcomes { display: grid; gap: .7rem; }
.task { border-block-start: 1px solid var(--line); padding-block-start: .8rem; }
.task:first-child { border-block-start: 0; padding-block-start: 0; }
.task h3, .task p, .task-result { overflow-wrap: anywhere; }
.task p:not(.metadata) { margin-block-start: .35rem; font-size: .92rem; white-space: pre-wrap; }
.task-header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .35rem .75rem; }
.task-result { background: #1c241b; border-inline-start: 2px solid #83a482; margin-block-start: .55rem; padding: .5rem .65rem; font-size: .86rem; }
.task-result strong { color: var(--green); }
.task-controls { margin-block-start: 1rem; border-block-start: 1px solid var(--line); padding-block-start: 1rem; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li, .record { display: flex; justify-content: space-between; align-items: flex-start; gap: .4rem 1rem; }
.activity-list li { border-block-end: 1px solid var(--line); padding-block-end: .6rem; font-size: .89rem; }
.activity-list time { font-size: .78rem; color: var(--muted); min-width: max-content; }
.record { background: #1a1713; border-radius: .3rem; padding: .72rem .8rem; margin-block: .65rem; overflow-wrap: anywhere; }
.record small { margin-block-start: .14rem; }
.partner-list .record, .sales-outcomes .record { margin: 0; }
.contact { color: var(--gold); font-size: .9rem; min-width: max-content; direction: ltr; }
.pill {
  display: inline-block; white-space: nowrap; border-radius: .25rem; padding: .1rem .45rem; color: #ded0ba;
  border: 1px solid #5d4d39; background: #30271e; font-size: .76rem; font-weight: 560;
}
.pill.positive { color: var(--green); background: #273324; border-color: #506048; }
.pill.negative { color: var(--rose); background: #432a23; border-color: #734b3e; }
.pill.gold { color: var(--gold); background: #3c2e20; border-color: #6f5836; }
.table-scroll { width: 100%; overflow-x: auto; }
table { inline-size: 100%; min-width: 570px; border-collapse: collapse; font-size: .91rem; }
th, td { text-align: start; padding: .8rem .65rem; border-block-end: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: .83rem; color: var(--muted); font-weight: 560; }
tbody tr:last-child > * { border-block-end: 0; }
tbody th { font-weight: 530; }
.unavailable {
  display: flex; gap: .8rem; align-items: center; margin-block-start: 1rem; border-block-start: 1px solid var(--line);
  padding-block-start: .85rem; color: var(--muted); font-size: .81rem;
}
.unavailable button { padding: .48rem .62rem; color: #c0af96; background: #2c2720; border: 1px dashed #796750; border-radius: .35rem; }
.unavailable strong { color: #e6cfad; }
.footer { color: var(--muted); font-size: .82rem; margin-block-start: 1.5rem; padding-block-start: .75rem; border-block-start: 1px solid var(--line); }
.notice {
  position: fixed; z-index: 25; inset-block-end: 1.25rem; inset-inline-end: 1.25rem; padding: .8rem 1rem; max-width: min(470px, calc(100vw - 2.5rem));
  border: 1px solid #a78b59; background: #362c1d; color: var(--warm); border-radius: .4rem; box-shadow: 0 .7rem 2rem #0007;
}
.notice.bad { border-color: #bb8475; background: #432a23; }
@media (max-width: 1190px) {
  .shell { grid-template-columns: 205px minmax(0, 1fr); }
  .rail { padding-inline: .9rem; }
  .hero-executive { background-size: cover, auto 100%; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; padding: .8rem 1rem .7rem; border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .brand { margin-block-end: .7rem; }
  .role-nav { display: flex; overflow-x: auto; padding-block: .25rem; padding-inline: .15rem; scrollbar-width: thin; }
  .role-nav button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .rail-bottom { display: none; }
  .hero-copy { max-width: 75%; }
}
@media (max-width: 650px) {
  #main { padding-inline: .85rem; }
  .topbar { gap: .45rem; flex-wrap: wrap; }
  .top-role { width: 100%; }
  .top-actions { justify-content: start; width: 100%; }
  .top-actions .field:first-child:has(#persona) { flex: 1 0 100%; }
  .workspace-grid { grid-template-columns: minmax(0,1fr); }
  .hero { margin-block-start: .85rem; min-height: auto; }
  .hero-executive, [dir=rtl] .hero-executive {
    background-image: linear-gradient(0deg, #231b13 0%, #231b13 38%, #231b13d0 69%, #231b1360), url('./owner-demo.webp');
    background-size: cover, 100% auto; background-position: center, center top;
  }
  .hero-copy { max-width: 100%; }
  .hero-executive .hero-copy { padding-block-start: 6rem; }
  .metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-strip > div:nth-child(2) { border-inline-end: 0; }
  .metric-strip > div:nth-child(-n+2) { border-block-end: 1px solid var(--line); }
  .split-actions { grid-template-columns: minmax(0,1fr); }
  .activity-list time { min-width: 0; }
  .contact { min-width: 0; }
}
@media (max-width: 365px) { .field-pair { grid-template-columns: minmax(0, 1fr); } }
