/* The legal pages (terms.html, privacy.html): the website's legal rules
   (src/styles/global.css .legal-doc, .legal a) on its palette (tokens.css),
   written out because these pages load nothing of the web app. */

@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap;
             src: url("/legal/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 100 900; font-display: swap;
             src: url("/legal/fonts/outfit-latin-wght-normal.woff2") format("woff2"); }

:root { color-scheme: light; --bg: #f3eee6; --ink: #1b1917; --ink2: #4c463d; --muted: #6e6959; --coral: #d8432c;
        /* One type pixel: the reader's text size moves it, up to twice. */
        --u: min(calc(1rem / 16), 2px); }
:root[data-theme="dark"] { color-scheme: dark;
        --bg: #0f0c0b; --ink: #f0ede6; --ink2: #c6c0b4; --muted: #9a9384; --coral: #ff6a4d; }
/* iOS: the root follows Dynamic Type (17 at the default size), in Safari and in the app's sheet. */
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; }
  :root { --u: min(calc(1rem / 17), 2px); }
}

/* Both languages are on the page; legal.js names the reader's on <html> before the first paint. */
html[lang="it"] article[lang="en"], html[lang="en"] article[lang="it"] { display: none; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "Instrument Sans", system-ui, sans-serif;
       font-size: calc(15 * var(--u)); line-height: 1.45; -webkit-font-smoothing: antialiased; }
main { max-width: 560px; margin-inline: auto;
       padding: 24px max(16px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom))
                max(16px, env(safe-area-inset-left)); }

/* The page word (.feed-day-word at --t-page), then the detail page's reading voice. */
h1 { font-family: "Outfit", system-ui, sans-serif; font-weight: 600; font-size: clamp(calc(25 * var(--u)), 6.7vw, calc(28 * var(--u)));
     letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
article { font-size: calc(15 * var(--u)); line-height: 1.6; color: var(--ink2); }
article h1 + * { margin-top: 24px; }
article p { text-wrap: pretty; }
article p + p { margin-top: 16px; }
article h2 { font-family: "Outfit", system-ui, sans-serif; font-weight: 600; font-size: calc(17 * var(--u));
             letter-spacing: -0.02em; color: var(--ink); margin-top: 32px; margin-bottom: 8px; text-wrap: balance; }
article h2::first-letter { text-transform: uppercase; }
article ul { margin: 16px 0; padding-left: 24px; }
article li + li { margin-top: 8px; }
.legal-date { font-size: calc(13 * var(--u)); color: var(--muted); }

/* A link: ink, 600, underlined in coral. */
a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--coral);
    text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
