/* LAUNCHPAD · Launch Complex LC-01
   Blueprint: ultramarine ink on periwinkle paper, acid chartreuse as the launch signal. */
:root {
  --paper: #eceefa;
  --paper-2: #f6f7fd;
  --paper-3: #dde1f6;
  --ink: #1d2bb8;
  --ink-2: #2b37a8;
  --muted: #5d64ad;
  --rule: #c3c8ec;
  --rule-2: #9aa1d8;
  --orange: #c8f53a;
  --orange-2: #3f5a00;
  --go: #0f9d6b;
  --hold: #d98f00;
  --scrub: #e8344e;
  --console: #111a6e;
  --console-2: #17217f;
  --console-line: #2c379a;
  --console-ink: #eef0ff;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Chivo", system-ui, sans-serif;
  --mono: "Chivo Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.55 var(--body);
  background-color: var(--paper);
  /* drafting grid: 8 px minor, 64 px major */
  background-image:
    linear-gradient(rgba(29, 43, 184, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 43, 184, .055) 1px, transparent 1px),
    linear-gradient(rgba(29, 43, 184, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 43, 184, .025) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 8px 8px, 8px 8px;
}

a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; }
.small { font-size: 13px; }
.dim { color: #8b93d8; }
.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------------------------------------------------------------- demo banner + strip */
.demo-banner {
  background: var(--orange);
  color: #111a6e;
  font: 13.5px var(--body);
  padding: 9px 20px;
  text-align: center;
}
.demo-banner a { font-weight: 700; margin-left: 8px; }

.strip {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 9px max(20px, calc((100% - 1240px) / 2));
  background: var(--ink);
  color: var(--console-ink);
  font: 600 12px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.strip__id { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#cluster { display: inline-flex; align-items: center; gap: 8px; color: #c5cbf3; }
.strip__links { display: flex; gap: 20px; margin-left: auto; }
.strip__links a { text-decoration: none; color: #c5cbf3; }
.strip__links a:hover { color: var(--orange); }
.strip__links a::after { content: " ↗"; }
.strip__clock { color: #8b93d8; white-space: nowrap; }
.strip__clock b { color: var(--console-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.lamp { width: 8px; height: 8px; border-radius: 50%; background: #5d64ad; display: inline-block; flex: none; }
.lamp--go { background: #c8f53a; box-shadow: 0 0 8px #c8f53a; }
.lamp--hold { background: #ffb547; box-shadow: 0 0 8px #ffb547; animation: blink 1.2s steps(2, jump-none) infinite; }
.lamp--scrub { background: #ff4d6d; box-shadow: 0 0 8px #ff4d6d; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  padding: 56px 0 40px;
  align-items: start;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font: 600 12px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tick { width: 22px; height: 2px; background: var(--orange); }

.wordmark {
  margin: 0;
  font: 900 clamp(60px, calc(9.4vw - 10px), 118px)/.82 var(--display);
  letter-spacing: -.012em;
  text-transform: uppercase;
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
.wordmark span { color: var(--orange); margin: 0 .02em; }

.lede { max-width: 470px; margin: 26px 0 30px; font-size: 17px; color: var(--ink-2); animation: rise .7s .08s cubic-bezier(.2, .7, .2, 1) both; }
.lede code { background: var(--paper-3); padding: 1px 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font: 800 16px var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 13px 20px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; transition: transform .2s ease; }
.btn--launch { background: var(--orange); border-color: var(--orange); color: #111a6e; box-shadow: 5px 5px 0 var(--ink); animation: rise .7s .16s cubic-bezier(.2, .7, .2, 1) both; }
.btn--launch:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn--launch:hover svg { transform: translateX(4px); }
.btn--launch:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn--launch:disabled { background: var(--paper-3); border-color: var(--rule-2); color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }
.btn--ghost { border-color: var(--console-line); color: var(--console-ink); }
.btn--ghost:hover { border-color: var(--console-ink); }
.btn--wide { width: 100%; }

.readouts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 44px 0 0;
  border-top: 2px solid var(--ink);
  animation: rise .7s .24s cubic-bezier(.2, .7, .2, 1) both;
}
.readouts div { padding: 12px 12px 0 0; border-right: 1px solid var(--rule); }
.readouts div + div { padding-left: 12px; }
.readouts div:last-child { border-right: 0; }
.readouts dt { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.readouts dd { margin: 4px 0 0; font: 800 44px/1 var(--display); font-variant-numeric: tabular-nums; }
.readouts dd.is-ok { color: var(--go); }
.readouts dd.is-bad { color: var(--scrub); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------------------------------------------------------------- figure: the 3D cluster */
.fig { margin: 0; animation: rise .9s .1s cubic-bezier(.2, .7, .2, 1) both; }
.fig__frame {
  position: relative;
  aspect-ratio: 5 / 4;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, .55), transparent 65%),
    var(--paper-2);
  border: 1px solid var(--ink);
  overflow: hidden;
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#scene.is-dragging { cursor: grabbing; }
.crop { position: absolute; width: 14px; height: 14px; border: 0 solid var(--orange); z-index: 2; pointer-events: none; }
.crop--tl { top: 8px; left: 8px; border-top-width: 2px; border-left-width: 2px; }
.crop--tr { top: 8px; right: 8px; border-top-width: 2px; border-right-width: 2px; }
.crop--bl { bottom: 8px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; }
.crop--br { bottom: 8px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; }

.labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tag3d {
  position: absolute;
  transform: translate(-50%, -100%);
  font: 600 11px var(--mono);
  letter-spacing: .04em;
  white-space: nowrap;
  padding: 3px 7px;
  background: var(--ink);
  color: var(--paper-2);
  transition: opacity .2s ease;
}
.tag3d::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 14px; background: var(--ink); }
.tag3d i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--go); }
.tag3d.hold i { background: var(--hold); }
.tag3d.scrub i { background: var(--scrub); }
.tag3d.launch { background: var(--orange); color: #111a6e; }
.tag3d.launch::after { background: var(--orange); }
.tag3d.is-hot { outline: 2px solid var(--orange); }
.fig__hint { position: absolute; left: 16px; bottom: 12px; margin: 0; font: 11px var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; z-index: 2; }

.fig figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font: 11.5px var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.legend { display: flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; margin-left: 8px; display: inline-block; }
.legend .go { background: var(--go); }
.legend .hold { background: var(--hold); }
.legend .scrub { background: var(--scrub); }

.subsystems { display: flex; align-items: baseline; gap: 14px; padding-top: 12px; flex-wrap: wrap; }
.subsystems__label { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font: 12.5px var(--mono); }
.chips li { display: inline-flex; align-items: center; gap: 7px; }

/* ---------------------------------------------------------------- section heads */
.section-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 18px;
  margin: 72px 0 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.section-head__no { font: 600 13px var(--mono); color: var(--orange); }
.section-head h2 { margin: 0; font: 900 46px/.9 var(--display); text-transform: uppercase; letter-spacing: -.005em; }
.section-head p { margin: 0; justify-self: end; color: var(--muted); font-size: 14px; text-align: right; }

/* ---------------------------------------------------------------- payload sheets */
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0; border-left: 1px solid var(--ink); border-top: 1px solid var(--ink); }
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 22px 18px;
  background: var(--paper-2);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  animation: rise .5s cubic-bezier(.2, .7, .2, 1) both;
  transition: background .2s ease;
}
.sheet:hover { background: #ffffff; }
.sheet.is-flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 40% { background: #e8fbb0; } }
.sheet__no { font: 600 11px var(--mono); letter-spacing: .1em; color: var(--muted); }
.sheet__name { margin: 2px 0 0; font: 800 34px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; padding-right: 96px; }
.sheet__desc { margin: 8px 0 16px; color: var(--ink-2); font-size: 14px; min-height: 22px; }

.stamp {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  justify-items: center;
  padding: 5px 9px 4px;
  border: 2.5px solid currentColor;
  transform: rotate(-6deg);
  font: 900 22px/1 var(--display);
  letter-spacing: .08em;
  color: var(--go);
  mix-blend-mode: multiply;
}
.stamp small { font: 600 8.5px var(--mono); letter-spacing: .12em; margin-top: 2px; }
.stamp--hold { color: var(--hold); }
.stamp--scrub { color: var(--scrub); }
.stamp--launch { color: var(--orange); }

.spec { margin: 0 0 16px; font-size: 13px; }
.spec div { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.spec dt { color: var(--muted); font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.spec div::after { content: none; }
.spec .lead { flex: 1; border-bottom: 1px dotted var(--rule-2); transform: translateY(-3px); min-width: 12px; }
.spec dd { margin: 0; font: 12.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.sync--OutOfSync { color: var(--hold); }

.ops {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: auto;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.ops a, .ops button {
  display: grid;
  place-items: center;
  font: 600 11px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: none;
  border: 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 9px 6px;
  cursor: pointer;
}
.ops a:hover, .ops button:hover { background: var(--ink); color: var(--paper-2); }
.ops .is-primary { background: var(--ink); color: var(--paper-2); }
.ops .is-primary:hover { background: var(--orange); color: #111a6e; }
.ops .is-danger { color: var(--scrub); }
.ops .is-danger:hover { background: var(--scrub); color: #fff; }
.ops [aria-disabled="true"] { opacity: .4; pointer-events: none; }
/* the list is redrawn every few seconds: only the first draw animates */
.sheets.is-settled .sheet { animation: none; }

.bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 4px 0 14px; }
.bar span { height: 8px; background: var(--paper-3); }
.bar .is-done { background: var(--ink); }
.bar .is-running { background: var(--orange); animation: blink 1s steps(2, jump-none) infinite; }
.bar .is-failed { background: var(--scrub); }
.sheet--job { background: repeating-linear-gradient(-45deg, var(--paper-2) 0 14px, #e5e9fb 14px 28px); }

.empty { padding: 48px 0; text-align: center; font: 600 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- launch sequence */
.countdown { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.countdown::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; border-top: 2px dashed var(--ink); }
.countdown li { position: relative; padding: 0 16px 0 0; }
.countdown b {
  position: relative;
  display: inline-block;
  font: 900 30px/1 var(--display);
  background: var(--paper);
  padding: 14px 10px 14px 0;
}
.countdown li:last-child b { color: var(--orange); }
.countdown span { display: block; margin-top: 12px; font: 800 19px var(--display); text-transform: uppercase; letter-spacing: .03em; }
.countdown small { display: block; color: var(--muted); font-size: 13px; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 80px; padding: 18px 0 40px; border-top: 2px solid var(--ink); font: 12px var(--mono); letter-spacing: .04em; color: var(--ink-2); }

/* ---------------------------------------------------------------- launch control (dark console) */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(29, 43, 184, .45); backdrop-filter: blur(2px); }
.drawer {
  position: fixed;
  z-index: 21;
  inset: 0 0 0 auto;
  width: min(480px, 100%);
  overflow-y: auto;
  padding: 26px 28px 32px;
  background: var(--console);
  color: var(--console-ink);
  border-left: 4px solid var(--orange);
  animation: slide .28s cubic-bezier(.2, .7, .2, 1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer__head { position: relative; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--console-line); }
.drawer__kicker { margin: 0; font: 600 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.drawer__head h2 { margin: 4px 0 0; font: 900 42px/1 var(--display); text-transform: uppercase; }
.icon-btn { position: absolute; top: 0; right: 0; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid var(--console-line); color: var(--console-ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--orange); color: var(--orange); }
.icon-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #aab1ea; padding: 0; }
.field__label i { font-style: normal; color: #7179c0; text-transform: none; letter-spacing: 0; }
.field__hint { font-size: 12.5px; color: #8b93d8; }
.field__hint.is-error { color: #ff7d93; }
.field input {
  width: 100%;
  font: 16px var(--mono);
  color: var(--console-ink);
  background: var(--console-2);
  border: 1px solid var(--console-line);
  border-radius: 0;
  padding: 12px 13px;
}
.field input:focus { outline: none; border-color: var(--orange); box-shadow: inset 3px 0 0 var(--orange); }
.field input[aria-invalid="true"] { border-color: #ff7d93; }
#f-desc { font-family: var(--body); }

.preview { display: grid; gap: 4px; padding: 12px 14px; border: 1px dashed var(--console-line); font-size: 12.5px; }
.preview div { display: grid; grid-template-columns: 56px 1fr; gap: 8px; min-width: 0; }
.preview span { font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #8b93d8; }
.preview code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--console-ink); }

.tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl { position: relative; display: block; cursor: pointer; }
.tpl input { position: absolute; opacity: 0; }
.tpl__box { display: block; height: 100%; padding: 12px 13px; border: 1px solid var(--console-line); background: var(--console-2); }
.tpl input:checked + .tpl__box { border-color: var(--orange); box-shadow: inset 0 -3px 0 var(--orange); }
.tpl input:focus-visible + .tpl__box { outline: 2px solid var(--orange); outline-offset: 2px; }
.tpl__name { display: block; font: 800 19px var(--display); text-transform: uppercase; letter-spacing: .03em; }
.tpl__sum { display: block; color: #aab1ea; font-size: 12.5px; margin-top: 3px; }
.tpl__stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tpl__stack i { font: normal 10.5px var(--mono); color: #c5cbf3; border: 1px solid var(--console-line); padding: 1px 5px; }
.form__error { margin: 0; color: #ff7d93; font-size: 14px; }
.drawer .btn--launch { box-shadow: 5px 5px 0 #0b1257; }

.job__name { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.job__name code { font: 800 26px var(--display); text-transform: uppercase; letter-spacing: .02em; }
.pill { margin-left: auto; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border: 1px solid currentColor; color: #aab1ea; white-space: nowrap; }
.pill--done, .pill--Healthy { color: #c8f53a; }
.pill--running, .pill--Progressing { color: #ffb547; }
.pill--failed, .pill--Degraded, .pill--Missing { color: #ff7d93; }

.steps { list-style: none; margin: 0 0 16px; padding: 0; }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--console-line); }
.steps .ico { font: 900 22px/1 var(--display); color: #7179c0; }
.steps .is-done .ico { color: #c8f53a; }
.steps .is-running .ico { color: var(--orange); animation: blink 1s steps(2, jump-none) infinite; }
.steps .is-failed .ico { color: #ff7d93; }
.steps b { display: block; font-weight: 500; font-size: 14.5px; }
.steps .is-pending b { color: #8b93d8; }
.steps small { display: block; color: #aab1ea; font: 12px var(--mono); margin-top: 2px; word-break: break-word; }
.steps .t { float: right; color: #8b93d8; font: 11px var(--mono); }

.job__links { display: flex; gap: 16px; margin: 4px 0 18px; font: 12px var(--mono); }
.job__links a { color: #c5cbf3; }
.job__done { display: grid; gap: 10px; }

/* ---------------------------------------------------------------- logs (drawer + playground) */
.log {
  margin: 0;
  padding: 14px;
  background: #0b1257;
  color: #d5daff;
  border: 1px solid var(--console-line);
  border-left: 3px solid var(--orange);
  font: 12px/1.65 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 460px;
  overflow: auto;
}
.job__log { max-height: 190px; margin: 0 0 16px; font-size: 11.5px; }
.log__l--head { color: #fff; font-weight: 600; }
.log__l--muted { color: #7f88cf; }
.log__l--ok { color: #c8f53a; }
.log__l--bad { color: #ff7d93; }
.log__l--argo { color: #c8f53a; }

/* ---------------------------------------------------------------- playground panel (public demo) */
.panel {
  position: fixed;
  z-index: 21;
  inset: 0 0 0 auto;
  width: min(1000px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border-left: 2px solid var(--ink);
  box-shadow: -18px 0 0 rgba(29, 43, 184, .06);
  animation: slide .28s cubic-bezier(.2, .7, .2, 1);
}
.panel__head { display: flex; align-items: center; gap: 12px; padding: 18px 24px 14px; background: var(--ink); color: var(--paper-2); }
.panel__head h2 { margin: 0; font: 900 32px/1 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel__head .dot { display: none; }
.panel__head .pill { margin-left: 2px; }
.panel__tag { color: #aab1ea; font-size: 12px; margin-right: auto; }
.panel__head .icon-btn { position: static; }
.tabs { display: flex; padding: 0 24px; background: var(--ink); overflow-x: auto; }
.tabs button {
  font: 800 15px var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #aab1ea;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 10px 14px 9px;
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--paper-2); }
.tabs button[aria-selected="true"] { color: var(--paper-2); border-bottom-color: var(--orange); }
.panel__body { flex: 1; overflow-y: auto; padding: 22px 24px 30px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.pg-note { margin: 0; color: var(--ink-2); font-size: 14px; }
.pg-note a { color: var(--orange-2); font-weight: 700; }
.pg-note--bad { color: var(--scrub); }

.browser { border: 1px solid var(--ink); background: #fff; display: flex; flex-direction: column; min-height: 420px; flex: 1; box-shadow: 6px 6px 0 rgba(29, 43, 184, .12); }
.browser__bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--paper-3); border-bottom: 1px solid var(--ink); }
.browser__bar span { width: 9px; height: 9px; background: var(--rule-2); }
.browser__bar code { margin-left: 8px; color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser__bar i { margin-left: auto; font: normal 11px var(--mono); color: var(--go); }
.browser__view { flex: 1; width: 100%; border: 0; min-height: 400px; background: #fff; }

.api { border: 1px solid var(--ink); background: #fff; }
.api__bar { display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--paper-3); border-bottom: 1px solid var(--ink); flex-wrap: wrap; }
.api__method { font: 700 12px var(--mono); color: var(--go); }
.api__bar code { color: var(--ink-2); font-size: 13px; }
.api__bar input { flex: 1; min-width: 120px; font: 14px var(--mono); color: var(--ink); background: #fff; border: 1px solid var(--ink); padding: 8px 10px; border-radius: 0; }
.api__bar .btn { padding: 8px 14px; font-size: 14px; box-shadow: none; animation: none; }
.api__quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px; border-bottom: 1px solid var(--rule); }
.api__quick button { font: 12px var(--mono); color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule-2); padding: 4px 8px; cursor: pointer; }
.api__quick button:hover { background: var(--ink); color: var(--paper-2); }
.api__out { margin: 0; padding: 14px; min-height: 220px; max-height: 420px; overflow: auto; background: #fff; font: 13px/1.55 var(--mono); white-space: pre-wrap; }
.api__out.is-ok { color: var(--ink); }
.api__out.is-bad { color: var(--scrub); }

.run { display: flex; align-items: center; gap: 10px; }
.run .pill { margin-left: 0; }
.panel .pill--done { color: var(--go); }
.panel .pill--running { color: var(--hold); }
.panel .pill--failed { color: var(--scrub); }

.files { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 12px; min-height: 0; }
.files__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.files__list button { width: 100%; text-align: left; font: 12.5px var(--mono); color: var(--ink-2); background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 7px 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files__list button:hover { background: var(--paper-3); }
.files__list button[aria-current="true"] { background: var(--ink); color: var(--paper-2); }
.files__view { margin: 0; padding: 14px; background: #fff; border: 1px solid var(--ink); font: 12.5px/1.6 var(--mono); overflow: auto; max-height: 560px; }

.editor { width: 100%; min-height: 340px; resize: vertical; font: 13px/1.55 var(--mono); color: var(--ink); background: #fff; border: 1px solid var(--ink); border-radius: 0; padding: 12px; tab-size: 2; }
.editor:focus { outline: none; box-shadow: inset 4px 0 0 var(--orange); }
.panel .field input { background: #fff; color: var(--ink); border-color: var(--ink); }
.panel .field__label { color: var(--muted); }
.panel .btn--launch { align-self: flex-start; animation: none; }

/* ---------------------------------------------------------------- toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px); background: var(--ink); color: var(--paper-2); padding: 11px 16px; border-left: 4px solid var(--orange); font: 13px var(--mono); box-shadow: 6px 6px 0 rgba(29, 43, 184, .2); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
  .wordmark { font-size: clamp(56px, 15vw, 150px); }
  .countdown { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .countdown::before { display: none; }
  .section-head { grid-template-columns: auto 1fr; }
  .section-head p { grid-column: 1 / -1; justify-self: start; text-align: left; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .strip { flex-wrap: wrap; gap: 6px 12px; padding-inline: 16px; font-size: 10.5px; }
  .strip__links { margin-left: 0; width: 100%; gap: 16px; }
  .strip__clock { display: none; }
  .strip__links { gap: 12px; }
  .readouts { grid-template-columns: repeat(2, 1fr); }
  .readouts div:nth-child(2) { border-right: 0; }
  .readouts div:nth-child(3) { padding-left: 0; }
  .readouts dd { font-size: 36px; }
  .sheets { grid-template-columns: 1fr; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .section-head h2 { font-size: 36px; }
  .tpls { grid-template-columns: 1fr; }
  .files { grid-template-columns: 1fr; }
  .files__list { flex-direction: row; overflow-x: auto; }
  .drawer { padding: 22px 18px; }
  .panel__head, .tabs, .panel__body { padding-left: 16px; padding-right: 16px; }
  .panel__tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* staggered entrance for the manifest (no inline styles: the portal's CSP forbids them) */
.sheet:nth-child(2) { animation-delay: 60ms; }
.sheet:nth-child(3) { animation-delay: 120ms; }
.sheet:nth-child(4) { animation-delay: 180ms; }
.sheet:nth-child(5) { animation-delay: 240ms; }
.sheet:nth-child(n + 6) { animation-delay: 300ms; }

/* blueprint: chartreuse only as a fill; thin marks stay in ink so they read on paper */
.crop { border-color: var(--ink); }
.tick { background: var(--ink); height: 3px; }
.section-head__no { color: var(--ink); }
.chips .lamp--go { background: var(--go); box-shadow: none; }
.countdown li:last-child b { color: var(--ink); background: linear-gradient(transparent 55%, var(--orange) 55% 88%, transparent 88%); }
.sheet.is-flash { animation: flash 1.2s ease; }
