/*
 * ============================================================================
 * GRAPHITE THEME - 21st.dev Community Theme
 * Source: https://21st.dev/community/themes/graphite
 * Locked: 2026-04-08
 * ============================================================================
 *
 * LIGHT MODE (:root)
 * --card:                     #f5f5f5
 * --ring:                     #606060
 * --input:                    #e0e0e0
 * --muted:                    #d9d9d9
 * --accent:                   #c0c0c0
 * --border:                   #d0d0d0
 * --radius:                   0.35rem
 * --chart-1:                  #606060
 * --chart-2:                  #476666
 * --chart-3:                  #909090
 * --chart-4:                  #a8a8a8
 * --chart-5:                  #c0c0c0
 * --popover:                  #f5f5f5
 * --primary:                  #606060
 * --sidebar:                  #eaeaea
 * --font-mono:                Fira Code, monospace
 * --font-sans:                Montserrat, sans-serif
 * --secondary:                #e0e0e0
 * --background:               #f0f0f0
 * --font-serif:               Georgia, serif
 * --foreground:               #333333
 * --destructive:              #cc3333
 * --shadow-blur:              0px
 * --shadow-color:             hsl(0 0% 20% / 0.1)
 * --sidebar-ring:             #606060
 * --shadow-spread:            0px
 * --shadow-opacity:           0.15
 * --sidebar-accent:           #c0c0c0
 * --sidebar-border:           #d0d0d0
 * --card-foreground:          #333333
 * --shadow-offset-x:          0px
 * --shadow-offset-y:          2px
 * --sidebar-primary:          #606060
 * --muted-foreground:         #666666
 * --accent-foreground:        #333333
 * --popover-foreground:       #333333
 * --primary-foreground:       #ffffff
 * --sidebar-foreground:       #333333
 * --secondary-foreground:     #333333
 * --destructive-foreground:   #ffffff
 * --sidebar-accent-foreground:        #333333
 * --sidebar-primary-foreground:       #ffffff
 *
 * DARK MODE (.dark)
 * --card:                     #202020
 * --ring:                     #a0a0a0
 * --input:                    #303030
 * --muted:                    #2a2a2a
 * --accent:                   #404040
 * --border:                   #353535
 * --chart-1:                  #a0a0a0
 * --chart-2:                  #7e9ca0
 * --chart-3:                  #707070
 * --chart-4:                  #585858
 * --chart-5:                  #404040
 * --popover:                  #202020
 * --primary:                  #a0a0a0
 * --sidebar:                  #1f1f1f
 * --font-mono:                Fira Code, monospace
 * --font-sans:                Inter, sans-serif
 * --secondary:                #303030
 * --background:               #1a1a1a
 * --font-serif:               Georgia, serif
 * --foreground:               #d9d9d9
 * --destructive:              #e06666
 * --sidebar-ring:             #a0a0a0
 * --sidebar-accent:           #404040
 * --sidebar-border:           #353535
 * --card-foreground:          #d9d9d9
 * --sidebar-primary:          #a0a0a0
 * --muted-foreground:         #808080
 * --accent-foreground:        #d9d9d9
 * --popover-foreground:       #d9d9d9
 * --primary-foreground:       #1a1a1a
 * --sidebar-foreground:       #d9d9d9
 * --secondary-foreground:     #d9d9d9
 * --destructive-foreground:   #ffffff
 * --sidebar-accent-foreground:        #d9d9d9
 * --sidebar-primary-foreground:       #1a1a1a
 *
 * GRAY SCALE (light):
 *   #fafafa (98%) | #f5f5f5 (96% card) | #f0f0f0 (94% bg)
 *   #eaeaea (92% sidebar) | #e0e0e0 (88% input/secondary) | #d9d9d9 (85% muted)
 *   #d0d0d0 (82% border) | #c0c0c0 (75% accent) | #a8a8a8 (66% chart-4)
 *   #909090 (56% chart-3) | #666666 (40% muted-fg) | #606060 (38% primary)
 *   #333333 (20% foreground) | #1a1a1a (10% headings)
 *
 * RADIUS: 0.35rem
 * SHADOW: 0px 2px 0px hsl(0 0% 20% / 0.1)
 * FONTS: Montserrat (sans), Georgia (serif), Fira Code (mono)
 * ============================================================================
 */

:root {
    --bg: #f0f0f0;
    --bg-alt: #f5f5f5;
    --border: #d0d0d0;
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-dim: #d97706;
    --secondary: #c0c0c0;
    --secondary-hover: #a8a8a8;
    --secondary-dim: #c0c0c0;
    --success: #606060;
    --success-dim: #333333;
    --danger: #cc3333;
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;

    /* Graphite tokens */
    --card: #f5f5f5;
    --input: #e0e0e0;
    --muted: #d9d9d9;
    --primary: #606060;
    --primary-fg: #ffffff;
    --foreground: #333333;
    --popover: #f5f5f5;
    --sidebar: #eaeaea;
    --radius: 0.35rem;
    --chart-1: #606060;
    --chart-2: #476666;
    --chart-3: #909090;
    --chart-4: #a8a8a8;
    --chart-5: #c0c0c0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background: var(--bg);
    color: var(--text-secondary);
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
.nav {
    background: rgba(240,240,240,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 0;
}
.logo-axl {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--accent);
}
.logo-compress {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--secondary);
    letter-spacing: 2px;
}

/* Center nav links (desktop) */
.nav-center {
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 0.35rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover { color: var(--text-secondary); background: rgba(0,0,0,0.06); }
.nav-link.active { color: var(--secondary); background: rgba(192,192,192,0.08); }
.nav-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.6;
}
.nav-link.active .nav-icon { opacity: 1; }

/* Right side: user + hamburger */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* User icon button */
.nav-user-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.nav-user-btn:hover { border-color: var(--secondary); }
.nav-user-icon {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: fill 0.2s;
}
.nav-user-btn:hover .nav-user-icon { fill: var(--secondary); }
.nav-user-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--bg-alt);
}

/* User dropdown */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    overflow: hidden;
    z-index: 200;
}
.nav-dropdown.open { display: block; }

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-alt);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--secondary);
    font-weight: 600;
}
.dropdown-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
}
.dropdown-item:hover {
    background: rgba(192,192,192,0.06);
    color: var(--text-secondary);
}
.dropdown-item-accent { color: var(--accent); }
.dropdown-item-accent:hover { background: rgba(51,51,51,0.08); color: var(--accent); }
.dropdown-item-dim { color: var(--text-muted); }
.dropdown-item-dim:hover { color: var(--danger); background: rgba(239,68,68,0.06); }
.dropdown-note {
    padding: 10px 16px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Hamburger (mobile only) */
.nav-hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.nav-hamburger:hover { border-color: var(--accent); }
.hamburger-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
}
.hamburger-close { display: none; }
.nav-hamburger.open .hamburger-open { display: none; }
.nav-hamburger.open .hamburger-close { display: block; }
.nav-hamburger.open { border-color: var(--accent); }
.nav-hamburger.open .hamburger-icon { fill: var(--accent); }

/* Mobile slide-down menu */
.nav-mobile {
    display: none;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}
.nav-mobile.open { display: block; }
.mobile-link {
    display: block;
    padding: 10px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}
.mobile-link:hover { background: rgba(192,192,192,0.06); color: var(--text-secondary); }
.mobile-link-dim { color: var(--text-muted); }
.mobile-link-accent { color: var(--accent); font-weight: 600; }
.mobile-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Responsive: hide center links, show hamburger on mobile */
@media (max-width: 640px) {
    .nav-center { display: none; }
    .nav-hamburger { display: flex; }
}

/* ---- MAIN ---- */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}
.main-wide {
    max-width: 1100px;
}

/* ---- FOOTER ---- */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.footer-text {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.footer-links {
    display: flex;
    gap: 16px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: #333333; }

/* ---- FLASH ---- */
.flash-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px 0;
}
.flash-msg {
    background: var(--bg-alt);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    padding: 10px 16px;
    border-radius: 0.35rem;
    font-size: 14px;
    margin-bottom: 8px;
}

/* ---- CARDS ---- */
.card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 24px;
}
.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

/* ---- FORMS ---- */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    color: var(--text-secondary);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-dim);
}
.form-group select { cursor: pointer; }
.optional { color: var(--text-muted); font-size: 11px; }
.hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; display: block; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 0.35rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary, .btn-accent { background: #fbbf24; border: none; color: #1a1a1a; font-weight: 700; }
.btn-primary:hover:not(:disabled), .btn-accent:hover:not(:disabled) { background: #e5a91f; color: #1a1a1a; border: none; }
.btn-full { width: 100%; }
.btn-dim { background: transparent; border: 1px solid #fbbf24; color: #fbbf24; }
.btn-dim:hover:not(:disabled) { border-color: #fbbf24; color: #1a1a1a; background: #fbbf24; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---- AUTH ---- */
.auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}
.auth-card {
    width: 100%;
    max-width: 400px;
}
.auth-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}
.auth-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-footer a { color: var(--secondary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ---- HERO (compress landing) ---- */
.hero-section {
    text-align: center;
    padding: 24px 0 32px;
}
.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.text-secondary { color: var(--secondary); }
.hero-sub {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ---- COMPRESS PANELS ---- */
.tool-section { margin-bottom: 48px; }
.compress-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.panel {
    background: #636363;
    border: 1px solid #555555;
    border-radius: 0.35rem;
    overflow: hidden;
}
.panel-output { border-color: #555555; }
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #555555;
    border-bottom: 1px solid #555555;
}
.panel-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #d0d0d0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.char-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #a0a0a0;
}
.panel-textarea {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    background: transparent;
    border: none;
    color: #f0f0f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    resize: vertical;
    line-height: 1.6;
}
.panel-textarea:focus { outline: none; }
.panel-textarea[readonly] { color: #f0f0f0; }

/* ---- TOOLBAR ---- */
.toolbar {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.toolbar-stats {
    display: flex;
    gap: 12px;
}
.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ececec;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
}
.stat-pill-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-pill-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #333333;
    font-weight: 700;
}
.toolbar-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}
.toolbar-select {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    cursor: pointer;
}
.toolbar-select:focus { outline: none; border-color: var(--secondary-dim); }
.toolbar-input {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    flex: 1;
    min-width: 200px;
}
.toolbar-input:focus { outline: none; border-color: var(--secondary-dim); }
.toolbar-input::placeholder { color: var(--text-muted); }

/* ---- PRO GATE ---- */
.pro-gate {
    position: relative;
}
.pro-gate-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #ececec;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.pro-gate-inner:hover {
    border-color: var(--accent);
    background: #e0e0e0;
}
.pro-gate-icon {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}
.pro-gate-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(51,51,51,0.1);
    padding: 2px 8px;
    border-radius: 3px;
}
.pro-gate-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
}
.pro-gate-expand {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: auto;
    min-width: 280px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 50;
}
.pro-gate.expanded .pro-gate-expand {
    display: block;
}
.pro-gate-expand p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}
.pro-gate-expand ul {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.pro-gate-expand ul li {
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 0 3px 14px;
    position: relative;
    line-height: 1.5;
}
.pro-gate-expand ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}
.pro-gate-actions {
    display: flex;
    gap: 8px;
}
@media (max-width: 768px) {
    .pro-gate-expand {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 280px;
        max-width: 90vw;
    }
    .pro-gate-text { display: none; }
}

/* ---- ACCOUNT PAGE ---- */
.account-page { max-width: 640px; margin: 0 auto; }
.account-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.account-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    margin-bottom: 16px;
    overflow: hidden;
}
.account-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}
.account-card-header h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    flex: 1;
}
.account-card-icon { width: 16px; height: 16px; fill: var(--accent); flex-shrink: 0; }
.account-card-body { padding: 16px 18px; }
.badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 3px;
}
.badge-green { background: rgba(96,96,96,0.12); color: var(--success); }
.badge-dim { background: rgba(75,85,99,0.2); color: var(--text-muted); }
.form-row { margin-bottom: 12px; }
.form-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.form-select, .form-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}
.form-select:focus, .form-input:focus { border-color: var(--secondary); }
.form-input::placeholder { color: var(--text-muted); }
.form-actions { display: flex; gap: 8px; margin-top: 12px; }
.form-note { font-size: 11px; color: var(--text-muted); margin-top: 12px; line-height: 1.5; }
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-block { flex: 1; min-width: 100px; text-align: center; padding: 12px 0; }
.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
}
.stat-number.accent { color: var(--accent); }
.stat-number.secondary { color: var(--secondary); }
.stat-number.success { color: var(--success); }
.stat-label-sm {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.account-info { margin-bottom: 16px; }
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(96,96,96,0.4);
}
.info-label { font-size: 13px; color: var(--text-muted); }
.info-value { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-secondary); }
.account-details { margin-top: 12px; }
.account-summary {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}
.account-summary:hover { color: var(--secondary); }
.account-danger .account-summary:hover { color: var(--danger); }
.btn-danger {
    background: transparent;
    border: 1px solid #EF4444;
    color: #EF4444;
}
.btn-danger:hover { background: #EF4444; color: #ffffff; border-color: #EF4444; }
.btn-sm { font-size: 12px; padding: 8px 16px; }

/* ---- HOW IT WORKS ---- */
.how-section {
    margin-bottom: 48px;
}
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.step-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 24px;
    text-align: center;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 12px;
}
.step-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- CTA ---- */
.cta-section {
    margin-bottom: 48px;
}
.cta-card {
    background: var(--bg-alt);
    border: 1px solid #d0d0d0;
    border-radius: 0.35rem;
    padding: 32px;
    text-align: center;
}
.cta-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}
.cta-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ---- RESULTS TABLE ---- */
.results-section {
    margin-bottom: 48px;
}
.results-table-wrap {
    overflow-x: auto;
}
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.results-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.results-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}
.results-table tr:hover td {
    background: var(--bg-alt);
}
.results-empty td {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
}
.results-table .ratio-cell { color: var(--success); font-weight: 600; }

/* ---- ARCHITECTURE COLLAPSIBLE ---- */
.arch-section {
    margin-bottom: 48px;
}
.arch-details {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    overflow: hidden;
}
.arch-summary {
    padding: 16px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #1a1a1a;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}
.arch-summary::before {
    content: '+';
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: var(--secondary);
    transition: transform 0.2s;
}
.arch-details[open] .arch-summary::before {
    content: '-';
}
.arch-summary::-webkit-details-marker { display: none; }
.arch-content {
    padding: 0 20px 20px;
}
.arch-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin: 20px 0 8px;
    letter-spacing: 0.5px;
}
.arch-content h3:first-child { margin-top: 0; }
.arch-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.7;
}
.arch-code {
    background: #1a1a1a;
    color: #f0f0f0;
    border: 1px solid #333333;
    border-left: 3px solid #606060;
    border-radius: 0.35rem;
    padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 8px 0 12px;
    white-space: pre-wrap;
}

/* Architecture section dividers */
.arch-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Tag pills (architecture) */
.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.tag-pill {
    display: inline-block;
    padding: 4px 12px;
    background: #1a1a1a;
    color: #f0f0f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    border-radius: 4px;
}

/* Dark comparison cards (caveman) */
.compare-card-dark {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    overflow: hidden;
}

.compare-card-dark-good {
    border-color: var(--border);
}

.compare-card-dark-header {
    padding: 12px 20px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.compare-card-dark-header-good {
    color: var(--text-secondary);
}

.compare-card-dark-body {
    padding: 20px;
}

.compare-example {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.compare-example-good {
    color: var(--text-secondary);
}

.compare-bullets {
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted);
}

.compare-bullets p { margin-bottom: 2px; }

.compare-bullets-good {
    color: var(--text-secondary);
}

.compare-cant strong { color: var(--danger); }
.compare-can strong { color: var(--text-primary); }

.compare-table-dark {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.compare-table-dark td {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.compare-dark-val {
    text-align: right;
}

.compare-dark-bad { color: var(--danger); }
.compare-dark-gold { color: var(--text-primary); font-weight: 600; }

.compare-footer-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 20px;
}

/* Pipeline original (from cached page) */
.pipeline-original {
    padding: 0 0 16px;
}

.pipeline-original-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 300;
    font-style: italic;
    color: #333333;
    margin-bottom: 8px;
}

.pipeline-original-line {
    width: 80px;
    height: 2px;
    background: #333333;
    margin-bottom: 20px;
}

.pipeline-original-text {
    font-size: 18px;
    font-weight: 400;
    color: #333333;
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 24px;
}

.pipeline-original-cta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-brutalist {
    background: #333333;
    color: #f0f0f0;
    border: none;
    font-weight: 700;
}
.btn-brutalist:hover:not(:disabled) {
    background: #1a1a1a;
    color: #f0f0f0;
}

.btn-brutalist-outline {
    background: transparent;
    border: 1px solid #333333;
    color: #333333;
    font-weight: 600;
}
.btn-brutalist-outline:hover:not(:disabled) {
    background: #333333;
    color: #f0f0f0;
}

@media (max-width: 768px) {
    .pipeline-original-title { font-size: 22px; }
    .pipeline-original-text { font-size: 15px; }
    .pipeline-original-cta { flex-direction: column; }
    .pipeline-original-cta .btn { width: 100%; }
    .compare-card-dark-body { padding: 14px; }
    .compare-example { font-size: 10px; }
}

/* ---- DOCS PAGE ---- */
.docs-container {
    max-width: 1000px;
    margin: 0 auto;
}
.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}
.page-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}
.docs-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: start;
}
.docs-nav {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.docs-nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}
.docs-nav-link:hover { color: var(--text-secondary); background: var(--border); }
.docs-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.docs-section { scroll-margin-top: 72px; }
.docs-sub-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    margin: 16px 0 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.docs-section p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.7;
}
.docs-section code {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--secondary);
}
.docs-code-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 14px 16px;
    margin: 8px 0 12px;
    overflow-x: auto;
}
.docs-code-block pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--secondary);
    line-height: 1.6;
    white-space: pre;
}
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 12px;
    font-size: 13px;
}
.docs-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.docs-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}
.docs-table code {
    border: none;
    padding: 0;
}
.docs-list {
    padding-left: 20px;
    margin: 8px 0 12px;
}
.docs-list li {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.6;
}
.docs-list li strong { color: var(--text-secondary); }

/* ---- DASHBOARD ---- */
.dash-header {
    margin-bottom: 24px;
}
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.dash-grid > .card:first-child {
    grid-column: 1 / -1;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.stat-item { text-align: center; }
.stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}
.stat-value.secondary { color: var(--secondary); }
.stat-value.success { color: var(--success); }
.stat-value.accent { color: var(--accent); font-size: 16px; }
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.account-info p {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-muted);
}
.account-info strong { color: var(--text-secondary); }
.badge-green {
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
}
.badge-dim {
    color: var(--text-muted);
    font-size: 12px;
}

/* ---- CHAT ---- */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.chat-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
}
.banner-warn {
    background: var(--bg-alt);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    padding: 12px 16px;
    border-radius: 0.35rem;
    font-size: 14px;
    margin-bottom: 16px;
}
.banner-warn a { color: var(--secondary); }
.chat-api-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    margin-bottom: 12px;
}
.chat-provider-select {
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
}
.chat-api-input {
    flex: 1;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
}
.chat-api-input::placeholder { color: var(--fg-dim); }
.chat-api-input:focus {
    outline: none;
    border-color: var(--accent);
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.msg {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 0.35rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}
.msg-user {
    align-self: flex-end;
    border-color: var(--secondary-dim);
}
.msg-assistant {
    align-self: flex-start;
    border-color: var(--accent-dim);
}
.msg-english {
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}
.msg-axl-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.btn-axl-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
}
.btn-axl-toggle:hover { color: var(--secondary); border-color: var(--secondary-dim); }
.tokens-saved {
    font-size: 11px;
    color: var(--success);
    font-family: 'JetBrains Mono', monospace;
}
.msg-axl {
    margin-top: 8px;
    background: var(--bg);
    border-radius: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border);
}
.msg-axl pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--secondary);
    white-space: pre-wrap;
    word-break: break-all;
}
.hidden { display: none; }
.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--secondary);
    font-family: 'JetBrains Mono', monospace;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary);
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.chat-input-bar {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.chat-input-bar textarea {
    flex: 1;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    resize: none;
    max-height: 120px;
}
.chat-input-bar textarea:focus {
    outline: none;
    border-color: var(--secondary-dim);
}
.chat-input-bar textarea:disabled {
    opacity: 0.4;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    /* Nav touch targets */
    .nav-link {
        padding: 10px 16px !important;
    }
    .mobile-link {
        padding: 14px 24px !important;
    }
    .nav-hamburger {
        width: 36px !important;
        height: 36px !important;
    }
    .nav-dropdown {
        min-width: 90vw !important;
    }

    /* Page frame */
    body {
        padding-bottom: 70px !important;
    }
    .main {
        padding: 16px 12px !important;
        max-width: 100% !important;
    }

    /* Footer */
    footer, .footer {
        padding: 16px !important;
        font-size: 10px !important;
    }
    .footer-text {
        font-size: 10px !important;
    }
    .footer-links { display: none; }

    /* Flash messages */
    .flash-container {
        padding: 8px 12px !important;
    }
    .flash-msg {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }

    /* Auth forms (login/register/account) */
    .auth-card, .account-page {
        margin: 0 !important;
        padding: 16px !important;
    }
    .account-card {
        margin-bottom: 12px !important;
    }
    .account-card-body {
        padding: 12px !important;
    }
    .form-input, .form-select {
        font-size: 14px !important;
    }

    /* Stats in account page */
    .stats-row {
        gap: 8px !important;
    }
    .stat-block {
        min-width: 80px !important;
        padding: 8px !important;
    }
    .stat-number {
        font-size: 20px !important;
    }

    /* Pro gate */
    .pro-gate-expand {
        position: fixed !important;
        bottom: auto !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        min-width: 280px !important;
        max-width: 90vw !important;
        z-index: 1000 !important;
    }

    .caveman-grid { grid-template-columns: 1fr !important; }

    /* Hero */
    .hero-section { padding: 16px 0 24px !important; }
    .hero-title { font-size: 20px !important; letter-spacing: 1px; }
    .hero-sub { font-size: 13px !important; max-width: 100% !important; }

    /* Tab bar - scroll horizontally */
    .tab-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
    .tab-pill {
        font-size: 12px !important;
        padding: 6px 16px !important;
        flex-shrink: 0;
    }

    /* Tabs - scroll horizontally if needed */
    .tool-section > div:first-child {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .tool-section > div:first-child button {
        flex-shrink: 0;
        font-size: 12px !important;
        padding: 8px 14px !important;
    }

    /* Panels stack vertically */
    .compress-panels { grid-template-columns: 1fr !important; }
    .panel-textarea { min-height: 150px !important; font-size: 12px !important; }
    .compress-textarea { min-height: 180px; font-size: 12px; padding: 12px; }
    #textPanels { grid-template-columns: 1fr !important; }
    #textPanels textarea { min-height: 180px !important; font-size: 12px !important; }

    /* Toolbar stacks */
    .toolbar { flex-direction: column !important; gap: 10px !important; padding: 10px !important; }
    .toolbar-stats { justify-content: center !important; gap: 8px !important; font-size: 10px !important; }
    .toolbar-controls { flex-wrap: wrap !important; justify-content: center !important; gap: 6px !important; width: 100% !important; }
    .toolbar-select, .toolbar-input { font-size: 11px !important; }
    .toolbar-input { flex: 1 1 100% !important; min-width: 0 !important; }
    #toolbar { flex-wrap: wrap !important; justify-content: center !important; }
    .stat-pill-value { font-size: 9px !important; }
    .stat-pill-label { font-size: 9px !important; }

    /* Buttons full width on mobile */
    .btn { padding: 10px 14px !important; font-size: 12px !important; }

    /* Metrics bar */
    #metricsBar { padding: 12px !important; font-size: 11px !important; }
    #metricsBar > div { gap: 12px !important; }

    /* Decompress API bar */
    #decompress-api-bar { padding: 8px !important; }
    #decompress-api-bar > div:last-child { flex-direction: column !important; gap: 6px !important; }
    #decompress-api-bar select, #decompress-api-bar input { width: 100% !important; }

    /* Mode toggle buttons */
    #panel-text > div:first-child { flex-wrap: wrap !important; gap: 6px !important; }

    /* How it works - stack steps */
    .steps-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .step-card {
        padding: 16px !important;
    }
    .step-num, .step-num-brutalist {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
    }

    /* CTA text */
    .cta-text {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    /* Architecture extras */
    .arch-summary {
        padding: 12px 16px !important;
        font-size: 12px !important;
    }
    .tag-pills {
        gap: 6px !important;
    }
    .tag-pill {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    /* Caveman / compare cards */
    .caveman-card {
        padding: 16px !important;
    }
    .caveman-label {
        font-size: 11px !important;
    }
    .compare-card-body {
        padding: 14px !important;
    }
    .compare-table {
        font-size: 11px !important;
    }

    /* Pipeline card */
    .pipeline-header {
        padding: 12px 16px !important;
    }
    .pipeline-body {
        padding: 16px !important;
    }
    .pipeline-title {
        font-size: 15px !important;
    }
    .pipeline-step {
        font-size: 12px !important;
    }

    /* Metrics */
    .metrics-big {
        font-size: 16px !important;
    }
    .metrics-big-row {
        gap: 16px !important;
    }
    .metrics-cost-row {
        font-size: 11px !important;
    }

    /* Caveman comparison - stack columns */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* CTA card */
    .cta-card, .cta-section > div {
        padding: 20px 16px !important;
    }
    .cta-title {
        font-size: 18px !important;
    }

    /* Scenarios link area */
    .results-section {
        padding: 20px 0 !important;
    }
    .results-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .results-table {
        font-size: 11px !important;
        min-width: 500px !important;
    }

    /* Architecture accordion */
    .arch-details {
        padding: 0 !important;
    }
    .arch-content {
        padding: 12px !important;
    }
    .arch-content h3 {
        font-size: 14px !important;
    }
    .arch-content p {
        font-size: 12px !important;
    }
    .arch-code {
        font-size: 10px !important;
        padding: 10px !important;
        overflow-x: auto !important;
    }

    /* History panel */
    #local-history {
        max-height: 200px !important;
    }

    /* General section padding */
    section, .how-section, .cta-section, .results-section {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* File compress drop zone */
    #drop-zone {
        padding: 30px 16px !important;
    }
    #drop-zone p {
        font-size: 13px !important;
    }

    .cta-banner { padding: 24px 16px; }
    .cta-banner h3 { font-size: 16px; }
    .results-table th { font-size: 9px; padding: 6px 8px; }
    .results-table td { padding: 6px 8px; }
    .dash-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; gap: 10px; }
    .msg { max-width: 95%; }
    .docs-grid { grid-template-columns: 1fr; }
    .docs-nav { position: static; }
    .section-title { font-size: 14px; }
    .scenario-columns { grid-template-columns: 1fr; }
    .scenario-decompressed { font-size: 12px; }
    .scenario-header { padding: 12px 16px; }
    .scenario-number { font-size: 14px; width: 28px; height: 28px; }
    .scenario-title { font-size: 14px; }
    .scenario-col { padding: 14px; }
    .scenario-english { font-size: 13px; }
    .scenario-axl { font-size: 10px; }
    .scenario-stats { flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
    .scenarios-hero .hero-title { font-size: 22px; }

    /* Auth pages */
    .auth-title { font-size: 20px !important; }
    .auth-sub { font-size: 13px !important; }

    /* Account page */
    .account-title { font-size: 18px !important; }
    .info-row { flex-direction: column !important; gap: 4px !important; }
    .info-label { font-size: 12px !important; }
    .info-value { font-size: 12px !important; }

    /* Chat page */
    .chat-container { height: calc(100vh - 120px) !important; }
    .chat-header { flex-wrap: wrap !important; }
    .chat-title { font-size: 16px !important; }
    .chat-api-bar { flex-direction: column !important; }
    .chat-input-bar textarea { font-size: 13px !important; padding: 10px 12px !important; }
    .msg { padding: 10px 14px !important; }
    .banner-warn { font-size: 12px !important; padding: 10px 12px !important; border-radius: 0.35rem !important; }

    /* Docs page */
    .page-title { font-size: 20px !important; }
    .page-sub { font-size: 13px !important; }
    .docs-section p { font-size: 13px !important; }
    .docs-code-block { padding: 10px 12px !important; font-size: 11px !important; }
    .docs-table { font-size: 11px !important; }

    /* Scenarios page */
    .scenarios-page { padding: 0 12px 40px !important; }
    .scenarios-hero { padding: 32px 0 24px !important; }
    .scenario-columns { grid-template-columns: 1fr !important; }
    .scenario-col { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
    .scenario-axl { font-size: 10px !important; padding: 10px !important; }
}

@media (max-width: 480px) {
    .logo-compress { display: none !important; }
    .logo-axl { font-size: 15px !important; }
    .hero-title { font-size: 18px !important; }
    .panel-textarea { min-height: 120px !important; font-size: 11px !important; }
    .stat-pill { padding: 4px 8px !important; font-size: 9px !important; }
}

/* ---- SCENARIOS PAGE ---- */
.scenarios-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 60px;
}
.scenarios-hero {
    text-align: center;
    padding: 48px 0 36px;
}
.scenarios-hero .hero-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--secondary);
    border: 1px solid var(--secondary-dim);
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.scenarios-hero .hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.scenarios-hero .hero-sub {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 16px;
}
.scenarios-back-link {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent-dim);
    padding: 6px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}
.scenarios-back-link:hover {
    background: rgba(96,96,96,0.1);
    border-color: var(--accent);
}
.scenarios-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.scenario-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    overflow: hidden;
    transition: border-color 0.2s;
}
.scenario-card:hover {
    border-color: var(--accent-dim);
}
.scenario-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(96,96,96,0.03);
}
.scenario-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(51,51,51,0.1);
    border: 1px solid var(--accent-dim);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}
.scenario-title {
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1px;
}
.scenario-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
.scenario-col {
    padding: 16px 20px;
}
.scenario-col:not(:last-child) {
    border-right: 1px solid var(--border);
}
.scenario-label-decompressed {
    color: #3b82f6;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
}
.scenario-decompressed {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}
.roundtrip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #22c55e;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.25);
}
.scenario-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
}
.scenario-label-english {
    color: var(--accent);
    background: rgba(251,146,60,0.1);
    border: 1px solid rgba(251,146,60,0.2);
}
.scenario-label-axl {
    color: var(--success);
    background: rgba(96,96,96,0.1);
    border: 1px solid rgba(96,96,96,0.2);
}
.scenario-english {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}
.scenario-axl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.8;
    color: var(--success);
    background: rgba(96,96,96,0.04);
    border: 1px solid rgba(96,96,96,0.1);
    border-radius: 6px;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-all;
}
.scenario-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: rgba(240,240,240,0.5);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
}
.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}
.stat-highlight {
    color: var(--accent);
    font-weight: 700;
}
.scenario-try {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}
.scenario-try:hover {
    background: rgba(51,51,51,0.08);
    color: var(--accent-hover);
}


/* ---- BRUTALIST STEP NUMBERS ---- */
.step-num-brutalist {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #333333;
    color: #f0f0f0;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 12px;
}

.step-title-brutalist {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* ---- COMPARE CARDS (Token Stripping vs AXL) ---- */
.compare-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    overflow: hidden;
}

.compare-card-header {
    padding: 12px 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    text-align: center;
}

.compare-card-header-bad {
    background: #555555;
    color: var(--danger);
}

.compare-card-header-good {
    background: #555555;
    color: #f0f0f0;
}

.compare-card-body {
    padding: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 16px;
}

.compare-table td {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.compare-table td:first-child {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.compare-val {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 11px;
}

.compare-val-bad { color: var(--danger); }
.compare-val-good { color: #333333; font-weight: 700; }

.compare-verdict {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    padding-top: 4px;
}

.compare-verdict-bad { color: var(--text-muted); }
.compare-verdict-good { color: #333333; font-weight: 600; }

.compare-card-faded {
    opacity: 0.75;
}

.compare-card-featured {
    border-color: #555555;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.compare-critique {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    font-style: italic;
}

.compare-pitch {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    font-weight: 500;
}

/* ---- PIPELINE CARD (Chat CTA) ---- */
.pipeline-card {
    background: #636363;
    border: 1px solid #555555;
    border-radius: 0.35rem;
    overflow: hidden;
}

.pipeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #555555;
}

.pipeline-badge {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1a1a1a;
    background: #fbbf24;
    padding: 3px 10px;
    border-radius: 4px;
}

.pipeline-badge-brutalist {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #f0f0f0;
    background: #333333;
    padding: 3px 10px;
    border-radius: 4px;
}

.pipeline-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #f0f0f0;
}

.pipeline-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #a0a0a0;
    letter-spacing: 1px;
}

.pipeline-body {
    padding: 24px;
}

.pipeline-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.pipeline-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: #d0d0d0;
    font-size: 13px;
    line-height: 1.6;
}

.pipeline-step strong {
    color: #f0f0f0;
    display: block;
    margin-bottom: 2px;
}

.pipeline-step p {
    margin: 0;
    color: #a0a0a0;
    font-size: 12px;
}

.pipeline-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fbbf24;
    color: #1a1a1a;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.pipeline-step-num-brutalist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333333;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.pipeline-cta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pipeline-cta .btn-dim {
    color: #d0d0d0;
    border-color: #a0a0a0;
}

.pipeline-cta .btn-dim:hover {
    color: #f0f0f0;
    border-color: #f0f0f0;
    background: transparent;
}

@media (max-width: 768px) {
    .pipeline-cta { flex-direction: column; }
    .pipeline-cta .btn { width: 100%; }
}

/* ---- REBUILT TEMPLATE STYLES ---- */

.tab-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    color: #a0a0a0;
    transition: color 0.2s;
}
.panel-icon-btn:hover { color: #f0f0f0; }

.mono-sm {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Results section header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.results-empty-text {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 12px;
}

/* History items */
.history-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.history-item:hover { background: var(--bg-alt); }
.history-item:last-child { border-bottom: none; }

.history-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.history-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.history-ratio {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--success);
    font-weight: 700;
}

.history-tokens {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-secondary);
}

.history-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
}

/* Caveman comparison cards */
.caveman-card {
    text-align: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 24px 20px;
}

.caveman-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}
.caveman-label-bad { color: var(--danger); }
.caveman-label-good { color: var(--success); }

.caveman-verdict {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.caveman-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.caveman-vs-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: var(--accent);
}

/* Metrics rows */
/* ---- METRICS DISPLAY ---- */
.metrics-block {
    margin-bottom: 16px;
}

.metrics-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #909090;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.metrics-big-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.metrics-big {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.metrics-big-highlight {
    color: #333333;
}

.metrics-unit {
    font-size: 11px;
    color: #909090;
}

.metrics-cost-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #909090;
}

.metrics-cost-row strong {
    color: #333333;
}

.metrics-structure-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #909090;
}

.metrics-structure-row strong {
    color: #1a1a1a;
    font-weight: 700;
}

.metrics-roundtrip strong {
    color: #fbbf24;
}

.metrics-raw {
    font-size: 11px;
    color: #909090;
}

.metrics-scale {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d0d0d0;
    font-size: 11px;
    color: #666666;
}

.metrics-scale strong {
    color: #1a1a1a;
}

.tab-pill {
    padding: 8px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    background: #ececec;
    color: #909090;
}
.tab-pill.active, .tab-pill:hover {
    background: #333333;
    color: #f0f0f0;
}

#textPanels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #555555;
    border: 1px solid #555555;
    border-radius: 0.35rem;
    overflow: hidden;
    margin-bottom: 0;
}

#textPanels > div {
    background: #636363;
    display: flex;
    flex-direction: column;
}

#textPanels textarea {
    flex: 1;
    background: #555555;
    border: none;
    color: #f0f0f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    padding: 16px;
    resize: none;
    outline: none;
    min-height: 280px;
}

#textPanels textarea::placeholder {
    color: #a0a0a0;
}

#toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: #ececec;
    border: 1px solid #d0d0d0;
    border-top: none;
    border-radius: 0 0 0.35rem 0.35rem;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #909090;
}

.stat-pill strong {
    color: #333333;
    font-weight: 700;
}

#metricsBar {
    padding: 16px;
    background: #ececec;
    border: 1px solid #d0d0d0;
    border-top: none;
    border-radius: 0 0 0.35rem 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

#decompressModeBar {
    background: #ececec;
    border-radius: 0.35rem;
    padding: 12px 16px;
    margin-bottom: 16px;
}

#filePanel {
    padding: 40px 20px;
    text-align: center;
}

#fileDrop {
    border: 2px dashed #d0d0d0;
    border-radius: 0.35rem;
    padding: 48px 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0,0,0,0.02);
}

#fileDrop:hover, #fileDrop.dragover {
    border-color: #fbbf24;
    background: rgba(251,191,36,0.04);
}

/* Steps grid */
.steps-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.step-new {
    background: #ececec;
    border: 1px solid #d0d0d0;
    border-radius: 0.35rem;
    padding: 20px;
    text-align: center;
}

/* Caveman comparison */
.caveman-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* CTA */
.cta-new {
    background: #ececec;
    border: 1px solid #d0d0d0;
    border-radius: 0.35rem;
    padding: 32px;
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    #textPanels { grid-template-columns: 1fr; }
    #textPanels textarea { min-height: 180px; font-size: 12px; }
    #toolbar { flex-wrap: wrap; justify-content: center; gap: 10px; padding: 10px; }
    .stat-pill-value { font-size: 9px; }
    .stat-pill-label { font-size: 9px; }
    .steps-grid-new { grid-template-columns: 1fr; }
    .caveman-grid { grid-template-columns: 1fr; }
    .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; flex-wrap: nowrap; }
    .tab-pill { font-size: 12px; padding: 6px 16px; flex-shrink: 0; }
    #fileDrop { padding: 30px 16px; }
    .cta-new { padding: 20px 16px; }
}

@media (max-width: 480px) {
    #textPanels textarea { min-height: 120px; font-size: 11px; }
    .stat-pill { font-size: 9px; padding: 3px 8px; }
}
