/* Priset Veritas design tokens */
:root {
  --bg: #F5F6FA; --surface: #FFFFFF; --ink: #12172B; --muted: #5B6378; --line: #DADDE7;
  --brand: #3F3AD6; --brand-ink: #FFFFFF; --brand-soft: #ECEBFD;
  --pass: #13795B; --fail: #B42318; --blocked: #9A5800;
  --pass-bg: #E5F4EE; --fail-bg: #FBEAE8; --blocked-bg: #FBF0DF;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E111C; --surface: #161A28; --ink: #E6E8F0; --muted: #969CB2; --line: #2A2F42;
    --brand: #8F8BFF; --brand-ink: #0E111C; --brand-soft: #23244A;
    --pass: #45C28E; --fail: #FF7A6E; --blocked: #E8A64A;
    --pass-bg: #10291F; --fail-bg: #331715; --blocked-bg: #2E220F;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hint, .muted { color: var(--muted); font-weight: 400; font-size: 13px; }
.mono { font-family: var(--mono); }

/* Brand lockup */
.lockup { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--ink); }
.lockup-brand { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--muted); }
.lockup-product { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.lockup.small .lockup-product { font-size: 16px; }

/* Buttons and fields */
button, .btn { font: inherit; cursor: pointer; border-radius: 6px; padding: 9px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: var(--ink); }
button.primary, .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
button.primary:hover, .btn.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--fail); }
button.link { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; }
button:disabled { opacity: .55; cursor: progress; }
button.small { padding: 5px 10px; font-size: 13px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 14px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 500; font-size: 14px; padding: 0; margin-bottom: 6px; }
.form-error { color: var(--fail); margin: 0; font-size: 14px; min-height: 1em; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 .wide { grid-column: 1 / -1; }

/* Verdict stamp: the signature element */
.stamp { --c: var(--pass); border: 3px double var(--c); color: var(--c); border-radius: 8px; padding: 10px 18px 12px; transform: rotate(-3deg); text-align: center; min-width: 170px; background: color-mix(in srgb, var(--surface) 85%, transparent); }
.stamp.fail { --c: var(--fail); } .stamp.blocked { --c: var(--blocked); }
.stamp-word { font-family: var(--display); font-size: 36px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.stamp-count { font-size: 13px; font-weight: 600; margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .stamp.fresh, .l-stamp { animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) both; }
  .l-stamp { animation-delay: .7s; }
  @keyframes stamp { from { transform: rotate(-3deg) scale(1.7); opacity: 0; } to { transform: rotate(-3deg) scale(1); opacity: 1; } }
}

/* ---------------- Landing ---------------- */
.landing .l-top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(20px, 5vw, 64px); }
.landing .l-top nav { display: flex; gap: 22px; align-items: center; }
.landing .l-top nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.landing .l-top nav a:not(.btn):hover { color: var(--ink); }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(40px, 8vw, 110px) clamp(20px, 5vw, 64px) clamp(56px, 8vw, 120px); max-width: 1320px; margin: 0 auto; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 6.4vw, 84px); line-height: .98; letter-spacing: -0.02em; max-width: 12ch; }
.hero-sub { font-size: 19px; color: var(--muted); max-width: 52ch; margin: 24px 0 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn { padding: 12px 20px; }
.ticket { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px 22px; box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--ink) 35%, transparent); }
.ticket-key { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ticket-type { margin-left: 8px; font-family: var(--sans); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font-size: 12px; }
.ticket-title { font-weight: 600; font-size: 20px; margin: 8px 0 18px; max-width: 26ch; }
.ticket-ac { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.ticket-ac li { display: flex; gap: 10px; align-items: baseline; }
.mark { font-weight: 700; width: 1em; }
.mark.ok { color: var(--pass); } .mark.bad { color: var(--fail); }
.ticket-foot { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.l-stamp { position: absolute; right: -18px; top: -26px; }
.l-section { padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 64px); max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); }
.l-section h2, .l-cta h2 { font-family: var(--display); font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.01em; max-width: 20ch; margin-bottom: 32px; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: f; }
.flow li { counter-increment: f; border-top: 3px solid var(--ink); padding-top: 18px; }
.flow li::before { content: counter(f); font-family: var(--display); font-weight: 700; font-size: 40px; color: var(--brand); display: block; line-height: 1; margin-bottom: 14px; }
.flow h3 { font-size: 18px; margin-bottom: 8px; }
.flow p, .controls p, .features dd { color: var(--muted); margin: 0; }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; }
.lede { color: var(--muted); max-width: 60ch; margin: 0 0 16px; }
.split .lede { font-size: 18px; }
.features { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.features dt { font-weight: 600; margin-bottom: 4px; }
.features dd { margin: 0; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 40px; }
.controls h3 { font-size: 17px; margin-bottom: 6px; }
.l-cta { text-align: left; padding: clamp(56px, 8vw, 110px) clamp(20px, 5vw, 64px); max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.l-cta h2 { margin: 0; }
.l-cta .btn { padding: 14px 24px; }
.l-foot { display: flex; justify-content: space-between; padding: 24px clamp(20px, 5vw, 64px) 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
@media (max-width: 960px) {
  .hero, .split { grid-template-columns: 1fr; }
  .flow, .controls, .features { grid-template-columns: 1fr 1fr; }
  .l-stamp { right: 8px; }
  .landing .l-top nav a:not(.btn) { display: none; }
}
@media (max-width: 600px) { .flow, .controls, .features { grid-template-columns: 1fr; } }

/* ---------------- App ---------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 32px; }
.auth-card .lockup { margin-bottom: 24px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .lede { font-size: 14px; }
.secret-box { font-family: var(--mono); font-size: 15px; letter-spacing: .08em; background: var(--bg); border: 1px dashed var(--line); border-radius: 6px; padding: 12px; word-break: break-all; text-align: center; }

.topbar { display: flex; align-items: center; gap: 20px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.topbar .team-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.topbar .team-switch select { width: auto; padding: 5px 8px; font-weight: 600; color: var(--ink); }
.topbar nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; font-size: 14px; }
.topbar nav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
.topbar .who { font-size: 14px; color: var(--muted); display: flex; gap: 14px; align-items: center; }
.topbar .who a { color: var(--muted); }

.layout { display: grid; grid-template-columns: 380px 1fr; min-height: calc(100vh - 56px); }
.rail { border-right: 1px solid var(--line); background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 32px; }
.rail h1 { font-size: 20px; }
.detail, .page { padding: 32px 40px 64px; min-width: 0; }
.page { max-width: 1100px; }
.page > h1 { font-size: 26px; margin-bottom: 6px; }
.more summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.more[open] { display: flex; flex-direction: column; gap: 16px; }

.navlist { list-style: none; margin: 0; padding: 0; }
.navlist h2 { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.navlist a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.navlist a:hover { background: var(--bg); }
.navlist a[aria-current="true"] { background: var(--bg); box-shadow: inset 3px 0 0 var(--brand); }
.navlist .key { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.navlist .name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.navlist .meta { grid-column: 1 / -1; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-title { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 8px; }

.pill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--bg); color: var(--muted); align-self: start; }
.pill.done, .pill.good { background: var(--pass-bg); color: var(--pass); }
.pill.done.has-fail, .pill.error, .pill.interrupted, .pill.bad { background: var(--fail-bg); color: var(--fail); }
.pill.awaiting_approval, .pill.warn { background: var(--blocked-bg); color: var(--blocked); }
.pill.live { color: var(--brand); }
.badge { font-size: 12px; font-weight: 600; border-radius: 4px; padding: 1px 6px; margin-left: 8px; vertical-align: 1px; }
.badge.ai { background: var(--brand-soft); color: var(--brand); }
.badge.you { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

.empty { max-width: 520px; margin-top: 12vh; color: var(--muted); }
.empty-title { font-size: 22px; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.notice { padding: 14px 16px; border-left: 3px solid var(--fail); background: var(--fail-bg); margin-bottom: 24px; border-radius: 0 6px 6px 0; }
.notice.info { border-color: var(--brand); background: var(--brand-soft); }
.once { padding: 14px 16px; border: 1px solid var(--brand); background: var(--brand-soft); border-radius: 6px; margin: 12px 0 20px; }
.once code { font-family: var(--mono); font-size: 15px; word-break: break-all; user-select: all; }

/* Run */
.run-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; margin-bottom: 28px; }
.run-key { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.run-title { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 4px 0 10px; max-width: 32ch; }
.run-facts { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.run-facts a { word-break: break-all; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.focus-quote { border-left: 3px solid var(--brand); padding: 6px 12px; margin: 12px 0 0; font-size: 14px; max-width: 70ch; }
.focus-quote b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.phases { list-style: none; padding: 0; margin: 0 0 28px; display: flex; counter-reset: ph; flex-wrap: wrap; gap: 8px 0; }
.phases li { counter-increment: ph; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; padding-right: 26px; }
.phases li::before { content: counter(ph); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.phases li.done { color: var(--ink); }
.phases li.done::before { content: "✓"; background: var(--ink); color: var(--surface); border-color: var(--ink); }
.phases li.now { color: var(--ink); font-weight: 600; }
.phases li.now::before { border-color: var(--brand); color: var(--brand); }
.live-line { color: var(--muted); font-size: 14px; margin: -16px 0 28px; }

/* Live test view: the test browser on the left, what it is doing on the right */
.livepanel { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 20px; margin: -8px 0 28px; align-items: start; }
.live-screen { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.live-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 12px; min-width: 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.live-screen.streaming .live-dot { background: var(--fail); }
.live-tag { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.live-url { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-screen img { display: block; width: 100%; height: auto; }
.live-empty { aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.live-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.live-count { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.live-count .verdict { font-size: 13px; margin-left: 8px; }
.live-meter { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 3px; background: var(--line); overflow: hidden; }
.live-meter::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
.live-meter::-webkit-progress-value { background: var(--brand); border-radius: 3px; transition: width .4s; }
.live-meter::-moz-progress-bar { background: var(--brand); border-radius: 3px; }
.live-side h3 { font-size: 16px; }
.live-now { margin: 0; font-size: 14px; color: var(--brand); }
.live-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; font-size: 13px; }
.live-steps li { padding: 6px 8px; border-radius: 4px; background: var(--bg); }
.live-steps li.bad { background: var(--fail-bg); color: var(--fail); }
.live-steps li:first-child { outline: 1px solid var(--brand-soft); }
@media (prefers-reduced-motion: no-preference) { .live-screen.streaming .live-dot { animation: pulse 1.2s ease-in-out infinite; } }
@media (max-width: 1100px) { .livepanel { grid-template-columns: 1fr; } }
.requirement { margin: 0 0 24px; }
.requirement h2, .plan h2, .results h2, .panel h2 { font-size: 18px; margin-bottom: 6px; }
.requirement ul { margin: 0; padding-left: 20px; max-width: 75ch; }
.cases { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid var(--line); }
.cases > li { border-bottom: 1px solid var(--line); }
.case-pick { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 0; cursor: pointer; font-weight: 400; flex-direction: row; }
.case-pick input { width: auto; margin-top: 4px; }
.case-title { font-weight: 600; }
.case-id { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-right: 8px; }
.case-type { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; margin-left: 6px; }
.case-body { color: var(--muted); font-size: 14px; margin-top: 6px; }
.case-body ol { margin: 4px 0; padding-left: 20px; }
.asides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin: 24px 0; }
.asides h3 { font-size: 14px; margin-bottom: 6px; }
.asides ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.result { border-bottom: 1px solid var(--line); }
.result > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding: 14px 0; }
.result > summary::-webkit-details-marker { display: none; }
.verdict { font-weight: 700; font-size: 14px; }
.verdict.passed { color: var(--pass); } .verdict.failed { color: var(--fail); } .verdict.blocked { color: var(--blocked); }
.result .reason { color: var(--muted); font-size: 14px; margin-top: 2px; }
.result-body { padding: 0 0 20px 100px; }
.ea { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin-bottom: 16px; }
.ea dt { font-weight: 600; } .ea dd { margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.step { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.step img { width: 120px; border: 1px solid var(--line); border-radius: 4px; display: block; }
.step-action { font-family: var(--mono); font-size: 13px; }
.step-action.bad { color: var(--fail); }
.step-note { color: var(--muted); font-size: 13px; }
.problems { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; margin-top: 14px; overflow-x: auto; }
.activity { margin-top: 32px; color: var(--muted); font-size: 13px; }
.activity summary { cursor: pointer; }
.activity ol { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.activity time { font-family: var(--mono); margin-right: 8px; }

/* Panels and tables */
.panel { padding: 24px 0; border-top: 1px solid var(--line); }
.panel:first-of-type { border-top: 0; }
.explore-status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; max-width: 760px; margin-bottom: 16px; font-size: 14px; }
.explore-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }
@media (prefers-reduced-motion: no-preference) { .explore-status.running .dot { animation: pulse 1.2s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .3; } } }
.explore-status.error { border-color: var(--fail); } .explore-status.error .dot { background: var(--fail); }
.explore-status.done .dot { background: var(--pass); }
.table-wrap { overflow-x: auto; margin: 8px 0 16px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data td.actions-cell { white-space: nowrap; text-align: right; }
table.data select { width: auto; padding: 4px 8px; font-size: 13px; }
.doctable { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--line); max-width: 900px; }
.doctable li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.doctable .doc-title { font-weight: 600; }
.doctable .doc-meta { color: var(--muted); font-size: 13px; }
.doctable .doc-actions { display: flex; gap: 6px; grid-row: span 2; }
.editor { max-width: 900px; margin-bottom: 24px; }
.editor textarea { font-family: var(--mono); font-size: 13px; line-height: 1.55; min-height: 420px; }
.formcard { max-width: 760px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 20px; margin: 12px 0 20px; }
.formcard h3 { font-size: 16px; }
pre.code { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px; overflow-x: auto; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail, .page { padding: 24px 18px 48px; }
  .run-head { grid-template-columns: 1fr; }
  .stamp { justify-self: start; }
  .result-body { padding-left: 0; }
  .step { grid-template-columns: 90px 1fr; } .step img { width: 90px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* Polish */
.topbar .team-switch { flex-direction: row; font-weight: 500; }
form.row > input, form.row > select, div.row > input { width: auto; flex: 1 1 180px; }
form.row > .form-error { flex-basis: 100%; }
form.row > button { flex: none; }
.page > .team-desc { margin: 0 0 4px; }
@media (max-width: 600px) {
  .ticket { margin-top: 36px; }
  .l-stamp { top: -44px; right: 6px; min-width: 0; padding: 6px 12px 8px; }
  .l-stamp .stamp-word { font-size: 26px; }
}

/* Usage */
.row.spread { justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.month-pick { flex-direction: row; align-items: center; gap: 8px; }
.month-pick select { width: auto; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 8px 0 24px; }
.stats div { background: var(--surface); padding: 16px 18px; }
.stats dt { color: var(--muted); font-size: 13px; }
.stats dd { margin: 4px 0 0; font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
h3.sub { font-size: 15px; margin: 20px 0 4px; }
table.data.num td:not(:first-child), table.data.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
tbody.group .group-head td { font-weight: 600; }
table.data tr.sub-row td { background: var(--surface); }
table.data td.indent { padding-left: 30px; color: var(--muted); }
[data-expand]::before { content: "▸ "; } [data-expand][aria-expanded="true"]::before { content: "▾ "; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }

/* Backend testing controls and results */
.backend-opts { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 4px 0; }
.backend-opts legend { padding: 0 6px; font-size: 13px; color: var(--muted); }
.backend-opts .sub, label.check.sub { margin-left: 22px; font-size: 13px; }
.criteria { list-style: none; padding: 0; margin: 0; }
.criteria li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.checks li { font-size: 14px; }
.checks li.bad { color: var(--ink); }
.checks li.ok .mono { color: var(--pass); }
.checks li.bad .mono { color: var(--fail); }
.sev { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 5px; }
.sev.critical { background: var(--fail-bg); color: var(--fail); }
.sev.major { background: var(--blocked-bg); color: var(--blocked); }
.sev.minor { background: var(--bg); color: var(--muted); }

/* Live runner page */
.live-wrap { display: grid; grid-template-columns: 340px 1fr; height: 100vh; }
  .live-side { border-right: 1px solid var(--line); background: var(--surface); padding: 20px; overflow-y: auto; }
  .live-stage { position: relative; background: #111; display: flex; flex-direction: column; }
  .live-stage .bar { color: #fff; font: 13px/1.4 var(--mono, monospace); padding: 8px 12px; background: #000; display: flex; justify-content: space-between; gap: 12px; }
  .live-stage iframe { flex: 1; width: 100%; border: 0; background: #fff; }
  .steplist { list-style: none; padding: 0; margin: 12px 0 0; }
  .steplist li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
  .steplist .ic { width: 16px; }
  .steplist .running { color: var(--brand); }
  .steplist .passed .ic { color: var(--pass); } .steplist .failed .ic { color: var(--fail); } .steplist .failed { color: var(--fail); }
  .tnav { font-weight: 600; margin-top: 16px; font-size: 13px; color: var(--muted); }
  .live-done { padding: 12px; border-radius: 8px; margin-top: 16px; font-weight: 600; }
  .live-done.ok { background: var(--pass-bg); color: var(--pass); } .live-done.bad { background: var(--fail-bg); color: var(--fail); }

/* Suite run detail + agent hint */
.steplist { list-style: none; padding: 0; margin: 12px 0 0; }
.steplist li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.steplist .ic { width: 16px; }
.steplist .passed .ic { color: var(--pass); } .steplist .failed .ic { color: var(--fail); } .steplist .failed { color: var(--fail); }
.agent-hint summary { cursor: pointer; font-size: 13px; color: var(--muted); }

/* Suite options + analytics */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 8px 0; }
.opt-grid fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.opt-grid legend { font-size: 13px; color: var(--muted); padding: 0 6px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 8px; }
.stat { flex: 1 1 130px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat-val { font-size: 26px; font-weight: 700; } .stat-val.good { color: var(--pass); } .stat-val.bad { color: var(--fail); } .stat-val.warn { color: var(--warn, #b8860b); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
svg.trend { width: 100%; max-width: 640px; height: 120px; }
.rank { list-style: none; padding: 0; margin: 0; } .rank li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
td.good, .good { color: var(--pass); } td.bad, .bad { color: var(--fail); }
@media (max-width: 800px) { .opt-grid, .two-col { grid-template-columns: 1fr; } }

/* Billing */
.bill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.usage-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.meter { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 10px 0; }
.meter-fill { height: 100%; background: var(--pass); } .meter-fill.over { background: var(--fail); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; }
.plan-card.current { border-color: var(--pass); box-shadow: 0 0 0 1px var(--pass) inset; }
.plan-name { font-weight: 700; font-size: 18px; } .plan-price { font-size: 24px; font-weight: 800; margin: 6px 0 12px; } .plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-feats { list-style: none; padding: 0; margin: 0 0 14px; flex: 1; } .plan-feats li { padding: 4px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.plan-feats li::before { content: "✓ "; color: var(--pass); }

/* Superadmin console + support tickets */
.adj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.adj-grid .formcard h3 { font-size: 15px; margin-bottom: 4px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.plan-edit fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; max-width: 80%; }
.msg.tenant { align-self: flex-start; background: var(--surface); }
.msg.admin { align-self: flex-end; background: var(--brand-soft, #eef); }
.msg.internal { border-style: dashed; background: var(--blocked-bg, #fff6e0); align-self: flex-end; }
.msg-head { font-size: 12px; margin-bottom: 4px; }
.msg-body { font-size: 14px; }
@media (max-width: 800px) { .grid3, .feat-grid { grid-template-columns: 1fr 1fr; } }
