/* terminal.css — IBM Terminal Design System — EXEGESISAPP Oracle Frontend
 * Tokens: --terminal-green #33FF33 | --terminal-green-dim #1A8A1A
 *         --terminal-black #000000 | --terminal-font 'IBM Plex Mono'
 *         --terminal-font-size 13px (14px 768px+) | --cursor-blink-rate 530ms
 *         --text-reveal-speed 30ms (0ms prefers-reduced-motion; read by terminal.js)
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap');

/* AC #1: Custom properties */
:root {
    --terminal-green: #33FF33;
    --terminal-green-dim: #1A8A1A;
    --terminal-black: #000000;
    --terminal-font: 'IBM Plex Mono';
    --terminal-font-size: 13px;
    --cursor-blink-rate: 530ms;
    --text-reveal-speed: 30ms;
}

/* AC #7: Visual purity reset — no rounded corners, shadows, gradients, decorations, scrollbars */
/* M2 fix: consolidated all * rules into one block */
* {
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    background-image: none;
    text-decoration: none;
    scrollbar-width: none;
    -webkit-tap-highlight-color: transparent; /* iOS Safari: suppress blue tap flash on tappable elements */
}

/* AC #7: No visual media */
img, svg, canvas, video {
    display: none;
}

/* AC #7: No scrollbars (webkit) */
::-webkit-scrollbar { display: none; }

/* AC #2: html/body layout lock */
html, body {
    margin: 0;
    padding: 0;
    background: var(--terminal-black);
    overflow: hidden;
    overscroll-behavior: none; /* M3 fix: prevent mobile browser bounce/rubber-band */
    width: 100%;
    height: 100%;
    -webkit-text-size-adjust: 100%; /* iOS Safari: prevent auto font scaling in landscape */
    text-size-adjust: 100%;
}

/* AC #2: Terminal container */
.terminal {
    width: 100%;
    height: 100%;  /* M1 fix: was 100vh — inherits from body { height: 100% }, avoids iOS Safari address bar overflow */
    background: var(--terminal-black);
    padding: 12px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* AC #3: Universal typography */
*, *::before, *::after {
    font-family: var(--terminal-font), 'Courier New', monospace;
    font-size: var(--terminal-font-size);
    font-weight: 400;
    line-height: 1.6;
    color: var(--terminal-green);
    letter-spacing: 0;
}

/* AC #3: Uniform heading and emphasis — no weight or size overrides */
h1, h2, h3, h4, h5, h6 {
    font-size: var(--terminal-font-size);
    font-weight: 400;
    margin: 0;
}

strong, b { font-weight: 400; }
em, i     { font-style: normal; }

/* Dim utility: page indicators, system messages */
.terminal-dim { color: var(--terminal-green-dim); }

/* Bright utility: status transitions, "Ready." final boot message */
.terminal-bright { color: #AAFFAA; }

/* AC #3: Link reset — no underline, no hover state */
a { color: var(--terminal-green); text-decoration: none; }

/* AC #4: Single 768px breakpoint */
@media (min-width: 768px) {
    :root { --terminal-font-size: 14px; }
    .terminal { padding: 16px; }
}

/* AC #5: Cursor blink — step-end for sharp IBM on/off flash */
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.2em;
    background: var(--terminal-green);
    vertical-align: text-bottom;
    animation: cursor-blink var(--cursor-blink-rate) step-end infinite;
}

/* Active cursor: static solid block during Fat's response (no blink).
 * H1 fix: standalone class — includes all visual properties so terminal.js can
 * remove .cursor and add .cursor--active independently (class swap, not modifier stack). */
.cursor--active {
    display: inline-block;
    width: 0.6em;
    height: 1.2em;
    background: var(--terminal-green);
    vertical-align: text-bottom;
    animation: none;
    opacity: 1;
}

/* AC #6: Accessibility — reduced motion */
@media (prefers-reduced-motion: reduce) {
    :root { --text-reveal-speed: 0ms; }
    .cursor { animation: none; opacity: 1; }
}

/* Story 3.3: Touch target sizing — 44px minimum per AC #2
 * 13px font × 1.6 line-height = 20.8px line height + 24px padding (12+12) = ~44.8px tap target
 * Only applies to [data-menu-key] elements; no spillover to other <p> tags */
[data-menu-key] {
    padding-top: 12px;
    padding-bottom: 12px;
}
