:root {
  color-scheme: dark;
  --bg: #0f131c;
  --bg-2: #141926;
  --surface: #1a2030;
  --surface-2: #202839;
  --line: rgba(148, 168, 200, .17);
  --line-2: rgba(148, 168, 200, .3);
  --ink: #e9eef7;
  --muted: #aab6c8;
  --cyan: #5fd0dc;
  --rust: #e0602a;
  --mono: Menlo, "SF Mono", Consolas, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, .button, summary, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 15px; min-height: 44px; border: 1px solid var(--line-2);
  border-radius: 7px; color: var(--ink); background: var(--surface-2);
  cursor: pointer; font-size: 13px; font-weight: 600; text-decoration: none;
  line-height: 1.5; transition: background .15s, border-color .15s;
}
button:hover:not(:disabled), .button:hover { border-color: var(--cyan); background: #29364a; }
button.primary { background: var(--cyan); border-color: var(--cyan); color: #0c2028; }
button.primary:hover:not(:disabled) { background: #8ee5ed; }
button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
button.secondary { background: transparent; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 2px solid #f3bc69; outline-offset: 4px; }
main:focus, section[tabindex]:focus { outline: none; }
a { color: var(--cyan); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3.4vw, 43px); line-height: 1.15; letter-spacing: -.035em; margin-bottom: 18px; font-weight: 600; }
h2 { font-size: 25px; line-height: 1.3; font-weight: 550; letter-spacing: -.025em; margin-bottom: 14px; }
h3 { font-size: 18px; line-height: 1.4; font-weight: 600; margin-bottom: 12px; }
h4 { font-size: 15px; margin-bottom: 7px; }
p { margin-bottom: 16px; color: var(--muted); }
p:last-child { margin-bottom: 0; }
hr { margin: 25px 0; border: 0; border-top: 1px solid var(--line); }
code { font: 11px var(--mono); color: var(--cyan); overflow-wrap: anywhere; }
.icon { width: 19px; height: 19px; flex: 0 0 19px; vertical-align: middle; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 34px; min-height: 83px; background: linear-gradient(180deg, #161b28, #10141e); border-bottom: 1px solid var(--line-2); position: relative; }
.topbar::after { content: ''; position: absolute; bottom: -1px; height: 2px; left: 0; width: 65%; background: linear-gradient(90deg, var(--rust), transparent); }
.brand { display: flex; align-items: center; gap: 15px; font-size: 20px; letter-spacing: .18em; font-weight: 700; }
.brand-sub { display: inline-block; font: 10px var(--mono); letter-spacing: .15em; color: var(--muted); margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--line-2); vertical-align: middle; }
.brand-mark { display: inline-block; position: relative; width: 23px; height: 23px; border: 3px solid var(--rust); border-radius: 50%; box-shadow: 0 0 20px #e0602a30; }
.brand-mark::after { content: ''; position: absolute; left: -7px; right: -7px; top: 8px; height: 2px; background: var(--ink); transform: rotate(-20deg); }
.header-user, .person { display: flex; align-items: center; gap: 11px; }
.header-user { gap: 22px; }
.person { min-width: 0; }
.person strong { display: block; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.person .hint { margin: 3px 0 0; }
.avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px; border: 1px solid #5fd0dc40; border-radius: 50%; background: #5fd0dc12; color: var(--cyan); font: 11px var(--mono); }
main { max-width: 1480px; min-height: calc(100vh - 175px); margin: auto; padding: 35px; }
.site-footer { padding: 23px 35px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer > span:first-child { font-family: var(--mono); letter-spacing: .1em; }
.eyebrow { font: 10px/1.6 var(--mono); color: var(--cyan); letter-spacing: .14em; margin-bottom: 13px; }
.lead { font-size: 16px; line-height: 1.7; max-width: 720px; }
.hint { font-size: 12px; line-height: 1.6; color: var(--muted); margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; flex-shrink: 0; max-width: 100%; padding: 4px 9px; border: 1px solid #5fd0dc35; border-radius: 5px; color: #9ce6ed; background: #5fd0dc0d; font: 10px/1.6 var(--mono); white-space: nowrap; }
.badge.neutral { color: var(--muted); background: #aab6c80a; border-color: var(--line); }
.badge.rust { color: #ffb08c; background: #e0602a12; border-color: #e0602a50; }
.panel { background: linear-gradient(150deg, #1a2030, #171d2a); border: 1px solid var(--line); border-radius: 10px; padding: 25px; margin-bottom: 20px; min-width: 0; box-shadow: 0 1px 0 #ffffff03 inset; }
.panel:last-child { margin-bottom: 0; }
.two-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.two-columns > .panel { margin-bottom: 20px; }
.actions, .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.actions { margin-top: 20px; }
.toolbar { justify-content: space-between; margin-bottom: 18px; }
.toolbar h2, .toolbar h3, .toolbar p, .toolbar .eyebrow { margin: 0; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 19px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { margin: 0; }
input, textarea, select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; background: #0f1520; color: var(--ink); border: 1px solid var(--line-2); border-radius: 6px; font-size: 14px; }
textarea { resize: vertical; line-height: 1.6; }
input[type=file] { padding: 7px; }
input::file-selector-button { border: 0; border-radius: 4px; padding: 6px 9px; background: var(--surface-2); color: var(--ink); margin-right: 10px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; margin: 15px 0; }
legend { padding: 0 6px; font-size: 13px; color: var(--muted); }
.checkbox-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.checkbox-row input { width: 18px; min-height: 18px; accent-color: var(--cyan); }
summary { cursor: pointer; color: var(--cyan); padding: 10px 0; font-size: 13px; }
details { margin-top: 18px; }
.notice { max-width: 1410px; margin: 22px auto 0; padding: 15px 20px; background: #163137; border: 1px solid #5fd0dc50; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.notice p { color: #c5eef2; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.notice.error { background: #34231f; border-color: #e88c6855; }
.notice.error p { color: #ffccba; }
.notice button { flex-shrink: 0; }
.empty { padding: 23px 0; color: var(--muted); border-top: 1px dashed var(--line-2); }
.callout { padding: 14px 17px; border-left: 2px solid var(--rust); background: #e0602a09; font-size: 13px; }
.loading { padding: 45px; font: 13px var(--mono); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 10; padding: 10px 20px; background: var(--cyan); color: var(--bg); border-radius: 4px; }
.skip-link:focus { top: 12px; }
.login-layout { max-width: 1130px; margin: 35px auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 75px; align-items: center; }
.login-card { background: var(--bg-2); padding: 35px; border: 1px solid var(--line); border-radius: 12px; }
.login-card h1 { font-size: 32px; }
.login-card .lead { font-size: 14px; margin-bottom: 28px; }
.login-card .full { width: 100%; margin: 7px 0 20px; }
.login-story h2 { font-size: 32px; white-space: pre-line; margin-top: 18px; }
.login-story > p { max-width: 390px; }
.story-route { display: flex; gap: 24px; margin-top: 30px; font-size: 12px; color: var(--muted); }
.story-route span { display: flex; gap: 8px; align-items: center; }
.story-route .icon { color: var(--cyan); }
.orbital { height: 270px; position: relative; overflow: hidden; background-image: linear-gradient(#94a8c807 1px, transparent 1px), linear-gradient(90deg, #94a8c807 1px, transparent 1px); background-size: 34px 34px; border-bottom: 1px solid var(--line); }
.planet { position: absolute; width: 180px; height: 180px; left: 27%; top: 37px; border-radius: 50%; background: radial-gradient(circle at 30% 28%, #e88b55, #a1492c 45%, #532d25 70%, #171923 95%); box-shadow: -9px -4px 25px #e0602a12, 15px 20px 60px #0006; }
.planet::after { content: ''; position: absolute; inset: 17px; border-radius: 50%; border: 1px solid #f3be9730; transform: rotate(-28deg) scaleX(.4); }
.orbit { position: absolute; width: 330px; height: 140px; border: 1px solid #5fd0dc65; border-radius: 50%; left: 11%; top: 54px; transform: rotate(-30deg); }
.orbit::after { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); left: 37px; top: 115px; box-shadow: 0 0 12px #5fd0dc80; }
.orbit-label { position: absolute; bottom: 13px; right: 0; color: var(--muted); font: 9px var(--mono); letter-spacing: .13em; }
.dashboard-intro { display: flex; justify-content: space-between; gap: 30px; margin: 25px 0 35px; }
.date-stamp { font: 10px var(--mono); color: var(--muted); text-align: right; flex-shrink: 0; padding-top: 8px; }
.date-stamp p { font: 12px var(--sans); margin-top: 8px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; align-items: start; }
.dashboard-single { max-width: 860px; }
.dashboard-grid aside { padding-top: 62px; }
.dashboard-grid aside h2 { font-size: 23px; }
.dashboard-grid aside p { font-size: 13px; }
.due { color: var(--ink); font-weight: 600; }
.mission-card .due { font-size: 16px; margin-bottom: 14px; }
.mission-meta .due { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid #e0602a50; border-radius: 5px; background: #e0602a12; color: #ffb08c; font-size: 12px; }
.actions-inline { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.review-notes { margin-top: 20px; padding: 14px 17px; border: 1px dashed var(--line-2); border-radius: 6px; }
.review-notes h4 { margin-top: 0; }
details.panel > summary { margin: -6px 0; }
details.panel[open] > summary { margin-bottom: 12px; }
input[type=datetime-local] { max-width: 280px; }
.mission-card { display: flex; gap: 23px; background: linear-gradient(130deg, #1d2736, #171d2a 65%); border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 20px; padding: 28px; border-left: 3px solid var(--rust); }
.mission-card-mark { width: 55px; height: 55px; flex: 0 0 55px; display: grid; place-items: center; border: 1px solid #5fd0dc40; border-radius: 50%; color: var(--cyan); background: #5fd0dc08; }
.mission-card-mark .icon { width: 29px; height: 29px; }
.mission-card-body { flex: 1; min-width: 0; }
.mission-card h3 { font-size: 28px; margin-bottom: 4px; }
.mission-card p { font-size: 14px; }
.mission-card .primary { margin-top: 5px; }
.breadcrumbs { justify-content: flex-start; gap: 10px; color: var(--muted); font-size: 12px; margin: -12px 0 23px; }
.breadcrumbs > :last-child { margin-left: auto; }
.mission-header { display: flex; justify-content: space-between; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.mission-header h1 { margin-bottom: 15px; }
.mission-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; font-size: 12px; color: var(--muted); }
.mission-meta > span { display: inline-flex; gap: 8px; align-items: center; }
.mission-roster { max-width: 340px; padding-top: 7px; text-align: right; }
.mission-roster p { margin-bottom: 5px; }
.mission-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 36px; align-items: start; }
.mission-sidebar { position: sticky; top: 22px; }
.mission-nav { display: flex; flex-direction: column; gap: 7px; }
.mission-nav button { justify-content: flex-start; text-align: left; padding: 14px 12px; background: none; border-color: transparent; color: var(--muted); font-weight: 500; }
.mission-nav button[aria-current] { border-color: #5fd0dc35; color: #c5f5fa; background: linear-gradient(90deg, #5fd0dc18, #5fd0dc06); }
.mission-nav button[aria-current] .icon { color: var(--cyan); }
.nav-number { margin-left: auto; font: 9px var(--mono); opacity: .6; }
.sidebar-note { margin: 30px 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.sidebar-note p { font-size: 12px; }
.mission-content { min-width: 0; }
.section-heading { margin-bottom: 26px; }
.section-heading h2 { font-size: 29px; }
.section-heading .eyebrow { color: var(--muted); }
.section-heading .lead { font-size: 14px; }
.objective { display: flex; gap: 17px; padding: 0 0 23px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.objective > .icon { color: var(--cyan); width: 24px; height: 24px; flex-basis: 24px; }
.objective .eyebrow { margin-bottom: 7px; }
.objective h3 { margin-bottom: 0; font-weight: 500; }
.prose, .message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.criteria, .checks { padding: 0; list-style: none; }
.criteria li { display: flex; gap: 13px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.criteria code { flex-shrink: 0; }
.item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border: 0; padding-bottom: 0; }
.item p { font-size: 14px; }
.steps { margin: 0; padding-left: 25px; }
.steps li { padding: 8px 0 8px 8px; color: var(--muted); font-size: 14px; }
.steps li::marker { color: var(--cyan); font-family: var(--mono); font-size: 11px; }
.status-strip { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.status-strip p { margin: 0; font-size: 13px; }
.status-strip .badge { flex-shrink: 0; }
.task-list { margin: 15px 0 25px; }
.task-row { display: grid; grid-template-columns: minmax(130px, 2fr) minmax(100px, 1.2fr) 95px minmax(105px, 1fr) auto; align-items: end; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.task-row .field { margin: 0; }
.task-row .field label { font-size: 11px; }
.task-row input, .task-row select { padding: 9px; font-size: 12px; }
.task-row .remove-task { font-size: 11px; padding: 10px 5px; }
.baseline summary { font-size: 15px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.file-row > div { min-width: 0; }
.file-row .button { flex-shrink: 0; }
.file-name { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.file-name strong { font-size: 14px; overflow-wrap: anywhere; }
.file-row .hint { overflow-wrap: anywhere; }
.thread .message { padding: 24px 0; border-bottom: 1px solid var(--line); }
.thread .message:first-child { padding-top: 0; }
.thread .message:last-child { border-bottom: 0; padding-bottom: 0; }
.thread .message-body { padding-left: 46px; color: var(--ink); }
.esra-message .avatar { border-color: #e0602a50; background: #e0602a12; color: #f3b18e; }
.esra-message .person .hint { color: #f3b18e; }
.checks li { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checks p { font-size: 13px; }
.submission-card h4 { margin-top: 25px; }
.feedback { border-left: 2px solid var(--rust); background: #e0602a06; padding: 18px; margin-top: 15px; }
.feedback-form { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line-2); }
.publication-form .hint { margin-top: 10px; }
/* v0.3: header nav, tables, teams panel, control centre */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.header-nav { display: flex; gap: 6px; margin-left: auto; margin-right: 12px; }
.header-nav button { padding: 9px 14px; min-height: 40px; }
.header-nav button[aria-current] { color: #c5f5fa; border-color: #5fd0dc35; background: linear-gradient(90deg, #5fd0dc18, #5fd0dc06); }
.header-nav button[aria-current] .icon { color: var(--cyan); }
.dashboard-wide { max-width: none; }
.mini-bar { display: inline-block; position: relative; width: 120px; max-width: 100%; height: 6px; border-radius: 3px; background: #94a8c822; overflow: hidden; vertical-align: middle; flex-shrink: 0; }
.mini-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #8ee5ed); border-radius: 3px; transition: width .2s; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.data-table th { font: 10px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; white-space: nowrap; }
.data-table td .hint { margin: 3px 0 0; }
.data-table td strong { font-size: 14px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .cell-check { width: 36px; padding-right: 0; }
.data-table .cell-check input { width: 18px; min-height: 18px; margin: 4px 0 0; accent-color: var(--cyan); }
.data-table .cell-work { color: var(--muted); white-space: nowrap; }
.data-table .num { text-align: right; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.data-table th.num { text-align: right; }
.teams-panel { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.teams-panel > .toolbar { margin-bottom: 8px; }
.teams-panel h4 { font-size: 16px; margin: 0; }
.selection-tools { margin-bottom: 6px; }
.selection-tools button { padding: 6px 10px; min-height: 34px; font-size: 12px; }
.assign-actions { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-top: 20px; }
.assign-actions .field { margin-bottom: 0; }
.assign-actions .actions-inline { padding-bottom: 26px; }
button[aria-busy=true] { pointer-events: none; }
button[aria-busy=true]::after { content: ''; display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid #5fd0dc66; border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
button.primary[aria-busy=true]::after { border-color: #0c202866; border-top-color: #0c2028; }
@keyframes spin { to { transform: rotate(360deg); } }
.mission-file { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.mission-file summary { font-size: 14px; }
.mission-file .file-status { margin-bottom: 12px; }
.mission-file .file-result { margin-top: 18px; }
.mission-file .file-result:empty { margin-top: 0; }
.callout.ok { border-left-color: var(--cyan); background: #5fd0dc09; color: var(--ink); }
.diff-table td { overflow-wrap: anywhere; }
.diff-table td:nth-child(2) { color: #ffb08c; }
.diff-table td:nth-child(3) { color: #9ce6ed; }
.version-list { margin-top: 18px; }
.diff-entry { border: 1px solid var(--line); padding: 10px 16px; border-radius: 6px; }
.diff-entry > summary { overflow-wrap: anywhere; font-family: var(--mono); }
.diff-values { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.diff-values h4 { font-size: 12px; }
.diff-values p { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-old { color: #ffb08c; }
.diff-new { color: #9ce6ed; }
.rollout-panel { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
tr[data-unavailable] td { color: var(--muted); }
.credential-batch { margin: 20px 0; }
.credential-batch code { white-space: pre-wrap; user-select: all; }
.task-progress { min-width: 200px; }
.cell-chips { min-width: 220px; }
.overview { min-width: 1450px; }
.overview tbody tr { cursor: pointer; transition: background .15s; }
.overview tbody tr:hover, .overview tbody tr:focus-visible { background: #5fd0dc0a; outline-offset: -2px; }
.overview td { vertical-align: middle; }
.cell-progress { min-width: 220px; white-space: nowrap; }
.cell-progress .progress-count { display: inline-block; font: 12px var(--mono); margin-right: 10px; min-width: 32px; }
.cell-progress .mini-bar { width: 80px; }
.cell-progress .progress-top { display: flex; align-items: center; margin-bottom: 4px; }
.cell-progress .milestone-dots { margin-left: 0; }
.milestone-dots { display: inline-flex; flex-wrap: nowrap; gap: 4px; margin-left: 10px; vertical-align: middle; }
.milestone-dots .dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; display: inline-block; }
.milestone-dots .dot.done { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 6px #5fd0dc60; }
.mission-roster .milestone-dots { margin: 4px 0 0; }
.chip, .cell-chips .chip { display: inline-block; padding: 3px 9px; margin: 2px 4px 2px 0; border: 1px solid #e0602a50; border-radius: 12px; background: #e0602a12; color: #ffb08c; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.chips .chip { white-space: normal; overflow-wrap: anywhere; }
.cell-chips { max-width: 360px; }
.cell-chips .chip { white-space: normal; }
.overview td:first-child { white-space: nowrap; }
.overview td:nth-child(3) { white-space: nowrap; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.stat-value { font: 600 20px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.stat-label { font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.heatmap { overflow-x: auto; }
.heat-grid { display: flex; gap: 3px; align-items: flex-start; }
.heat-week, .heat-days { display: flex; flex-direction: column; gap: 3px; }
.heat-days { margin-right: 6px; }
.heat-days span { height: 13px; font: 9px/13px var(--mono); color: var(--muted); }
.heat-cell { display: block; width: 13px; height: 13px; border-radius: 2px; background: #94a8c814; border: 1px solid #94a8c810; }
.heat-cell.out { visibility: hidden; }
.heat-cell.level-1 { background: #1e5f68; }
.heat-cell.level-2 { background: #2a8a95; }
.heat-cell.level-3 { background: #3fb5c2; }
.heat-cell.level-4 { background: #8ee5ed; }
.heat-cell:focus-visible { outline-offset: 1px; }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 12px; font: 10px var(--mono); color: var(--muted); }
.heat-legend .heat-cell { width: 11px; height: 11px; }
.hour-strip { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 90px; align-items: end; }
.hour-bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 1px solid var(--line-2); }
.hour-fill { display: block; min-height: 2px; background: linear-gradient(180deg, #8ee5ed, #2a8a95); border-radius: 2px 2px 0 0; }
.hour-label { position: absolute; top: 100%; left: 0; font: 9px var(--mono); color: var(--muted); margin-top: 4px; }
.hour-strip { margin-bottom: 20px; }
.session-list li { justify-content: space-between; }
.session-time { font-family: var(--mono); font-size: 12px; color: var(--ink); flex-shrink: 0; }
.event-list { list-style: none; padding: 0; margin: 0; max-height: 520px; overflow-y: auto; }
.event-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 1fr) auto; gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.event-row:last-child { border-bottom: 0; }
.event-kind { color: var(--ink); font-weight: 600; }
.event-actor { color: var(--muted); }
.event-row time { font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.event-detail { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; }
.event-detail:empty { display: none; }
.event-row[data-kind^="sim."] .event-kind { color: #9ce6ed; }
.event-row[data-kind="submission.create"] .event-kind, .event-row[data-kind="feedback.send"] .event-kind { color: #ffb08c; }
.update-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; border-left-color: var(--cyan); background: #5fd0dc0c; }
.update-notice p { margin: 0; color: #c5eef2; }
.eyebrow .version { color: var(--muted); }
@media (max-width: 1150px) {
  .mission-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 23px; }
  .nav-number { display: none; }
  .task-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .task-row > :first-child { grid-column: 1 / -1; }
  .task-row .remove-task { justify-self: start; }
  .login-layout { gap: 35px; }
  .orbit { left: 0; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; }
}
@media (max-width: 800px) {
  main { padding: 24px 20px; }
  .topbar { padding: 16px 20px; }
  .brand-sub { display: block; border: 0; margin: 3px 0 0; padding: 0; font-size: 8px; }
  .header-user { gap: 8px; }
  .header-nav { margin-right: 4px; gap: 2px; }
  .header-nav button { padding: 8px; min-height: 36px; font-size: 12px; }
  .header-nav button span { display: none; }
  .assign-actions .actions-inline { padding-bottom: 0; }
  .event-row { grid-template-columns: minmax(0, 1fr) auto; }
  .event-actor { grid-column: 1 / -1; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .header-user .avatar { display: none; }
  .header-user .person strong { max-width: 130px; }
  .dashboard-intro { margin-top: 14px; }
  .date-stamp { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid aside { padding-top: 0; }
  .dashboard-grid aside .panel { border-left: 2px solid var(--rust); }
  .mission-layout { display: block; }
  .mission-sidebar { position: static; }
  .mission-nav { display: flex; flex-direction: row; overflow-x: auto; gap: 4px; padding: 4px 3px 12px; margin-bottom: 23px; }
  .mission-nav button { white-space: nowrap; padding: 11px; flex-shrink: 0; }
  .sidebar-note { display: none; }
  .mission-header { display: block; margin-bottom: 18px; padding-bottom: 20px; }
  .mission-roster { max-width: none; text-align: left; margin-top: 17px; }
  .two-columns { gap: 16px; }
  .notice { margin: 18px 20px 0; flex-wrap: wrap; }
  .login-layout { max-width: 510px; display: flex; flex-direction: column-reverse; gap: 35px; margin: 16px auto; }
  .login-card { width: 100%; }
  .login-story { width: 100%; padding: 15px; }
  .orbital { display: none; }
  .login-story h2 { font-size: 26px; }
  .site-footer { padding: 20px; flex-wrap: wrap; gap: 6px 20px; }
}
@media (max-width: 520px) {
  main { padding: 20px 14px; }
  .topbar { padding: 14px 18px; gap: 12px; }
  .header-user .person .hint { max-width: 100px; font-size: 10px; }
  .header-user .person strong { max-width: 100px; font-size: 11px; }
  .header-user #logout { padding: 8px; font-size: 11px; }
  .topbar > .badge { font-size: 8px; }
  .panel { padding: 19px 16px; }
  .two-columns { display: block; }
  .diff-values { grid-template-columns: minmax(0, 1fr); }
  .mission-card { padding: 20px; gap: 14px; }
  .mission-card-mark { display: none; }
  .mission-card h3 { font-size: 25px; }
  .login-card { padding: 25px 20px; }
  .login-card h1 { font-size: 29px; }
  .breadcrumbs { gap: 2px; }
  .breadcrumbs > span { flex: 1; text-align: right; }
  .breadcrumbs > :last-child { margin: 0; }
  .status-strip { align-items: flex-start; }
  .file-row { flex-wrap: wrap; gap: 10px; }
  .file-name { align-items: flex-start; }
  .thread .message-body { padding-left: 0; }
  .message .toolbar { gap: 10px; }
  .message time { padding-left: 46px; }
  .notice { margin: 16px 14px 0; }
  .task-row { gap: 12px; }
  input, textarea, select, .task-row input, .task-row select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
/* v0.4: landing page, team home, Sprint workflow, ESRA tools, access cards */
.landing { max-width: 1240px; margin: 10px auto 30px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); gap: 56px; align-items: start; }
.landing-hero h1 { white-space: pre-line; font-size: clamp(32px, 4vw, 50px); margin-bottom: 16px; }
.landing-hero > .lead { max-width: 640px; }
.landing-hero .orbital { height: 200px; margin: 6px 0 22px; border-radius: 10px; border: 1px solid var(--line); }
.landing-hero .planet { width: 140px; height: 140px; top: 28px; left: 38%; }
.landing-hero .orbit { width: 300px; height: 110px; top: 44px; left: 26%; }
.landing-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(150deg, #1a2030, #161c28); }
.landing-card .icon { color: var(--cyan); width: 22px; height: 22px; margin-bottom: 10px; }
.landing-card h3 { font-size: 15px; margin-bottom: 6px; }
.landing-card p { font-size: 13px; line-height: 1.55; }
.landing-route { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: route; }
.landing-route li { counter-increment: route; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.landing-route li::before { content: '0' counter(route); font: 10px var(--mono); color: var(--cyan); border: 1px solid #5fd0dc40; border-radius: 4px; padding: 1px 5px; }
.landing .login-card { position: sticky; top: 24px; margin-top: 30px; }
.landing .login-card h2 { font-size: 26px; margin-bottom: 8px; }
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; margin: 0 0 24px; border: 1px solid #5fd0dc35; border-left: 3px solid var(--cyan); border-radius: 8px; background: #5fd0dc0b; }
.next-step .eyebrow { margin-bottom: 4px; display: block; }
.next-step p { margin: 0; color: var(--ink); font-size: 14px; }
.next-step button { flex-shrink: 0; }
.home-current .next-step { margin: 16px 0 18px; }
.home-earlier { margin-top: 34px; }
.home-earlier h2 { font-size: 19px; }
.mission-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; background: var(--bg-2); }
.mission-row h3 { font-size: 16px; margin: 0 0 2px; }
.mission-row .eyebrow { margin-bottom: 4px; display: block; }
.sprint-nav button { gap: 12px; }
.nav-step { font: 11px var(--mono); color: var(--cyan); border: 1px solid #5fd0dc35; border-radius: 4px; padding: 1px 6px; flex-shrink: 0; }
.order-box { padding: 24px 26px; margin-bottom: 20px; border: 1px solid #e0602a55; border-left: 4px solid var(--rust); border-radius: 10px; background: linear-gradient(140deg, #2a1d1b, #1a1c26 70%); }
.order-box .eyebrow { color: #ffb08c; }
.order-text { color: var(--ink); font-size: 17px; line-height: 1.65; margin-bottom: 0; }
.order-box .actions { margin-top: 16px; }
.goal-text { color: var(--ink); font-size: 18px; line-height: 1.55; margin: 0; }
.lecture-link { margin-top: 18px; padding: 12px 16px; border: 1px dashed #94a8c855; border-radius: 8px; background: #94a8c80a; }
.lecture-link .eyebrow { color: #c9d3e2; margin-bottom: 4px; display: block; }
.lecture-link p { font-size: 13px; margin: 0; }
.backlog-table td:nth-child(3), .backlog-table td:nth-child(4) { color: var(--muted); min-width: 220px; }
.backlog-table td:nth-child(2) { min-width: 140px; }
.backlog-table code, .pb-choice code, .criteria code { white-space: nowrap; }
.landing-hero .orbit-label { right: 14px; }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.role-card { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.role-card p { font-size: 13px; }
.criteria.compact li { padding: 8px 0; font-size: 13px; }
.plan-step { margin: 0 0 22px; padding: 18px 20px 6px; border-color: var(--line-2); border-radius: 8px; }
.plan-step legend { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink); padding: 0 8px; }
.step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cyan); color: #0c2028; font: 600 11px var(--mono); }
.plan-step > .hint { margin: 2px 0 14px; }
.plan-step > .secondary { margin-bottom: 16px; }
.pb-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 18px; margin-bottom: 14px; }
.pb-choice .checkbox-row { font-size: 14px; }
.task-row.sprint-task { grid-template-columns: minmax(180px, 2.4fr) minmax(120px, 1.2fr) 100px minmax(110px, 1fr) auto; margin: 0; }
.task-list:empty { display: none; }
.dod-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dod-row { display: flex; gap: 8px; }
.send-plan { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; margin-bottom: 20px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); }
.send-plan > p { margin: 0; }
.send-plan.callout, .send-plan > .callout { width: 100%; }
.review-list { margin-bottom: 20px; }
.feedback.ok { border-left-color: var(--cyan); background: #5fd0dc08; }
.button.primary-link { background: var(--cyan); border-color: var(--cyan); color: #0c2028; }
.actions.top { margin: 0 0 16px; }
.delivery-card .check-columns { margin-top: 16px; }
.delivery-card .checks li { grid-template-columns: 112px minmax(0, 1fr); }
.delivery-card .checks li .badge { justify-content: center; }
.delivery-card .checks strong { display: block; font-size: 13px; margin-bottom: 2px; }
.wall-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.wall { display: grid; grid-template-columns: minmax(0, 1fr) 90px 52px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.wall-bar { height: 6px; border-radius: 3px; background: #94a8c822; overflow: hidden; }
.wall-fill { display: block; height: 100%; background: var(--cyan); }
.wall-value { font: 11px var(--mono); text-align: right; color: var(--ink); }
.handover { color: var(--ink); }
.error-text { color: #ffb08c; }
.sprint-board { min-width: 980px; }
.sprint-board tbody tr { cursor: pointer; }
.sprint-board tbody tr:hover, .sprint-board tbody tr:focus-visible { background: #5fd0dc0a; }
.filter { min-height: 36px; font-size: 13px; }
button.small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
#roster-table td { vertical-align: middle; }
.source-row { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.access-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.access-card { padding: 20px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); break-inside: avoid; }
.access-head { display: flex; align-items: center; gap: 10px; font: 10px var(--mono); letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.access-head .brand-mark { width: 16px; height: 16px; border-width: 2px; }
.access-head .brand-mark::after { top: 5px; left: -5px; right: -5px; }
.access-card h3 { margin-bottom: 2px; }
.access-team { font-size: 13px; margin-bottom: 12px; }
.access-card dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px 10px; margin: 0 0 12px; font-size: 13px; }
.access-card dt { color: var(--muted); }
.access-card dd { margin: 0; overflow-wrap: anywhere; }
.access-card code { font-size: 14px; color: var(--ink); }
@media (max-width: 1150px) {
  .landing { grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: 32px; }
  .landing-cards { grid-template-columns: minmax(0, 1fr); }
  .task-row.sprint-task { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .task-row.sprint-task > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .landing { display: flex; flex-direction: column; gap: 26px; }
  .landing .login-card { position: static; margin-top: 0; order: -1; }
  .landing-hero .orbital { display: none; }
  .sprint-nav { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible !important; }
  .sprint-nav button { white-space: normal !important; padding: 10px !important; min-height: 44px; font-size: 12px; }
  .role-grid { grid-template-columns: minmax(0, 1fr); }
  .next-step { flex-direction: column; align-items: stretch; }
  .send-plan { flex-direction: column; align-items: stretch; }
  .mission-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 520px) {
  .task-row.sprint-task { grid-template-columns: minmax(0, 1fr); }
  .wall { grid-template-columns: minmax(0, 1fr) 60px 48px; }
  .delivery-card .checks li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .delivery-card .checks li .badge { justify-self: start; }
  .order-box { padding: 18px; }
  .order-text { font-size: 15px; }
  .plan-step { padding: 14px 12px 4px; }
}
@media print {
  .topbar, .site-footer, .notice, .no-print, .skip-link { display: none !important; }
  body, main { background: #fff; color: #000; padding: 0; }
  .access-card { border: 1px solid #000; background: #fff; color: #000; }
  .access-card code, .access-card dd, .access-card h3 { color: #000; }
  .access-card dt, .access-head, .access-card .hint, .access-team { color: #333; }
}
/* v0.4.1: scan map uploads, previews and large view */
.deliver-files { display: grid; gap: 0 20px; }
.deliver-files.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deliver-files.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scanmap-preview, .scanmap-thumb { position: relative; display: block; padding: 0; min-height: 0; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #0b0f16; cursor: zoom-in; }
.scanmap-preview img, .scanmap-thumb img { display: block; width: 100%; height: auto; }
.scanmap-preview:hover:not(:disabled), .scanmap-thumb:hover:not(:disabled) { background: #0b0f16; border-color: var(--cyan); }
.scanmap-figure { margin: 16px 0 4px; max-width: 720px; }
.scanmap-figure figcaption { margin-top: 6px; }
.zoom-hint { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 4px; background: #0f131ccc; color: var(--ink); font: 10px var(--mono); letter-spacing: .08em; }
.file-row.has-thumb { justify-content: flex-start; }
.file-row.has-thumb > div { flex: 1; }
.scanmap-thumb { width: 120px; flex: 0 0 120px; }
.scanmap-thumb .zoom-hint { display: none; }
.image-viewer { width: min(96vw, 1500px); max-height: 94vh; padding: 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--ink); }
.image-viewer::backdrop { background: #05070bd9; }
.image-viewer .toolbar { margin-bottom: 10px; }
.image-viewer img { display: block; max-width: 100%; max-height: calc(94vh - 90px); margin: 0 auto; object-fit: contain; }
@media (max-width: 800px) {
  .deliver-files.cols-2, .deliver-files.cols-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .scanmap-thumb { width: 84px; flex-basis: 84px; }
  .file-row.has-thumb > div { flex: 1 1 calc(100% - 100px); }
}
/* v0.4.2: items outside the Sprint stay neutral */
.item-column .sprint-count { margin: -2px 0 6px; }
.outside-items { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.outside-items h4 { color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.outside-items > .hint { margin-bottom: 4px; }
.checks li.outside strong { color: var(--muted); font-weight: 600; }
.checks li.outside .wall-fill { background: #94a8c866; }
.checks li.outside .wall-value { color: var(--muted); }
