/*
 * Base typography and element styles of the application pages.
 * Load it after tokens.css. Do not load it in a page with its own chrome: it styles body,
 * headings and links.
 *
 * Source: design-system/styles/ in the _conventions repository. A copy in a product
 * repository is a derived file. Change the rule there first, then run the sync script.
 */

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

/* The hidden attribute wins over a class that sets display (btn, badge, d-flex). */
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: var(--font-text);
    line-height: 1.52;
    color: var(--ink);
    background: var(--paper);
}

/* Display headings are uppercase. Level three and below stay in sentence case. */
h1, h2 {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -.012em;
    line-height: 1.05;
    margin: 0 0 var(--space-3);
}
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h3, h4 {
    font-weight: 600;
    letter-spacing: -.005em;
    line-height: 1.25;
    margin: 0 0 var(--space-2);
}
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 var(--space-3); }

a { color: var(--ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* No ligatures in code: the font would draw -> as an arrow. */
code, pre, kbd { font-family: var(--font-mono); font-size: .9em; font-variant-ligatures: none; }
:not(pre) > code {
    padding: .1em .35em;
    border-radius: 4px;
    background: var(--paper-raise);
}
pre {
    margin: 0 0 var(--space-3);
    padding: 13px 15px;
    border-radius: var(--radius-card);
    background: #131613;
    color: #F2F5F1;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

hr {
    margin: var(--space-4) 0;
    border: 0;
    border-top: 1px solid var(--line);
}

/* Small label above a heading: wide-tracked uppercase in a muted ink, never in mint */
.eyebrow {
    margin: 0 0 var(--space-2);
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--ink-3);
    font-weight: 500;
    font-size: .72rem;
}
.lead { font-size: 1.15rem; color: var(--ink-2); }
.text-muted { color: var(--ink-3); }
.small { font-size: .875rem; }

/* Every interactive element gets the same focus ring: an ink outline that holds 3:1
   on paper and on mint, plus a mint halo. */
:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
