/* ============================================================
   BASE & RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green:       #00ff41;
    --green-dim:   #00aa2a;
    --green-dark:  #003a0e;
    --red:         #ff3131;
    --red-dim:     #aa0000;
    --amber:       #ffb000;
    --amber-dim:   #7a5200;
    --cyan:        #00d4ff;
    --bg:          #0a0a0a;
    --bg-panel:    #0d0d0d;
    --bg-header:   #111111;
    --border:      #1a3a1a;
    --border-bright: #00ff41;
    --text:        #c8ffc8;
    --text-dim:    #4a7a4a;
    --font:        'Courier New', Courier, monospace;
    --tick:        100ms;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   SCANLINES OVERLAY
   ============================================================ */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
}

/* ============================================================
   WORKSPACE (TWO-PANEL SPLIT)
   ============================================================ */
.workspace {
    display: grid;
    grid-template-columns: 1fr 340px;
    height: 100vh;
    gap: 0;
}

/* ============================================================
   TERMINAL WINDOWS
   ============================================================ */
.terminal-window {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    overflow: hidden;
}

.console-panel {
    border-right: 1px solid var(--border-bright);
}

.dashboard-panel {
    border-left: none;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-bright);
    padding: 6px 12px;
    color: var(--green);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.window-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* ============================================================
   CONSOLE LOG
   ============================================================ */
.log-feed {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scroll-behavior: smooth;
}

.log-feed::before {
    content: '';
    flex: 1;
}

.log-feed p {
    margin: 0;
    word-break: break-word;
    white-space: pre-wrap;
}

.log-feed p.sys    { color: var(--text-dim); }
.log-feed p.info   { color: var(--text); }
.log-feed p.warn   { color: var(--amber); }
.log-feed p.danger { color: var(--red); }
.log-feed p.good   { color: var(--green); }
.log-feed p.cred   { color: var(--cyan); }
.log-feed p.cmd    { color: var(--green-dim); }
.log-feed p.event  { color: var(--amber); border-left: 2px solid var(--amber); padding-left: 8px; }
.log-feed p.unlock {
    background: linear-gradient(
        to right,
        #ff3131, #ffb000, #00ff41, #00d4ff, #a000ff, #ff3131
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: bold;
    animation: rainbow-scroll 4s linear infinite;
    border-left: 2px solid var(--green);
    padding-left: 8px;
    letter-spacing: 0.02em;
    width: fit-content;
}

.cmd-ref {
    color: var(--green);
    font-weight: bold;
}

/* ============================================================
   AUTOCOMPLETE SUGGESTIONS
   ============================================================ */
#suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.1s ease, padding 0.1s ease;
    background: var(--bg-header);
}

#suggestions.visible {
    max-height: 80px;
    padding: 6px 14px;
    border-top: 1px solid var(--border);
}

.suggestion-chip {
    background: transparent;
    border: 1px solid var(--green-dark);
    color: var(--text-dim);
    padding: 2px 8px;
    font-size: 11px;
    font-family: var(--font);
    cursor: pointer;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.suggestion-chip:hover,
.suggestion-chip.active {
    border-color: var(--green-dim);
    color: var(--green);
    background: var(--green-dark);
}

/* ============================================================
   INPUT LINE
   ============================================================ */
.console-line {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border);
    padding: 8px 14px;
    flex-shrink: 0;
    background: var(--bg-header);
}

.prompt {
    color: var(--green);
    font-weight: bold;
    flex-shrink: 0;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--green);
    font-family: var(--font);
    font-size: 13px;
    caret-color: var(--green);
}

#terminal-input::placeholder {
    color: var(--text-dim);
}

#terminal-input.has-history::placeholder {
    color: var(--green-dim);
}

/* ============================================================
   DASHBOARD / TELEMETRY
   ============================================================ */
.dashboard-panel .window-content {
    overflow-y: auto;
    padding: 10px 14px;
    gap: 0;
}

.telemetry-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.telemetry-section:last-child {
    border-bottom: none;
}

.telemetry-section h3 {
    color: var(--green-dim);
    font-size: 11px;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Header with a top-right action button (e.g. org chart info). */
.h3-with-action {
    position: relative;
}

.info-btn {
    position: absolute;
    top: -2px;
    right: 0;
    width: 15px;
    height: 15px;
    line-height: 13px;
    padding: 0;
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    color: var(--green-dim);
    background: transparent;
    border: 1px solid var(--green-dim);
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.info-btn:hover {
    color: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 4px var(--green);
}

.stat-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    gap: 8px;
}

.stat-line .label {
    color: var(--text-dim);
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-line .value {
    color: var(--text);
    font-size: 12px;
    text-align: right;
}

.stat-line .value.highlight {
    color: var(--green);
    font-weight: bold;
}

.stat-line .value.danger {
    color: var(--red);
}

.stat-line .value.warn {
    color: var(--amber);
}

.stat-line .value.cyan {
    color: var(--cyan);
}

/* ============================================================
   PROGRESS BAR (HEAT)
   ============================================================ */
.progress-bar-container {
    position: relative;
    height: 6px;
    background: var(--green-dark);
    border: 1px solid var(--border);
    margin: 6px 0 4px;
    overflow: visible;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--green);
    transition: width var(--tick) linear, background var(--tick) linear;
}

.progress-bar-marker {
    position: absolute;
    top: -3px;
    width: 1px;
    height: 12px;
    background: var(--amber);
    opacity: 0.7;
}

/* Heat floor — the un-decayable baseline, rendered as a hatched grey zone
   over the left of the heat bar. Sits above the fill so the floored portion
   reads as locked-in regardless of current heat color. */
.heat-floor-zone {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: repeating-linear-gradient(
        45deg,
        rgba(150, 150, 150, 0.55),
        rgba(150, 150, 150, 0.55) 3px,
        rgba(40, 40, 40, 0.55) 3px,
        rgba(40, 40, 40, 0.55) 6px
    );
    border-right: 1px solid rgba(200, 200, 200, 0.4);
    transition: width var(--tick) linear;
}

/* Progress bar color variants */
.cyan-fill  { background: var(--cyan) !important; }
.amber-fill { background: var(--amber) !important; }

/* Heat color shifts */
.heat-low  .progress-bar-fill { background: var(--green); }
.heat-mid  .progress-bar-fill { background: var(--amber); }
.heat-high .progress-bar-fill { background: var(--red); }

.heat-low  #heat-value-wrap { color: var(--text); }
.heat-mid  #heat-value-wrap { color: var(--amber); }
.heat-high #heat-value-wrap { color: var(--red); }

/* Heat delta rate of change indicators */
#heat-delta {
    font-size: 11px;
    margin-left: 6px;
    font-weight: normal;
    transition: color 0.3s ease;
}
#heat-value-wrap #heat-delta.delta-pos {
    color: var(--red);
    animation: heat-pulse 2s infinite ease-in-out;
}
#heat-value-wrap #heat-delta.delta-neg {
    color: var(--green);
}
#heat-value-wrap #heat-delta.delta-zero {
    color: var(--text-dim);
}

@keyframes heat-pulse {
    0% { opacity: 0.65; }
    50% { opacity: 1; text-shadow: 0 0 3px rgba(255, 49, 49, 0.4); }
    100% { opacity: 0.65; }
}

/* ============================================================
   SIGNAL REQUESTS & CADRE LIST
   ============================================================ */
.signal-request {
    border-left: 2px solid var(--amber-dim);
    padding: 4px 0 4px 8px;
    margin-top: 6px;
    font-size: 11px;
}

.signal-request .handle   { color: var(--cyan); }
.signal-request .skills   { color: var(--text-dim); }
.signal-request .skills.revealed { color: var(--green-dim); }
.signal-request .ready      { color: var(--green); }
.signal-request .suspicious { color: var(--red); font-size: 10px; }

.cadre-member {
    border-left: 2px solid var(--green-dark);
    padding: 3px 0 3px 8px;
    margin-top: 4px;
    font-size: 11px;
}

.cadre-member .handle          { color: var(--text); }
.cadre-member .skills          { color: var(--green-dim); }
.cadre-member.detained         { border-left-color: var(--red-dim); opacity: 0.7; }
.cadre-member.detained .handle { color: var(--text-dim); }
.cadre-member.detained .skills { color: var(--red-dim); }
.detained-timer                { color: var(--red); font-size: 10px; margin-left: 4px; }

.dept-row {
    display: grid;
    grid-template-columns: 72px 64px 1fr;
    align-items: baseline;
    gap: 4px;
    margin-top: 5px;
    font-size: 11px;
}

.dept-label  { color: var(--text); }
.dept-status.active   { color: var(--green); }
.dept-status.inactive { color: var(--text-dim); }
.dept-effect { color: var(--green-dim); font-size: 10px; }

/* ============================================================
   SESSION TIMER
   ============================================================ */
#session-timer {
    color: var(--text-dim);
    font-size: 10px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--green-dim); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    92%       { opacity: 1; }
    93%       { opacity: 0.85; }
    94%       { opacity: 1; }
    96%       { opacity: 0.9; }
    97%       { opacity: 1; }
}

@keyframes rainbow-scroll {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

body { animation: flicker 8s infinite; }

/* ============================================================
   VISUAL POLISH (see design/visual-improvements.md)
   ============================================================ */

/* #1 — each new console line "prints in" (slide from left + fade). Cheap and
   universal; narrative beats still use the JS typewriter (logTypewriter). */
@keyframes line-in {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}
.log-feed p { animation: line-in 0.12s ease-out; }

/* #2 — discrete counters pop when they change (gain a proxy/cred/recruit). */
@keyframes value-tick {
    0%   { transform: translateY(0);    color: #fff; text-shadow: 0 0 6px currentColor; }
    100% { transform: translateY(0); }
}
.stat-line .value.value-changed {
    animation: value-tick 0.35s ease-out;
    display: inline-block; /* allow transform without disturbing flex baseline */
}

/* #3 — CRT phosphor bloom on the brightest green elements. */
.window-header,
.prompt,
.stat-line .value.highlight {
    text-shadow: 0 0 2px rgba(0, 255, 65, 0.45);
}

/* #4 — prompt caret pulse to pull the eye back to the input. */
.prompt { animation: prompt-pulse 1.4s ease-in-out infinite; }
@keyframes prompt-pulse {
    0%, 100% { opacity: 1;   text-shadow: 0 0 2px rgba(0, 255, 65, 0.45); }
    50%      { opacity: 0.6; text-shadow: 0 0 5px rgba(0, 255, 65, 0.7); }
}

/* #6 — heat escalation. A red vignette overlay (mirrors .scanlines) whose
   opacity is driven by body.heat-tier-* classes, plus a console border pulse
   and faster flicker at high heat. */
.heat-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: radial-gradient(
        ellipse at center,
        transparent 45%,
        rgba(255, 49, 49, 0.10) 80%,
        rgba(255, 49, 49, 0.28) 100%
    );
}
body.heat-tier-mid  .heat-vignette { opacity: 0.5; }
body.heat-tier-high .heat-vignette { opacity: 1; animation: vignette-throb 2s ease-in-out infinite; }
@keyframes vignette-throb {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}
body.heat-tier-high { animation: flicker 3s infinite; }
body.heat-tier-high .console-panel { animation: console-alarm 1.6s ease-in-out infinite; }
@keyframes console-alarm {
    0%, 100% { border-right-color: var(--border-bright); }
    50%      { border-right-color: var(--red); }
}

/* Going Dark marker pulses as heat approaches the threshold. */
.progress-bar-marker.near {
    animation: marker-pulse 0.9s ease-in-out infinite;
    opacity: 1;
}
@keyframes marker-pulse {
    0%, 100% { box-shadow: 0 0 2px var(--amber); background: var(--amber); }
    50%      { box-shadow: 0 0 6px var(--red);   background: var(--red); }
}

/* #7 — Going Dark / purge screen event, triggered by toggling .active
   (see js/systems/fx.js). Two distinct beats:
     - full  (godark): a near-opaque blackout + glitch sweep + color flashes.
     - minor (purge):  a quick subtle flash. */
.screen-wipe {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1001;
    opacity: 0;
}

/* Full wipe — the big "you have gone dark" moment. */
.screen-wipe.active {
    animation: screen-wipe-full 1.15s steps(3, end) 1;
}
@keyframes screen-wipe-full {
    0%   { opacity: 0;    background: #000; transform: translateX(0); }
    7%   { opacity: 1;    background: #000; transform: translateX(0); }
    18%  { opacity: 1;    background: linear-gradient(0deg, #000 38%, rgba(0,255,65,0.30) 50%, #000 62%); transform: translateX(-7px); }
    30%  { opacity: 1;    background: repeating-linear-gradient(0deg, #000 0 5px, rgba(0,255,65,0.20) 5px 7px); transform: translateX(7px); }
    42%  { opacity: 1;    background: #000; transform: translateX(-5px); }
    55%  { opacity: 1;    background: repeating-linear-gradient(0deg, #000 0 3px, rgba(255,49,49,0.18) 3px 5px); transform: translateX(5px); }
    66%  { opacity: 0.96; background: rgba(0,255,65,0.40); transform: translateX(-3px); }
    78%  { opacity: 0.9;  background: rgba(255,49,49,0.22); transform: translateX(2px); }
    90%  { opacity: 0.55; background: #000; transform: translateX(0); }
    100% { opacity: 0;    background: transparent; }
}

/* Minor wipe — routine purge flush. Overrides the full rule when both
   classes are present (higher specificity). */
.screen-wipe.minor.active {
    animation: screen-wipe-minor 0.3s steps(2, end);
}
@keyframes screen-wipe-minor {
    0%   { opacity: 0;   background: #000; }
    15%  { opacity: 0.7; background: rgba(0, 255, 65, 0.12); transform: translateX(-2px); }
    45%  { opacity: 0.3; background: #000; transform: translateX(2px); }
    100% { opacity: 0;   background: transparent; }
}

/* #8 — danger lines glitch briefly on arrival (RGB split + jitter, once). */
.log-feed p.danger {
    animation: line-in 0.12s ease-out, danger-glitch 0.4s steps(2, end) 1;
}
@keyframes danger-glitch {
    0%   { text-shadow: -2px 0 var(--red), 2px 0 var(--cyan); transform: translateX(-2px); }
    33%  { text-shadow: 2px 0 var(--red), -2px 0 var(--cyan); transform: translateX(2px); }
    66%  { text-shadow: -1px 0 var(--red), 1px 0 var(--cyan); transform: translateX(-1px); }
    100% { text-shadow: none; transform: translateX(0); }
}

/* #9 — inline ASCII sparkline next to live rates. */
.spark {
    color: var(--green-dim);
    font-size: 11px;
    letter-spacing: 1px;
    margin-left: 6px;
    opacity: 0.8;
}

/* Honor user motion preference — dial the loops/glitches down. */
@media (prefers-reduced-motion: reduce) {
    body, body.heat-tier-high,
    .prompt,
    body.heat-tier-high .heat-vignette,
    body.heat-tier-high .console-panel,
    .progress-bar-marker.near,
    .log-feed p,
    .log-feed p.danger,
    .stat-line .value.value-changed {
        animation: none !important;
    }
}

/* ============================================================
   IDEOLOGY PLOTTER STYLING
   ============================================================ */
.ideology-plotter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
}

.ideology-plotter-canvas-wrap {
    background: #020703;
    border: 1px solid var(--border);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.15);
    position: relative;
    width: 200px;
    height: 200px;
}

#ideology-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ============================================================
   ORG CHART TECH TREE STYLING
   ============================================================ */
.orgchart-visual-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.orgchart-node-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed #141;
    background: rgba(0, 34, 5, 0.1);
    padding: 5px 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    transition: all 0.2s ease;
}

.orgchart-node-row.unlocked {
    border: 1px solid var(--green);
    background: rgba(0, 255, 65, 0.04);
    color: var(--green);
}

.orgchart-node-row.available {
    border: 1px solid var(--cyan);
    background: rgba(6, 182, 212, 0.04);
    color: var(--cyan);
    cursor: pointer;
}

.orgchart-node-row.available:hover {
    background: rgba(6, 182, 212, 0.18);
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
}

.orgchart-node-row.available:hover .orgchart-node-status {
    text-decoration: underline;
}

.orgchart-node-row.locked {
    opacity: 0.45;
    color: var(--text-dim);
}

.orgchart-node-name {
    font-weight: bold;
}

.orgchart-node-status {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: bold;
}

/* ============================================================
   INTERACTIVE CONSOLE MENU STYLING
   ============================================================ */
.console-menu {
    border: 1px solid var(--border-bright);
    background: rgba(0, 58, 14, 0.25);
    padding: 8px 12px;
    margin: 10px 0;
    font-family: var(--font);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.15);
}

.menu-title {
    color: var(--green);
    font-weight: bold;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.menu-item {
    padding: 2px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.menu-pointer {
    width: 14px;
    display: inline-block;
    color: var(--green);
    font-weight: bold;
}

.menu-item.selected {
    background: var(--green-dark);
    color: var(--green);
    outline: 1px solid var(--border-bright);
}

.menu-item.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.menu-desc {
    color: var(--text-dim);
    margin-left: 8px;
    font-size: 11px;
}

.menu-footer {
    border-top: 1px solid var(--border);
    padding-top: 4px;
    margin-top: 6px;
    color: var(--text-dim);
    font-size: 10px;
    text-align: center;
}

.text-success { color: var(--green); }
.text-warning { color: var(--amber); }
.text-danger  { color: var(--red); }

/* ============================================================
   MOBILE-ONLY CONTROLS (hidden on desktop)
   ============================================================ */
.mobile-tabbar { display: none; }
#submit-btn { display: none; }

/* ============================================================
   MOBILE LAYOUT — single-column, tabbed panels (≤768px)
   Desktop layout above is left fully intact; everything here is
   width-gated. Touch *behavior* (keyboard suppression) is gated in JS
   on isTouch, not here.
   ============================================================ */
@media (max-width: 768px) {
    /* Full dynamic viewport height so the input line stays above the mobile
       browser chrome and on-screen keyboard. Stack into one column; leave
       room at the bottom for the fixed tab bar. */
    .workspace {
        grid-template-columns: 1fr;
        height: 100dvh;
        padding-bottom: 46px;
    }

    /* Each panel fills the column; only the active tab's panel is shown. */
    .console-panel { border-right: none; }
    body.tab-console   .dashboard-panel { display: none; }
    body.tab-telemetry .console-panel   { display: none; }

    /* Fixed bottom switcher. */
    .mobile-tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 46px;
        z-index: 1002;
        background: var(--bg-header);
        border-top: 1px solid var(--border-bright);
    }
    .mobile-tabbar button {
        flex: 1;
        background: transparent;
        border: none;
        border-right: 1px solid var(--border);
        color: var(--text-dim);
        font-family: var(--font);
        font-size: 12px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        cursor: pointer;
    }
    .mobile-tabbar button:last-child { border-right: none; }
    body.tab-console   .mobile-tabbar button[data-tab="console"],
    body.tab-telemetry .mobile-tabbar button[data-tab="telemetry"] {
        color: var(--green);
        background: var(--green-dark);
        text-shadow: 0 0 2px rgba(0, 255, 65, 0.45);
    }

    /* Surface heat from the console tab: pulse the TELEMETRY tab as heat rises
       (reuses the existing body.heat-tier-* classes). */
    body.heat-tier-mid  .mobile-tabbar button[data-tab="telemetry"] { color: var(--amber); }
    body.heat-tier-high .mobile-tabbar button[data-tab="telemetry"] {
        color: var(--red);
        animation: heat-pulse 1.4s infinite ease-in-out;
    }

    /* Larger touch targets. */
    .suggestion-chip {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 38px;
        display: flex;
        align-items: center;
    }
    .menu-item {
        padding: 8px 4px;
        min-height: 38px;
    }
    .orgchart-node-row { padding: 10px 8px; }
    .info-btn {
        width: 22px;
        height: 22px;
        line-height: 20px;
        font-size: 13px;
    }

    /* Quick-command bar: keep chips on one horizontally-scrollable row above the
       input rather than wrapping into a tall block. */
    #suggestions {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #suggestions.visible { max-height: 56px; }

    /* Submit button at the end of the input line — primary "run" affordance when
       the keyboard's own enter key isn't handy (chips-primary play). */
    #submit-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        height: 36px;
        margin-left: 8px;
        padding: 0;
        background: var(--green-dark);
        border: 1px solid var(--green-dim);
        color: var(--green);
        font-family: var(--font);
        font-size: 14px;
        line-height: 1;
        cursor: pointer;
        text-shadow: 0 0 2px rgba(0, 255, 65, 0.45);
    }
    #submit-btn:active {
        background: var(--green-dim);
        color: var(--bg);
    }
}



