/* ==========================================================================
   ICT and computing: debug the code, password checker, keyboard shortcuts,
   flowchart builder, secret code machine. Loaded only on those pages.
   ========================================================================== */
.mono, .mono input, textarea.mono, input.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; }
.g-msg { font-size: clamp(1.05rem, 2.2vw, 1.4rem); font-weight: 650; color: var(--text-2); min-height: 1.4em; margin: 0; }
.g-msg.win { color: var(--green); }
.g-msg.lose { color: var(--red); }
body.presenting .g-msg { font-size: clamp(1.3rem, 3.4vh, 2.6rem); }
.g-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@keyframes ict-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes ict-pop { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- Debug the code ---------- */
.dbg-body { align-items: stretch; text-align: left; justify-content: flex-start; gap: 16px; max-width: 900px; width: 100%; margin: 0 auto; }
.dbg-head { display: grid; gap: 4px; }
.dbg-set { justify-self: start; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.dbg-set[data-kind='blocks'] { background: color-mix(in srgb, #f2a516 18%, var(--surface)); }
.dbg-set[data-kind='python'] { background: color-mix(in srgb, #3e7bfa 16%, var(--surface)); }
.dbg-set[data-kind='steps'] { background: color-mix(in srgb, #2fa66a 16%, var(--surface)); }
.dbg-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 4px 0 0; letter-spacing: -0.03em; }
.dbg-goal { margin: 0; color: var(--text-2); font-size: clamp(1rem, 1.8vw, 1.25rem); }
.dbg-code { list-style: none; margin: 0; padding: 14px 14px 14px 0; counter-reset: ln; display: grid; gap: 6px; border-radius: 16px; background: var(--surface-2); }
.dbg-code li { counter-increment: ln; display: flex; align-items: center; gap: 10px; padding-left: calc(var(--in, 0) * 1.6em); position: relative; }
.dbg-code li::before { content: counter(ln); width: 2.4em; flex: none; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85em; font-weight: 650; margin-left: calc(var(--in, 0) * -1.6em); margin-right: calc(var(--in, 0) * 1.6em); }
.dbg-code.no-nums li::before { visibility: hidden; width: 0.6em; }
.dbg-code button { font: inherit; color: inherit; text-align: left; background: transparent; border: 2px solid transparent; border-radius: 10px; padding: 0; cursor: pointer; max-width: 100%; transition: transform 0.12s; }
.dbg-code button:hover { transform: translateX(3px); }
.dbg-code button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dbg-blank { display: block; height: 0.9em; }
.dbg-code li.wrong button { animation: ict-shake 0.45s; }
.dbg-code li.wrong button > * { box-shadow: 0 0 0 3px var(--red); }
.dbg-code li.right button > * { box-shadow: 0 0 0 3px var(--green); }
.dbg-code li.dim { opacity: 0.35; }
.dbg-tag { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: var(--green); padding: 2px 8px; border-radius: 99px; animation: ict-pop 0.3s var(--ease); }
/* Steps */
.stp { display: inline-block; padding: 9px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: clamp(1rem, 1.9vw, 1.3rem); }
/* Python */
.dbg-python { background: #131a29; color: #e8ecf4; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; }
.dbg-python li::before { color: #6b7894; }
.dbg-python code { display: inline-block; white-space: pre; padding: 4px 10px; border-radius: 8px; font-size: clamp(0.95rem, 1.9vw, 1.35rem); }
.dbg-python button:hover code { background: rgba(255, 255, 255, 0.07); }
.dbg-python li { padding-left: 0; }
.dbg-python li::before { margin: 0; }
.py-k { color: #ff9e64; font-weight: 700; } .py-f { color: #7dcfff; } .py-s { color: #9ece6a; } .py-n { color: #e0af68; } .py-c { color: #6b7894; font-style: italic; }
/* Blocks */
.dbg-blocks li { gap: 10px; }
.blk { display: inline-block; padding: 9px 16px; border-radius: 10px 10px 10px 10px; color: #fff; font-weight: 700; font-size: clamp(0.95rem, 1.8vw, 1.25rem); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.blk-ev { background: #d49a06; border-radius: 22px 22px 10px 10px; }
.blk-ctl { background: #e08a00; }
.blk-mot { background: #3e7bfa; }
.blk-look { background: #8e4ec6; }
.blk-sense { background: #0891b2; }
.blk-pen { background: #12a594; }
.blk-snd { background: #c026d3; }
.blk-var { background: #ea6a1f; }
.dbg-fix { padding: 14px 18px; border-radius: 16px; background: color-mix(in srgb, var(--green) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 40%, var(--border)); animation: ict-pop 0.3s var(--ease); }
.dbg-fix-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dbg-fix-tag { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: var(--green); padding: 2px 8px; border-radius: 99px; }
.dbg-fix code { font-weight: 700; font-size: clamp(1rem, 1.9vw, 1.3rem); white-space: pre-wrap; }
.dbg-fix code.mono { background: #131a29; color: #e8ecf4; padding: 4px 10px; border-radius: 8px; white-space: pre; }
.dbg-fix p { margin: 8px 0 0; color: var(--text-2); font-size: clamp(0.95rem, 1.7vw, 1.15rem); }
.dbg-sets button { padding: 7px 4px; }
.dbg-maker summary { cursor: pointer; margin-bottom: 12px; }
.dbg-maker textarea { min-height: 120px; font-size: 0.9rem; }
.dbg-mine { list-style: none; padding: 0; margin: 12px 0 6px; display: grid; gap: 2px; }
.dbg-mine li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
body.presenting .dbg-body { max-width: 1400px; padding-top: 64px; gap: 2.2vh; }
body.presenting .dbg-title { font-size: clamp(2rem, 5vh, 3.6rem); }
body.presenting .dbg-goal { font-size: clamp(1.2rem, 2.8vh, 2rem); }
body.presenting .dbg-code { font-size: clamp(1rem, 3vh, 2.2rem); gap: 1vh; }
body.presenting .stp, body.presenting .blk, body.presenting .dbg-python code { font-size: clamp(1.1rem, 3.2vh, 2.4rem); }
body.presenting .dbg-fix code { font-size: clamp(1.1rem, 3vh, 2.2rem); }
body.presenting .dbg-fix p { font-size: clamp(1rem, 2.4vh, 1.8rem); }
.dbg-fix code:not(.mono) { font-family: inherit; }
:root[data-theme='dark'] .dbg-python, :root[data-theme='dark'] .dbg-fix code.mono { background: #070a12; box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- Password strength checker ---------- */
.pw-safe { display: inline-flex; align-items: center; gap: 6px; color: var(--green) !important; font-weight: 650; }
.pw-safe svg { width: 16px; height: 16px; }
.pw-body { gap: 18px; width: 100%; max-width: 860px; margin: 0 auto; justify-content: flex-start; padding-top: 28px; }
.pw-field { position: relative; width: 100%; }
.pw-input { width: 100%; font-size: clamp(1.4rem, 3.6vw, 2.4rem) !important; font-weight: 700; text-align: center; padding: 16px 78px !important; border-radius: 16px !important; border-width: 2px !important; letter-spacing: 0.02em; }
.pw-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: inherit; font-size: 0.85rem; font-weight: 650; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.pw-parts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 0; }
.pw-part { display: grid; justify-items: center; gap: 2px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border-bottom: 4px solid var(--k, var(--border-strong)); animation: ict-pop 0.2s var(--ease); }
.pw-part b { font-size: 1.05rem; }
.pw-part small { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.k-common { --k: #e5484d; } .k-word { --k: #f76b15; } .k-year { --k: #d97706; } .k-repeat, .k-sequence, .k-keyboard { --k: #8e4ec6; } .k-random { --k: #1f9d72; }
.pw-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; }
.pw-meter i { height: 14px; border-radius: 99px; background: var(--surface-3); transition: background 0.25s; }
.pw-verdict { display: grid; gap: 2px; }
.pw-verdict b { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.05; }
.pw-verdict span { color: var(--text-2); font-size: clamp(1rem, 1.9vw, 1.3rem); font-weight: 550; }
.pw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; width: 100%; text-align: left; }
@media (max-width: 700px) { .pw-grid { grid-template-columns: 1fr; } }
.pw-checks, .pw-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; }
.pw-checks li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-2); }
.pw-checks i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 0.8rem; font-weight: 800; color: #fff; flex: none; }
.pw-checks .ok i { background: var(--green); }
.pw-checks .no i { background: var(--surface-3); color: var(--muted); }
.pw-tips li { padding: 9px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 0.95rem; line-height: 1.4; border-left: 4px solid var(--amber); }
.pw-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pw-examples .btn { font-weight: 600; }
.pw-note { display: flex; gap: 6px; align-items: flex-start; }
.pw-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--green); }
body.presenting .pw-body { max-width: 1300px; padding-top: 70px; gap: 2.4vh; }
body.presenting .pw-input { font-size: clamp(2rem, 6vh, 4.4rem) !important; }
body.presenting .pw-meter i { height: 2vh; }
body.presenting .pw-verdict b { font-size: clamp(2.6rem, 8vh, 6rem); }
body.presenting .pw-verdict span, body.presenting .pw-checks li { font-size: clamp(1.1rem, 2.6vh, 2rem); }
body.presenting .pw-tips li { font-size: clamp(1rem, 2.3vh, 1.7rem); }
body.presenting .pw-part b { font-size: clamp(1.1rem, 2.8vh, 2rem); }
body.presenting .pw-checks i { width: 3vh; height: 3vh; }
body.presenting .stage-bar .pw-safe { display: inline-flex; }

/* ---------- Keyboard shortcuts quiz ---------- */
.ks-body { gap: 20px; width: 100%; max-width: 920px; margin: 0 auto; }
.ks-top { display: flex; gap: 22px; align-items: center; justify-content: center; }
.ks-score { display: grid; justify-items: center; line-height: 1.1; }
.ks-score span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ks-score b { font-size: 1.6rem; letter-spacing: -0.03em; }
.ks-clock { position: relative; width: 56px; height: 56px; display: grid; place-items: center; font-weight: 750; }
.ks-clock svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ks-clock circle { fill: none; stroke-width: 4; }
.ks-clock .trk { stroke: var(--surface-3); }
.ks-clock .arc { stroke: var(--accent); stroke-linecap: round; }
.ks-clock.warn .arc { stroke: var(--red); }
.ks-clock.warn { color: var(--red); }
.ks-q { display: grid; justify-items: center; gap: 14px; }
.ks-main { display: grid; justify-items: center; gap: 16px; min-height: 90px; align-content: center; }
.ks-keys { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ks-keys i { font-style: normal; font-weight: 700; color: var(--muted); }
.ks-key {
  display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; padding: 0 0.45em; border-radius: 0.28em; font: inherit; font-weight: 750; line-height: 1;
  background: var(--surface); color: var(--text); border: 2px solid var(--border-strong); box-shadow: 0 0.12em 0 var(--border-strong); font-size: 1em;
}
.ks-key.wide { padding: 0 0.6em; }
.ks-main .ks-keys { font-size: clamp(1.8rem, 5vw, 3.4rem); }
.ks-action { font-size: clamp(1.9rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; text-wrap: balance; }
.ks-press { margin: 0; color: var(--muted); font-weight: 600; }
.ks-back { min-height: 0; }
.ks-back.show { padding: 14px 26px; border-radius: 18px; background: var(--accent-soft); animation: ict-pop 0.3s var(--ease); }
.ks-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.ks-opt {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; font: inherit; font-weight: 700; font-size: clamp(1.05rem, 2.2vw, 1.4rem); text-align: left;
  background: var(--surface); color: var(--text); border: 2px solid var(--border-strong); box-shadow: 0 4px 0 var(--border-strong); cursor: pointer; transition: transform 0.12s, border-color 0.15s;
}
.ks-opt:hover:not([disabled]) { border-color: var(--accent); transform: translateY(-2px); }
.ks-opt[disabled] { cursor: default; opacity: 0.55; }
.ks-opt.right { opacity: 1; background: color-mix(in srgb, var(--green) 14%, var(--surface)); border-color: var(--green); box-shadow: 0 4px 0 var(--green); }
.ks-opt.wrong { opacity: 1; background: color-mix(in srgb, var(--red) 12%, var(--surface)); border-color: var(--red); box-shadow: 0 4px 0 var(--red); animation: ict-shake 0.4s; }
.ks-letter { flex: none; width: 1.8em; height: 1.8em; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 0.8em; }
.ks-opts.is-keys .ks-keys { font-size: 0.95em; gap: 6px; justify-content: flex-start; }
.ks-end { display: grid; gap: 6px; animation: ict-pop 0.3s var(--ease); }
.ks-end b { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -0.04em; color: var(--accent); }
.ks-end span { font-size: 1.2rem; color: var(--text-2); font-weight: 600; }
@media (max-width: 560px) { .ks-opts { grid-template-columns: 1fr; } }
body.presenting .ks-body { max-width: 1400px; gap: 3vh; }
body.presenting .ks-main .ks-keys, body.presenting .ks-action { font-size: clamp(2.4rem, 9vh, 6.5rem); }
body.presenting .ks-opt { font-size: clamp(1.2rem, 3.4vh, 2.6rem); padding: 2vh 2vw; }
body.presenting .ks-score b { font-size: clamp(1.6rem, 4vh, 3rem); }
body.presenting .ks-clock { width: clamp(56px, 9vh, 110px); height: clamp(56px, 9vh, 110px); font-size: clamp(1rem, 3vh, 2rem); }
body.presenting .ks-end b { font-size: clamp(3rem, 12vh, 9rem); }

/* ---------- Flowchart builder ---------- */
.fl-stage { min-height: min(78vh, 760px); }
.fl-canvas {
  position: relative; flex: 1; min-height: 420px; margin: 0;
  background-color: var(--surface);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--text) 13%, transparent) 1.1px, transparent 1.3px);
  background-size: 22px 22px;
}
.fl-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; display: block; }
.fl-node { cursor: grab; }
.fl-node:active { cursor: grabbing; }
.fl-node.sel { filter: drop-shadow(0 0 0.5px #3e7bfa) drop-shadow(0 4px 10px rgba(62, 123, 250, 0.35)); }
.fl-node.target > :first-child { stroke-dasharray: 6 4; stroke-width: 5; }
.fl-edge { cursor: pointer; }
.fl-handle { cursor: crosshair; }
.fl-handle circle:last-child { fill: #3e7bfa; stroke: #fff; stroke-width: 2.5; }
.fl-handle:hover circle:last-child { r: 9; }
.fl-temp { fill: none; stroke: #3e7bfa; stroke-width: 3; stroke-dasharray: 8 6; pointer-events: none; }
.fl-edit {
  position: absolute; z-index: 3; min-height: 0 !important; height: 52px; resize: none; text-align: center; font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2;
  padding: 6px 8px !important; border-radius: 10px !important; border: 2px solid var(--accent) !important; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.35) !important;
}
.fl-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 1.1rem; pointer-events: none; }
.fl-empty[hidden] { display: none; }
.fl-palette { padding-top: 14px; border-top: 1px solid var(--border); align-items: center; }
.fl-add {
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border-radius: 12px; font: inherit; font-weight: 650; font-size: 0.98rem; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); transition: transform 0.12s, border-color 0.15s;
}
.fl-add:hover { border-color: var(--accent); transform: translateY(-1px); }
.fl-add svg { width: 38px; height: 20px; stroke-width: 2.2; }
.fl-add[data-add='term'] svg { fill: #e2f5e9; stroke: #2fa66a; }
.fl-add[data-add='proc'] svg { fill: #e6eeff; stroke: #3e7bfa; }
.fl-add[data-add='dec'] svg { fill: #fff1d6; stroke: #e08a00; }
.fl-add[data-add='io'] svg { fill: #f2e9fb; stroke: #8e4ec6; }
.fl-del { height: 52px; }
.fl-shapes button { padding: 7px 4px; font-size: 0.8rem; }
.fl-key { display: grid; gap: 8px; font-size: 0.88rem; color: var(--text-2); }
.fl-key span { display: flex; align-items: center; gap: 10px; }
.fl-key i { width: 30px; height: 16px; flex: none; border: 2px solid; }
.fl-key .k-term { border-radius: 99px; background: #e2f5e9; border-color: #2fa66a; }
.fl-key .k-proc { border-radius: 3px; background: #e6eeff; border-color: #3e7bfa; }
.fl-key .k-dec { width: 18px; height: 18px; margin: 0 6px; transform: rotate(45deg); background: #fff1d6; border-color: #e08a00; }
.fl-key .k-io { transform: skewX(-20deg); background: #f2e9fb; border-color: #8e4ec6; }
.btn.armed { background: var(--red); color: #fff; border-color: var(--red); }
body.presenting .fl-stage .stage-bar { position: absolute; }
body.presenting .fl-canvas { position: absolute; inset: 0 0 96px; }
body.presenting .fl-palette { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); }
body.presenting .fl-palette .fl-add { height: 60px; font-size: 1.1rem; }
@media (max-width: 640px) { .fl-add { height: 44px; padding: 0 10px; font-size: 0.85rem; } .fl-add svg { width: 28px; } .fl-canvas { min-height: 340px; } }

/* ---------- Secret code machine ---------- */
.sc-mode { margin-right: 4px; }
.sc-mode button { padding: 5px 14px; }
.sc-mode button[disabled] { opacity: 0.4; cursor: not-allowed; }
.sc-body { justify-content: flex-start; padding-top: 24px; }
.sc-machine { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; width: 100%; align-items: center; text-align: left; }
@media (max-width: 760px) { .sc-machine { grid-template-columns: 1fr; } }
.sc-io { display: grid; gap: 10px; min-width: 0; }
.sc-box { display: grid; gap: 6px; position: relative; }
.sc-box[hidden] { display: none; }
.sc-in { min-height: 0 !important; font-size: clamp(1.1rem, 2.2vw, 1.5rem) !important; font-weight: 650; border-radius: 14px !important; padding: 12px 14px !important; resize: none; }
.sc-arrow { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 1.6rem; color: var(--muted); line-height: 1; }
.sc-arrow[hidden] { display: none; }
.sc-arrow span { font-size: 0.75rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.sc-out {
  min-height: 3.2em; padding: 14px 16px; border-radius: 14px; background: #131a29; color: #9ef0c0; font-weight: 750; letter-spacing: 0.06em;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem); line-height: 1.35; word-break: break-word; white-space: pre-wrap; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.sc-out.mono { letter-spacing: 0.02em; font-size: clamp(1rem, 2.2vw, 1.5rem); }
.sc-out.pig { display: flex; flex-wrap: wrap; gap: 6px 22px; color: #9ef0c0; }
.sc-pig-word { display: inline-flex; gap: 4px; }
.sc-pig-other { display: inline-grid; place-items: center; min-width: 20px; }
.sc-ph { color: #4f5d78; }
.sc-copy { position: absolute; right: 8px; bottom: 8px; background: rgba(255, 255, 255, 0.08); color: #c7d0e0; border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
.sc-copy:hover { background: rgba(255, 255, 255, 0.16); }
.sc-reveal { display: grid; gap: 12px; justify-items: start; }
.sc-reveal[hidden] { display: none; }
.sc-reveal-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-answer { padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--green) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 45%, var(--border)); font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 1.9rem); letter-spacing: 0.04em; animation: ict-pop 0.3s var(--ease); }
.sc-key { display: grid; place-items: center; min-width: 0; }
.sc-key-note { margin: 0 0 8px; color: var(--text-2); font-weight: 600; text-align: center; }
.sc-wheel { width: min(100%, 320px); height: auto; font-family: inherit; }
.sc-wheel .w-outer { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 2; }
.sc-wheel .w-inner { fill: #fff1d6; stroke: #e08a00; stroke-width: 2; }
.sc-wheel .w-hub { fill: var(--surface); stroke: var(--border); }
.sc-wheel .w-ticks line { stroke: var(--border-strong); stroke-width: 1; }
.sc-wheel .w-pointer { fill: var(--accent); opacity: 0.22; }
.sc-wheel .w-plain { font-size: 17px; font-weight: 800; fill: var(--text); }
.sc-wheel .w-code { font-size: 16px; font-weight: 800; fill: #a35f00; }
.sc-wheel .w-rot { transform-origin: 150px 150px; transition: transform 0.45s var(--ease); }
.sc-wheel .w-label { font-size: 22px; font-weight: 800; fill: var(--text); }
.sc-wheel .w-sub { font-size: 13px; font-weight: 650; fill: var(--muted); }
.sc-rows { display: grid; gap: 10px; width: 100%; }
.sc-row, .sc-cells { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; }
.sc-cells { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; width: 100%; }
.sc-row span, .sc-cells span { display: grid; justify-items: center; gap: 2px; padding: 4px 0; border-radius: 8px; background: var(--surface-2); }
.sc-row b, .sc-cells b { font-size: 0.95rem; font-weight: 800; }
.sc-row i, .sc-cells i { font-style: normal; font-weight: 800; color: #a35f00; font-size: 0.95rem; }
:root[data-theme='dark'] .sc-row i, :root[data-theme='dark'] .sc-cells i, :root[data-theme='dark'] .sc-wheel .w-code { color: #f2b94a; fill: #a35f00; }
:root[data-theme='dark'] .sc-row i, :root[data-theme='dark'] .sc-cells i { color: #f2b94a; }
.sc-cells i { font-size: 0.8rem; letter-spacing: 0.04em; }
.sc-pig-key i { color: var(--text); }
.sc-pig-key i svg { display: block; }
.sc-controls { align-items: center; }
.sc-shift { height: 52px; }
.sc-shift button { width: 52px; font-size: 1.5rem; font-weight: 700; background: transparent; border: 0; cursor: pointer; color: var(--text); }
.sc-shift span { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-weight: 650; color: var(--text-2); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.sc-shift b { font-size: 1.4rem; color: var(--text); min-width: 1.3em; text-align: center; }
.sc-kw { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text-2); }
.sc-kw[hidden] { display: none; }
.sc-kw input { width: 150px; height: 52px; text-transform: uppercase; font-weight: 750; letter-spacing: 0.06em; }
.btn.beep { background: var(--amber); border-color: var(--amber); color: #14110a; }
.sc-brute { width: 100%; text-align: left; display: grid; gap: 8px; }
.sc-brute ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; max-height: 300px; overflow: auto; }
.sc-brute li { display: flex; gap: 10px; align-items: baseline; padding: 4px 8px; border-radius: 8px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9rem; color: var(--text-2); }
.sc-brute li b { color: var(--muted); width: 1.6em; text-align: right; flex: none; }
.sc-brute li.best { background: color-mix(in srgb, var(--green) 16%, var(--surface)); color: var(--text); font-weight: 700; }
.sc-ciphers { display: grid; gap: 6px; }
.sc-ciphers button { display: grid; gap: 1px; text-align: left; font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.sc-ciphers button small { color: var(--muted); font-size: 0.8rem; }
.sc-ciphers button[aria-checked='true'] { border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--c, var(--accent)); }
body.presenting .sc-body { padding: 70px 4vw 20px; }
body.presenting .sc-in, body.presenting .sc-out, body.presenting .sc-answer { font-size: clamp(1.4rem, 4vh, 3.2rem) !important; }
body.presenting .sc-out.mono { font-size: clamp(1.2rem, 3.2vh, 2.4rem) !important; }
body.presenting .sc-out.pig svg { width: clamp(40px, 7vh, 80px); height: clamp(40px, 7vh, 80px); }
body.presenting .sc-wheel { width: min(100%, 58vh); }
body.presenting .sc-row b, body.presenting .sc-row i, body.presenting .sc-cells b { font-size: clamp(0.95rem, 2.2vh, 1.6rem); }
body.presenting .sc-shift, body.presenting .sc-kw input { height: 60px; }
body.presenting .g-label { font-size: clamp(0.8rem, 1.6vh, 1.2rem); }
