:root {
  color-scheme: light;
  --canvas: #f4f1ea;
  --paper: #fffdf9;
  --paper-strong: #ffffff;
  --ink: #20293a;
  --muted: #687184;
  --line: #ddd9d0;
  --line-strong: #c9c3b7;
  --blue: #3346cc;
  --blue-dark: #24329e;
  --blue-pale: #e9ecff;
  --peach: #ffddc7;
  --peach-strong: #f2a36f;
  --mint: #d6f4e7;
  --mint-strong: #66b995;
  --lilac: #e9e2ff;
  --lilac-strong: #9b86da;
  --yellow: #ffedb5;
  --red: #b83b4b;
  --red-pale: #fdebed;
  --green: #26765c;
  --green-pale: #e3f5ee;
  --shadow: 0 16px 50px rgba(38, 42, 56, .09);
  --shadow-small: 0 5px 18px rgba(38, 42, 56, .08);
  --radius: 22px;
  --radius-small: 13px;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background:
  radial-gradient(circle at 8% -5%, rgba(255, 221, 199, .75), transparent 28rem),
  radial-gradient(circle at 100% 12%, rgba(214, 244, 231, .62), transparent 26rem), var(--canvas); }
body.dialog-open, body.detail-modal-open, body.mobile-nav-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--blue); }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .65rem; font-size: clamp(2.25rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.055em; font-weight: 750; }
h2 { margin-bottom: .6rem; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.08; letter-spacing: -.025em; }
h3 { margin-bottom: .35rem; font-size: 1.03rem; line-height: 1.25; }
p { line-height: 1.62; }
svg.icon { width: 1.35em; height: 1.35em; flex: 0 0 auto; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; left: 1rem; top: 1rem; z-index: 200; transform: translateY(-200%); padding: .75rem 1rem; border-radius: 9px; background: var(--ink); color: white; }
.skip-link:focus { transform: none; }

.public-shell { min-height: 100vh; }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.35rem 0; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 780; letter-spacing: -.025em; }
.brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px 12px 12px 4px; color: white; background: var(--blue); font-size: .83rem; letter-spacing: -.04em; }
.public-actions { display: flex; align-items: center; gap: .65rem; }
.public-main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2.5rem, 6vw, 6.5rem) 0 5rem; }
.public-main-narrow { width: min(620px, calc(100% - 2rem)); }
.public-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.hero-copy { max-width: 650px; }
.hero-copy > p { max-width: 570px; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.28rem); }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; color: var(--blue-dark); font-size: .77rem; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 1.6rem; height: 3px; border-radius: 9px; background: var(--peach-strong); }
.door-stack { display: grid; gap: 1rem; }
.door { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 1.1rem; align-items: center; min-height: 144px; padding: 1.5rem; overflow: hidden; border: 1px solid rgba(32,41,58,.08); border-radius: var(--radius); color: var(--ink); background: var(--paper); box-shadow: var(--shadow-small); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.door:hover { transform: translateY(-3px); color: var(--ink); box-shadow: var(--shadow); }
.door:first-child { background: linear-gradient(135deg, var(--blue) 0%, #4b5ade 100%); color: white; }
.door:first-child:hover { color: white; }
.door-icon { display: grid; place-items: center; width: 3.7rem; height: 3.7rem; border-radius: 18px; background: rgba(255,255,255,.2); }
.door:not(:first-child) .door-icon { background: var(--peach); }
.door-icon svg { width: 1.75rem; height: 1.75rem; }
.door strong { display: block; margin-bottom: .35rem; font-size: 1.28rem; letter-spacing: -.02em; }
.door small { display: block; max-width: 30rem; color: inherit; opacity: .78; font-size: .92rem; line-height: 1.45; }
.door > svg { opacity: .72; }
.recovery-links { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; margin-top: 1.25rem; color: var(--muted); font-size: .9rem; }
.session-pill, .role-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .72rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.58); font-size: .82rem; }

.workspace-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; padding: .75rem max(1rem, calc((100vw - 1380px) / 2)); border-bottom: 1px solid rgba(201,195,183,.7); background: rgba(244,241,234,.9); backdrop-filter: blur(18px); }
.topbar-end { display: flex; align-items: center; gap: .65rem; }
.topbar-menu { position: relative; }
.notification-trigger { position: relative; border: 1px solid var(--line); background: rgba(255,255,255,.52); }
.notification-badge { position: absolute; right: -.25rem; top: -.25rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border: 2px solid var(--canvas); border-radius: 999px; color: white; background: var(--red); font-size: .62rem; font-weight: 800; line-height: .9rem; text-align: center; }
.notification-badge[hidden] { display: none; }
.profile-trigger { display: flex; align-items: center; gap: .55rem; min-height: 46px; padding: .32rem .52rem .32rem .36rem; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--ink); background: rgba(255,255,255,.58); text-align: left; }
.profile-trigger:hover, .profile-trigger[aria-expanded="true"] { border-color: #aeb5dd; background: white; }
.profile-trigger > svg { width: .9rem; color: var(--muted); transform: rotate(90deg); }
.profile-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; color: white; background: var(--blue); font-size: .82rem; font-weight: 800; }
.profile-avatar-large { width: 3.7rem; height: 3.7rem; font-size: 1.35rem; }
.profile-trigger-copy strong, .profile-trigger-copy small { display: block; }
.profile-trigger-copy strong { font-size: .82rem; }
.profile-trigger-copy small { margin-top: .08rem; color: var(--muted); font-size: .66rem; }
.header-popover { position: absolute; right: 0; top: calc(100% + .55rem); z-index: 55; width: min(330px, calc(100vw - 2rem)); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 22px 65px rgba(20,26,40,.2); }
.header-popover[hidden] { display: none; }
.header-popover header { padding: 1rem 1rem .8rem; border-bottom: 1px solid var(--line); }
.header-popover header h2 { margin: .15rem 0 0; font-size: 1.1rem; }
.header-popover header p { margin: .2rem 0 0; overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.header-popover > a, .header-popover > button { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 58px; padding: .7rem 1rem; border: 0; border-top: 1px solid var(--line); cursor: pointer; color: var(--ink); background: transparent; font: inherit; text-align: left; text-decoration: none; }
.header-popover > a:hover, .header-popover > button:hover, .header-popover > a:focus-visible, .header-popover > button:focus-visible { color: var(--ink); background: var(--blue-pale); outline: none; }
.header-popover > a > svg, .header-popover > button > svg { flex: 0 0 auto; width: 1.1rem; color: var(--blue-dark); }
.header-popover > a span, .header-popover > button span { min-width: 0; }
.header-popover > a strong, .header-popover > a small, .header-popover > button strong, .header-popover > button small { display: block; }
.header-popover > a strong, .header-popover > button strong { font-size: .83rem; }
.header-popover > a small, .header-popover > button small { margin-top: .12rem; color: var(--muted); font-size: .7rem; }
.notification-popover [data-notifications-content] { padding: .75rem 1rem; }
.notification-popover [data-notifications-content] p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.notification-popover [data-notifications-content] p strong { color: var(--ink); }
.notification-popover ul { display: grid; gap: .35rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.notification-popover li { display: flex; justify-content: space-between; gap: 1rem; font-size: .78rem; }
.profile-summary { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.profile-summary h2 { margin: .12rem 0 0; }
.profile-summary p { margin: .25rem 0 0; color: var(--muted); }
.workspace-grid { display: grid; grid-template-columns: 245px minmax(0, 1fr); width: min(1380px, 100%); min-height: calc(100vh - 70px); margin: 0 auto; }
.nav { position: sticky; top: 70px; align-self: start; height: calc(100vh - 70px); padding: 2rem 1rem 1rem; overflow-y: auto; border-right: 1px solid var(--line); }
.nav-label { display: block; margin: 0 .75rem .7rem; color: var(--muted); font-size: .7rem; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: .8rem; margin-bottom: .22rem; padding: .72rem .78rem; border-radius: 12px; color: #4f586a; font-size: .92rem; font-weight: 620; text-decoration: none; }
.nav a svg { width: 1.18rem; height: 1.18rem; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.58); }
.nav a.active { color: var(--blue-dark); background: var(--paper-strong); box-shadow: var(--shadow-small); }
.nav-separator { height: 1px; margin: 1.15rem .8rem; background: var(--line); }
.nav-context { margin: 2rem .65rem 0; padding: 1rem; border-radius: 15px; background: rgba(255,255,255,.55); }
.nav-context strong { display: block; font-size: .86rem; }
.nav-context p { margin: .3rem 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.main { width: 100%; min-width: 0; padding: clamp(2rem, 4vw, 4rem) clamp(1rem, 5vw, 5rem) 5rem; }
.main-inner { width: min(1050px, 100%); margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.page-heading h1 { max-width: 780px; margin-bottom: .5rem; font-size: clamp(2.25rem, 4.2vw, 3.75rem); }
.page-heading p { max-width: 650px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.icon-button.mobile-menu { display: none; }
.nav-scrim { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: .72rem 1.08rem; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 720; line-height: 1; text-decoration: none; transition: transform .15s ease, background .15s ease, border .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button-primary { color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(51,70,204,.22); }
.button-primary:hover { color: white; background: var(--blue-dark); }
.button-secondary { border-color: var(--line-strong); color: var(--ink); background: var(--paper); }
.button-secondary:hover { color: var(--ink); border-color: var(--ink); }
.button-quiet { min-height: 38px; padding: .45rem .65rem; color: var(--muted); background: transparent; }
.button-danger { color: white; background: var(--red); }
.button-small { min-height: 36px; padding: .45rem .7rem; border-radius: 10px; font-size: .83rem; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; cursor: pointer; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: var(--paper); }
.text-button { padding: 0; border: 0; cursor: pointer; color: var(--blue-dark); background: transparent; font-weight: 680; text-decoration: underline; text-underline-offset: .2em; }

.task-hero { position: relative; margin-bottom: 1.4rem; padding: clamp(1.5rem, 4vw, 3rem); overflow: hidden; border-radius: 28px; color: white; background: linear-gradient(130deg, #2f41c4, #475bd9 58%, #6a75e2); box-shadow: var(--shadow); }
.task-hero::after { content: ''; position: absolute; right: -4rem; bottom: -7rem; width: 20rem; height: 20rem; border: 3rem solid rgba(255,255,255,.08); border-radius: 50%; }
.task-hero > * { position: relative; z-index: 1; }
.task-hero h2 { max-width: 600px; margin-bottom: .7rem; font-size: clamp(1.8rem, 3.8vw, 3rem); }
.task-hero p { max-width: 630px; margin-bottom: 1.35rem; opacity: .82; }
.task-hero .button { color: var(--blue-dark); background: white; }
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.task-card { position: relative; display: flex; flex-direction: column; min-height: 220px; padding: 1.35rem; border: 1px solid rgba(32,41,58,.08); border-radius: var(--radius); color: var(--ink); background: var(--paper); box-shadow: var(--shadow-small); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.task-card[type="button"] { width: 100%; cursor: pointer; font: inherit; text-align: left; }
.task-card:focus-visible { outline: 3px solid rgba(51,70,204,.28); outline-offset: 2px; }
.task-card:hover { transform: translateY(-3px); color: var(--ink); box-shadow: var(--shadow); }
.task-card-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.15rem; border-radius: 15px; background: var(--peach); }
.task-card:nth-child(3n+2) .task-card-icon { background: var(--mint); }
.task-card:nth-child(3n+3) .task-card-icon { background: var(--lilac); }
.task-card h3 { font-size: 1.14rem; }
.task-card p { margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.task-card .task-go { display: inline-flex; gap: .4rem; align-items: center; margin-top: auto; color: var(--blue-dark); font-size: .85rem; font-weight: 750; }
.task-card .task-go svg { width: 1rem; }

.section { margin-top: 2.3rem; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: .9rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .25rem 0 0; color: var(--muted); }
.card { padding: 1.35rem; border: 1px solid rgba(32,41,58,.08); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-small); }
.card + .card { margin-top: 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; }
.metric { padding: 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.62); }
.metric b { display: block; margin-bottom: .25rem; font-size: 1.8rem; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: .78rem; }

.action-list { display: grid; gap: .65rem; }
.action-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; min-height: 82px; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: rgba(255,255,255,.58); text-decoration: none; }
.action-row:hover { color: var(--ink); border-color: #aeb5dd; background: white; }
.action-row-icon { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 14px; color: var(--blue-dark); background: var(--blue-pale); }
.action-row strong, .action-row small { display: block; }
.action-row small { margin-top: .15rem; color: var(--muted); line-height: 1.4; }
.action-row-end { display: flex; align-items: center; gap: .65rem; }
.detail-row { width: 100%; cursor: pointer; font: inherit; text-align: left; }
.detail-row:focus-visible { outline: 3px solid rgba(51,70,204,.28); outline-offset: 2px; border-color: var(--blue); }
.row-view { display: inline-flex; align-items: center; gap: .32rem; padding: .35rem .5rem; border-radius: 9px; color: var(--blue-dark); background: var(--blue-pale); font-size: .76rem; font-weight: 750; white-space: nowrap; }
.row-view svg { width: 1rem; height: 1rem; }
.workspace-job-copy { min-width: 0; overflow-wrap: anywhere; }
.workspace-job-copy .disclosure p { overflow-wrap: anywhere; word-break: break-word; }
.workspace-job-row .action-row-end { flex-wrap: wrap; justify-content: flex-end; }

.status, .kind { display: inline-flex; align-items: center; gap: .42rem; width: max-content; max-width: 100%; padding: .38rem .62rem; border-radius: 999px; white-space: nowrap; font-size: .76rem; font-weight: 720; }
.status-dot { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.status-good { color: var(--green); background: var(--green-pale); }
.status-waiting { color: #806018; background: #fff3cf; }
.status-attention { color: var(--red); background: var(--red-pale); }
.status-neutral { color: #62697a; background: #eeedf0; }
.kind svg { width: 1rem; height: 1rem; }
.kind-peach { background: var(--peach); }
.kind-mint { background: var(--mint); }
.kind-lilac { background: var(--lilac); }
.kind-gray { background: #ecebed; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { padding: .75rem 1rem; color: var(--muted); background: #f7f5f0; font-size: .71rem; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
td { padding: .9rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #faf9f6; }
.identity strong, .identity small { display: block; }
.identity small { margin-top: .18rem; color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: .45rem; }
.workspace-inventory-table { table-layout: fixed; }
.workspace-inventory-table .workspace-col-person { width: 32%; }
.workspace-inventory-table .workspace-col-state { width: 16%; }
.workspace-inventory-table .workspace-col-system { width: 20%; }
.workspace-inventory-table .workspace-col-connection { width: 17%; }
.workspace-inventory-table .workspace-col-expiry { width: 15%; }
.workspace-inventory-table th, .workspace-inventory-table td { min-width: 0; overflow: hidden; }
.workspace-inventory-table .status { max-width: 100%; }
.workspace-person-link { display: block; min-width: 0; }
.workspace-cell-clamp { display: -webkit-box !important; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.workspace-cell-ellipsis { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-system-cell, .workspace-date-cell { overflow-wrap: anywhere; }
.workspace-job-reason { margin: .55rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.workspace-job-reason strong { display: inline; color: var(--ink); }
.workspace-retry-summary { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.52); }
.workspace-retry-person { display: flex; align-items: center; gap: .8rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.workspace-retry-person > div > span, .workspace-retry-person strong, .workspace-retry-person small { display: block; }
.workspace-retry-person > div > span { margin-bottom: .18rem; color: var(--muted); font-size: .69rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.workspace-retry-person small { margin-top: .15rem; color: var(--muted); }
.workspace-retry-summary dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.workspace-retry-summary dl > div { padding: .85rem 1rem; }
.workspace-retry-summary dl > div + div { border-left: 1px solid var(--line); }
.workspace-retry-summary dt { color: var(--muted); font-size: .69rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.workspace-retry-summary dd { margin: .25rem 0 0; font-size: .87rem; line-height: 1.45; }
.workspace-retry-reason { margin-top: 1rem; padding: 1rem; border-left: 4px solid #c49a2e; border-radius: 4px 14px 14px 4px; background: #fff8df; }
.workspace-retry-reason h3 { margin: .15rem 0 .35rem; font-size: 1.02rem; }
.workspace-retry-reason p { margin: 0; color: #67551e; font-size: .86rem; line-height: 1.5; }
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.filter { min-height: 38px; padding: .48rem .75rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--muted); background: var(--paper); font-size: .82rem; font-weight: 650; }
.filter.active { color: var(--blue-dark); border-color: #aab3f1; background: var(--blue-pale); }
.search-box { position: relative; flex: 1 1 270px; }
.search-box svg { position: absolute; left: .85rem; top: 50%; width: 1.1rem; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 2.55rem; }

.form-card { padding: clamp(1.25rem, 3vw, 2.25rem); border: 1px solid rgba(32,41,58,.08); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-small); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.field { display: grid; gap: .42rem; margin-bottom: 1rem; }
.field > span:first-child, .field legend { font-size: .86rem; font-weight: 720; }
.field small { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.field-error { color: var(--red) !important; }
input, select, textarea { width: 100%; min-height: 48px; padding: .72rem .82rem; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--ink); background: white; outline: none; }
textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51,70,204,.13); }
fieldset.field { padding: 0; border: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
.choice { position: relative; display: flex; align-items: flex-start; gap: .75rem; padding: .9rem; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: white; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-pale); box-shadow: 0 0 0 1px var(--blue); }
.choice input { width: 1.1rem; min-height: auto; margin-top: .15rem; accent-color: var(--blue); }
.choice strong, .choice small { display: block; }
.choice small { margin-top: .2rem; }
.form-actions { display: flex; justify-content: space-between; gap: .8rem; align-items: center; margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.form-actions-end { justify-content: flex-end; }
.summary-box { padding: 1.1rem; border-radius: 15px; background: var(--blue-pale); }
.summary-box p:last-child { margin-bottom: 0; }
.details { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); margin: 0; }
.details > div { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.details > div:nth-child(odd) { padding-right: 1rem; }
.details dt { margin-bottom: .22rem; color: var(--muted); font-size: .73rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.details dd { margin: 0; line-height: 1.45; }

.progress { display: flex; gap: 0; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.progress li { position: relative; display: grid; flex: 1; grid-template-columns: auto 1fr; gap: .45rem; align-items: center; color: var(--muted); font-size: .77rem; }
.progress li:not(:last-child)::after { content: ''; position: absolute; left: 1.8rem; right: .5rem; top: .85rem; z-index: 0; height: 2px; background: var(--line); }
.progress li > span { position: relative; z-index: 1; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--paper); font-weight: 750; }
.progress li > span svg { width: .9rem; }
.progress li b { position: relative; z-index: 1; width: max-content; padding-right: .5rem; background: var(--paper); }
.progress-current { color: var(--blue-dark) !important; }
.progress-current > span { color: white; border-color: var(--blue) !important; background: var(--blue) !important; }
.progress-done > span { color: white; border-color: var(--green) !important; background: var(--green) !important; }

.message { display: flex; gap: .8rem; align-items: flex-start; margin: .8rem 0; padding: .9rem 1rem; border-radius: 13px; background: var(--blue-pale); }
.message p { margin: 0; line-height: 1.5; }
.message svg { margin-top: .1rem; }
.message-success { color: var(--green); background: var(--green-pale); }
.message-error { color: var(--red); background: var(--red-pale); }
.message-warning { color: #715413; background: #fff2c9; }
.loading { display: flex; align-items: center; justify-content: center; gap: .7rem; min-height: 180px; color: var(--muted); }
.spinner { width: 1.25rem; height: 1.25rem; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { display: grid; justify-items: center; padding: 3.3rem 1rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.42); }
.empty-state > svg { width: 2.2rem; height: 2.2rem; margin-bottom: 1rem; color: var(--blue); }
.empty-state p { max-width: 460px; color: var(--muted); }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ''; position: absolute; left: .55rem; top: .6rem; bottom: .6rem; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1.15rem 2rem; }
.timeline li::before { content: ''; position: absolute; left: .18rem; top: .25rem; width: .65rem; height: .65rem; border: 3px solid var(--paper); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--line); }
.timeline small { display: block; margin-top: .2rem; color: var(--muted); }
.timeline-detail { display: -webkit-box; margin: .25rem 0 0; overflow: hidden; color: var(--ink); font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.pipeline { display: grid; grid-template-columns: repeat(var(--steps, 5), minmax(0,1fr)); margin: 1rem 0 1.5rem; }
.pipeline-step { position: relative; padding-top: 2rem; color: var(--muted); font-size: .74rem; text-align: center; }
.pipeline-step::before { content: ''; position: absolute; left: calc(50% - .55rem); top: .35rem; z-index: 2; width: 1.1rem; height: 1.1rem; border: 3px solid var(--paper); border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 1px var(--line); }
.pipeline-step:not(:last-child)::after { content: ''; position: absolute; left: 50%; right: -50%; top: .9rem; height: 2px; background: var(--line); }
.pipeline-step.done::before, .pipeline-step.current::before { background: var(--blue); }
.pipeline-step.done::after { background: var(--blue); }
.pipeline-step.current { color: var(--ink); font-weight: 700; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(20,26,40,.52); backdrop-filter: blur(4px); }
.dialog { position: relative; width: min(590px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.5rem; border-radius: 24px; background: var(--paper); box-shadow: 0 30px 90px rgba(10,15,30,.3); }
.dialog-close { position: absolute; right: .8rem; top: .8rem; }
.dialog-copy { padding-right: 3rem; }
.dialog-copy h2 { font-size: 1.8rem; }
.dialog-copy p { color: var(--muted); }
.dialog-body { margin-top: 1rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.detail-modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: clamp(.65rem, 2vw, 1.5rem); background: rgba(20,26,40,.58); backdrop-filter: blur(5px); }
.detail-modal { display: grid; grid-template-rows: auto minmax(0,1fr); width: min(1160px, 100%); max-height: calc(100dvh - clamp(1.3rem, 4vw, 3rem)); overflow: hidden; border: 1px solid rgba(255,255,255,.35); border-radius: 25px; background: var(--canvas); box-shadow: 0 35px 110px rgba(10,15,30,.38); }
.detail-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.detail-modal-header h2 { margin: .15rem 0 0; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.detail-modal-header p { max-width: 720px; margin: .35rem 0 0; color: var(--muted); }
.detail-modal-close { flex: 0 0 auto; }
.detail-modal-body { min-width: 0; padding: clamp(1rem, 2.4vw, 1.7rem); overflow: auto; overscroll-behavior: contain; }
.detail-modal-body > .split { align-items: start; }
.platform-overview { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.55); }
.platform-overview > div { min-width: 0; padding: .9rem 1rem; }
.platform-overview > div + div { border-left: 1px solid var(--line); }
.platform-overview span, .platform-overview strong, .platform-overview small { display: block; }
.platform-overview span { color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.platform-overview strong { margin-top: .22rem; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.platform-overview small { margin-top: .18rem; overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.health-signal-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .65rem; }
.health-signal-tile { display: grid; min-width: 0; min-height: 158px; padding: .9rem; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; color: var(--ink); background: rgba(255,255,255,.65); font: inherit; text-align: left; box-shadow: var(--shadow-small); }
.health-signal-tile:hover, .health-signal-tile:focus-visible { border-color: #aeb5dd; background: white; outline: 3px solid rgba(51,70,204,.11); outline-offset: 1px; transform: translateY(-1px); }
.health-signal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .45rem; color: var(--muted); font-size: .7rem; font-weight: 750; }
.health-signal-head > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health-signal-head .status { flex: 0 0 auto; padding: .26rem .42rem; font-size: .63rem; }
.health-signal-tile > strong { align-self: end; margin-top: .6rem; overflow: hidden; font-size: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }
.health-signal-tile > small { display: -webkit-box; margin-top: .28rem; overflow: hidden; color: var(--muted); font-size: .74rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.health-signal-more { display: flex; align-items: center; gap: .3rem; align-self: end; margin-top: .55rem; color: var(--blue-dark); font-size: .7rem; font-weight: 750; }
.health-signal-more svg { width: .85rem; }
.platform-footnote { margin: .65rem 0 0; color: var(--muted); font-size: .72rem; }
.platform-service-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.52); }
.platform-service-row { display: grid; grid-template-columns: minmax(240px,2fr) minmax(110px,.7fr) minmax(75px,.45fr) minmax(190px,1.2fr) auto; gap: 1rem; align-items: center; width: 100%; min-height: 84px; padding: .85rem 1rem; border: 0; cursor: pointer; color: var(--ink); background: transparent; font: inherit; text-align: left; }
.platform-service-row + .platform-service-row { border-top: 1px solid var(--line); }
.platform-service-row:hover, .platform-service-row:focus-visible { background: white; outline: none; }
.platform-service-row > span { min-width: 0; }
.platform-service-row > span > small { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .65rem; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.platform-service-name strong, .platform-service-name small { display: block; }
.platform-service-name small { display: -webkit-box !important; margin: .22rem 0 0 !important; overflow: hidden; font-weight: 400 !important; letter-spacing: 0 !important; line-height: 1.35; text-transform: none !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.platform-service-row em { display: block; margin-top: .22rem; overflow: hidden; color: var(--muted); font-size: .7rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.platform-service-open svg { width: 1rem; color: var(--muted); }
.platform-signal-dialog { width: min(960px, 100%); }
.platform-signal-explanation { margin-top: 1.2rem; padding: 1rem; border-radius: 15px; background: var(--blue-pale); }
.platform-signal-explanation h3 { margin-bottom: .35rem; }
.platform-signal-explanation p { margin: 0; line-height: 1.5; }
.platform-service-dialog { width: min(960px, 100%); }
.platform-service-dialog .dialog-copy p { max-width: 760px; }
.platform-service-facts { padding: .2rem 1rem; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.48); }
.platform-service-facts .details > div:last-child,
.platform-service-facts .details > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.platform-inventory { margin-top: 1.4rem; }
.platform-inventory-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.platform-inventory-head h3 { margin-bottom: .15rem; }
.platform-inventory-head p { margin: 0; color: var(--muted); font-size: .84rem; }
.platform-asset-count { flex: 0 0 auto; padding: .42rem .65rem; border-radius: 999px; color: var(--blue-dark) !important; background: var(--blue-pale); font-weight: 700; white-space: nowrap; }
.platform-asset-filters { display: grid; grid-template-columns: minmax(250px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr); gap: .65rem; margin-bottom: .8rem; }
.platform-asset-filter { min-width: 0; margin: 0; }
.platform-asset-filter > span:first-child { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.platform-asset-filter input, .platform-asset-filter select { min-height: 42px; padding-top: .58rem; padding-bottom: .58rem; }
.platform-asset-search-control { position: relative; display: block; }
.platform-asset-search-control svg { position: absolute; left: .72rem; top: 50%; z-index: 1; width: 1.05rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.platform-asset-search-control input { padding-left: 2.3rem; }
.platform-asset-table-wrap { border-radius: 14px; }
.platform-asset-table { min-width: 780px; table-layout: fixed; }
.platform-asset-table th, .platform-asset-table td { padding-right: .7rem; padding-left: .7rem; }
.platform-asset-table th:nth-child(1) { width: 24%; }
.platform-asset-table th:nth-child(2) { width: 23%; }
.platform-asset-table th:nth-child(3) { width: 16%; }
.platform-asset-table th:nth-child(4) { width: 12%; }
.platform-asset-table th:nth-child(5) { width: 16%; }
.platform-asset-table th:nth-child(6) { width: 9%; }
.platform-asset-primary strong, .platform-asset-primary small, .platform-asset-detail { display: block; }
.platform-asset-primary strong { overflow-wrap: anywhere; }
.platform-asset-primary small, .platform-asset-detail { margin-top: .2rem; color: var(--muted); font-size: .75rem; line-height: 1.35; overflow-wrap: anywhere; }
.platform-asset-detail { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.platform-asset-none { color: var(--muted); font-size: .78rem; }
.platform-asset-filter-empty { padding: 1.6rem; border: 1px dashed var(--line-strong); border-radius: 14px; text-align: center; background: rgba(255,255,255,.42); }
.platform-asset-filter-empty p { margin: .25rem 0 0; color: var(--muted); font-size: .86rem; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 120; display: flex; align-items: center; gap: .65rem; max-width: min(420px, calc(100vw - 2rem)); padding: .9rem 1rem; border-radius: 13px; color: white; background: var(--green); box-shadow: var(--shadow); }
.toast-error { background: var(--red); }

.tabs { display: flex; gap: .25rem; margin: 0 0 1rem; padding: .28rem; overflow-x: auto; border-radius: 13px; background: #e9e6df; }
.tabs a, .tabs button { flex: 0 0 auto; padding: .62rem .8rem; border: 0; border-radius: 10px; cursor: pointer; color: var(--muted); background: transparent; font-size: .83rem; font-weight: 700; text-decoration: none; }
.tabs .active, .tabs [aria-selected="true"] { color: var(--ink); background: var(--paper); box-shadow: var(--shadow-small); }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 1rem; }
.sticky-card { position: sticky; top: 90px; align-self: start; }
.disclosure { margin-top: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.disclosure summary { cursor: pointer; color: var(--muted); font-size: .82rem; font-weight: 650; }
.code { margin-top: .7rem; padding: .8rem; overflow-x: auto; border-radius: 10px; color: #dce2ff; background: #20283b; font: .78rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 980px) {
  .task-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .public-hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .nav { position: fixed; inset: 70px auto 0 0; z-index: 36; width: min(300px,86vw); height: calc(100dvh - 70px); transform: translateX(-105%); border-right: 1px solid var(--line); background: var(--canvas); box-shadow: var(--shadow); transition: transform .2s ease; }
  .nav.open { transform: none; }
  .icon-button.mobile-menu { display: grid; }
  .nav-scrim { position: fixed; inset: 70px 0 0 min(300px,86vw); z-index: 34; display: block; width: auto; border: 0; cursor: pointer; background: rgba(20,26,40,.4); backdrop-filter: blur(2px); }
  .nav-scrim[hidden] { display: none; }
  .main { padding-top: 2rem; }
  .split { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .health-signal-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .platform-service-row { grid-template-columns: minmax(220px,1.6fr) minmax(105px,.6fr) minmax(65px,.35fr) auto; }
  .platform-service-row > span:nth-child(4) { display: none; }
}

@media (max-width: 680px) {
  h1 { font-size: 2.55rem; }
  .public-header { padding: .9rem 0; }
  .public-actions .button { display: none; }
  .public-main { padding-top: 2.5rem; }
  .door { min-height: 124px; padding: 1.1rem; }
  .door-icon { width: 3.1rem; height: 3.1rem; }
  .topbar { min-height: 62px; }
  .workspace-grid { min-height: calc(100vh - 62px); }
  .nav { top: 62px; height: calc(100dvh - 62px); }
  .nav-scrim { top: 62px; }
  .main { padding: 1.5rem 1rem 4rem; }
  .page-heading { display: block; }
  .page-heading .button { margin-top: 1rem; }
  .task-grid, .card-grid, .form-grid, .choice-grid { grid-template-columns: 1fr; }
  .profile-trigger-copy { display: none; }
  .profile-trigger { padding-right: .38rem; }
  .profile-trigger > svg { display: none; }
  .header-popover { position: fixed; right: .7rem; top: 68px; width: min(330px, calc(100vw - 1.4rem)); }
  .platform-overview { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .platform-overview > div + div { border-left: 1px solid var(--line); }
  .platform-overview > div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .platform-overview > div:nth-child(4) { border-top: 1px solid var(--line); }
  .health-signal-grid { grid-template-columns: 1fr; }
  .health-signal-tile { min-height: 138px; }
  .platform-service-row { grid-template-columns: minmax(0,1fr) auto; gap: .55rem 1rem; }
  .platform-service-row > span:nth-child(2), .platform-service-row > span:nth-child(3) { grid-row: 2; }
  .platform-service-row > span:nth-child(3) { justify-self: end; }
  .platform-service-row > span:nth-child(4) { display: none; }
  .platform-service-open { grid-column: 2; grid-row: 1; }
  .workspace-retry-summary dl { grid-template-columns: 1fr; }
  .workspace-retry-summary dl > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .task-card { min-height: 185px; }
  .action-row { grid-template-columns: auto minmax(0,1fr); }
  .action-row-end { grid-column: 2; justify-content: flex-start; }
  .detail-row .action-row-end { flex-wrap: wrap; }
  .workspace-job-row { align-items: start; }
  .workspace-job-row .action-row-end { justify-content: flex-start; }
  .workspace-inventory-wrap { overflow: visible; border: 0; background: transparent; }
  .workspace-inventory-table, .workspace-inventory-table tbody { display: block; width: 100%; }
  .workspace-inventory-table colgroup, .workspace-inventory-table thead { display: none; }
  .workspace-inventory-table tr { display: block; margin-bottom: .75rem; padding: .65rem .9rem; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow-small); }
  .workspace-inventory-table td { display: grid; grid-template-columns: minmax(7.2rem, .42fr) minmax(0, 1fr); gap: .75rem; align-items: start; width: 100%; padding: .58rem 0; overflow: visible; border-top: 1px solid var(--line); }
  .workspace-inventory-table td::before { content: attr(data-label); color: var(--muted); font-size: .69rem; font-weight: 760; letter-spacing: .07em; text-transform: uppercase; }
  .workspace-inventory-table .workspace-person-cell { display: block; padding-bottom: .8rem; border-top: 0; }
  .workspace-inventory-table .workspace-person-cell::before { display: block; margin-bottom: .45rem; }
  .workspace-inventory-table .workspace-state-cell .status { justify-self: start; }
  .workspace-inventory-table .workspace-cell-clamp { display: block !important; overflow: visible; -webkit-line-clamp: unset; }
  .workspace-inventory-table .workspace-cell-ellipsis { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .details { grid-template-columns: 1fr; }
  .details > div:nth-child(odd) { padding-right: 0; }
  .progress li b { display: none; }
  .progress li:not(:last-child)::after { right: -.2rem; }
  .pipeline { overflow-x: auto; grid-template-columns: repeat(var(--steps, 5), minmax(95px,1fr)); padding-bottom: .5rem; }
  .dialog { padding: 1.1rem; border-radius: 18px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .detail-modal-backdrop { place-items: stretch; padding: 0; }
  .detail-modal { width: 100%; max-height: 100dvh; border: 0; border-radius: 0; }
  .detail-modal-header { padding: .9rem 1rem; }
  .detail-modal-header p { font-size: .82rem; }
  .detail-modal-body { padding: 1rem; }
  .detail-modal-body .section { margin-top: 1.25rem; }
  .timeline-detail { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .platform-service-dialog { width: 100%; }
  .platform-service-facts { padding: .15rem .85rem; }
  .platform-service-facts .details > div { border-bottom: 1px solid var(--line); }
  .platform-service-facts .details > div:last-child { border-bottom: 0; }
  .platform-inventory-head { display: block; }
  .platform-asset-count { width: max-content; margin-top: .6rem !important; }
  .platform-asset-filters { grid-template-columns: 1fr; }
  .platform-asset-table-wrap { overflow: visible; border: 0; background: transparent; }
  .platform-asset-table { display: block; min-width: 0; }
  .platform-asset-table thead { display: none; }
  .platform-asset-table tbody { display: grid; gap: .7rem; }
  .platform-asset-table tr { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-strong); box-shadow: var(--shadow-small); }
  .platform-asset-table tbody tr:hover { background: var(--paper-strong); }
  .platform-asset-table td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .platform-asset-table td::before { content: attr(data-label); display: block; margin-bottom: .22rem; color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .platform-asset-table td[data-field="asset"] { grid-column: 1 / -1; padding-bottom: .65rem; border-bottom: 1px solid var(--line); }
  .platform-asset-table td[data-field="asset"]::before { display: none; }
  .platform-asset-table td[data-field="source"] { align-self: end; }
}

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