/* ═══════════════════════════════════════════════════
   Base — Reset, Typography, Utilities
   ═══════════════════════════════════════════════════ */

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

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
}

body {
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Utility Classes ── */
.hidden       { display: none !important; }
.flex         { display: flex; }
.items-center { align-items: center; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full   { width: 100%; }
.mt-4     { margin-top: 16px; }
.mb16     { margin-bottom: 16px; }
.p-0      { padding: 0 !important; }
.text-center { text-align: center; }

.page-header-right {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}

.clickable {
    cursor: pointer;
    transition: opacity 0.2s var(--ease-out);
}
.clickable:hover { opacity: 0.8; }

/* ── Page-Level Typography ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}
.page-hl {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 4px;
    font-family: var(--font);
}
.page-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -.4px;
    font-family: var(--font);
}
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

/* ── Grids ── */
.g2  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.g3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.g4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.g32 { display: grid; grid-template-columns: 1.8fr 1fr; gap: 16px; margin-bottom: 16px; }
.g23 { display: grid; grid-template-columns: 1fr 1.8fr; gap: 16px; margin-bottom: 16px; }
.g13 { display: grid; grid-template-columns: 1.2fr 2.8fr; gap: 16px; margin-bottom: 16px; }

/* ── Code Inline ── */
code {
    font-family: var(--mono);
    font-size: 12px;
    background: var(--bg2);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--teal);
    font-weight: 500;
}

/* ── Custom Scrollbar (inner panels) ── */
.inner-scroll { overflow-y: auto; padding-right: 4px; }
.inner-scroll::-webkit-scrollbar { width: 4px; }
.inner-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ── Keyframes ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .5; transform: scale(.85); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.blink {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}
