/* Same MRG look as Fleet Twin (09_fleet_twin/web/css/app.css): navy / teal, Fira, fixed 1920x1080 stage. */
:root {
  --bg: #0B1140; --panel: #121A55; --panel2: #18226A; --line: #2A3580;
  --ink: #F4F7FB; --muted: #9FB0C8; --teal: #3FAEA7; --teal2: #7FD6CF;
  --amber: #F2B23A; --red: #E5634D; --navy: #161E6F;
  --t: 300ms;
}
@media (prefers-reduced-motion: reduce) { :root { --t: 0ms; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05082A; overflow: hidden; }
body { font-family: 'Fira Sans', Arial, sans-serif; color: var(--ink); }
.num, code, pre { font-family: 'Fira Code', monospace; font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal2); outline-offset: 2px; }
kbd { font-family: 'Fira Code', monospace; font-size: 13px; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-left: 10px; opacity: .7; }

.stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0;
  background: var(--bg); padding: 26px 40px 24px; display: flex; flex-direction: column; gap: 16px; }

.hdr { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.title { font-size: 34px; font-weight: 600; }
.sub { font-size: 17px; color: var(--muted); margin-top: 4px; }
.hdr-right { display: flex; align-items: center; gap: 24px; }
.status { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--muted); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #4A5590; }
.status.live .dot { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.status.replay .dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.seg { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.seg button { background: none; border: 0; padding: 9px 24px; font-size: 18px; color: var(--muted); border-radius: 7px; transition: background var(--t), color var(--t); }
.seg button[aria-checked="true"] { background: var(--teal); color: #06212A; font-weight: 600; }

.scope { display: flex; justify-content: space-between; align-items: center; background: var(--panel2); border: 1px solid var(--line);
  border-left: 5px solid var(--teal); border-radius: 10px; padding: 12px 20px; font-size: 21px; }
.scope-k { color: var(--teal2); font-weight: 600; }
.scope-not { color: var(--amber); font-weight: 600; margin-left: 6px; }
.scope-r { color: var(--muted); font-size: 18px; }

.main { flex: 1; min-height: 0; display: grid; grid-template-columns: 900px 1fr; gap: 20px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 24px; display: flex; flex-direction: column; min-height: 0; }
.k { font-size: 14px; letter-spacing: 2.6px; font-weight: 600; color: var(--teal2); text-transform: uppercase; display: flex; justify-content: space-between; align-items: baseline; }
.k em { font-style: normal; color: var(--muted); letter-spacing: .4px; text-transform: none; font-weight: 400; font-size: 15px; }
.request { font-size: 24px; line-height: 1.35; margin: 8px 0 14px; padding: 12px 16px; background: rgba(255,255,255,.04); border-radius: 10px; border: 1px solid var(--line); }
.steps-k { margin-top: 2px; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.step { display: grid; grid-template-columns: 36px 1fr 40px; gap: 12px; align-items: start; padding: 6px 10px; border-radius: 8px; animation: in var(--t) ease-out; }
.step:last-child { background: rgba(127,214,207,.07); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step .n { font-family: 'Fira Code', monospace; color: var(--muted); font-size: 16px; padding-top: 3px; }
.step .lab { font-size: 20px; font-weight: 500; }
.step .tool { font-family: 'Fira Code', monospace; font-size: 13px; color: var(--teal2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; margin-left: 10px; vertical-align: 2px; }
.step .line { font-size: 17px; color: var(--muted); margin-top: 2px; }
.step .thought { font-size: 16px; color: var(--teal2); font-style: italic; margin-top: 3px; }
.step .mark { font-size: 26px; font-weight: 600; text-align: center; line-height: 1; padding-top: 2px; }
.mark.ok { color: var(--teal); } .mark.bad { color: var(--red); } .mark.wait { color: var(--amber); }
.step.bad .line { color: #F3A597; }
.step.gate { border: 2px solid var(--amber); background: rgba(242,178,58,.10) !important; }
.step.gate .lab { color: var(--amber); }
.step.end .lab { color: var(--teal2); }
.step pre { font-size: 12px; color: var(--muted); white-space: pre-wrap; margin: 4px 0 0; max-height: 90px; overflow: hidden; }
.thinking { display: flex; align-items: center; gap: 12px; font-size: 19px; padding: 10px 12px 0; color: var(--teal2); }
.thinking span:last-child { color: var(--muted); }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--teal2); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }

.right { overflow: hidden; }
.cardbody { flex: 1; min-height: 0; margin-top: 12px; overflow: hidden; }
.intro { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; color: var(--muted); font-size: 24px; text-align: center; }
.intro .big { font-size: 40px; color: var(--ink); font-weight: 600; }
.cand-h { display: flex; justify-content: space-between; align-items: flex-start; }
.cand-name { font-size: 46px; font-weight: 600; line-height: 1.1; }
.cand-sub { font-size: 20px; color: var(--muted); margin-top: 6px; }
.badge { font-size: 15px; letter-spacing: 2px; font-weight: 600; text-transform: uppercase; padding: 6px 12px; border-radius: 6px; background: var(--teal); color: #06212A; }
.badge.checking { background: var(--panel2); color: var(--teal2); border: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.box { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.box .bk { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; }
.row { display: flex; justify-content: space-between; font-size: 19px; padding: 5px 0; border-bottom: 1px solid rgba(42,53,128,.6); gap: 12px; }
.row:last-child { border-bottom: 0; }
.row .v { font-family: 'Fira Code', monospace; font-size: 17px; }
.v.ok { color: var(--teal2); } .v.bad { color: var(--red); } .v.pend { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 84px; position: relative; margin-top: 8px; border-bottom: 1px solid var(--line); }
.bars i { flex: 1; background: var(--teal); border-radius: 3px 3px 0 0; opacity: .85; }
.bars i.low { background: var(--red); opacity: 1; }
.bars .min { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--amber); }
.bars .min span { position: absolute; right: 0; top: -22px; font-size: 13px; color: var(--amber); }
.verdict { margin-top: 8px; font-size: 17px; }
.list { width: 100%; border-collapse: collapse; font-size: 21px; }
.list th { text-align: left; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.list td { padding: 12px 10px; border-bottom: 1px solid rgba(42,53,128,.6); }
.list td.ok { color: var(--teal2); } .list td.bad { color: var(--red); }
.mail { background: #F4F7FB; color: #0B1140; border-radius: 10px; padding: 22px 28px; position: relative; font-size: 20px; }
.mail .hd { font-size: 17px; color: #45507F; padding: 4px 0; border-bottom: 1px solid #D5DBEA; }
.mail .hd b { color: #0B1140; display: inline-block; width: 90px; }
.mail .body { padding-top: 14px; line-height: 1.45; }
.stamp { position: absolute; right: 22px; top: 18px; border: 3px solid var(--red); color: var(--red); font-weight: 600; letter-spacing: 2px; padding: 4px 10px; border-radius: 6px; transform: rotate(-4deg); font-size: 16px; }
.mails { display: flex; flex-direction: column; gap: 12px; }
.mails .mail { padding: 12px 20px; font-size: 17px; }
.mails .mail .body { padding-top: 6px; font-size: 16px; }
.rawjson { font-size: 14px; color: var(--teal2); white-space: pre-wrap; margin: 0; }

.gatebox { margin-top: 12px; background: rgba(242,178,58,.14); border: 2px solid var(--amber); border-radius: 12px; padding: 14px 20px; }
.gate-k { font-size: 15px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--amber); font-weight: 600; }
.gate-q { font-size: 26px; margin-top: 4px; }

.bar { display: flex; justify-content: space-between; align-items: center; }
.bar-l, .bar-r { display: flex; gap: 14px; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 14px 26px; font-size: 21px; transition: background var(--t), opacity var(--t); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.approve:not(:disabled) { background: var(--teal); color: #06212A; font-weight: 600; border-color: var(--teal); }
.btn.reject:not(:disabled) { border-color: var(--red); color: #F3A597; }
.btn.file:not(:disabled) { border-color: var(--amber); color: var(--amber); }
.btn.ghost { background: none; font-size: 18px; padding: 12px 20px; color: var(--muted); }
.btn.ghost[aria-pressed="true"] { color: var(--teal2); border-color: var(--teal); }

.filemodal { position: absolute; inset: 0; background: rgba(5,8,42,.78); display: flex; align-items: center; justify-content: center; z-index: 5; }
.paper { width: 1240px; max-height: 960px; background: #F7F5EF; color: #1A2040; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.paper-h { display: flex; justify-content: space-between; align-items: center; padding: 22px 34px; border-bottom: 2px solid #1A2040; }
.paper-k { font-size: 15px; letter-spacing: 2.4px; text-transform: uppercase; color: #6A6F86; font-weight: 600; }
.paper-name { font-size: 38px; font-weight: 600; margin-top: 4px; }
.btn.dark { color: #1A2040; border-color: #A9AEC2; }
.paper-body { padding: 20px 34px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; font-size: 19px; overflow: hidden; }
.paper-body .f { display: flex; justify-content: space-between; border-bottom: 1px dotted #B9BCCB; padding: 6px 0; }
.paper-body .f span:first-child { color: #6A6F86; }
.paper-body .sec { grid-column: 1 / -1; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: #6A6F86; font-weight: 600; margin-top: 12px; }
.notes { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.note { background: #FFF6CC; border: 1px solid #E8D98A; border-radius: 4px; padding: 12px 16px; font-size: 22px; font-family: 'Fira Sans', Arial, sans-serif; }
.note small { display: block; font-size: 14px; color: #6A6F86; margin-bottom: 4px; }

.nokey { position: absolute; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--muted); z-index: 9; }
[hidden] { display: none !important; }
body.still *, body.still *::before { animation: none !important; transition: none !important; }
