/* Actmark pages. Dark instrument panel: neutral near-black, one hue (cyan) in four brightnesses.
   Bright cyan is for text, lines and light only, never for large fills. No build step, no outside requests. */
:root {
  --bg: #131313;            /* page */
  --bg-deep: #0e0f10;       /* sidebar, story panel, inputs */
  --panel: #18191a;         /* a panel on the page */
  --panel-2: #1f2122;       /* a raised row, hover */
  --line: #26292b;
  --line-strong: #3a3e41;
  --text: #e7e9e9;
  --muted: #8a8b8c;
  --faint: #5c5f61;
  --cyan: #2af0f4;          /* light: selected text, icons, chart lines */
  --cyan-mid: #22b5b3;      /* counts, secondary accents */
  --teal: #174848;          /* selected / primary fill */
  --teal-hi: #1d5c5c;
  --teal-soft: #13272c;     /* quiet fill with a hint of the hue */
  --glow: rgba(42, 240, 244, 0.35);
  --amber: #f0b44c;  --amber-soft: #2b2312;
  --red: #ff7a70;    --red-soft: #2d1716;
  --green: #4fe3a2;  --green-soft: #10291f;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 10px;
  --gutter: 1.25rem;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
/* the blueprint: a faint grid that fades toward the bottom of the screen */
.grid-bg { background-color: var(--bg);
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.0625rem; line-height: 1.35; font-weight: 650; }
h3 { font-size: 0.9375rem; font-weight: 650; }
a { color: var(--cyan); text-underline-offset: 3px; text-decoration-color: rgba(42,240,244,0.4); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: var(--teal-hi); color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- controls --------------------------------------------------------------------------- */
button, .btn { font: inherit; font-size: 0.9375rem; cursor: pointer; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--panel-2);
  color: var(--text); padding: 0.55rem 1.05rem; line-height: 1.35; display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--teal); border-color: rgba(42,240,244,0.22); color: var(--cyan); font-weight: 650; }
button.primary:hover { background: var(--teal-hi); border-color: rgba(42,240,244,0.5); box-shadow: 0 0 18px rgba(42,240,244,0.12); }
button.good { background: var(--teal); border-color: rgba(42,240,244,0.22); color: var(--cyan); font-weight: 650; }
button.good:hover { background: var(--teal-hi); }
button.danger { color: var(--red); border-color: #4a2523; background: transparent; }
button.danger:hover { background: var(--red-soft); border-color: var(--red); }
button.solid-danger { background: var(--red-soft); border-color: var(--red); color: var(--red); font-weight: 650; }
button.ghost { border-color: transparent; background: none; color: var(--muted); padding: 0.35rem 0.6rem; }
button.ghost:hover { color: var(--text); background: var(--panel-2); }
button.big { padding: 0.8rem 1.5rem; font-size: 1rem; }
button:disabled { opacity: 0.5; cursor: default; }
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.hint { font-size: 0.8125rem; color: var(--muted); margin-top: 0.4rem; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=number], input[type=search], input[type=date], textarea {
  font: inherit; width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-deep); color: var(--text);
  transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover { border-color: #50555a; }
input:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(42,240,244,0.12), 0 0 16px rgba(42,240,244,0.1); }
textarea { resize: vertical; min-height: 5rem; }
.field { margin-bottom: 1.3rem; }
.alert { border-radius: var(--r); padding: 0.7rem 0.9rem; font-size: 0.875rem; line-height: 1.45; border: 1px solid transparent; }
.alert.bad { background: var(--red-soft); color: var(--red); border-color: #4a2523; margin-bottom: 1.1rem; }

/* status words: a small light and a word */
.tag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; white-space: nowrap; line-height: 1.5; border: 1px solid transparent; }
.tag::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.tag.active { background: var(--teal-soft); color: var(--cyan); border-color: rgba(42,240,244,0.18); }
.tag.pending { background: var(--amber-soft); color: var(--amber); border-color: #4a3b18; }
.tag.disabled, .tag.rejected { background: var(--red-soft); color: var(--red); border-color: #4a2523; }
.tag.plain { background: var(--panel-2); color: var(--muted); }
.tag.kind { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.tag.plain::before, .tag.kind::before { display: none; }

.mark { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.01em; color: var(--text); text-decoration: none; }
.mark svg { width: 26px; height: 26px; flex: none; color: var(--cyan); filter: drop-shadow(0 0 6px rgba(42,240,244,0.45)); }
.env { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-strong); display: inline-flex; align-items: center; gap: 0.4rem; }
.env::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.env.sandbox { background: var(--amber-soft); color: var(--amber); border-color: #4a3b18; }
.env.sandbox::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* panels: one border, and a hairline of light along the top edge */
.sheet, .kpis, .review-card, .door, .signin .card, dialog { position: relative; }
.sheet::before, .kpis::before, .signin .card::before, dialog::before {
  content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(42,240,244,0.55) 30%, rgba(42,240,244,0.55) 70%, transparent); opacity: 0.45; }

/* ============================ registration =========================================== */
.split { min-height: 100vh; display: grid; grid-template-columns: minmax(20rem, 36%) 1fr; }
.story { background: var(--bg-deep); border-right: 1px solid var(--line); padding: 2.25rem 3rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.story::after { /* a large faint seal ring, half off the panel */
  content: ""; position: absolute; right: -10rem; bottom: -10rem; width: 28rem; height: 28rem; border-radius: 50%;
  border: 1px solid rgba(42,240,244,0.10); box-shadow: inset 0 0 0 1.4rem rgba(42,240,244,0.02), inset 0 0 0 1.5rem rgba(42,240,244,0.08), 0 0 80px rgba(42,240,244,0.05); pointer-events: none; }
.story h1 { font-size: 2.25rem; line-height: 1.15; margin-top: 4.5rem; max-width: 14ch; letter-spacing: -0.02em; }
.story .lede { color: var(--muted); margin-top: 1rem; max-width: 34ch; }
.steps { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; gap: 0.9rem; position: relative; padding-bottom: 1.6rem; color: var(--faint); }
.steps li::before { content: counter(step); width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center;
  font-size: 0.8125rem; font-weight: 600; font-family: var(--mono); background: var(--bg-deep); position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; left: calc(1rem - 0.5px); top: 2rem; bottom: 0; width: 1px; background: var(--line-strong); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps li b { display: block; font-weight: 600; padding-top: 0.25rem; }
.steps li span { display: block; font-size: 0.8125rem; color: var(--faint); margin-top: 0.15rem; }
.steps li.now { color: var(--text); }
.steps li.now span { color: var(--muted); }
.steps li.now::before { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 0 4px rgba(42,240,244,0.08), 0 0 14px rgba(42,240,244,0.35); }
.steps li.done { color: var(--muted); }
.steps li.done::before { content: "✓"; border-color: rgba(42,240,244,0.35); background: var(--teal); color: var(--cyan); }
.steps li.done::after { background: linear-gradient(var(--cyan), rgba(42,240,244,0.2)); opacity: 0.6; }
.story .foot { margin-top: auto; padding-top: 3rem; font-size: 0.8125rem; color: var(--faint); max-width: 36ch; position: relative; z-index: 1; }

.desk { display: flex; flex-direction: column; }
.desk .top { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; padding: 1.25rem 2rem; }
.form-area { flex: 1; display: flex; justify-content: center; padding: 2rem 2rem 4rem; }
.form-area > * { width: 100%; max-width: 34rem; }
.stepno { font-size: 0.8125rem; color: var(--cyan-mid); font-weight: 600; font-family: var(--mono); letter-spacing: 0.02em; }
.form-area h2 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.015em; margin: 0.35rem 0 0.4rem; }
.form-area .sub { color: var(--muted); margin-bottom: 2rem; max-width: 46ch; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tiles label { margin: 0; font-weight: 400; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 12px; padding: 1rem; cursor: pointer; display: grid; gap: 0.4rem; position: relative; transition: border-color .12s, background .12s, box-shadow .12s; }
.tiles label:hover { border-color: #50555a; }
.tiles input { position: absolute; opacity: 0; pointer-events: none; }
.tiles svg { width: 28px; height: 28px; color: var(--muted); }
.tiles b { font-size: 0.9375rem; }
.tiles span { font-size: 0.8125rem; color: var(--muted); line-height: 1.45; }
.tiles label::after { content: ""; position: absolute; top: 0.95rem; right: 0.95rem; width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--line-strong); }
.tiles label:has(input:checked) { border-color: rgba(42,240,244,0.55); background: var(--teal-soft); box-shadow: 0 0 0 1px rgba(42,240,244,0.15), 0 0 24px rgba(42,240,244,0.08); }
.tiles label:has(input:checked) svg { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(42,240,244,0.5)); }
.tiles label:has(input:checked)::after { border-color: var(--cyan); background: radial-gradient(circle, var(--cyan) 0 35%, transparent 40%); box-shadow: 0 0 8px var(--glow); }
.tiles label:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 2rem; }
.code-input { font-family: var(--mono) !important; font-size: 2rem !important; letter-spacing: 0.55em; padding: 0.7rem 0 0.7rem 0.55em !important; text-align: center; max-width: 17rem; color: var(--cyan) !important; }
.sent-to { display: flex; align-items: center; gap: 0.75rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 1.75rem; }
.sent-to svg { width: 22px; height: 22px; color: var(--cyan); flex: none; }

/* the certificate: the one loud moment */
.certificate { display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: center; margin-bottom: 2rem; }
.seal { width: 9.5rem; height: 9.5rem; color: var(--amber); display: block; margin: 0.4rem; filter: drop-shadow(0 0 9px color-mix(in srgb, currentColor 40%, transparent)); }
.seal.active { color: var(--cyan); }
.seal.rejected, .seal.disabled { color: var(--red); }
.seal .tilt { transform: rotate(-9deg); transform-origin: 80px 80px; }
.seal text { font-family: var(--sans); font-weight: 700; fill: currentColor; }
.seal .date { font-family: var(--mono); font-weight: 500; }
.seal .ring { fill: none; stroke: currentColor; }
.seal .scale { fill: none; stroke: currentColor; stroke-width: 3; stroke-dasharray: 1 5.2; opacity: 0.7; transform-origin: 80px 80px; }
@media (prefers-reduced-motion: no-preference) {
  .seal.stamp { animation: stamp 0.6s cubic-bezier(.2,1.4,.4,1) both; }
  @keyframes stamp { 0% { opacity: 0; transform: scale(1.5); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
  .seal .scale { animation: turn 60s linear infinite; }
  @keyframes turn { to { transform: rotate(360deg); } }
}
.certificate h2 { margin: 0.35rem 0 0.4rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.5rem; font-size: 0.9375rem; padding: 1.1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { overflow-wrap: anywhere; }
.keyslip { margin-top: 1.75rem; border-radius: 12px; background: var(--bg-deep); border: 1px solid rgba(42,240,244,0.25); padding: 1.1rem 1.2rem 1rem; position: relative;
  box-shadow: 0 0 0 1px rgba(42,240,244,0.04), 0 0 32px rgba(42,240,244,0.06) inset; }
.keyslip .head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.6rem; }
.keyslip .head h3 { flex: 1; }
.keyslip .key { font-family: var(--mono); font-size: 0.9375rem; word-break: break-all; color: var(--cyan); text-shadow: 0 0 12px rgba(42,240,244,0.35); user-select: all; line-height: 1.6;
  padding: 0.75rem 0; border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); }
.keyslip .warn { color: var(--amber); font-size: 0.8125rem; margin-top: 0.7rem; display: flex; gap: 0.5rem; }
.keyslip .copied { font-size: 0.8125rem; color: var(--cyan-mid); }
.keyslip button { background: var(--teal); border-color: rgba(42,240,244,0.3); color: var(--cyan); font-weight: 650; }
.keyslip button:hover { background: var(--teal-hi); }

/* entry page */
.entry { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.entry header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 2rem; }
.entry main { display: grid; place-items: center; padding: 2rem; }
.entry .inner { width: 100%; max-width: 64rem; }
.entry h1 { font-size: 2.75rem; letter-spacing: -0.03em; max-width: 16ch; line-height: 1.1; }
.entry .lede { color: var(--muted); margin: 1rem 0 2.5rem; max-width: 52ch; font-size: 1.0625rem; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.door { display: grid; gap: 0.5rem; padding: 1.5rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.door:hover { border-color: rgba(42,240,244,0.45); box-shadow: 0 0 28px rgba(42,240,244,0.08); }
.door.dark { background: var(--teal-soft); border-color: rgba(42,240,244,0.2); }
.door b { font-size: 1.125rem; }
.door span { color: var(--muted); font-size: 0.9375rem; }
.door em { font-style: normal; font-weight: 600; color: var(--cyan); margin-top: 0.75rem; font-size: 0.9375rem; }

/* ============================ operator console ========================================= */
.shell { display: grid; grid-template-columns: 15.5rem 1fr; min-height: 100vh;
  background: linear-gradient(90deg, var(--bg-deep) calc(15.5rem - 1px), var(--line) calc(15.5rem - 1px) 15.5rem, transparent 15.5rem); }
.side { background: var(--bg-deep); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.25rem 0.75rem; position: sticky; top: 0; height: 100vh; }
.side .mark { padding: 0 0.6rem; }
.side .role { padding: 0.2rem 0.6rem 0 2.95rem; font-size: 0.8125rem; color: var(--muted); }
.side nav { margin-top: 2rem; display: grid; gap: 0.2rem; }
.side nav .group { font-size: 0.75rem; color: var(--faint); padding: 1rem 0.65rem 0.35rem; }
.side nav button { width: 100%; justify-content: flex-start; border: 1px solid transparent; background: none; color: var(--muted); padding: 0.6rem 0.7rem; border-radius: 10px; font-size: 0.9375rem; position: relative; }
.side nav button svg { width: 18px; height: 18px; flex: none; }
.side nav button:hover { background: var(--panel-2); color: var(--text); }
.side nav button[aria-current=page] { background: var(--teal); color: var(--cyan); font-weight: 650; border-color: rgba(42,240,244,0.18); }
.side nav button[aria-current=page] svg { filter: drop-shadow(0 0 5px rgba(42,240,244,0.6)); }
.side nav button[aria-current=page]::before { content: ""; position: absolute; left: -0.75rem; top: 25%; bottom: 25%; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.side nav .count { margin-left: auto; font-size: 0.75rem; font-family: var(--mono); color: var(--faint); }
.side nav button[aria-current=page] .count { color: var(--cyan-mid); }
.side nav button .count.hot, .side nav button[aria-current=page] .count.hot { background: var(--amber-soft); color: var(--amber); border: 1px solid #4a3b18; border-radius: 999px; padding: 0 0.45rem; font-weight: 700; }
.side .bottom { margin-top: auto; display: grid; gap: 0.6rem; padding: 0 0.6rem; }
.side .bottom .env { justify-self: start; }
.side .bottom .row { display: flex; gap: 0.25rem; margin-left: -0.6rem; }

.main { min-width: 0; padding: 2rem 2.5rem 4rem; }
.page { max-width: 76rem; margin: 0 auto; }
.pagehead { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pagehead .title { flex: 1; min-width: 16rem; }
.pagehead .title p { color: var(--muted); margin-top: 0.35rem; font-size: 0.9375rem; }
.pagehead .tools { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.pagehead input[type=search] { width: 17rem; padding-left: 2.1rem;
  background: var(--bg-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8b8c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.7rem center / 1rem; }
.back { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); text-decoration: none; font-size: 0.875rem; margin-bottom: 0.9rem; }
.back:hover { color: var(--cyan); }

/* a row of figures, divided by rules, on one panel */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: var(--gutter); }
.kpis > div { padding: 1.15rem 1.3rem 1.25rem; border-left: 1px solid var(--line); min-width: 0; }
.kpis > div:first-child { border-left: 0; }
.kpis b { display: block; font-size: 2rem; line-height: 1.1; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.kpis > div:first-child b { color: var(--cyan); text-shadow: 0 0 18px rgba(42,240,244,0.35); }
.kpis span { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 0.4rem; }
.kpis small { display: block; font-size: 0.75rem; color: var(--faint); margin-top: 0.15rem; }
.kpis > div.hot b { color: var(--amber); text-shadow: 0 0 18px rgba(240,180,76,0.3); }
.kpis .word b { font-size: 1.25rem; line-height: 1.8; letter-spacing: 0; }

.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.sheet > header { display: flex; align-items: baseline; gap: 0.75rem; padding: 1.05rem 1.3rem 0; }
.sheet > header h2 { flex: 1; }
.sheet > header a, .sheet > header .link { font-size: 0.875rem; }
.sheet > header .small { font-family: var(--mono); color: var(--faint); }
.sheet .body { padding: 1rem 1.3rem 1.3rem; }
/* One page grid. Every two-column row uses the same two equal tracks and the same gutter, so panel edges
   line up from the top of the page to the bottom. Never give one row a different split. */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); align-items: start; margin-bottom: var(--gutter); }
.stack { display: grid; gap: var(--gutter); }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font-weight: 600; color: var(--faint); font-size: 0.8125rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th.r, .table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.table.rows tbody tr { cursor: pointer; transition: background .1s; }
.table.rows tbody tr:hover td { background: var(--panel-2); }
.table.rows tbody tr:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.table .who b { display: block; font-weight: 600; }
.table .who span { display: block; font-size: 0.8125rem; color: var(--muted); }
.table .go { color: var(--faint); width: 1.5rem; font-size: 1.1rem; }
.table.rows tbody tr:hover .go { color: var(--cyan); }
.ratio { display: inline-flex; align-items: center; gap: 0.6rem; justify-content: flex-end; }
.ratio i { display: inline-block; width: 3.5rem; height: 4px; border-radius: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.ratio i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--cyan); box-shadow: 0 0 8px var(--cyan); border-radius: 2px; }
.empty { padding: 3rem 1.5rem; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: 0.35rem; }

/* review queue */
.queue { display: grid; gap: 1rem; }
.review-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem 1.4rem 1.25rem 1.6rem;
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 2rem; align-items: start; overflow: hidden; }
.review-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.review-card h2 { font-size: 1.125rem; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.review-card .meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; font-size: 0.875rem; color: var(--muted); margin-top: 0.35rem; }
.review-card .meta b { color: var(--text); font-weight: 500; }
.review-card blockquote { margin: 0.9rem 0 0; padding: 0.65rem 0.9rem; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 10px; font-size: 0.9375rem; max-width: 62ch; }
.review-card .decide { display: flex; gap: 0.5rem; }
.review-card.compact { padding: 1rem 1.1rem 1rem 1.3rem; grid-template-columns: 1fr; background: var(--bg-deep); }
.review-card.compact .decide { margin-top: 0.6rem; }

/* ranked list on the overview */
.ranked { list-style: none; padding: 0; display: grid; gap: 0.2rem; }
.ranked li button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; border: 0; background: none; padding: 0.6rem 0.5rem; border-radius: 10px; text-align: left; }
.ranked li button:hover { background: var(--panel-2); }
.ranked .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ranked .val { font-variant-numeric: tabular-nums; font-weight: 600; font-family: var(--mono); }
.ranked .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.ranked .bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--teal-hi); border-radius: 2px; }
.ranked .bar .v { position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--cyan); box-shadow: 0 0 8px var(--cyan); z-index: 1; border-radius: 2px; }

/* organisation page */
.orghead { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.5rem; }
.orghead .who { flex: 1; min-width: 18rem; }
.orghead h1 { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.orghead .line { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.orghead .line .mono { color: var(--faint); }
.orghead .decide { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .base { stroke: var(--line-strong); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 13px; font-family: var(--mono); }
.chart .bar { fill: var(--cyan); filter: drop-shadow(0 0 6px rgba(42,240,244,0.55)); }
.chart .bar:hover { fill: #8ff8fa; }
.chart .line { fill: none; stroke: var(--cyan); stroke-width: 2.25; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(42,240,244,0.7)); }
.chart .dot { fill: var(--bg); stroke: var(--cyan); stroke-width: 2.25; filter: drop-shadow(0 0 6px var(--cyan)); }
.chart .end { fill: var(--cyan); font-size: 15px; font-weight: 700; font-family: var(--mono); }
.hbars { display: grid; gap: 0.8rem; }
.hbars div { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; font-size: 0.9375rem; }
.hbars div span { color: var(--muted); }
.hbars div b { font-variant-numeric: tabular-nums; font-weight: 600; font-family: var(--mono); }
.hbars div i { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.hbars div i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: linear-gradient(90deg, var(--teal-hi), var(--cyan)); border-radius: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.25rem; font-size: 0.9375rem; }
.kv dt { color: var(--muted); }
.kv dd { overflow-wrap: anywhere; min-width: 0; }
.quota-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.quota-form label { flex-basis: 100%; }
.quota-form input { width: 9rem; font-family: var(--mono); }
.quota-form .saved { font-size: 0.8125rem; color: var(--cyan-mid); }
.keys { list-style: none; padding: 0; display: grid; }
.keys li { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; padding: 0.75rem 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.keys li:first-child { border-top: 0; padding-top: 0; }
.keys li span { font-size: 0.8125rem; color: var(--muted); }
.privacy { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; padding: 1rem 1.2rem; border-radius: 14px; background: var(--teal-soft);
  border: 1px solid rgba(42,240,244,0.18); color: #b9f4f5; margin-bottom: var(--gutter); font-size: 0.9375rem; }
.privacy svg { width: 22px; height: 22px; margin-top: 0.1rem; color: var(--cyan); filter: drop-shadow(0 0 5px rgba(42,240,244,0.6)); }

/* sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.signin .card { width: 100%; max-width: 26rem; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 2.25rem; box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
.signin .card .mark { margin-bottom: 1.75rem; }
.signin h1 { font-size: 1.5rem; }
.signin .sub { color: var(--muted); margin: 0.4rem 0 1.75rem; }
.signin button.primary { width: 100%; justify-content: center; margin-top: 0.5rem; }
.signin .corner { position: fixed; top: 1rem; right: 1.25rem; }

/* dialogs */
dialog { border: 1px solid var(--line-strong); border-radius: 16px; padding: 0; width: min(34rem, calc(100vw - 2rem)); color: var(--text); background: var(--panel);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(42,240,244,0.05); }
dialog::backdrop { background: rgba(5, 6, 7, 0.72); backdrop-filter: blur(3px); }
dialog form { padding: 1.75rem; }
dialog h2 { font-size: 1.25rem; }
dialog .sub { color: var(--muted); font-size: 0.9375rem; margin: 0.4rem 0 1.5rem; }
dialog .actions { margin-top: 1.5rem; justify-content: flex-end; }
dialog .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

/* ---- small screens -------------------------------------------------------------------- */
@media (max-width: 62rem) {
  .split { grid-template-columns: 1fr; }
  .story { padding: 1.25rem 1.25rem 1.5rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .story h1 { font-size: 1.625rem; margin-top: 1.5rem; max-width: none; }
  .story .lede, .story .foot { display: none; }
  .steps { margin-top: 1.25rem; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .steps li { grid-template-columns: 1fr; gap: 0.4rem; padding: 0; font-size: 0.8125rem; }
  .steps li::after, .steps li span { display: none; }
  .desk .top { padding: 0.75rem 1.25rem 0; }
  .form-area { padding: 1rem 1.25rem 3rem; }
  .certificate { grid-template-columns: 1fr; gap: 1rem; }
  .seal { width: 7.5rem; height: 7.5rem; }
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 0.75rem; gap: 0.5rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .role, .side nav .group { display: none; }
  .side nav { margin: 0; display: flex; overflow-x: auto; width: 100%; order: 3; }
  .side nav button { width: auto; }
  .side nav button[aria-current=page]::before { display: none; }
  .side .bottom { margin: 0 0 0 auto; display: flex; align-items: center; padding: 0; }
  .side .bottom .row { margin-left: 0; }
  .main { padding: 1.25rem; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis > div { border-left: 0; border-top: 1px solid var(--line); }
  .kpis > div:nth-child(-n+2) { border-top: 0; }
  .kpis > div:nth-child(even) { border-left: 1px solid var(--line); }
  .review-card { grid-template-columns: 1fr; }
  .doors, .tiles, dialog .two { grid-template-columns: 1fr; }
  .entry h1 { font-size: 1.875rem; }
  .table-wrap { overflow-x: auto; }
}

/* organisation console */
.meter { height: 6px; border-radius: 3px; background: var(--line-strong); overflow: hidden; margin-top: 0.6rem; }
.meter i { display: block; height: 100%; width: var(--p); background: var(--cyan); box-shadow: 0 0 10px var(--cyan); border-radius: 3px; }
.meter.warn i { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.checks { display: flex; gap: 1rem; flex-wrap: wrap; }
.checks label { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 500; margin: 0; cursor: pointer; }
.checks input { accent-color: var(--cyan); width: 1rem; height: 1rem; }
.rowact { display: flex; gap: 0.4rem; justify-content: flex-end; }
.rowact button { padding: 0.3rem 0.7rem; font-size: 0.8125rem; }

/* data health */
.runs { display: flex; gap: 6px; flex-wrap: wrap; }
.runs .run { width: 22px; height: 22px; border-radius: 5px; background: var(--line-strong); }
.runs .run.ok { background: var(--teal); box-shadow: inset 0 0 0 1px rgba(42,240,244,0.5); }
.runs .run.warn { background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber); }
.runs .run.fail { background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }

/* organisation console: hosted setup and warehouse data */
.setup-steps { list-style: none; margin: 0; padding: 0.6rem 1.3rem 1.3rem; counter-reset: s; }
.setup-steps .step { counter-increment: s; position: relative; padding: 1rem 0 1rem 2.6rem; border-bottom: 1px solid var(--line); }
.setup-steps .step:last-child { border-bottom: 0; }
.setup-steps .step::before { content: counter(s); position: absolute; left: 0; top: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 0.8125rem; color: var(--muted); font-family: var(--mono); }
.setup-steps .step.done::before { content: "✓"; border-color: rgba(42,240,244,0.4); color: var(--cyan); background: var(--teal-soft); }
.setup-steps .step-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.setup-steps .step p.muted { font-size: 0.875rem; margin-top: 0.3rem; }
.setup-steps .step > :last-child:not(p) { margin-top: 0.75rem; }
.keyflow .row, .filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.filters { padding: 1rem 1.3rem; gap: 1.5rem; }
.filters select, .filters input[type=file] { font: inherit; color: var(--text); background: var(--bg-deep); border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.35rem 0.5rem; }
.checkline { display: flex; align-items: center; gap: 0.4rem; margin: 0.6rem 0; font-size: 0.875rem; }
pre.code { margin: 0.5rem 0 0; padding: 0.75rem 0.9rem; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.55; color: var(--text); white-space: pre; }
.downloads { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.35rem; }
.downloads a { font-family: var(--mono); font-size: 0.8125rem; }
.sheet .kv + h3, .sheet h3 { margin-top: 1.1rem; }
td.clip { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keyflow .alert:not(.bad) { background: var(--teal-soft); border-color: rgba(42,240,244,0.18); color: var(--text); }

/* ---- the integration guide (guide.html) ---------------------------------------------------------------- */
.entry.docpage { grid-template-columns: minmax(0, 1fr); }
.docpage main { display: block; padding: 1rem 2rem; }
.docpage .inner { max-width: 54rem; margin: 0 auto; min-width: 0; }
.doclinks { display: flex; gap: 1.25rem; align-items: center; font-size: 0.875rem; }
.doclinks a { color: var(--muted); text-decoration: none; }
.doclinks a:hover { color: var(--cyan); }
.docnote { color: var(--amber); background: var(--amber-soft); border-radius: var(--r); padding: 0.6rem 0.9rem; font-size: 0.875rem; }
.doc { color: var(--text); font-size: 0.975rem; line-height: 1.75; padding-bottom: 4rem; }
.doc h1 { font-size: 2.25rem; letter-spacing: -0.02em; max-width: none; margin: 0.5rem 0 1rem; }
.doc h2 { font-size: 1.35rem; margin: 2.75rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; color: var(--cyan-mid); }
.doc p, .doc li { color: #cfd2d3; }
.doc a { color: var(--cyan); }
.doc code { font-family: var(--mono); font-size: 0.85em; background: var(--teal-soft); color: var(--cyan); padding: 0.1em 0.35em; border-radius: 4px; }
.doc pre { background: var(--bg-deep); border: 1px solid var(--line); border-top-color: var(--line-strong); border-radius: var(--r);
  padding: 0.9rem 1rem; overflow-x: auto; line-height: 1.55; }
.doc pre code { background: none; color: var(--text); padding: 0; font-size: 0.8125rem; }
.doc blockquote { margin: 1rem 0; padding: 0.5rem 1rem; border-left: 2px solid var(--cyan-mid); color: var(--muted); background: var(--panel); }
.doc .tablewrap { overflow-x: auto; margin: 1rem 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
.doc th, .doc td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; background: var(--panel); }
@media (max-width: 640px) { .doclinks a { display: none; } .doc h1 { font-size: 1.75rem; } .docpage main { padding: 0.5rem 1rem; } .entry.docpage header { padding: 1rem; } }
