/* ===========================================
   Base element styling
   Replaces the typography / link / button / table base that PicoCSS
   used to provide. modern-normalize handles the low-level reset
   (box-sizing, margins, form font inheritance); this layer applies the
   Collony design language (Geist, role tokens, weight 400 headings).
   Token-only — no hardcoded colors.
   =========================================== */

/* Self-hosted Geist (variable, all weights in one file) — no external request.
   OFL licensed (see static/fonts/Geist-OFL.txt). Replaces the Google Fonts CDN. */
@font-face {
    font-family: 'Geist';
    src: url('/static/fonts/Geist-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings — Geist, light weight (never Pico's 700) */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.2px;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }

a {
    color: var(--c-secondary);
    text-decoration: none;
    transition: color var(--dur-fast) ease;
}
a:hover { text-decoration: underline; }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

strong, b { font-weight: 600; }

small { font-size: 0.85em; }

img, svg, video { max-width: 100%; height: auto; }
svg { height: revert; } /* icon sprites set their own dimensions */

/* Code */
code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}
code {
    background: var(--surface-alt);
    padding: 0.1em 0.4em;
    border-radius: var(--r-sm);
    color: var(--text-primary);
}
pre {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1rem;
    overflow-x: auto;
}
pre code { background: none; padding: 0; }

/* Kill native button chrome (modern-normalize leaves the OS "white raised button"
   look on backgroundless buttons now that Pico is gone). Component classes layer
   their own appearance on top; classless buttons get the ghost default below. */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: inherit;
}
button:disabled { cursor: not-allowed; }

/* Default look for classless <button> / link-buttons that used to rely on
   Pico's default styling. Placed in reset.css (before forms/layout) so more
   specific container rules (.mute-options button, .top-nav … button, .btn-*)
   still win. Ghost appearance — most bare buttons are secondary actions. */
button:not([class]),
a[role="button"]:not([class]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
button:not([class]):hover,
a[role="button"]:not([class]):hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

/* Tables — base reset; components/tables.css supplies the skin */
table {
    border-collapse: collapse;
    width: 100%;
}

/* Selection + focus ring (Pico used to provide these) */
::selection {
    background: var(--c-secondary-ghost);
    color: var(--text-primary);
}
:focus-visible {
    outline: 2px solid var(--c-secondary);
    outline-offset: 2px;
}
