:root {
  --ink: #08111f;
  --panel: #0f1b2e;
  --panel-raised: #14243a;
  --line: rgba(226, 211, 180, .18);
  --paper: #e8dfcf;
  --muted: #9ea8b2;
  --signal: #ef6b3e;
  --amber: #efb84c;
  --green: #73d6a5;
  --danger: #ff8f82;
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Georgia, serif;
  --mono: SFMono-Regular, Consolas, Liberation Mono, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 14px; }
button, textarea, input, select { font: inherit; }
button { cursor: pointer; }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .14; z-index: 5; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E"); }
.shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 72px; position: relative; }
.topbar { min-height: 82px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: .08em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--signal); color: var(--ink); font-family: var(--serif); font-weight: 900; font-size: 21px; transform: rotate(-7deg); }
.brand strong { display: block; font-size: 14px; letter-spacing: .12em; }
.brand small { display: block; font-size: 8px; color: var(--muted); margin-top: 2px; }
.system-signal { font-size: 10px; color: var(--muted); letter-spacing: .11em; }
.system-signal i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 7px; box-shadow: 0 0 16px var(--green); animation: pulse 2.5s infinite; }
.identity { justify-self: end; color: var(--muted); }
.identity a { color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--signal); padding-bottom: 4px; }

.hero { display: grid; grid-template-columns: 1.3fr .7fr; min-height: 390px; align-items: end; padding: 72px 0 54px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 80% 18%, rgba(239, 107, 62, .16), transparent 26%), linear-gradient(116deg, transparent 55%, rgba(239,184,76,.05)); }
.eyebrow, .section-label { color: var(--signal); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 15px; }
.hero h1 { font: 700 clamp(48px, 7.4vw, 104px)/.86 var(--serif); letter-spacing: -.07em; margin: 0; max-width: 800px; }
.hero h1 em { color: var(--amber); font-weight: 400; }
.lede { max-width: 570px; color: var(--muted); line-height: 1.85; margin: 27px 0 0; }
.hero-signal { align-self: center; justify-self: end; width: 200px; display: grid; grid-template-columns: 34px 1fr; row-gap: 11px; font-size: 11px; border-left: 1px solid var(--signal); padding-left: 18px; }
.hero-signal span { color: var(--signal); }.hero-signal b { letter-spacing: .08em; font-weight: 400; }

.workspace { display: grid; grid-template-columns: 190px 1fr; min-height: 620px; }.hidden { display: none !important; }
.rail { border-right: 1px solid var(--line); padding: 30px 20px 0 0; display: flex; flex-direction: column; gap: 7px; }
.nav-button { border: 0; background: transparent; color: var(--muted); text-align: left; padding: 11px 12px; display: flex; justify-content: space-between; transition: .2s; }.nav-button span { font-size: 9px; opacity: .5; }.nav-button:hover, .nav-button.active { color: var(--paper); background: rgba(232,223,207,.07); }.nav-button.active { border-left: 2px solid var(--signal); }
.rail-note { margin-top: auto; padding: 16px 12px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.65; }.rail-note b { color: var(--paper); font-size: 10px; }.rail-note p { margin-bottom: 0; }
.view { display: none; padding: 38px 0 0 38px; }.view.active { display: block; animation: reveal .35s ease both; }
.command-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(20,36,58,.9), rgba(11,20,34,.6)); padding: 26px; box-shadow: 18px 18px 0 rgba(239,107,62,.08); }
.section-label span { color: var(--muted); margin-left: 10px; letter-spacing: .06em; }.command-card label { display: block; color: var(--paper); margin-bottom: 10px; font-size: 12px; }
textarea { width: 100%; resize: vertical; min-height: 96px; color: var(--paper); background: #091524; border: 1px solid rgba(232,223,207,.23); padding: 15px; outline: none; line-height: 1.55; }.command-card textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(239,107,62,.13); } textarea::placeholder { color: #5d6a76; }
.command-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }.toggle { color: var(--muted) !important; display: flex !important; gap: 8px; align-items: center; margin: 0 !important; font-size: 11px !important; }.toggle input { accent-color: var(--signal); }
.primary { border: 0; color: var(--ink); background: var(--signal); padding: 12px 16px; font-weight: 700; transition: transform .15s, box-shadow .15s; }.primary:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--amber); }.primary b { margin-left: 17px; font-size: 18px; }.form-message { min-height: 17px; margin: 14px 0 0; color: var(--amber); font-size: 11px; }
.board-header { display: flex; align-items: end; justify-content: space-between; margin: 58px 0 18px; }.board-header .section-label { margin: 0 0 7px; }.board-header h2 { font: 600 31px/1 var(--serif); margin: 0; letter-spacing: -.035em; }.counter { font: 42px/1 var(--serif); color: var(--signal); }
.incident-list, .diagnosis-list { display: grid; gap: 9px; }.incident-row, .diagnosis-row { width: 100%; border: 1px solid var(--line); background: rgba(20,36,58,.3); color: inherit; display: grid; grid-template-columns: 95px 1fr 130px 30px; gap: 15px; align-items: center; padding: 18px; text-align: left; transition: .2s; }.incident-row:hover, .diagnosis-row:hover { background: rgba(20,36,58,.85); border-color: rgba(239,107,62,.55); transform: translateX(4px); }.severity { color: var(--amber); font-size: 10px; letter-spacing: .08em; }.severity.high { color: var(--danger); }.incident-title { font-family: var(--serif); font-size: 19px; }.incident-meta, .diagnosis-meta { color: var(--muted); font-size: 10px; line-height: 1.6; }.status { justify-self: start; padding: 5px 7px; border: 1px solid currentColor; font-size: 9px; letter-spacing: .08em; color: var(--green); }.status.open { color: var(--signal); }.status.mitigated { color: var(--amber); }.status.resolved { color: var(--muted); }.row-arrow { color: var(--signal); font-size: 20px; }.empty-state { color: var(--muted); border: 1px dashed var(--line); padding: 35px; text-align: center; }
.login-state { margin-top: 40px; border: 1px solid var(--line); min-height: 310px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(20,36,58,.65), transparent); }.login-card { max-width: 500px; text-align: center; padding: 30px; }.login-card h2 { font: 600 42px/1.03 var(--serif); letter-spacing: -.05em; margin: 0; }.login-card p:not(.eyebrow) { line-height: 1.8; color: var(--muted); margin: 18px 0 25px; }.link-button { text-decoration: none; display: inline-block; }
.incident-dialog { width: min(900px, calc(100vw - 36px)); max-height: calc(100vh - 50px); border: 1px solid var(--line); color: var(--paper); background: #0b1625; padding: 0; box-shadow: 0 24px 80px rgba(0,0,0,.6); }.incident-dialog::backdrop { background: rgba(1,5,11,.75); backdrop-filter: blur(4px); }.dialog-close { position: absolute; right: 14px; top: 12px; background: transparent; border: 0; color: var(--paper); font-size: 28px; z-index: 1; }.detail { padding: 34px; }.detail h2 { font: 600 42px/1 var(--serif); letter-spacing: -.05em; padding-right: 35px; margin: 8px 0 18px; }.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0; }.detail-grid div { padding: 13px 12px; border-right: 1px solid var(--line); }.detail-grid small { display: block; color: var(--muted); font-size: 9px; margin-bottom: 6px; }.detail h3 { font: 600 21px var(--serif); letter-spacing: -.02em; margin: 31px 0 12px; }.report { background: #07101c; padding: 16px; max-height: 300px; overflow: auto; font: 11px/1.55 var(--mono); color: #ced5dc; white-space: pre-wrap; }.detail-actions { display: flex; gap: 9px; flex-wrap: wrap; margin: 22px 0; }.secondary { border: 1px solid var(--line); color: var(--paper); background: transparent; padding: 10px 12px; }.secondary:hover { border-color: var(--amber); color: var(--amber); }.comment-list { display: grid; gap: 8px; }.comment { background: rgba(232,223,207,.05); padding: 12px; }.comment small { display: block; color: var(--muted); margin-bottom: 6px; font-size: 9px; }.comment-form { display: grid; gap: 8px; margin-top: 13px; }.comment-form textarea { min-height: 75px; }.comment-form button { justify-self: end; }
@keyframes pulse { 50% { opacity: .4; box-shadow: 0 0 3px var(--green); } } @keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .shell { width: min(100% - 28px, 1440px); }.topbar { grid-template-columns: 1fr auto; }.system-signal { display: none; }.hero { grid-template-columns: 1fr; min-height: auto; padding: 55px 0 38px; }.hero-signal { justify-self: start; margin-top: 42px; }.workspace { display: block; }.rail { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; padding: 15px 0; }.rail-note { display: none; }.view { padding: 27px 0 0; }.incident-row, .diagnosis-row { grid-template-columns: 1fr 24px; }.incident-row > :nth-child(1), .incident-row > :nth-child(3), .diagnosis-row > :nth-child(1), .diagnosis-row > :nth-child(3) { display: none; }.detail { padding: 24px; }.detail h2 { font-size: 32px; }.detail-grid { grid-template-columns: 1fr; }.detail-grid div { border-right: 0; border-bottom: 1px solid var(--line); }.command-actions { align-items: start; gap: 14px; flex-direction: column; }.primary { width: 100%; }.login-card h2 { font-size: 35px; } }

input, select { width: 100%; color: var(--paper); background: #091524; border: 1px solid rgba(232,223,207,.23); padding: 11px 12px; outline: none; }
input:focus, select:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(239,107,62,.13); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.identity { display: flex; align-items: center; gap: 12px; }.identity span { text-align: right; font-size: 10px; letter-spacing: .06em; }.identity strong { display: block; color: var(--paper); font-size: 12px; }.identity small { display: block; margin-top: 3px; color: var(--muted); }
.notice { border-left: 3px solid var(--amber); background: rgba(239,184,76,.1); color: #f3dca5; padding: 13px 16px; line-height: 1.6; margin-bottom: 18px; }.notice.danger { border-color: var(--danger); background: rgba(255,143,130,.08); color: var(--danger); }
.filters { display: grid; grid-template-columns: repeat(3, minmax(130px, 220px)) auto; gap: 8px; margin: -3px 0 16px; }.diagnoses .filters { grid-template-columns: minmax(130px, 220px) auto; justify-content: start; }.filters .secondary { white-space: nowrap; }
.auth-card { width: min(500px, 100%); }.auth-form { display: grid; gap: 14px; text-align: left; }.auth-form label, .panel-form label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }.auth-form .primary { margin-top: 4px; }.auth-form .form-message { text-align: center; }.login-state:has(.auth-card:not(.hidden)) { padding: 35px 20px; }
.member-layout { display: grid; grid-template-columns: minmax(260px, .36fr) 1fr; gap: 24px; align-items: start; }.panel-form, .members-panel { border: 1px solid var(--line); background: rgba(20,36,58,.35); padding: 22px; }.panel-form { display: grid; gap: 15px; position: sticky; top: 18px; }.member-list { display: grid; gap: 8px; }.member-row { display: grid; grid-template-columns: minmax(160px, 1fr) 120px 80px auto; gap: 9px; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; }.member-row > div small { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }.member-row.disabled { opacity: .55; }.member-active { color: var(--muted); font-size: 10px; display: flex; gap: 5px; align-items: center; }.member-active input { width: auto; accent-color: var(--signal); }.reset-member { grid-column: 2 / -1; justify-self: end; }
.text-button { color: var(--amber); border: 0; background: transparent; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }.muted { color: var(--muted); line-height: 1.7; }
.structured-report { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }.structured-report section { border: 1px solid var(--line); background: #07101c; padding: 15px; min-height: 105px; }.structured-report section:nth-child(3), .structured-report details { grid-column: 1 / -1; }.structured-report h4 { color: var(--signal); font: 600 17px var(--serif); margin: 0 0 10px; }.structured-report p { line-height: 1.65; margin: 0; }.structured-report pre { color: #ced5dc; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.55 var(--mono); margin: 0; }.structured-report details { border-top: 1px solid var(--line); padding-top: 10px; }.structured-report summary { cursor: pointer; color: var(--muted); font-size: 10px; margin-bottom: 12px; }.report-list { margin: 0; padding-left: 18px; line-height: 1.65; }.report-list li + li { margin-top: 6px; }
.inline-select { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }.inline-select select { min-width: 150px; }.one-time-link { display: grid; gap: 12px; }.one-time-link code { border: 1px solid var(--line); background: #07101c; padding: 15px; color: var(--green); overflow-wrap: anywhere; line-height: 1.6; }.compact-dialog { width: min(560px, calc(100vw - 36px)); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; transform: translateY(20px); opacity: 0; pointer-events: none; background: var(--paper); color: var(--ink); padding: 13px 17px; box-shadow: 6px 6px 0 var(--signal); transition: .2s; }.toast.visible { transform: none; opacity: 1; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; }.member-layout { grid-template-columns: 1fr; }.panel-form { position: static; }.member-row { grid-template-columns: 1fr 110px; }.member-active, .save-member { justify-self: start; }.reset-member { grid-column: auto; }.structured-report { grid-template-columns: 1fr; }.structured-report section, .structured-report section:nth-child(3) { grid-column: 1; } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr; }.member-row { grid-template-columns: 1fr; }.reset-member { justify-self: start; }.identity span { display: none; }.nav-button span { display: none; }.rail { overflow-x: auto; }.structured-report section { padding: 12px; } }
