/* ==========================================================================
   Nocturne — base: page, typography, links, focus, selection, scrollbars,
   small text helpers (.lbl eyebrow, .cap caption, .hint), reduced motion.
   Spec §1.6, §1.11, §1.12.
   ========================================================================== */

html { background: var(--bg); }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
*, *::before, *::after { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text);
    font-family: var(--font);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.25;
}
h1, .h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.025em; line-height: 1.05; }
h2, .h2 { font-size: 22px; letter-spacing: -.015em; }
h3, .h3 { font-size: 19px; }
h4, .h4 { font-size: 17px; }
h5, .h5 { font-size: 15px; }
h6, .h6 { font-size: 13px; }
p { line-height: 1.55; }
b, strong { font-weight: 600; }
small, .small { font-size: 12px; }
hr { border-color: var(--line); opacity: 1; }

a { color: var(--lav-ink); text-decoration: none; transition: color var(--dur-2); }
a:hover { color: var(--text); }

code, kbd, pre, samp { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; }
code { color: var(--rose-ink); }
pre { color: var(--text-2); }
kbd { background: var(--surface-3); color: var(--text); border-radius: 6px; padding: 1px 6px; }
blockquote { color: var(--text-2); }
mark, .mark { background: var(--pch-deep); color: var(--text); border-radius: 4px; }

:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }
::selection { background: var(--lav-glow); color: var(--text); }

/* Thin themed scrollbars (Firefox + WebKit) */
* { scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--subtle); }

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

/* Eyebrow, caption, hint */
.lbl { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--subtle); }
.cap { font-size: 12px; color: var(--subtle); }
.hint { font-size: 12px; color: var(--subtle); }
.hint.err { color: var(--rose-ink); }
.tnum { font-variant-numeric: tabular-nums; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
@keyframes sh { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

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