:root {
  color: #182126;
  background: #edf1ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #182126;
  --muted: #61716e;
  --paper: #fffdf9;
  --line: #d8dfdc;
  --green: #174a3c;
  --green-light: #dfece5;
  --orange: #e97840;
  --nav: #122b26;
  --nav-soft: #1d3b34;
  --red: #a03c38;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1120px; min-height: 100vh; background: #edf1ef; }
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--orange); color: white; font-family: Georgia, serif; font-size: 25px; font-weight: 700; box-shadow: 0 8px 20px #09171355; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #c7ded4; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; background: var(--paper); }
.login-brand { display: flex; flex-direction: column; justify-content: center; padding: 10vw; color: white; background: radial-gradient(circle at 25% 15%, #2b6755, transparent 33%), linear-gradient(145deg, #102b25 15%, #174a3c 70%, #0f3027); }
.login-brand > span { margin-top: 28px; color: #b9cec6; font-size: 13px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.login-brand h1 { margin: 8px 0; font: 700 72px/1 Georgia, serif; }
.login-brand p { max-width: 560px; margin: 18px 0 0; color: #dbe7e2; font: 25px/1.45 Georgia, serif; }
.login-card { align-self: center; margin: 7vw; padding: 48px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: 0 24px 70px #23453a20; }
.login-card h2 { margin: 12px 0; font: 700 34px/1.15 Georgia, serif; }
.login-card > p { color: var(--muted); line-height: 1.65; }
.primary-button { display: block; width: 100%; margin: 30px 0 18px; padding: 15px 20px; border: 0; border-radius: 12px; background: var(--green); color: white; text-align: center; text-decoration: none; font-weight: 800; cursor: pointer; }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }
.configuration-note, .identity-rule { display: flex; flex-direction: column; gap: 5px; padding: 16px; border-radius: 12px; font-size: 13px; }
.configuration-note { margin-bottom: 14px; background: #fff2e8; color: #71452e; }
.identity-rule { background: var(--green-light); color: #244e41; }

.product-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(650px, 1fr) 334px; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 25px 20px; color: #e6f0ec; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong, .brand span { display: block; }
.brand strong { font: 700 23px/1 Georgia, serif; }
.brand span { margin-top: 5px; color: #90aaa0; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 7px; margin-top: 48px; }
.sidebar nav button { display: flex; gap: 12px; padding: 12px; border: 0; border-radius: 10px; color: #91aaa1; background: transparent; text-align: left; }
.sidebar nav button.active { color: white; background: var(--nav-soft); }
.sidebar nav i { color: #6b8b7f; font-style: normal; font-size: 10px; }
.trust-boundary { display: flex; flex-direction: column; gap: 5px; margin-top: auto; padding: 16px; border: 1px solid #31554a; border-radius: 14px; background: #16332c; }
.trust-boundary > span { color: #8eaca0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.trust-boundary small { color: #9cb4ab; overflow-wrap: anywhere; }
.trust-boundary b { align-self: flex-start; margin-top: 8px; padding: 5px 8px; border-radius: 99px; color: #f6c8ac; background: #6e3d283d; font-size: 10px; }

.workspace-shell { min-width: 0; background: #f3f5f3; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); background: #fffefa; }
.topbar label, .topbar > div { display: flex; align-items: center; gap: 12px; }
.topbar span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.topbar select, .topbar button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
.security-strip { padding: 9px 32px; color: #365b4f; background: var(--green-light); font-size: 12px; }
.security-strip strong { margin-right: 5px; }
.hero { display: flex; align-items: end; justify-content: space-between; min-height: 230px; padding: 42px 38px; color: white; background: linear-gradient(125deg, #173d33, #255e4c); }
.hero h1 { margin: 8px 0; font: 700 39px/1.1 Georgia, serif; }
.hero p { margin: 0; color: #d2e1db; }
.metrics { display: flex; gap: 10px; }
.metrics div { min-width: 104px; padding: 17px; border: 1px solid #ffffff24; border-radius: 13px; background: #ffffff0d; }
.metrics strong, .metrics span { display: block; }
.metrics strong { font: 700 28px/1 Georgia, serif; }
.metrics span { margin-top: 7px; color: #bfd3cb; font-size: 10px; text-transform: uppercase; }

.content-section { padding: 32px 36px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.section-title span { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-title h2 { margin: 5px 0 0; font: 700 25px/1.1 Georgia, serif; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; }
.attention-grid, .play-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.attention-card, .play-card, .run-card, .inspector { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 7px 22px #1d413515; }
.attention-card { padding: 18px; }
.attention-card > span, .play-card > div > span { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.attention-card h3, .play-card h3 { margin: 7px 0; font-family: Georgia, serif; }
.attention-card p { color: var(--muted); font-size: 12px; }
.attention-card .ready { color: var(--green); font-size: 11px; }
.attention-card .blocked { color: var(--red); font-size: 11px; }
.run-section { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
.run-grid { display: grid; gap: 10px; }
.run-card { width: 100%; padding: 17px; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.run-card:hover, .run-card.selected { border-color: #3d7765; transform: translateY(-1px); }
.run-card h3 { margin: 12px 0 6px; font: 700 18px/1.2 Georgia, serif; }
.run-card p { color: var(--muted); font-size: 12px; }
.run-card > div { display: flex; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 11px; }
.run-card > div strong { color: var(--ink); }
.state-pill { padding: 5px 8px; border-radius: 99px; color: #265345; background: var(--green-light); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.inspector { align-self: start; padding: 20px; }
.inspector-empty, .decision-empty { color: var(--muted); }
.inspector-empty span, .decision-empty span, .inspector-heading span { display: block; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.inspector-empty strong, .decision-empty strong { display: block; margin-top: 9px; color: var(--ink); font-family: Georgia, serif; }
.inspector-empty p, .decision-empty p { line-height: 1.5; }
.inspector-heading h2 { margin: 8px 0; font: 700 21px/1.15 Georgia, serif; }
.inspector-heading p { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.run-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0; }
.run-facts div { padding: 10px; border-radius: 9px; background: #eef3f0; }
.run-facts span, .run-facts strong { display: block; }
.run-facts span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.run-facts strong { margin-top: 4px; font-size: 10px; }
.authority-note { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-left: 3px solid var(--orange); color: #6e482f; background: #fff1e6; font-size: 11px; }
.authority-toggle { display: flex; gap: 8px; margin: 15px 0; color: var(--muted); font-size: 11px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.action-grid button { padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: white; font-size: 10px; font-weight: 750; cursor: pointer; }
.play-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; align-items: center; padding: 16px; }
.play-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: white; background: var(--green); font: 700 14px Georgia, serif; }
.play-card p { margin: 5px 0; color: var(--muted); font-size: 11px; }
.play-card code { color: #456259; font-size: 9px; }
.play-card .available { color: var(--green); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.blank-state, .blank-workspace { padding: 25px; border: 1px dashed #bdc9c4; border-radius: 13px; color: var(--muted); background: #f9faf8; }
.blank-workspace { margin: 50px; }

.decision-console { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 24px; border-left: 1px solid var(--line); background: #fffefa; }
.console-heading { display: flex; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.console-heading button { border: 0; color: var(--green); background: transparent; cursor: pointer; }
.decision-empty { margin-top: 34px; }
.decision-banner { display: flex; flex-direction: column; gap: 7px; margin-top: 22px; padding: 18px; border-radius: 12px; }
.decision-banner.permit { color: #205041; background: #e0eee7; }
.decision-banner.deny { color: #7c302e; background: #f7e3e1; }
.decision-banner span { font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.decision-banner strong { overflow-wrap: anywhere; }
.decision-console dl { margin: 18px 0; }
.decision-console dl div { padding: 11px 0; border-bottom: 1px solid var(--line); }
.decision-console dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.decision-console dd { margin: 5px 0 0; font-size: 11px; overflow-wrap: anywhere; }
.decision-console details { color: var(--muted); font-size: 11px; }
.decision-console pre { padding: 11px; overflow: auto; color: #c9e3d9; background: #102a24; font-size: 9px; }
.fatal-error { max-width: 600px; margin: 15vh auto; padding: 40px; border-radius: 18px; background: white; }

.play-launch { max-width: 160px; }
.play-launch .primary-button { margin: 0; white-space: nowrap; font-size: 12px; }
.play-launch .available { display: block; line-height: 1.5; text-transform: none; }
.run-notice { margin: 0; padding: 14px 32px; color: var(--green); background: var(--green-light); }
.run-scope p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
#start-run-dialog { width: min(580px, calc(100vw - 32px)); padding: 32px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--paper); }
#start-run-dialog::backdrop { background: #102b25aa; }
#start-run-dialog h2 { margin: 12px 0; font: 700 28px/1.2 Georgia, serif; }
#start-run-dialog p { color: var(--muted); line-height: 1.6; }
#start-run-dialog label { display: block; margin: 20px 0 8px; font-weight: 700; }
#start-run-dialog input, #start-run-dialog textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
#start-run-dialog :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.dialog-actions button { padding: 12px 20px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.dialog-actions .primary-button { width: auto; margin: 0; }
#start-run-dialog .form-error { color: var(--red); }

@media (max-width: 1250px) {
  .product-shell { grid-template-columns: 210px minmax(610px, 1fr) 300px; }
  .metrics div { min-width: 92px; }
}

.participation-notice { margin: 24px; padding: 24px; background: #fff4e7; border: 2px solid #bd6534; border-radius: 14px; color: #173b32; }
.participation-notice h2 { margin: 0 0 16px; font-size: 24px; }
.participation-notice article + article { margin-top: 20px; padding-top: 20px; border-top: 1px solid #d9bca5; }
.participation-notice h3 { margin: 0 0 8px; }
.participation-notice p { margin: 8px 0; overflow-wrap: anywhere; }
.participation-notice a { display: inline-block; margin: 12px 0 8px; padding: 12px 18px; line-height: 1.5; border-radius: 8px; background: #174a3c; color: white; font-weight: 600; text-decoration: none; }
.participation-notice a:focus-visible { outline: 3px solid #bd6534; outline-offset: 3px; }

/* Links on the dark home navigation remain readable in every visited state. */
.sidebar a, .sidebar a:visited, .login-brand a, .login-brand a:visited { color: #fff; }
.sidebar a:hover, .login-brand a:hover { color: #fff; text-decoration-thickness: 2px; }
.sidebar a:focus-visible, .login-brand a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

