:root {
  --navy: #0F172A; --indigo: #4F46E5; --blue: #1D4ED8; --gray: #64748B; --slate: #E2E8F0; --offwhite: #F8FAFC;
  --mint: #10B981; --amber: #F59E0B; --red: #DC2626; --white: #fff; --text: #0F172A; --muted: #64748B;
  --ink-2: #1E293B; --ink-3: #334155; --ink-4: #475569; --line-soft: #F1F5F9; --line: #CBD5E1;
  /* Role identity (docs/INTENT.md §12.1): requester indigo, reviewer mint, judge amber. */
  --requester: #4F46E5; --requester-ink: #3730A3; --requester-soft: #EEF2FF; --requester-line: #C7D2FE;
  --reviewer: #10B981; --reviewer-ink: #047857; --reviewer-soft: #ECFDF5; --reviewer-line: #A7F3D0;
  --judge: #F59E0B; --judge-ink: #B45309; --judge-soft: #FFFBEB; --judge-line: #FDE68A;
  --table-top: #EDE6DA; --table-edge: #DCD2C2;
  --radius: 10px; --radius-lg: 12px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, .06); --shadow-lift: 0 18px 40px rgba(15, 23, 42, .1);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: "Instrument Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--offwhite); color: var(--text); font-size: 15px; line-height: 1.5; }
a { color: var(--blue); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.skip-link { position: absolute; left: -999px; } .skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 6px; z-index: 100; }
.topbar { background: var(--navy); color: #fff; }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 2rem; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; display: flex; align-items: baseline; }
.brand-q { color: #A5B4FC; }
.brand-claim { margin-left: .75rem; font-weight: 400; font-size: .8rem; color: #CBD5E1; }
.nav { display: flex; gap: 1.25rem; }
.nav a { color: #E2E8F0; text-decoration: none; font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-color: #A5B4FC; color: #fff; }
.user-area { margin-left: auto; display: flex; align-items: center; gap: .75rem; color: #CBD5E1; font-size: .9rem; }
.container { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem; }
.card { background: #fff; border: 1px solid var(--slate); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-family: var(--mono); font-size: .85em; }
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--slate); background: #fff; color: var(--text); padding: .5rem .9rem; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #CBD5E1; background: var(--offwhite); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--indigo); border-color: var(--indigo); color: #fff; } .btn-primary:hover { background: #4338CA; border-color: #4338CA; }
.btn-danger { color: var(--red); border-color: #FECACA; } .btn-danger:hover { background: #FEF2F2; }
.btn-ghost { background: transparent; border-color: transparent; color: #CBD5E1; } .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.form label { display: block; font-weight: 600; margin: .75rem 0 .3rem; font-size: .9rem; }
.form input[type=text], .form input[type=password], .form input[type=number], .form select, .form textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid #CBD5E1; border-radius: 8px; font: inherit; background: #fff; }
.form textarea { min-height: 220px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }
.form .hint { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.login-card { max-width: 420px; margin: 4rem auto; }
.alert { padding: .7rem .9rem; border-radius: 8px; border: 1px solid; font-size: .9rem; }
.alert-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-warn { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.alert-ok { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert-info { background: #EEF2FF; border-color: #C7D2FE; color: #3730A3; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--slate); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tr.clickable { cursor: pointer; } tr.clickable:hover { background: var(--offwhite); }
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; background: var(--slate); color: var(--navy); white-space: nowrap; }
.badge-RUNNING, .badge-running { background: #E0E7FF; color: #3730A3; }
.badge-COMPLETED, .badge-completed, .badge-READY, .badge-ACCEPT { background: #D1FAE5; color: #065F46; }
.badge-FAILED, .badge-failed, .badge-BLOCKED, .badge-BLOCKER { background: #FEE2E2; color: #991B1B; }
.badge-CANCELLED, .badge-cancelled { background: #F1F5F9; color: #475569; }
.badge-READY_, .badge-NEEDS_CLARIFICATION, .badge-MAJOR, .badge-PARTIAL { background: #FEF3C7; color: #92400E; }
.badge-MINOR, .badge-REJECT { background: #F1F5F9; color: #475569; }
.badge-SUGGESTION, .badge-pending { background: #F8FAFC; color: #64748B; border: 1px solid var(--slate); }
.badge-AI_ASSUMPTION { background: #FEF3C7; color: #92400E; } .badge-OPEN_QUESTION { background: #E0E7FF; color: #3730A3; }
.badge-USER_PROVIDED { background: #D1FAE5; color: #065F46; } .badge-AI_DERIVED { background: #F1F5F9; color: #334155; } .badge-SYSTEM_CONSTRAINT { background: #E2E8F0; color: #1E293B; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters label { font-size: .8rem; color: var(--muted); display: block; }
.filters input, .filters select { padding: .4rem .5rem; border: 1px solid #CBD5E1; border-radius: 6px; font: inherit; }
.stat { text-align: center; padding: 1rem; }
.stat .value { font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy); }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stepper { display: flex; flex-direction: column; gap: .6rem; }
.iteration-row { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; align-items: center; }
.iteration-row .label { font-weight: 600; font-size: .9rem; }
.stages { display: flex; gap: .5rem; }
.stage { flex: 1; border: 1px solid var(--slate); border-radius: 8px; padding: .45rem .6rem; font-size: .8rem; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.stage.completed { border-color: #A7F3D0; background: #ECFDF5; } .stage.running { border-color: #A5B4FC; background: #EEF2FF; animation: pulse 1.5s infinite; }
.stage.failed { border-color: #FECACA; background: #FEF2F2; } .stage.cancelled { opacity: .6; }
.stage .model { color: var(--muted); font-size: .72rem; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(79,70,229,.25);} 70% { box-shadow: 0 0 0 6px rgba(79,70,229,0);} 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0);} }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--slate); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: .6rem .9rem; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--indigo); border-color: var(--indigo); }
.tab-panel[hidden] { display: none; }
.req h2 { font-size: 1rem; margin-top: 1.25rem; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.req ul { padding-left: 1.1rem; margin: .25rem 0; } .req li { margin-bottom: .35rem; }
.req .sid { font-family: ui-monospace, monospace; font-size: .8em; color: var(--indigo); margin-right: .3rem; }
.finding { border: 1px solid var(--slate); border-radius: 8px; padding: .75rem .9rem; margin-bottom: .6rem; background: #fff; }
.finding-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .3rem; }
.finding-head strong { flex: 1; }
.finding p { margin: .2rem 0; font-size: .9rem; }
.finding .decision { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--slate); font-size: .88rem; }
.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.score-dim { border: 1px solid var(--slate); border-radius: 8px; padding: .6rem; }
.score-dim .v { font-size: 1.4rem; font-weight: 700; } .score-dim .w { color: var(--muted); font-size: .75rem; }
.bar { height: 6px; background: var(--slate); border-radius: 3px; overflow: hidden; margin-top: .3rem; } .bar span { display: block; height: 100%; background: var(--indigo); }
.progress-chart { display: flex; gap: 1rem; align-items: flex-end; height: 120px; padding: .5rem 0; }
.progress-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .8rem; }
.progress-chart .col .fill { width: 60%; background: var(--indigo); border-radius: 4px 4px 0 0; min-height: 3px; }
.progress-chart .col .v { font-weight: 600; margin-bottom: .2rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } @media (max-width: 900px) { .compare, .form-row { grid-template-columns: 1fr; } }
.compare pre { white-space: pre-wrap; font: inherit; background: var(--offwhite); border: 1px solid var(--slate); border-radius: 8px; padding: .75rem; }
.diff-added { border-left: 3px solid var(--mint); padding-left: .5rem; } .diff-removed { border-left: 3px solid var(--red); padding-left: .5rem; text-decoration: line-through; color: var(--muted); } .diff-changed { border-left: 3px solid var(--amber); padding-left: .5rem; }
.readiness { font-size: 1.1rem; font-weight: 700; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 8px; font-size: .9rem; box-shadow: var(--shadow); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; font-size: .9rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.exec-table td { font-size: .82rem; }
.assumption-review { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--slate); }
details summary { cursor: pointer; font-weight: 500; }
.role-card { display: flex; flex-direction: column; gap: .2rem; }
.role-card { border-left: 3px solid var(--slate); padding-left: .7rem; }
.role-card .role { font-weight: 700; font-size: .8rem; letter-spacing: .06em; color: var(--indigo); }
.role-card:has(.role-REQUESTER) { border-left-color: var(--requester); }
.role-card:has(.role-REVIEWER) { border-left-color: var(--reviewer); }
.role-card:has(.role-JUDGE) { border-left-color: var(--judge); }
.role-card .role.role-REVIEWER { color: var(--reviewer-ink); }
.role-card .role.role-JUDGE { color: var(--judge-ink); }
.role-card .vendor { font-weight: 600; } .role-card .slug { color: var(--muted); font-size: .85rem; font-family: ui-monospace, monospace; }
.callout { border-left: 4px solid var(--indigo); background: #EEF2FF; padding: .6rem .9rem; border-radius: 0 8px 8px 0; font-size: .9rem; }
.checklist { list-style: none; padding: 0; } .checklist li::before { content: "✓ "; color: var(--mint); font-weight: 700; }

/* ==========================================================================
   Review table & screen components (design canvas "Refiniq Mockups", 2026-09)
   The round table is a working view, not decoration: every seat, note, pin and
   score below is bound to real run state by static/table.js.
   ========================================================================== */

/* --- shared primitives --- */
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: 5px 11px; border: 1px solid var(--requester-line); background: var(--requester-soft); border-radius: 999px; font: 600 11px/1 var(--mono); color: var(--requester-ink); letter-spacing: .06em; }
.label-xs { font: 700 10.5px/1 var(--mono); color: var(--muted); letter-spacing: .09em; text-transform: uppercase; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 5px; font: 700 10px/1.4 var(--mono); letter-spacing: .05em; background: var(--line-soft); color: var(--ink-3); }
.chip-USER_PROVIDED { background: #D1FAE5; color: #065F46; }
.chip-AI_DERIVED { background: var(--line-soft); color: var(--ink-3); }
.chip-AI_ASSUMPTION { background: #FEF3C7; color: #92400E; }
.chip-OPEN_QUESTION { background: var(--requester-soft); color: var(--requester-ink); }
.chip-SYSTEM_CONSTRAINT { background: var(--slate); color: var(--ink-2); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 20px; border-bottom: 1px solid var(--slate); }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; }

/* --- landing hero (Screen 1a) --- */
.hero { display: grid; grid-template-columns: 1fr 620px; gap: 40px; align-items: center; padding: 56px 48px 40px; background: linear-gradient(180deg, #fff 0%, var(--offwhite) 100%); border: 1px solid var(--slate); border-radius: var(--radius-lg); }
.hero h1 { margin: 20px 0 0; font-weight: 700; font-size: 50px; line-height: 1.06; letter-spacing: -.03em; color: var(--navy); text-wrap: balance; }
.hero .lede { margin: 20px 0 0; max-width: 520px; font-size: 17px; line-height: 1.6; color: var(--ink-4); text-wrap: pretty; }
.hero .cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero .cta .btn { padding: 12px 20px; border-radius: 9px; font-size: 14.5px; font-weight: 600; }
.stat-strip { display: flex; gap: 34px; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--slate); flex-wrap: wrap; }
.stat-strip .value { font-weight: 700; font-size: 27px; line-height: 1; letter-spacing: -.02em; color: var(--navy); }
.stat-strip .label { margin-top: 5px; font: 600 10.5px/1 var(--mono); color: var(--muted); letter-spacing: .07em; }
.role-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--slate); border: 1px solid var(--slate); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; }
.role-strip > div { padding: 26px 28px; background: #fff; }
.role-strip .role { font: 700 11px/1 var(--mono); letter-spacing: .07em; }
.role-strip h3 { margin: 11px 0 0; font-size: 17px; line-height: 1.3; }
.role-strip p { margin: 9px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.role-REQUESTER { color: var(--requester); } .role-REVIEWER { color: var(--reviewer-ink); } .role-JUDGE { color: var(--judge-ink); }

/* --- the round table --- */
.table-stage { position: relative; overflow: hidden; background: radial-gradient(110% 80% at 50% 46%, #fff 0%, #F1F5F9 100%); }
.table-stage.at-rest { height: 430px; border: 1px solid var(--slate); border-radius: 16px; background: radial-gradient(120% 90% at 50% 40%, #fff 0%, #F1F5F9 100%); }
.table-stage.live { height: 452px; }
.table-top { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--table-top); border: 1px solid var(--table-edge); box-shadow: var(--shadow-lift); }
.table-stage.at-rest .table-top { top: 56%; width: 430px; height: 250px; }
.table-stage.live .table-top { width: 520px; height: 296px; }
.table-inlay { position: absolute; left: 50%; top: 50%; width: 404px; height: 224px; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(220, 210, 194, .9); }
.table-glow { position: absolute; left: 50%; top: 50%; border-radius: 50%; background: radial-gradient(circle, rgba(79, 70, 229, .3) 0%, rgba(79, 70, 229, 0) 70%); }
.table-stage.at-rest .table-glow { top: 56%; width: 96px; height: 96px; margin: -48px 0 0 -48px; animation: rq-breathe 3.4s ease-in-out infinite; }
.table-stage.live .table-glow { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
.table-ring { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 1.5px solid rgba(79, 70, 229, .45); }
.table-ring.thin { border-width: 1px; border-color: rgba(79, 70, 229, .3); }
.table-orbit { position: absolute; left: 50%; top: 56%; width: 190px; height: 190px; margin: -95px 0 0 -95px; border-radius: 50%; border: 1px dashed rgba(79, 70, 229, .3); animation: rq-orbit 22s linear infinite; }
.table-orbit span { position: absolute; left: 50%; top: -4px; width: 7px; height: 7px; margin-left: -3px; border-radius: 50%; background: var(--indigo); }
.artifact { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 9px 15px; background: var(--navy); border-radius: 9px; box-shadow: 0 8px 22px rgba(15, 23, 42, .3); text-align: center; white-space: nowrap; }
.table-stage.at-rest .artifact { top: 56%; padding: 8px 14px; border-radius: 8px; }
.artifact .id { font: 700 12px/1 var(--mono); color: #fff; letter-spacing: .05em; }
.artifact .sub { margin-top: 5px; font: 500 10.5px/1 var(--mono); color: #A5B4FC; letter-spacing: .05em; }
.handover { position: absolute; left: 126px; top: 322px; width: 34px; height: 44px; background: #fff; border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 3px 9px rgba(15, 23, 42, .14); padding: 6px 5px; }
.handover span { display: block; height: 2px; background: var(--line); border-radius: 1px; margin-bottom: 4px; }
.handover span:nth-child(2) { width: 80%; } .handover span:nth-child(4) { width: 60%; margin-bottom: 0; }

/* seats — a seat is a participant marker, sized to read as a place at the table */
.seat-group { position: absolute; display: flex; gap: 12px; }
.seat-group.tl { left: 56px; top: 46px; align-items: flex-start; }
.seat-group.tr { right: 52px; top: 46px; align-items: flex-start; flex-direction: row-reverse; text-align: right; }
.seat-group.br { right: 52px; bottom: 44px; align-items: flex-end; flex-direction: row-reverse; text-align: right; }
.seat-group.bl { left: 56px; bottom: 44px; align-items: flex-end; }
.table-stage.at-rest .seat-group.tl { left: 66px; top: 44px; align-items: center; }
.table-stage.at-rest .seat-group.tr { right: 56px; top: 44px; align-items: center; }
.table-stage.at-rest .seat-group.br { right: 56px; bottom: 46px; align-items: center; }
.table-stage.at-rest .seat-group.bl { left: 66px; bottom: 46px; align-items: center; }
.seat { position: relative; width: 52px; height: 58px; flex: none; border-radius: 26px 26px 20px 20px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.table-stage.at-rest .seat { width: 46px; height: 52px; border-radius: 24px 24px 20px 20px; gap: 6px; }
.seat i { display: block; width: 7px; height: 9px; border-radius: 3px; }
.table-stage.at-rest .seat i { width: 6px; height: 8px; animation: rq-blink 4.1s infinite; }
.seat-REQUESTER { background: linear-gradient(160deg, #EEF2FF, #C7D2FE); border: 1.5px solid var(--requester); }
.seat-REQUESTER i { background: var(--requester); }
.seat-REVIEWER { background: linear-gradient(160deg, #D1FAE5, #6EE7B7); border: 1.5px solid #059669; }
.seat-REVIEWER i { background: var(--reviewer-ink); }
.seat-JUDGE { background: linear-gradient(160deg, #FEF3C7, #FCD34D); border: 1.5px solid #D97706; }
.seat-JUDGE i { background: var(--judge-ink); }
.seat-human { width: 50px; height: 58px; border-radius: 25px 25px 8px 8px; background: var(--line); border: 1.5px solid var(--gray); }
.table-stage.at-rest .seat-human { width: 44px; height: 52px; border-radius: 22px 22px 8px 8px; }
.seat-human i { position: absolute; left: 50%; top: 11px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #94A3B8; }
.table-stage.at-rest .seat-human i { top: 9px; width: 20px; height: 20px; margin-left: -10px; }
.seat-name { font: 700 11px/1 var(--mono); letter-spacing: .07em; }
.seat-model { margin-top: 4px; font: 400 11px/1 var(--mono); color: #94A3B8; }
.seat-role-hint { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.notepad { display: flex; flex-direction: column; gap: 3px; width: 78px; margin-top: 9px; padding: 7px 8px; background: #fff; border: 1px solid var(--slate); border-radius: 4px; }
.tr .notepad, .br .notepad { margin-left: auto; }
.br .notepad { margin-top: 0; margin-bottom: 9px; }
.notepad span { display: block; height: 2px; border-radius: 1px; }
.notepad span:nth-child(2) { width: 74%; } .notepad span:nth-child(4) { width: 50%; }
.tr .notepad span, .br .notepad span { margin-left: auto; }
.notepad-REQUESTER span { background: var(--requester-line); }
.notepad-REVIEWER span { background: #6EE7B7; }
.notepad-JUDGE span { background: #FCD34D; }
.bubble { position: absolute; width: 228px; padding: 9px 12px; color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.4; text-align: left; }
.bubble-REQUESTER { left: 66px; top: -8px; background: var(--requester); border-radius: 10px 10px 10px 2px; box-shadow: 0 6px 16px rgba(79, 70, 229, .3); }
.bubble-REVIEWER { right: 66px; bottom: -6px; background: var(--reviewer-ink); border-radius: 10px 2px 10px 10px; box-shadow: 0 6px 16px rgba(4, 120, 87, .3); }
.bubble-JUDGE { right: 66px; top: -8px; background: var(--judge-ink); border-radius: 10px 10px 2px 10px; box-shadow: 0 6px 16px rgba(180, 83, 9, .3); }
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; padding: 4px 8px; border-radius: 5px; font: 700 9.5px/1 var(--mono); letter-spacing: .05em; white-space: nowrap; }
.pin-BLOCKER { background: #FEE2E2; border: 1px solid #FCA5A5; color: #991B1B; }
.pin-MAJOR { background: #FEF3C7; border: 1px solid var(--judge-line); color: #92400E; }
.pin-MINOR, .pin-SUGGESTION { background: var(--line-soft); border: 1px solid var(--slate); color: var(--ink-4); }
.pin-OPEN { background: var(--requester-soft); border: 1px solid var(--requester-line); color: var(--requester-ink); }
.stage-caption { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--indigo); }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; background: rgba(165, 180, 252, .16); border: 1px solid rgba(165, 180, 252, .4); border-radius: 999px; font: 600 11px/1 var(--mono); color: #C7D2FE; letter-spacing: .06em; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #A5B4FC; }
.table-foot { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--slate); background: var(--offwhite); flex-wrap: wrap; }
.it-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.it-chip { padding: 5px 11px; border: 1px solid var(--slate); background: #fff; border-radius: 6px; font: 600 10.5px/1 var(--mono); color: #94A3B8; letter-spacing: .05em; }
.it-chip.completed { border-color: var(--reviewer-line); background: var(--reviewer-soft); color: #065F46; }
.it-chip.running { border-color: #A5B4FC; background: var(--requester-soft); color: var(--requester-ink); }
.it-chip.failed { border-color: #FECACA; background: #FEF2F2; color: #991B1B; }
.score-readout { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.score-readout .k { font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .05em; }
.score-readout .v { font-weight: 700; font-size: 20px; line-height: 1; color: var(--navy); letter-spacing: -.02em; }
.score-readout .t { font: 500 11px/1 var(--mono); color: #94A3B8; }
.score-track { width: 130px; height: 6px; background: var(--slate); border-radius: 3px; overflow: hidden; }
.score-track span { display: block; height: 100%; width: 0; background: var(--amber); }
.score-track span.ready { background: var(--mint); }

/* --- live transcript --- */
.transcript { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.feed { display: flex; gap: 11px; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
.feed:last-child { border-bottom: 0; }
.feed .accent { width: 3px; flex: none; border-radius: 2px; background: var(--line); }
.feed-REQUESTER .accent { background: var(--requester); }
.feed-REVIEWER .accent { background: var(--reviewer); }
.feed-JUDGE .accent { background: var(--judge); }
.feed .who { font: 700 10px/1 var(--mono); letter-spacing: .07em; color: var(--ink-3); }
.feed-REQUESTER .who { color: var(--requester); }
.feed-REVIEWER .who { color: var(--reviewer-ink); }
.feed-JUDGE .who { color: var(--judge-ink); }
.feed .what { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--ink-4); }
.feed .what .sev { padding: 1px 6px; border-radius: 4px; font: 700 10px var(--mono); }

/* --- verdict & rubric (Screen 1d) --- */
.verdict { position: relative; overflow: hidden; background: var(--navy); border-radius: var(--radius-lg); padding: 24px; color: #fff; }
.verdict .k { font: 600 10.5px/1 var(--mono); color: #94A3B8; letter-spacing: .09em; }
.verdict .score { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.verdict .score b { font-weight: 700; font-size: 62px; line-height: 1; letter-spacing: -.04em; }
.verdict .score span { font-size: 16px; font-weight: 500; color: #94A3B8; }
.verdict .why { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: #CBD5E1; }
.verdict + .card { margin-top: 1rem; }
.verdict .halo { position: absolute; right: -40px; bottom: -46px; width: 150px; height: 150px; border-radius: 50%; border: 1px dashed rgba(165, 180, 252, .35); }
.readiness-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; padding: 6px 12px; border-radius: 999px; font: 700 11px/1 var(--mono); letter-spacing: .06em; }
.readiness-READY { background: #D1FAE5; color: #065F46; }
.readiness-NEEDS_CLARIFICATION { background: #FEF3C7; color: #92400E; }
.readiness-BLOCKED { background: #FEE2E2; color: #991B1B; }
.rubric { display: flex; flex-direction: column; gap: 13px; margin-top: 15px; }
.rubric-row .top { display: flex; justify-content: space-between; gap: .5rem; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.rubric-row .top .w { color: #94A3B8; font-family: var(--mono); }
.rubric-row .top .v { font-weight: 700; font-family: var(--mono); }
.rubric-row .track { height: 6px; margin-top: 6px; background: var(--slate); border-radius: 3px; overflow: hidden; }
.rubric-row .track span { display: block; height: 100%; background: var(--indigo); }
.rubric-row.below .track span { background: var(--amber); }
.spec-section { margin-top: 22px; }
.spec-section:first-child { margin-top: 0; }
.spec-section > p, .spec-section > ul { max-width: 640px; }
.spec-section > p { margin: 9px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.spec-section > ul { margin: 9px 0 0; padding-left: 20px; }
.spec-section li { margin-bottom: 7px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.source-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

/* --- ambient motion (respects reduced-motion) --- */
@keyframes rq-breathe { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.14); opacity: .9; } }
@keyframes rq-orbit { to { transform: rotate(360deg); } }
@keyframes rq-blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .table-glow, .table-orbit, .seat i { animation: none !important; }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; padding: 32px 24px; }
  .hero h1 { font-size: 38px; }
  .table-stage.at-rest { width: 100%; max-width: 620px; }
  .role-strip { grid-template-columns: 1fr; }
}

/* --- segmented control (iteration count) --- */
.segmented { display: flex; gap: 6px; }
.segment { flex: 1; padding: 10px 0; text-align: center; border: 1px solid var(--slate); border-radius: 8px; background: #fff; font: 600 14px/1 var(--mono); color: #94A3B8; cursor: pointer; }
.segment:hover { border-color: var(--line); color: var(--ink-3); }
.segment[aria-checked="true"] { border: 1.5px solid var(--indigo); background: var(--indigo); color: #fff; }
.segment:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }
.char-count { margin-top: 7px; font-size: 12px; color: #94A3B8; }

/* --- pin anchors around the table --- */
.pin-at-0 { left: calc(50% - 132px); top: calc(50% - 62px); }
.pin-at-1 { left: calc(50% + 52px); top: calc(50% - 74px); }
.pin-at-2 { left: calc(50% - 138px); top: calc(50% + 52px); }
.pin-at-3 { left: calc(50% + 64px); top: calc(50% + 58px); }

/* Caption takes the colour of whoever is speaking. */
.stage-caption[data-role="REQUESTER"] { color: var(--requester); }
.stage-caption[data-role="REVIEWER"] { color: var(--reviewer-ink); }
.stage-caption[data-role="JUDGE"] { color: var(--judge-ink); }
.stage-caption[data-role="FAILED"] { color: var(--red); }
.stage-caption:not([data-role]), .stage-caption[data-role=""] { color: var(--muted); }

/* workspace switcher in the top bar (spec §23: a user may belong to several workspaces) */
.ws-switch { display: flex; align-items: center; }
.ws-switch select { background: #1E293B; color: #E2E8F0; border: 1px solid #334155; border-radius: 6px; padding: .3rem .5rem; font: inherit; font-size: .85rem; max-width: 220px; }
.ws-switch select:focus { outline: 2px solid #A5B4FC; outline-offset: 1px; }
.member-table td, .member-table th { vertical-align: middle; }
.member-table select { padding: .3rem .4rem; border: 1px solid #CBD5E1; border-radius: 6px; font: inherit; font-size: .85rem; }
.role-tag { display: inline-block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .75rem; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 4px; background: #EEF2FF; color: #3730A3; }
.role-tag.role-OWNER { background: #1E1B4B; color: #E0E7FF; }
.role-tag.role-ADMIN { background: #312E81; color: #E0E7FF; }
.role-tag.role-VIEWER { background: #F1F5F9; color: #475569; }
.inv-state { font-size: .75rem; font-weight: 600; letter-spacing: .04em; }
.inv-state.PENDING { color: #4338CA; } .inv-state.ACCEPTED { color: #15803D; } .inv-state.EXPIRED, .inv-state.REVOKED { color: #64748B; }

/* --- prepaid billing (pricing spec §7) --------------------------------------------------- */
.badge-PAUSED_INSUFFICIENT_FUNDS, .badge-paused, .badge-PENDING_RECONCILIATION, .badge-PENDING, .badge-DISPATCHED, .badge-RESERVED { background: #FEF3C7; color: #92400E; }
.badge-SETTLED, .badge-SUCCEEDED, .badge-TOP_UP, .badge-REFUND, .badge-ACTIVE { background: #D1FAE5; color: #065F46; }
.badge-NO_CHARGE, .badge-CANCELED, .badge-ADJUSTMENT { background: #F1F5F9; color: #475569; }
.badge-CHARGE, .badge-CHARGEBACK, .badge-CHARGEBACK_REVERSAL, .badge-BLOCKED_WALLET { background: #E2E8F0; color: #1E293B; }
.badge-PLATFORM_FUNDED { background: #E0E7FF; color: #3730A3; }
.badge-ESCALATED { background: #FEE2E2; color: #991B1B; }
.badge-OPEN { background: #FEF3C7; color: #92400E; }
.wallet-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.wallet-tile { padding: 1rem 1.25rem; border-right: 1px solid var(--slate); }
.wallet-tile:last-child { border-right: 0; }
.wallet-tile .k { font: 700 10px/1.4 var(--mono); letter-spacing: .08em; color: var(--muted); }
.wallet-tile .v { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.wallet-tile.primary .v { color: var(--indigo); }
.wallet-tile .hint { color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.wallet-note { padding: 0 1.25rem 1rem; }
.cost-totals { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--slate); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.cost-table td, .tx-table td { vertical-align: top; }
.tx-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-table .credit { color: #065F46; font-weight: 600; } .tx-table .debit { color: var(--navy); }
.checkout-card .kv dd { font-variant-numeric: tabular-nums; }
.estimate-kv dd { font-variant-numeric: tabular-nums; }
.estimate-notices { margin: .6rem 0 0; padding-left: 1.1rem; }
.estimate-notices li { margin-bottom: .25rem; }
.topup-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topup-estimate { margin-top: .8rem; padding: .8rem; border: 1px solid var(--slate); border-radius: 8px; background: #F8FAFC; }
.topup-confirm { display: flex; gap: .5rem; align-items: flex-start; margin-top: .6rem; font-size: .85rem; }
.topup-confirm input { margin-top: .2rem; }
@media (max-width: 720px) { .wallet-tiles, .cost-totals { grid-template-columns: 1fr; } .wallet-tile { border-right: 0; border-bottom: 1px solid var(--slate); } }
