@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&display=swap');

/* Chwma — legal pages, in the "Night Line" palette */
:root {
    color-scheme: dark;
    --ground: #16171a;
    --surface: #1e1f23;
    --line: #2e3035;
    --text: #ffffff;
    --muted: #b4b4b4;
    --accent-strong: #ffb224;
}

/* light theme (set by /js/ui/theme.js, same choice as the app) */
:root[data-theme='light'] {
    color-scheme: light;
    --ground: #f3f3f3;
    --surface: #ffffff;
    --line: #e3e3e3;
    --text: #111111;
    --muted: #555555;
    --accent-strong: #9a5b00;
}

/* accent colour for text and focus rings (same choice as the app; values from chwma.css; a custom
   colour is set inline by /js/ui/theme.js) */
:root[data-accent='teal'] {
    --accent-strong: #2fd3b5;
}

:root[data-accent='blue'] {
    --accent-strong: #5cb1ff;
}

:root[data-accent='violet'] {
    --accent-strong: #b897ff;
}

:root[data-accent='rose'] {
    --accent-strong: #ff7fa6;
}

:root[data-theme='light'][data-accent='teal'] {
    --accent-strong: #00766a;
}

:root[data-theme='light'][data-accent='blue'] {
    --accent-strong: #0b62c4;
}

:root[data-theme='light'][data-accent='violet'] {
    --accent-strong: #6d3fd4;
}

:root[data-theme='light'][data-accent='rose'] {
    --accent-strong: #c0245a;
}

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

body {
    margin: 0;
    padding: 24px 16px 48px;
    font-family: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--ground);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

main {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 40px;
    background: var(--surface);
    border-radius: 24px;
}

h1,
h2 {
    margin: 0;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 {
    font-size: 32px;
    line-height: 1.15;
    margin-bottom: 16px;
}

h2 {
    margin-top: 32px;
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 1.3;
}

p,
li {
    color: var(--muted);
    max-width: 68ch;
}

a {
    color: var(--text);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-strong);
}

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

@media (max-width: 600px) {
    main {
        padding: 24px 20px;
        border-radius: 20px;
    }

    h1 {
        font-size: 26px;
    }
}
