/* CODELOCK terminal panels, typography and gate controls. */

@font-face{font-family:'CC Mono';src:url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'CC Mono';src:url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
/* Kept verbatim from terminal-skin.css so the welcome overlay on the gate stays identical. */
@font-face{font-family:'Codelock ASCII';src:url('../assets/fonts/CodelockASCII.woff') format('woff');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Codelock Terminal';src:url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Codelock Terminal';src:url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
.welcome-copy{font-family:'Codelock Terminal',monospace}
.welcome-copy #welcome-title{font-family:'Codelock Terminal',monospace}
.welcome-copy #welcome-title>span{font-family:'Codelock ASCII',monospace;color:#d64b51;font-weight:400;text-shadow:1px 2px #42191d}
.welcome-copy :is(p,button){font-family:'Codelock Terminal',monospace}

/* ───────────────────────── tokens ───────────────────────── */
#cellblock.cc{
  --bg:#0a0909;
  --panel:#0d0c0c;
  --panel-2:#121010;
  --line:#242121;
  --line-2:#363131;
  --ink:#d9d6cf;
  --ink-hi:#f2efe8;
  --dim:#8d8983;
  --faint:#5a5652;
  --red:#e5484d;
  --red-ink:#ff6b6f;
  --red-deep:#5c1c1f;
  --red-wash:#e5484d14;
  --ok:#8fbf73;
  --mono:'CC Mono','Cascadia Mono',Consolas,'Liberation Mono',monospace;
  --fs:13px;
  --lh:1.65;
  font-family:var(--mono);
  font-size:var(--fs);
  line-height:var(--lh);
  color:var(--ink);
  font-variant-ligatures:none;
  font-feature-settings:'calt' 0,'liga' 0;
  -webkit-font-smoothing:antialiased;
}
body[data-view="prison"] #cellblock.cc{
  width:calc(100% + 32px);max-width:none;
  padding:0 0 64px;
  scroll-margin-top:0;
}
#cellblock.cc *,#cellblock.cc *::before,#cellblock.cc *::after{box-sizing:border-box}
#cellblock.cc :is(h2,h3,h4,p,dl,dd,ol){margin:0;padding:0}
#cellblock.cc :is(button,select,input){font:inherit;color:inherit;letter-spacing:0}
#cellblock.cc button{cursor:pointer;background:none;border:0;padding:0;border-radius:0}
#cellblock.cc button:disabled{cursor:not-allowed;opacity:.38}
#cellblock.cc :is(button,a,select,summary):focus-visible{outline:1px dashed var(--red);outline-offset:3px}
#cellblock.cc ::selection{background:var(--red);color:#0a0909}
#cellblock.cc kbd{font:inherit;font-size:.85em;display:inline-block;min-width:1.7em;padding:0 .35em;border:1px solid var(--line-2);color:var(--dim);text-align:center;line-height:1.45}
#cellblock.cc .cc-hash{color:var(--faint)}
#cellblock.cc .flag{color:var(--dim)}
#cellblock.cc .ps1{color:var(--red)}
#cellblock.cc .cwd{color:var(--ink-hi)}

/* ───── page zoom compensation ─────
   index.html zooms the page by --cc-zoom. svh/vw inside a zoomed page get scaled twice, so every viewport-relative
   size of the gate is restated here with --cc-u / --cc-w (1% of the viewport in design space). At zoom 1 these equal
   the original values. */
:root{--cc-zoom:1;--cc-u:1svh;--cc-w:1vw}
.observation-space{min-height:calc(100 * var(--cc-u));padding-top:max(32px,calc(50 * var(--cc-u) - var(--eye-width) / 6))}
body[data-view="prison"] .observation-space{
  --eye-width:min(800px,calc(100 * var(--cc-w) - 48px));
  --previous-eye-width:min(520px,calc(100 * var(--cc-w) - 48px));
  padding-top:calc(30px + max(24px,calc(clamp(48px,calc(11 * var(--cc-u)),120px) + (var(--previous-eye-width) - var(--eye-width)) / 6)));
}
.prison-columns{height:calc(100 * var(--cc-u))}
body[data-view="prison"] .gate-atmosphere{height:calc(var(--gate-height,calc(100 * var(--cc-u) * var(--cc-zoom))) / var(--cc-zoom))}
body[data-view="prison"] .archive-video{width:min(640px,calc(35.5 * var(--cc-w)))}
@media(min-width:1200px){
  .press-story--one{left:clamp(18px,calc(1.4 * var(--cc-w)),28px);top:calc(21 * var(--cc-u))}
  .press-story--two{top:calc(37 * var(--cc-u))}
  .press-story--three{left:clamp(18px,calc(1.4 * var(--cc-w)),28px);top:calc(68 * var(--cc-u))}
  .press-story--four{top:calc(72 * var(--cc-u))}
}
@media(min-width:1200px) and (max-width:1599px){
  .press-story--one{top:calc(20 * var(--cc-u))}
  .press-story--two{top:calc(31 * var(--cc-u))}
  .press-story--three,.press-story--four{top:calc(65 * var(--cc-u))}
}

/* ───────────────────────── question line (sits between the video and the gate buttons) ───────────────────────── */
.cc-question{display:none}
body[data-view="prison"] .cc-question{
  display:block;position:relative;z-index:2;flex:0 0 auto;margin:clamp(22px,calc(3 * var(--cc-u)),44px) 0 0;padding:0 16px;text-align:center;
  font:400 clamp(17px,1.6vw,24px)/1.4 'CC Mono','Cascadia Mono',Consolas,monospace;color:#f2efe8;letter-spacing:0;text-wrap:balance;
  text-shadow:0 1px 2px #000,0 0 14px #000;
}
.cc-question .q-prompt{color:#e5484d;margin-right:.5ch}
.cc-question .q-cursor,#cellblock.cc .q-cursor{display:inline-block;width:.6em;height:1.05em;margin-left:.25ch;vertical-align:-.15em;background:#e5484d;animation:cc-blink 1.06s steps(1) infinite}
@keyframes cc-blink{50%{opacity:0}}
body[data-view="prison"] .cc-question+.gate-actions{margin-top:14px}
body[data-view="prison"] .gate-actions{display:flex;justify-content:center;width:auto!important;height:auto}
body[data-view="prison"] #cellblock.cc{margin-top:clamp(64px,calc(9.5 * var(--cc-u)),120px);min-height:calc(95 * var(--cc-u))}

/* ───────────────────────── tmux status bar ───────────────────────── */
#cellblock.cc .facility-nav{
  position:sticky;top:0;z-index:8;
  display:flex;align-items:stretch;gap:0;
  height:30px;margin:0;padding:0;
  background:#141212;border:1px solid var(--line);border-top:0;
  font-size:12px;white-space:nowrap;overflow:hidden;
}
#cellblock.cc .tmux-session{display:flex;align-items:center;padding:0 12px;background:var(--red);color:#120808;font-weight:700}
#cellblock.cc .facility-links{display:flex;align-items:stretch;margin:0;padding-left:6px}
#cellblock.cc .facility-links button{display:flex;align-items:center;gap:6px;padding:0 12px;color:var(--dim);position:relative}
#cellblock.cc .facility-links button kbd{border:0;min-width:0;padding:0;color:var(--faint);font-size:12px}
#cellblock.cc .facility-links button kbd::after{content:':'}
#cellblock.cc .facility-links button:hover{color:var(--ink-hi)}
#cellblock.cc .facility-links button.is-current{background:var(--ink);color:#0a0909}
#cellblock.cc .facility-links button.is-current kbd{color:#0a0909}
#cellblock.cc .facility-links button.is-current::after{content:'*'}
#cellblock.cc .facility-links>a{display:flex;align-items:center;padding:0 12px;color:var(--dim);text-decoration:none;font:inherit}
#cellblock.cc .facility-links>a:hover{color:var(--ink-hi)}
#cellblock.cc .tmux-buy{display:flex;align-items:center;padding:0 14px;background:var(--red);color:#120808;font-weight:700;text-decoration:none;letter-spacing:.02em;cursor:pointer}
#cellblock.cc .tmux-buy:hover,#cellblock.cc .tmux-buy:focus-visible{background:#ff5f63}
#cellblock.cc .tmux-x{display:flex;align-items:center;justify-content:center;width:40px;background:#262222;color:var(--ink-hi);border-right:1px solid var(--line-2);cursor:pointer}
#cellblock.cc .tmux-x .cc-xlogo{width:14px;height:14px;display:block}
#cellblock.cc .tmux-x:hover,#cellblock.cc .tmux-x:focus-visible{background:var(--ink);color:#0a0909}
#cellblock.cc .tmux-right{display:flex;align-items:center;gap:10px;margin-left:auto;padding:0 12px;color:var(--dim)}
#cellblock.cc .tmux-sep{color:var(--faint)}
#cellblock.cc .tmux-host{color:var(--ink)}
#cellblock.cc #cc-clock{color:var(--ink-hi)}

/* tmux bar pinned to the top of the whole page (gate included); the gate is pushed down by its height above */
body[data-view="prison"] #cellblock.cc{z-index:5}
body[data-view="prison"] #cellblock.cc .facility-nav{position:fixed;top:0;left:0;right:0;border-left:0;border-right:0;background:#121010f2}

/* ───────────────────────── shell command lines ───────────────────────── */
#cellblock.cc .cc-cmd{margin:28px 0 10px;color:var(--ink);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cellblock.cc .cc-cmd::after{content:'';display:inline-block;width:.6em;height:1.1em;margin-left:.2ch;vertical-align:-.2em;background:var(--ink);opacity:0}
#cellblock.cc .cc-cmd.is-live::after{opacity:1;animation:cc-blink 1.06s steps(1) infinite}

/* ───────────────────────── TUI boxes ───────────────────────── */
#cellblock.cc .tui-box{position:relative;border:1px solid var(--line-2);background:var(--panel)}
#cellblock.cc .instrument-bar,#cellblock.cc .file-tab{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:32px;padding:0 12px;border-bottom:1px solid var(--line-2);background:var(--panel-2);
  font-size:12px;color:var(--dim);
}
#cellblock.cc .instrument-bar h3,#cellblock.cc .file-tab h3{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:var(--ink-hi);letter-spacing:0}
#cellblock.cc .instrument-bar h3::before,#cellblock.cc .file-tab h3::before{content:'┤';color:var(--faint);font-weight:400}
#cellblock.cc .instrument-bar h3::after,#cellblock.cc .file-tab h3::after{content:'├';color:var(--faint);font-weight:400}
#cellblock.cc .instrument-bar>span,#cellblock.cc .file-tab>span{font-size:11px;color:var(--faint);text-transform:uppercase}
#cellblock.cc .instrument-bar>span.is-running{color:var(--red)}
#cellblock.cc .status-light{width:7px;height:7px;background:var(--red);animation:cc-blink 1.6s steps(1) infinite}
#cellblock.cc .status-light+*{margin:0}

/* ───────────────────────── 01 / surveillance ───────────────────────── */
#cellblock.cc .observation-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px 400px;gap:12px;align-items:stretch;scroll-margin-top:44px}
#cellblock.cc .observation-feed{min-width:0}
#cellblock.cc .observation-toolbar{display:grid;grid-template-columns:1fr auto 1fr}
#cellblock.cc .room-nav{display:flex;gap:0;align-self:stretch}
#cellblock.cc .room-nav button{padding:0 12px;color:var(--dim);font-size:12px}
#cellblock.cc .room-nav button::before{content:'[ ';color:var(--faint)}
#cellblock.cc .room-nav button::after{content:' ]';color:var(--faint)}
#cellblock.cc .room-nav button[aria-pressed="true"]{color:var(--ink-hi)}
#cellblock.cc .room-nav button[aria-pressed="true"]::before{content:'[*';color:var(--red)}
#cellblock.cc .room-nav button[aria-pressed="true"]::after{color:var(--red)}
#cellblock.cc .room-nav button:hover{color:var(--ink-hi)}
#cellblock.cc #feed-toggle{justify-self:end;color:var(--dim);font-size:12px;white-space:nowrap}
#cellblock.cc #feed-toggle:hover,#cellblock.cc #feed-toggle[aria-pressed="true"]{color:var(--red-ink)}

#cellblock.cc .cell-feed{position:relative;overflow:hidden;width:100%;aspect-ratio:16/9;background:#141513}
#cellblock.cc .cell-feed.is-3d{aspect-ratio:1.98;background:#141513}
#cellblock.cc .cell-feed.is-3d>:not(iframe){display:none}
#cellblock.cc .cell-feed.is-3d iframe{position:absolute;inset:0;display:block;width:100%;height:100%;border:0}
#cellblock.cc .cell-feed.is-3d+.transmission-line{display:none}
#cellblock.cc .cell-feed:not(.is-3d) iframe{display:none}
#cellblock.cc .cell-visual{position:absolute;inset:0;background:url('../assets/cellblock-scenes-v1.png') calc(var(--cell-col)*50%) calc(var(--cell-row)*100%)/300% 200%}
#cellblock.cc .transmission-line{display:flex;gap:12px;padding:8px 12px;border-top:1px solid var(--line);font-size:12px}
#cellblock.cc .transmission-line>span{color:var(--faint)}

/* camera roster: 6 tiles, captions like `ls` output */
#cellblock.cc .cell-roster{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;border-top:1px solid var(--line-2)}
#cellblock.cc .cell-choice{position:relative;display:grid;grid-template-columns:auto 1fr;align-content:start;gap:0 8px;padding:8px;text-align:left;border-right:1px solid var(--line);color:var(--dim);font-size:11px;line-height:1.5;background:var(--panel)}
#cellblock.cc .cell-choice:last-child{border-right:0}
#cellblock.cc .cell-thumbnail{grid-column:1/-1;display:block;width:100%;aspect-ratio:16/9;object-fit:cover;margin-bottom:7px;border:1px solid var(--line);filter:grayscale(.65) brightness(.62) contrast(1.05);transition:filter .15s}
#cellblock.cc .cell-index{color:var(--faint)}
#cellblock.cc .cell-choice-name{color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cellblock.cc .cell-choice-state{grid-column:1/-1;color:var(--faint);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cellblock.cc .cell-choice:hover{background:var(--panel-2)}
#cellblock.cc .cell-choice:hover .cell-thumbnail{filter:grayscale(.2) brightness(.85)}
#cellblock.cc .cell-choice.is-selected{background:var(--panel-2);color:var(--ink-hi)}
#cellblock.cc .cell-choice.is-selected .cell-thumbnail{filter:none;border-color:var(--red)}
#cellblock.cc .cell-choice.is-selected .cell-index{color:var(--red)}
#cellblock.cc .cell-choice.is-selected .cell-index::before{content:'▶ '}
#cellblock.cc .cell-choice.is-selected .cell-choice-name{color:var(--ink-hi)}
#cellblock.cc .feed-footnote{display:flex;justify-content:space-between;gap:12px;padding:6px 12px;border-top:1px solid var(--line-2);background:var(--panel-2);color:var(--faint);font-size:11px;text-transform:lowercase}
#cellblock.cc .feed-footnote span:first-child::before{content:'-- ';}
#cellblock.cc .feed-footnote span:last-child::after{content:' --'}

/* dossier: reads as `cat file.rec` */
#cellblock.cc .inmate-file{display:flex;flex-direction:column;align-self:stretch}
#cellblock.cc .file-cmd{padding:12px 14px 4px;color:var(--dim);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cellblock.cc .file-identity{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:2px 12px;padding:10px 14px 14px;border-bottom:1px dashed var(--line-2)}
#cellblock.cc .file-number{font-size:12px;color:var(--faint)}
#cellblock.cc .file-number::before{content:'id: '}
#cellblock.cc .file-stamp{justify-self:end;padding:0 6px;font-size:11px;font-weight:700;color:var(--red-ink);border:1px solid var(--red-deep);background:var(--red-wash)}
#cellblock.cc .file-stamp::before{content:'['}
#cellblock.cc .file-stamp::after{content:']'}
#cellblock.cc .file-identity h4{grid-column:1/-1;font-size:30px;font-weight:700;line-height:1.15;color:var(--ink-hi);letter-spacing:.02em}
#cellblock.cc .file-identity p{grid-column:1/-1;font-size:12px;color:var(--dim)}
#cellblock.cc .file-identity p::before{content:'class: ';color:var(--faint)}
#cellblock.cc .file-facts{padding:10px 14px;border-bottom:1px dashed var(--line-2)}
#cellblock.cc .file-facts>div{display:flex;align-items:baseline;gap:0;font-size:12.5px;line-height:1.9}
#cellblock.cc .file-facts dt{color:var(--dim);flex:0 0 auto}
#cellblock.cc .file-facts dt::after{content:'';flex:1}
#cellblock.cc .file-facts>div::after{content:none}
#cellblock.cc .file-facts dd{margin-left:auto;color:var(--ink-hi);text-align:right}
#cellblock.cc .file-facts dt{display:flex;flex:1;gap:0;overflow:hidden;white-space:nowrap}
#cellblock.cc .file-facts dt::after{content:' ....................................................';color:var(--faint);overflow:hidden}
#cellblock.cc .subject-metrics{display:grid;gap:2px;padding:12px 14px;border-bottom:1px dashed var(--line-2)}
#cellblock.cc .subject-metrics label{display:flex;justify-content:space-between;font-size:12.5px;color:var(--dim)}
#cellblock.cc .subject-metrics label span{color:var(--ink-hi)}
#cellblock.cc .subject-metrics progress{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
#cellblock.cc .ascii-meter{display:block;margin-bottom:10px;font-size:12.5px;line-height:1.4;white-space:pre;overflow:hidden;color:var(--faint)}
#cellblock.cc .ascii-meter b{font-weight:700;color:var(--ink)}
#cellblock.cc .ascii-meter.is-high b{color:var(--red)}
#cellblock.cc .merit-line{display:flex;justify-content:space-between;align-items:baseline;font-size:12.5px;color:var(--dim)}
#cellblock.cc .merit-line strong{font-size:22px;font-weight:700;color:var(--ink-hi)}
#cellblock.cc .merit-line small{font-size:11px;font-weight:400;color:var(--faint)}
#cellblock.cc .infraction{padding:12px 14px;font-size:12.5px}
#cellblock.cc .infraction>span{display:block;color:var(--faint)}
#cellblock.cc .infraction p{color:var(--ink)}
#cellblock.cc .infraction p::before{content:'> ';color:var(--red)}
/* booking photo slot — fills the dossier's free height */
#cellblock.cc .cc-mugshot{flex:1;display:flex;flex-direction:column;min-height:240px;margin:8px 14px 4px;padding:0}
#cellblock.cc .mug-frame{position:relative;flex:1;min-height:180px;overflow:hidden;border:1px solid var(--line-2);
  background:
    repeating-linear-gradient(180deg,transparent 0 11px,#ffffff0d 11px 12px),
    repeating-linear-gradient(180deg,transparent 0 59px,#ffffff1f 59px 60px),
    linear-gradient(180deg,#161414,#0f0e0e)}
#cellblock.cc .mug-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top;z-index:1}
#cellblock.cc .mug-scale{position:absolute;inset:0 0 0 auto;display:flex;flex-direction:column;justify-content:space-around;padding:0 6px;font-size:10px;color:var(--faint);text-align:right;z-index:2;pointer-events:none}
#cellblock.cc .mug-scale i{font-style:normal}
#cellblock.cc .mug-empty{position:absolute;inset:0;display:grid;place-content:center;gap:4px;text-align:center;font-size:11px;letter-spacing:.12em;color:var(--dim)}
#cellblock.cc .mug-empty small{font-size:10px;letter-spacing:0;color:var(--faint)}
#cellblock.cc .mug-corners{position:absolute;inset:8px;z-index:2;pointer-events:none;
  background:
    linear-gradient(var(--red),var(--red)) left top/12px 1px no-repeat,linear-gradient(var(--red),var(--red)) left top/1px 12px no-repeat,
    linear-gradient(var(--red),var(--red)) right top/12px 1px no-repeat,linear-gradient(var(--red),var(--red)) right top/1px 12px no-repeat,
    linear-gradient(var(--red),var(--red)) left bottom/12px 1px no-repeat,linear-gradient(var(--red),var(--red)) left bottom/1px 12px no-repeat,
    linear-gradient(var(--red),var(--red)) right bottom/12px 1px no-repeat,linear-gradient(var(--red),var(--red)) right bottom/1px 12px no-repeat}
#cellblock.cc .cc-mugshot figcaption{display:flex;justify-content:space-between;gap:8px;padding:6px 0 0;font-size:10.5px;color:var(--faint)}
#cellblock.cc .mug-id{color:var(--ink)}
#cellblock.cc .file-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 14px 14px}
#cellblock.cc .text-action{grid-column:1/-1;justify-self:start;color:var(--dim);font-size:12px}
#cellblock.cc .text-action::before{content:'→ '}
#cellblock.cc .text-action:hover{color:var(--ink-hi)}
#cellblock.cc .file-bottom{display:flex;justify-content:space-between;gap:10px;padding:6px 14px;border-top:1px solid var(--line-2);background:var(--panel-2);font-size:10.5px;color:var(--faint)}
#cellblock.cc .barcode{letter-spacing:-.05em;color:var(--line-2)}

/* buttons: bracketed commands, inverse on hover */
#cellblock.cc .facility-button{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;padding:0 12px;border:1px solid var(--line-2);color:var(--ink);font-size:12px;white-space:nowrap;transition:background .08s,color .08s}
#cellblock.cc .facility-button:hover:not(:disabled){background:var(--ink);color:#0a0909;border-color:var(--ink)}
#cellblock.cc .facility-button.primary{border-color:var(--red);color:var(--red-ink)}
#cellblock.cc .facility-button.primary:hover:not(:disabled){background:var(--red);border-color:var(--red);color:#120808}
#cellblock.cc .facility-button kbd{border-color:currentColor;color:inherit;opacity:.75}

/* ───────────────────────── section headings ───────────────────────── */
#cellblock.cc .facility-section{scroll-margin-top:30px}
#cellblock.cc .section-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px 32px;margin:0 0 16px;padding-top:40px}
#cellblock.cc .section-heading .cc-cmd{grid-column:1/-1;margin:0 0 18px}
#cellblock.cc .section-kicker{grid-column:1/-1;color:var(--dim);font-size:12px;letter-spacing:0;text-transform:lowercase}
#cellblock.cc .section-kicker>span:not(.cc-hash){margin:0 .6ch;color:var(--faint)}
#cellblock.cc .section-heading h2{margin:4px 0 0;font-weight:400;min-width:0}
#cellblock.cc .figlet{display:block;margin:0;font-family:var(--mono);white-space:pre;line-height:1.02;letter-spacing:0;color:var(--red);font-size:clamp(5px,.74vw,10px);overflow:hidden}
#cellblock.cc .figlet i{font-style:normal;color:#6e2427}
#cellblock.cc .footer-wordmark i{color:#2c1214}
#cellblock.cc .section-aside{align-self:end;font-size:12px;line-height:1.7;color:var(--dim);text-align:left;white-space:nowrap}
#cellblock.cc .model-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:32px;grid-column:2;grid-row:3}
#cellblock.cc .model-docs-link{display:inline-flex;align-items:center;justify-content:space-between;gap:32px;min-width:190px;padding:14px 18px;border:1px solid var(--red);color:var(--red-ink);background:#e5484d09;text-decoration:none;font-size:12px;letter-spacing:.05em;white-space:nowrap;transition:color .15s,background .15s}
#cellblock.cc .model-docs-link:hover{background:var(--red);color:#160a0a}
@media(max-width:900px){#cellblock.cc .model-heading-actions{gap:16px}#cellblock.cc .model-heading-actions .section-aside{display:none}#cellblock.cc .model-docs-link{min-width:165px}}
@media(max-width:980px){#cellblock.cc .model-heading-actions{grid-column:1;grid-row:auto;justify-content:flex-start;margin-top:12px}#cellblock.cc .model-docs-link{min-width:180px}}

/* ───────────────────────── 02 / trials ───────────────────────── */
#cellblock.cc .trial-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:12px;align-items:stretch}
#cellblock.cc .catalog-head{display:grid;grid-template-columns:52px 1fr 40px;gap:12px;padding:7px 14px;border-bottom:1px solid var(--line-2);background:var(--panel-2);color:var(--faint);font-size:11px}
#cellblock.cc .trial-option{position:relative;display:grid;grid-template-columns:52px 1fr 40px;gap:12px;width:100%;padding:16px 14px;text-align:left;border-bottom:1px solid var(--line);color:var(--dim)}
#cellblock.cc .trial-no{color:var(--faint);font-size:13px}
#cellblock.cc .trial-no::before{content:'  ';white-space:pre}
#cellblock.cc .trial-copy{display:grid;gap:3px}
#cellblock.cc .trial-type{font-size:11px;color:var(--faint)}
#cellblock.cc .trial-copy strong{font-size:15px;font-weight:700;color:var(--ink)}
#cellblock.cc .trial-copy>span:last-child{font-size:12.5px;color:var(--dim);max-width:72ch}
#cellblock.cc .trial-mark{justify-self:end;font-size:18px;line-height:1.2;color:var(--faint)}
#cellblock.cc .trial-option:hover:not(:disabled){background:var(--panel-2)}
#cellblock.cc .trial-option:hover:not(:disabled) strong{color:var(--ink-hi)}
#cellblock.cc .trial-option.is-selected{background:var(--red-wash);box-shadow:inset 2px 0 var(--red)}
#cellblock.cc .trial-option.is-selected .trial-no{color:var(--red)}
#cellblock.cc .trial-option.is-selected .trial-no::before{content:'> '}
#cellblock.cc .trial-option.is-selected strong{color:var(--ink-hi)}
#cellblock.cc .trial-option.is-selected .trial-mark{color:var(--red)}
#cellblock.cc .trial-option:disabled{opacity:.5}
#cellblock.cc .trial-note{display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:start;padding:14px;color:var(--dim);font-size:12px}
#cellblock.cc .note-cross{color:var(--red);padding-left:2ch}
#cellblock.cc .trial-note>span:last-child{color:var(--faint);font-size:10.5px}

#cellblock.cc .operator-console{display:flex;flex-direction:column;background:#0b0a0a}
#cellblock.cc .win-dots{color:var(--faint);letter-spacing:.15em;font-weight:400}
#cellblock.cc .operator-console .instrument-bar h3::before,#cellblock.cc .operator-console .instrument-bar h3::after{content:none}
#cellblock.cc #console-state{padding:0 6px;border:1px solid var(--line-2);color:var(--dim)}
#cellblock.cc .operator-console.is-running #console-state{border-color:var(--red);color:var(--red-ink);animation:cc-blink 1.2s steps(1) infinite}
#cellblock.cc .console-settings{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 20px;align-items:end;padding:14px;border-bottom:1px dashed var(--line-2)}
#cellblock.cc .console-settings label{display:grid;gap:6px;font-size:12px}
#cellblock.cc .console-settings fieldset{margin:0;padding:0;border:0;min-width:0}
#cellblock.cc .console-settings legend{padding:0;margin-bottom:6px;font-size:12px}
#cellblock.cc select{appearance:none;-webkit-appearance:none;width:100%;height:34px;padding:0 30px 0 10px;border:1px solid var(--line-2);background:#0a0909 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%238d8983'/%3E%3C/svg%3E") no-repeat right 11px center;color:var(--ink-hi);font-size:12.5px;border-radius:0}
#cellblock.cc select:hover:not(:disabled){border-color:var(--dim)}
#cellblock.cc select option{background:#0d0c0c;color:var(--ink)}
#cellblock.cc .intensity-options{display:flex;border:1px solid var(--line-2)}
#cellblock.cc .intensity-options button{height:32px;padding:0 14px;font-size:12px;color:var(--dim);border-right:1px solid var(--line-2)}
#cellblock.cc .intensity-options button:last-child{border-right:0}
#cellblock.cc .intensity-options button:hover:not(:disabled){color:var(--ink-hi)}
#cellblock.cc .intensity-options button.is-selected{background:var(--red);color:#120808;font-weight:700}
#cellblock.cc .console-terminal{flex:1;min-height:250px;padding:14px;font-size:12.5px;line-height:1.75}
#cellblock.cc .terminal-path{margin-bottom:6px;color:var(--ink-hi);word-break:break-all}
#cellblock.cc .terminal-path .ps1{color:var(--red)}
#cellblock.cc .terminal-cursor{display:inline-block;width:.6em;height:1.1em;margin-left:.5ch;vertical-align:-.2em;background:var(--ink-hi);animation:cc-blink 1.06s steps(1) infinite}
#cellblock.cc #trial-output{list-style:none}
#cellblock.cc #trial-output li{display:grid;grid-template-columns:auto 1fr;gap:1ch;color:var(--ink)}
#cellblock.cc #trial-output li::before{content:attr(data-ts);color:var(--faint)}
#cellblock.cc #trial-output li.terminal-muted{color:var(--dim)}
#cellblock.cc #trial-output li.terminal-success{color:var(--ok)}
#cellblock.cc #trial-output li.terminal-failure{color:var(--red-ink)}
#cellblock.cc #trial-output li.terminal-success::after,#cellblock.cc #trial-output li.terminal-failure::after{content:none}
#cellblock.cc .trial-progress{position:relative;padding:8px 14px;border-top:1px dashed var(--line-2);font-size:12.5px}
#cellblock.cc .trial-progress>span{display:none}
#cellblock.cc .ascii-progress{display:block;font:inherit;white-space:pre;overflow:hidden;color:var(--faint)}
#cellblock.cc .ascii-progress b{font-weight:400;color:var(--red)}
#cellblock.cc .console-bottom{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--line-2);background:var(--panel-2)}
#cellblock.cc #trial-summary{margin-right:auto;font-size:11px;color:var(--faint)}

/* ───────────────────────── 03 / records ───────────────────────── */
#cellblock.cc .records-layout{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:12px;align-items:stretch}
#cellblock.cc .reflection-entry{border-bottom:1px solid var(--line)}
#cellblock.cc .reflection-entry summary{display:grid;grid-template-columns:64px minmax(0,1fr) 40px;gap:12px;padding:14px;list-style:none;cursor:pointer}
#cellblock.cc .reflection-entry summary::-webkit-details-marker{display:none}
#cellblock.cc .reflection-entry summary:hover{background:var(--panel-2)}
#cellblock.cc .reflection-number{color:#c9a24d;font-size:12.5px}
#cellblock.cc .reflection-number::before{content:'#'}
#cellblock.cc .reflection-entry summary>span:nth-child(2){display:grid;gap:3px;min-width:0}
#cellblock.cc .reflection-heading{font-size:11px;color:var(--faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cellblock.cc .reflection-excerpt{font-size:13.5px;color:var(--ink)}
#cellblock.cc .reflection-entry summary>span:last-child{justify-self:end;font-size:0;color:var(--faint)}
#cellblock.cc .reflection-entry summary>span:last-child::before{content:'[+]';font-size:12px}
#cellblock.cc .reflection-entry[open] summary>span:last-child::before{content:'[-]';color:var(--red)}
#cellblock.cc .reflection-entry[open] summary{background:var(--panel-2)}
#cellblock.cc .reflection-entry[open] .reflection-excerpt{color:var(--ink-hi)}
#cellblock.cc .reflection-body{margin:0 14px 16px 90px;padding:2px 0 2px 14px;border-left:1px solid var(--line-2);font-size:12.5px;line-height:1.8;color:var(--dim);max-width:78ch}
#cellblock.cc .record-disclaimer{padding:8px 14px;background:var(--panel-2);color:var(--faint);font-size:11px}

#cellblock.cc .privilege-balance{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center;padding:14px;border-bottom:1px dashed var(--line-2)}
#cellblock.cc .privilege-balance>div{display:grid;gap:0}
#cellblock.cc .privilege-balance span{font-size:11px;color:var(--faint)}
#cellblock.cc .privilege-balance strong{font-size:44px;font-weight:700;line-height:1.05;color:var(--ink-hi)}
#cellblock.cc .privilege-balance p{font-size:12px;color:var(--dim);border-left:1px solid var(--line-2);padding-left:14px}
#cellblock.cc .reward-option,#cellblock.cc .delegation-heading{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:start;width:100%;padding:14px;text-align:left;border-bottom:1px solid var(--line)}
#cellblock.cc .reward-option:hover:not(:disabled){background:var(--panel-2)}
#cellblock.cc .reward-option:hover:not(:disabled) .reward-arrow{color:var(--red)}
#cellblock.cc .reward-cost{color:var(--red);font-size:12.5px}
#cellblock.cc .reward-cost::before{content:'-'}
#cellblock.cc .reward-option strong,#cellblock.cc .delegation-heading strong{display:block;font-size:13.5px;color:var(--ink-hi);font-weight:700}
#cellblock.cc .reward-option small,#cellblock.cc .delegation-heading small{display:block;font-size:12px;color:var(--dim)}
#cellblock.cc .reward-arrow{color:var(--faint)}
#cellblock.cc .delegation{padding-bottom:14px}
#cellblock.cc .delegation-heading{border-bottom:0}
#cellblock.cc .permission-label{font-size:11px;color:var(--faint);border:1px solid var(--line-2);padding:0 6px}
#cellblock.cc .permission-label.is-unlocked{color:var(--ok);border-color:#3c5a2e}
#cellblock.cc .delegation label{display:grid;gap:6px;margin:0 14px 10px;font-size:12px}
#cellblock.cc .delegation .facility-button{margin:0 14px;width:calc(100% - 28px)}

/* ───────────────────────── 04 / evidence ───────────────────────── */
#cellblock.cc .evidence-head,#cellblock.cc .evidence-list>a{display:grid;grid-template-columns:96px 48px minmax(0,1fr) 210px 24px;gap:16px;align-items:start;padding:14px}
#cellblock.cc .evidence-head{padding-block:7px;border-bottom:1px solid var(--line-2);background:var(--panel-2);color:var(--faint);font-size:11px}
#cellblock.cc .evidence-list>a{color:var(--dim);text-decoration:none;border-bottom:1px solid var(--line)}
#cellblock.cc .evidence-list>a:last-child{border-bottom:0}
#cellblock.cc .evidence-mode{color:var(--faint);font-size:12px}
#cellblock.cc .evidence-id{color:#c9a24d;font-size:12.5px}
#cellblock.cc .evidence-text{display:grid;gap:3px}
#cellblock.cc .evidence-text strong{font-size:14px;color:var(--ink);font-weight:700}
#cellblock.cc .evidence-text>span{font-size:12.5px}
#cellblock.cc .evidence-meta{font-size:11px;line-height:1.7;color:var(--faint)}
#cellblock.cc .evidence-arrow{justify-self:end;color:var(--faint)}
#cellblock.cc .evidence-list>a:hover{background:var(--panel-2)}
#cellblock.cc .evidence-list>a:hover strong{color:var(--ink-hi);text-decoration:underline;text-decoration-color:var(--red);text-underline-offset:4px}
#cellblock.cc .evidence-list>a:hover .evidence-arrow{color:var(--red)}
#cellblock.cc .source-note{margin-top:14px;max-width:110ch;font-size:12px;line-height:1.8;color:var(--dim)}

/* ───────────────────────── footer ───────────────────────── */
#cellblock.cc .facility-footer{margin-top:56px;padding-top:28px;border-top:1px solid var(--line)}
#cellblock.cc .footer-wordmark{color:#4a1b1e;font-size:clamp(6px,1.25vw,17px)}
#cellblock.cc .footer-bottom{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-top:24px}
#cellblock.cc .footer-bottom p{font-size:13px;line-height:1.8;color:var(--ink-hi)}
#cellblock.cc .footer-bottom p>span{font-size:12px;color:var(--faint)}
#cellblock.cc .footer-bottom>div{display:flex;gap:20px}
#cellblock.cc .footer-bottom button{font-size:12px;color:var(--dim)}
#cellblock.cc .footer-bottom button:hover{color:var(--ink-hi)}
#cellblock.cc .footer-exit{margin-top:28px;color:var(--faint);font-size:12px}
#cellblock.cc .footer-exit .q-cursor{background:var(--faint);width:.6em;height:1.1em}

/* toast: a single-line notice, bottom-right */
#cellblock.cc .facility-toast{position:fixed;z-index:40;right:20px;bottom:20px;max-width:min(440px,calc(100vw - 40px));padding:9px 14px;border:1px solid var(--line-2);border-left:2px solid var(--red);background:#0d0c0cf7;color:var(--ink);font-size:12.5px;opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .16s,transform .16s}
#cellblock.cc .facility-toast::before{content:'[!] ';color:var(--red)}
#cellblock.cc .facility-toast.is-visible{opacity:1;transform:none}

#cellblock.cc .reflection-ledger{display:flex;flex-direction:column}
#cellblock.cc .cc-hexwrap{position:relative;flex:1;min-height:120px;border-top:1px dashed var(--line-2);overflow:hidden}
#cellblock.cc .cc-hexhead{padding:8px 14px 0;color:var(--dim);font-size:12px}
#cellblock.cc .cc-hexdump{position:absolute;inset:30px 14px 0;margin:0;font:inherit;font-size:11.5px;line-height:1.55;color:var(--faint);white-space:pre;overflow:hidden;-webkit-mask-image:linear-gradient(#000 60%,transparent);mask-image:linear-gradient(#000 60%,transparent)}
#cellblock.cc .cc-hexdump b{font-weight:400;color:#c9a24d}
#cellblock.cc .cc-hexdump i{font-style:normal;color:var(--dim)}

/* ───────────────────────── sys.monitor ───────────────────────── */
#cellblock.cc .sys-panel{display:flex;flex-direction:column;height:0;min-height:100%;font-size:12px;overflow:hidden}
#cellblock.cc .sys-meters{display:grid;grid-template-columns:1fr 1fr;gap:1px 14px;padding:10px 12px 6px;line-height:1.5;white-space:pre}
#cellblock.cc .sys-meters span{overflow:hidden;color:var(--faint)}
#cellblock.cc .sys-meters em{font-style:normal;color:#5fa8b8;margin-right:.5ch}
#cellblock.cc .sys-meters b{font-weight:700;color:var(--ok)}
#cellblock.cc .sys-meters b.hot{color:var(--red)}
#cellblock.cc .sys-meters i{font-style:normal;color:var(--dim)}
#cellblock.cc .sys-summary{padding:4px 12px 10px;color:var(--dim);line-height:1.6;border-bottom:1px dashed var(--line-2)}
#cellblock.cc .sys-summary b{color:var(--ink-hi);font-weight:700}
#cellblock.cc .sys-summary b.hot{color:var(--red)}
#cellblock.cc .sys-procs{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
#cellblock.cc .sys-procs th{padding:4px 6px;background:#1d3a2a;color:#cfe8d6;font-weight:700;text-align:right;white-space:nowrap}
#cellblock.cc .sys-procs td{padding:2px 6px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
#cellblock.cc .sys-procs :is(th,td):nth-child(1){width:46px}
#cellblock.cc .sys-procs :is(th,td):nth-child(2){width:64px;text-align:left}
#cellblock.cc .sys-procs :is(th,td):nth-child(3){width:22px;text-align:center}
#cellblock.cc .sys-procs :is(th,td):nth-child(4){width:48px}
#cellblock.cc .sys-procs :is(th,td):nth-child(5),#cellblock.cc .sys-procs :is(th,td):nth-child(6){width:38px}
#cellblock.cc .sys-procs :is(th,td):nth-child(7){text-align:left;color:var(--dim)}
#cellblock.cc .sys-procs td.hot{color:var(--red)}
#cellblock.cc .sys-procs tr.is-run td:nth-child(3){color:var(--ok);font-weight:700}
#cellblock.cc .sys-procs tr.is-sel td{background:#2a2626}
#cellblock.cc .sys-procs tr.is-sel td:nth-child(2){color:var(--ink-hi);font-weight:700}
#cellblock.cc .sys-sub{border-top:1px solid var(--line-2);margin-top:8px}
#cellblock.cc .sys-journal{flex:1;min-height:0;overflow:hidden;list-style:none;padding:8px 12px;font-size:11.5px;line-height:1.6;display:flex;flex-direction:column;justify-content:flex-end}
#cellblock.cc .sys-journal li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink);flex:0 0 auto}
#cellblock.cc .sys-journal time{color:var(--faint)}
#cellblock.cc .sys-journal u{text-decoration:none;color:#5fa8b8}
#cellblock.cc .sys-journal li.warn{color:#d6a64b}
#cellblock.cc .sys-journal li.err{color:var(--red-ink)}
#cellblock.cc .sys-journal li.ok{color:var(--ok)}

/* ───────────────────────── responsive ───────────────────────── */
@media(max-width:1500px){
  #cellblock.cc .observation-layout{grid-template-columns:minmax(0,1fr) 340px}
  #cellblock.cc .sys-panel{grid-column:1/-1;height:auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto auto 1fr}
  #cellblock.cc .sys-panel>.instrument-bar:first-child{grid-column:1/-1}
  #cellblock.cc .sys-meters,#cellblock.cc .sys-summary,#cellblock.cc .sys-procs{grid-column:1}
  #cellblock.cc .sys-sub{grid-column:2;grid-row:2;border-left:1px solid var(--line-2)}
  #cellblock.cc .sys-journal{grid-column:2;grid-row:3/5;height:260px;border-left:1px solid var(--line-2)}
}
@media(max-width:1180px){
  #cellblock.cc .observation-layout{grid-template-columns:minmax(0,1fr) 320px}
  #cellblock.cc .records-layout{grid-template-columns:minmax(0,1fr) 330px}
  #cellblock.cc .evidence-head,#cellblock.cc .evidence-list>a{grid-template-columns:48px minmax(0,1fr) 180px 24px}
  #cellblock.cc .evidence-mode,#cellblock.cc .evidence-head>span:first-child{display:none}
}
@media(max-width:980px){
  #cellblock.cc .observation-layout,#cellblock.cc .trial-layout,#cellblock.cc .records-layout{grid-template-columns:minmax(0,1fr)}
  #cellblock.cc .cell-roster{grid-template-columns:repeat(3,minmax(0,1fr))}
  #cellblock.cc .sys-panel{display:flex}
  #cellblock.cc .sys-sub,#cellblock.cc .sys-journal{border-left:0}
  #cellblock.cc .sys-journal{height:220px}
  #cellblock.cc .cell-choice:nth-child(3n){border-right:0}
  #cellblock.cc .cell-choice:nth-child(n+4){border-top:1px solid var(--line)}
  #cellblock.cc .section-heading{grid-template-columns:1fr}
  #cellblock.cc .figlet{font-size:clamp(5px,1vw,10px)}
  #cellblock.cc .host-hide,#cellblock.cc .tmux-host,#cellblock.cc .tmux-right .tmux-sep:first-of-type{display:none}
}
@media(max-width:700px){
  #cellblock.cc .sys-procs td:nth-child(7),#cellblock.cc .sys-procs th:nth-child(7){display:none}
  #cellblock.cc{--fs:12.5px}
  #cellblock.cc .tmux-buy{padding:0 9px}
  #cellblock.cc .tmux-x{width:34px}
  #cellblock.cc .facility-links{padding-left:0;overflow-x:auto;scrollbar-width:none;min-width:0}
  #cellblock.cc .facility-links::-webkit-scrollbar{display:none}
  #cellblock.cc .facility-links button{flex:0 0 auto}
  #cellblock.cc .facility-links button{padding:0 7px;gap:0}
  #cellblock.cc .facility-links button kbd{display:none}
  #cellblock.cc .observation-toolbar .room-nav button{padding:4px 8px}
  #cellblock.cc #feed-toggle{font-size:11px}
  #cellblock.cc .tmux-right{display:none}
  #cellblock.cc .observation-toolbar{grid-template-columns:1fr auto}
  #cellblock.cc .observation-toolbar .room-nav{grid-column:1/-1;grid-row:2;border-top:1px solid var(--line)}
  #cellblock.cc .observation-toolbar h3{grid-row:1}
  #cellblock.cc .cell-roster{grid-template-columns:repeat(2,minmax(0,1fr))}
  #cellblock.cc .cell-choice{border-right:1px solid var(--line)!important;border-top:1px solid var(--line)}
  #cellblock.cc .cell-choice:nth-child(2n){border-right:0!important}
  #cellblock.cc .cell-choice:nth-child(-n+2){border-top:0}
  #cellblock.cc .feed-footnote{flex-direction:column;gap:0}
  #cellblock.cc .figlet{font-size:clamp(3.4px,1.42vw,9px)}
  #cellblock.cc .section-aside{white-space:normal}
  #cellblock.cc .cc-cmd{font-size:12px}
  #cellblock.cc .file-actions{grid-template-columns:1fr}
  #cellblock.cc .console-settings{grid-template-columns:1fr}
  #cellblock.cc .intensity-options button{flex:1}
  #cellblock.cc .trial-option,#cellblock.cc .catalog-head{grid-template-columns:40px 1fr 24px;gap:10px}
  #cellblock.cc .trial-note{grid-template-columns:40px 1fr}
  #cellblock.cc .trial-note>span:last-child{grid-column:2}
  #cellblock.cc .console-bottom{flex-wrap:wrap}
  #cellblock.cc #trial-summary{flex-basis:100%}
  #cellblock.cc #trial-output li{grid-template-columns:1fr}
  #cellblock.cc #trial-output li::before{font-size:10.5px;line-height:1.3}
  #cellblock.cc .reflection-entry summary{grid-template-columns:44px minmax(0,1fr) 30px;gap:8px}
  #cellblock.cc .reflection-body{margin-left:14px}
  #cellblock.cc .evidence-head{display:none}
  #cellblock.cc .evidence-list>a{grid-template-columns:40px minmax(0,1fr) 18px;gap:10px}
  #cellblock.cc .evidence-meta{grid-column:2;grid-row:2}
  #cellblock.cc .evidence-arrow{grid-column:3;grid-row:1}
  #cellblock.cc .footer-bottom{flex-direction:column;align-items:start}
  #cellblock.cc .footer-bottom>div{flex-wrap:wrap;gap:12px 20px}
  #cellblock.cc .footer-wordmark{font-size:clamp(3.6px,1.48vw,9px)}
}
@media(prefers-reduced-motion:reduce){
  #cellblock.cc *,.cc-question *{animation:none!important;transition:none!important}
}

/* ───────────────────────── gate actions (X / descend / $LOCKED) ─────────────────────────
   Gate controls share the terminal type scale.
   body[data-gate] selects the gate-control treatment. */
body[data-view="prison"] .gate-actions{width:min(480px,calc(100% - 32px));grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr);gap:clamp(14px,2vw,28px)}
.gate-actions .gate-action{position:relative;overflow:hidden;isolation:isolate;height:50px;padding:0 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:0;box-shadow:none;background:none;font:700 15px/1 'CC Mono','Cascadia Mono',Consolas,monospace;letter-spacing:.1em;transition:color .12s,background .12s,box-shadow .12s,transform .12s}
.gate-actions .gate-action::before{content:none}
.gate-actions .gate-action span{mask-image:none;-webkit-mask-image:none;text-shadow:none;white-space:nowrap}
.gate-actions .cc-xlogo{width:20px;height:20px;display:block}
.gate-actions .cc-tag{display:none;max-width:100%;overflow:hidden;text-overflow:clip;white-space:nowrap;font-size:9px;font-weight:400;letter-spacing:.14em}
.gate-actions .cc-fill{display:none}
.gate-actions .gate-action:focus-visible,.gate-actions .descent-cue:focus-visible{outline:2px solid #f3ebe4;outline-offset:3px}
body[data-view="prison"] .gate-actions .descent-cue{position:relative;overflow:hidden;isolation:isolate;width:56px;height:56px;margin:0 auto;border:0;transition:color .12s,background .12s}
.gate-actions .descent-cue::before{content:none}
.cc-descend{position:relative;z-index:2;width:24px;height:24px;display:block;animation:cc-bob 2.2s ease-in-out infinite}
@keyframes cc-bob{0%,100%{transform:translateY(-2px)}50%{transform:translateY(3px)}}

/* A — riveted steel plate, red stencil */
body[data-gate="a"] .gate-actions .gate-action,body[data-gate="a"] .gate-actions .descent-cue{
  color:#e0473f;
  background:
    radial-gradient(circle at 8px 8px,#6d6360 0 1.6px,#1a1515 2.2px,transparent 2.8px),
    radial-gradient(circle at calc(100% - 8px) 8px,#6d6360 0 1.6px,#1a1515 2.2px,transparent 2.8px),
    radial-gradient(circle at 8px calc(100% - 8px),#6d6360 0 1.6px,#1a1515 2.2px,transparent 2.8px),
    radial-gradient(circle at calc(100% - 8px) calc(100% - 8px),#6d6360 0 1.6px,#1a1515 2.2px,transparent 2.8px),
    repeating-linear-gradient(112deg,transparent 0 9px,#ffffff06 9px 10px,transparent 10px 23px),
    linear-gradient(180deg,#342d2b,#1b1716 70%,#141110);
  box-shadow:inset 0 1px 0 #ffffff1c,inset 0 -2px 0 #0009,inset 0 0 0 1px #4a403d,0 3px 0 #050404,0 6px 14px #000a;
}
body[data-gate="a"] .gate-actions .gate-action span{text-shadow:0 1px 0 #000,0 -1px 0 #ffffff12}
body[data-gate="a"] .gate-actions .cc-xlogo{filter:drop-shadow(0 1px 0 #000)}
body[data-gate="a"] .gate-actions .descent-cue{border-radius:50%;background:radial-gradient(circle,#2e2826,#171312 70%);box-shadow:inset 0 1px 0 #ffffff1c,inset 0 0 0 1px #4a403d,inset 0 0 0 5px #1a1515,inset 0 0 0 6px #3a312f,0 3px 0 #050404,0 6px 14px #000a}
body[data-gate="a"] .gate-actions .gate-action:hover,body[data-gate="a"] .gate-actions .descent-cue:hover{color:#ff5a50;transform:translateY(-1px)}
body[data-gate="a"] .gate-actions .gate-action:hover{box-shadow:inset 0 1px 0 #ffffff24,inset 0 -2px 0 #0009,inset 0 0 0 1px #8a3a34,0 3px 0 #050404,0 8px 18px #000c}
body[data-gate="a"] .gate-actions .gate-action:active{transform:translateY(2px);box-shadow:inset 0 1px 0 #ffffff10,inset 0 0 0 1px #4a403d,0 1px 0 #050404}

/* B — red ASCII field like the eye, label punched through */
body[data-gate="b"] .gate-actions .gate-action,body[data-gate="b"] .gate-actions .descent-cue{color:#fff1ec;background:#140909;box-shadow:inset 0 0 0 1px #7a2326}
body[data-gate="b"] .gate-actions .descent-cue{border-radius:50%}
body[data-gate="b"] .gate-actions .cc-fill{display:block;position:absolute;inset:-2px;z-index:-1;margin:0;font:400 9px/9px 'CC Mono',Consolas,monospace;letter-spacing:0;color:#d4383e;white-space:pre;overflow:hidden;opacity:.62;pointer-events:none}
body[data-gate="b"] .gate-actions .gate-action>span,body[data-gate="b"] .gate-actions .cc-xlogo{position:relative;z-index:1;padding:5px 10px;background:#140909;box-shadow:0 0 0 1px #140909}
body[data-gate="b"] .gate-actions .cc-xlogo{box-sizing:content-box;padding:5px 9px}
body[data-gate="b"] .gate-actions .descent-cue .cc-descend{background:#140909;border-radius:50%;padding:4px;box-sizing:content-box}
body[data-gate="b"] .gate-actions :is(.gate-action,.descent-cue):hover{box-shadow:inset 0 0 0 1px #e5484d}
body[data-gate="b"] .gate-actions :is(.gate-action,.descent-cue):hover .cc-fill{opacity:1;color:#ff5a5f}

/* C — inmate tag, refined: thin hazard edge, two-line label, status cell */
.gate-actions .cc-main{display:flex;align-items:center;gap:9px}
.gate-actions .cc-xtext,.gate-actions .cc-state{display:none}
body[data-gate="c"] .gate-actions{width:min(620px,calc(100% - 32px));grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr);gap:clamp(12px,1.6vw,22px)}
body[data-gate="c"] .gate-actions .gate-action{
  height:54px;padding:0 0 0 22px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;justify-items:start;gap:0;
  color:#f1e9e2;background:linear-gradient(180deg,#1d1818,#131010);box-shadow:inset 0 0 0 1px #3a3130,0 6px 16px #000b;
}
body[data-gate="c"] .gate-actions .gate-action::after{content:'';position:absolute;inset:0 auto 0 0;width:6px;background:repeating-linear-gradient(135deg,#a8282b 0 5px,#161111 5px 10px)}
body[data-gate="c"] .gate-actions .cc-label{display:grid;gap:5px;min-width:0}
body[data-gate="c"] .gate-actions .cc-tag{display:block;font-size:10px;letter-spacing:.16em;color:#857d78}
.gate-actions .cc-tag-rest{font-style:normal}
body[data-gate="c"] .gate-actions .cc-main span,body[data-gate="c"] .gate-actions .cc-xtext{font-size:16px;letter-spacing:.08em;line-height:1}
body[data-gate="c"] .gate-actions .cc-xtext{display:inline}
body[data-gate="c"] .gate-actions .cc-xlogo{width:17px;height:17px}
body[data-gate="c"] .gate-actions .cc-state{display:flex;align-items:center;gap:6px;align-self:stretch;padding:0 14px;border-left:1px solid #3a3130;font-size:10px;font-weight:700;letter-spacing:.14em;color:#c2393a}
body[data-gate="c"] .gate-actions .cc-state::before{content:'';width:5px;height:5px;background:currentColor;animation:cc-blink 1.6s steps(1) infinite}
body[data-gate="c"] .gate-actions .descent-cue{width:54px;height:54px;color:#f1e9e2;background:linear-gradient(180deg,#1d1818,#131010);box-shadow:inset 0 0 0 1px #3a3130,0 6px 16px #000b}
body[data-gate="c"] .gate-actions .descent-cue::after{content:'';position:absolute;inset:auto 0 0 0;height:6px;z-index:1;background:repeating-linear-gradient(135deg,#a8282b 0 5px,#161111 5px 10px)}
body[data-gate="c"] .gate-actions .descent-cue .cc-descend{margin-top:-4px}
body[data-gate="c"] .gate-actions .gate-action:hover,body[data-gate="c"] .gate-actions .descent-cue:hover{box-shadow:inset 0 0 0 1px #a8282b,0 6px 16px #000b;background:linear-gradient(180deg,#241c1c,#171212)}
body[data-gate="c"] .gate-actions .gate-action:hover .cc-tag{color:#d4504c}
body[data-gate="c"] .gate-actions .descent-cue:hover{color:#ff6a60}

@media(max-width:700px){
  .gate-actions .gate-action{padding:0 10px;font-size:13px;letter-spacing:.05em}
  body[data-gate="c"] .gate-actions .gate-action{padding-left:16px}
  body[data-gate="c"] .gate-actions .cc-main span,body[data-gate="c"] .gate-actions .cc-xtext{font-size:13px;letter-spacing:.04em}
  body[data-gate="c"] .gate-actions .cc-tag{font-size:9px;letter-spacing:.1em}
  .gate-actions .cc-tag-rest{display:none}
  body[data-gate="c"] .gate-actions .cc-state{padding:0 8px;font-size:0;gap:0}
}
@media(prefers-reduced-motion:reduce){.cc-descend{animation:none}.gate-actions .gate-action{transition:none}}

/* ───── descend arrow candidates (?arrow=1|2|3; cc.js sets body[data-arrow]) ───── */
body[data-view="prison"] .gate-actions .descent-cue{width:56px!important;height:104px!important;margin:0 auto;background:none!important;box-shadow:none!important;border:0!important;border-radius:0!important;color:#e0453f}
body[data-view="prison"] .gate-actions .descent-cue::after{content:none!important}
.descent-cue .cc-fill{display:none!important}
.cc-arrow{display:none}
body[data-arrow="1"] .cc-arrow--1,body[data-arrow="3"] .cc-arrow--3{display:block}
body[data-arrow="2"] .cc-arrow--2{display:grid}

/* 1 — thin drop line with a pulse travelling down */
.cc-arrow--1{width:24px;height:100px;overflow:visible}
.cc-arrow--1 path{fill:none;stroke-linecap:square;stroke-linejoin:miter}
.a1-line{stroke:#6e2a2b;stroke-width:1.5;stroke-dasharray:2 4}
.a1-pulse{stroke:#ff5a52;stroke-width:2;stroke-dasharray:18 120;animation:a1-run 1.9s cubic-bezier(.55,0,.45,1) infinite}
.a1-head{stroke:#e0453f;stroke-width:2.2}
@keyframes a1-run{0%{stroke-dashoffset:20}100%{stroke-dashoffset:-96}}
.descent-cue:hover .a1-line{stroke:#a8383a}
.descent-cue:hover .a1-head{stroke:#ff6a60}

/* 2 — ASCII column, characters light up top to bottom */
.cc-arrow--2{justify-items:center;font:700 15px/11.5px 'CC Mono','Cascadia Mono',Consolas,monospace;color:#e0453f}
.cc-arrow--2 i{font-style:normal;opacity:.2;animation:a2-flow 1.6s steps(1) infinite}
.cc-arrow--2 i:last-child{font-size:17px;line-height:16px;margin-top:2px}
.cc-arrow--2 i:nth-child(1){animation-delay:0s}.cc-arrow--2 i:nth-child(2){animation-delay:.08s}.cc-arrow--2 i:nth-child(3){animation-delay:.16s}.cc-arrow--2 i:nth-child(4){animation-delay:.24s}
.cc-arrow--2 i:nth-child(5){animation-delay:.32s}.cc-arrow--2 i:nth-child(6){animation-delay:.4s}.cc-arrow--2 i:nth-child(7){animation-delay:.48s}.cc-arrow--2 i:nth-child(8){animation-delay:.56s}
@keyframes a2-flow{0%{opacity:1;color:#ff8a84}18%{opacity:.75;color:#e0453f}40%,100%{opacity:.2}}
.cc-arrow--2 i:last-child{opacity:.85}
.descent-cue:hover .cc-arrow--2 i{animation:none;opacity:1;color:#ff6a60}

/* 3 — scratched into the wall */
.cc-arrow--3{width:28px;height:104px;overflow:visible;animation:a3-bob 2.6s ease-in-out infinite}
.cc-arrow--3 path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.a3-main{stroke:#c9332f;stroke-width:2.6}
.a3-scratch{stroke:#e8746a;stroke-width:.9;opacity:.55}
@keyframes a3-bob{0%,100%{transform:translateY(-3px)}50%{transform:translateY(3px)}}
.descent-cue:hover .a3-main{stroke:#ff5a52}
.descent-cue:hover .a3-scratch{opacity:.85}

@media(prefers-reduced-motion:reduce){.a1-pulse,.cc-arrow--2 i,.cc-arrow--3{animation:none}.cc-arrow--2 i{opacity:1}}

/* ───── ENTER transition: welcome copy leaves, then the gate lights up in order ───── */
body.cc-leaving .welcome-copy{opacity:0;transform:translateY(14px);transition:opacity .3s ease,transform .3s ease}
body.cc-leaving #eye-canvas{transition:filter .3s ease;filter:brightness(1.25)}
@keyframes cc-in{from{opacity:0}to{opacity:1}}
@keyframes cc-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes cc-drop{from{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:none}}
body.cc-entering :is(.gate-atmosphere,.prison-columns){animation:cc-in 1.1s ease-out both}
body.cc-entering .distress-echoes{animation:cc-in .9s ease-out .35s both}
body.cc-entering .prison-title{animation:cc-rise .8s cubic-bezier(.22,1,.36,1) .25s both}
body.cc-entering .archive-video{animation:cc-rise .9s cubic-bezier(.22,1,.36,1) .45s both}
body.cc-entering .press-wall{animation:cc-in .9s ease-out .7s both}
body.cc-entering .cc-question{animation:cc-rise .7s cubic-bezier(.22,1,.36,1) .85s both}
body.cc-entering .gate-actions{animation:cc-rise .7s cubic-bezier(.22,1,.36,1) 1s both}
body.cc-entering #cellblock.cc .facility-nav{animation:cc-drop .55s cubic-bezier(.22,1,.36,1) .6s both}
@media(prefers-reduced-motion:reduce){
  body.cc-leaving .welcome-copy{transition:none}
  body.cc-entering *{animation:none!important}
}

/* ───── ENTER button candidates (1 scratched · 2 solid block · 3 stamp) ───── */
.cc-enter-picks{display:flex;justify-content:center;margin:30px 0 0}
.cc-pick{display:grid;justify-items:center;gap:12px}
.cc-pick>small{font:400 11px/1 'CC Mono',Consolas,monospace;color:#6f6964;letter-spacing:.2em}
.welcome-copy .cc-enter{all:unset;box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-family:'CC Mono','Cascadia Mono',Consolas,monospace;-webkit-tap-highlight-color:transparent}
.welcome-copy .cc-enter:focus-visible{outline:2px solid #f3ebe4;outline-offset:6px}

/* 1 — scratched underline with arrow */
.welcome-copy .cc-enter--1{flex-direction:column;gap:4px;width:auto;min-height:0;margin:0;padding:6px 6px 0;border:0;background:none}
.cc-enter--1 span{font-size:19px;font-weight:700;letter-spacing:.42em;padding-left:.42em;color:#e0453f;text-shadow:0 1px 0 #000}
.e1-scratch{width:150px;height:18px;overflow:visible;transform-origin:left center;transition:transform .25s cubic-bezier(.22,1,.36,1)}
.e1-scratch path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.e1-main{stroke:#c9332f;stroke-width:2.4}
.e1-thin{stroke:#e8746a;stroke-width:.9;opacity:.55}
.cc-enter--1:hover span{color:#ff5a52}
.cc-enter--1:hover .e1-scratch{transform:scaleX(1.12)}
.cc-enter--1:hover .e1-main{stroke:#ff5a52}

/* 2 — solid block, same family as BUY $LOCKED */
.welcome-copy .cc-enter--2{height:48px;background:#e5484d;color:#120808;font-weight:700;font-size:15px;letter-spacing:.3em;transition:background .12s}
.cc-enter--2 span{padding:0 22px 0 calc(22px + .3em)}
.cc-enter--2 kbd{align-self:stretch;display:flex;align-items:center;padding:0 14px;background:#9c2a2e;color:#f6e2df;font:inherit;font-size:16px;letter-spacing:0}
.cc-enter--2:hover{background:#ff5f63}
.cc-enter--2:hover kbd{background:#b5302f}
.cc-enter--2:active{transform:translateY(1px)}

/* 3 — rubber stamp */
.welcome-copy .cc-enter--3{flex-direction:column;gap:3px;padding:9px 22px 10px;color:#d8423c;border:2px solid currentColor;outline:1px solid currentColor;outline-offset:3px;transform:rotate(-3deg);transition:transform .2s,color .2s;
  -webkit-mask-image:radial-gradient(circle at 18% 30%,#0000 0 1.2px,#000 1.6px),radial-gradient(circle at 72% 64%,#0000 0 1px,#000 1.5px),repeating-linear-gradient(172deg,#000 0 5px,#000a 5.4px,#000 6px 11px);
  -webkit-mask-size:23px 19px,29px 23px,100% 100%;-webkit-mask-composite:source-in;mask-composite:intersect}
.cc-enter--3 small{font-size:9px;letter-spacing:.3em;padding-left:.3em;font-weight:700}
.cc-enter--3 span{font-size:22px;font-weight:700;letter-spacing:.32em;padding-left:.32em;line-height:1}
.welcome-copy .cc-enter--3:focus-visible{outline:1px solid currentColor;outline-offset:3px;box-shadow:0 0 0 6px #f3ebe455}
.cc-enter--3:hover{transform:rotate(0);color:#ff4f48;-webkit-mask-image:none;mask-image:none}

@media(max-width:700px){.cc-enter-picks{flex-direction:column;align-items:center;gap:26px}}
/* Section addresses land below the fixed top bar. */
#cellblock.cc #surveillance,#cellblock.cc .facility-section{scroll-margin-top:34px}
