/* ==========================================================================
   Base — reset, typography, focus, utilities
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

h1,
h2,
h3,
h4 {
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
}

::selection {
    background: rgba(167, 139, 250, 0.35);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Icons (sprite: assets/icons.svg) */
.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon--sm {
    width: 14px;
    height: 14px;
}

.icon--lg {
    width: 20px;
    height: 20px;
}

/* Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: var(--text);
    color: var(--bg);
    font-weight: 500;
    transform: translateY(-150%);
    transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
    transform: none;
}

.muted {
    color: var(--text-muted);
}

.subtle {
    color: var(--text-subtle);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

[hidden] {
    display: none !important;
}
