/* Shared look for the legal pages: paper, ink and wine, like the app
   (mobile/src/ui/theme.ts). Newsreader for headings, Instrument Sans for text.
   Fonts are served from this site, not from Google Fonts: loading them from
   Google would send every visitor's IP address to Google (LG München I,
   3 O 17493/20). All three are SIL Open Font License, see fonts/OFL-*.txt. */
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --sunken: #F2EDE5;
  --ink: #1C1A19;
  --secondary: #5A544E;
  --muted: #756D64;
  --border: #E4DCD1;
  --accent: #7A2E3C;
  --accent-soft: #F3E9EA;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120F;
    --surface: #1E1B17;
    --sunken: #27231D;
    --ink: #F2EDE6;
    --secondary: #C6BDB2;
    --muted: #AAA094;
    --border: #39322A;
    --accent: #D17C91;
    --accent-soft: #35232A;
  }
}
:root[data-theme="dark"] {
  --bg: #14120F;
  --surface: #1E1B17;
  --sunken: #27231D;
  --ink: #F2EDE6;
  --secondary: #C6BDB2;
  --muted: #AAA094;
  --border: #39322A;
  --accent: #D17C91;
  --accent-soft: #35232A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 680px;
  padding: 40px 16px 80px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding-bottom: 14px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
nav .brand {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-right: auto;
}
nav a { color: var(--secondary); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
h1, h2, h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
}
h1 { font-size: 2.1rem; margin: 0 0 0.2em; }
h2 { font-size: 1.35rem; margin: 2.2em 0 0.4em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 0.3em; }
a { color: var(--accent); }
.lede {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.45;
  margin: 0.6em 0 1.2em;
}
.updated { color: var(--muted); font-size: 0.85rem; margin: 0; }
.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 18px;
  margin: 1.2em 0;
}
.box ul { padding-left: 1.1em; }
ul { padding-left: 1.2em; }
li { margin: 0.25em 0; }
.table-wrap { overflow-x: auto; margin: 1em 0; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  line-height: 1.45;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
th {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.contact { font-size: 1.1rem; font-weight: 600; }
.todo {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 4px;
  border-radius: 4px;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.85em;
}
.links { list-style: none; padding: 0; }
.links li { margin: 0; border-bottom: 1px solid var(--border); }
.links a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.2rem;
}
.links small { display: block; color: var(--muted); font-family: "Instrument Sans", sans-serif; font-size: 0.85rem; }
address { font-style: normal; }
footer {
  margin-top: 56px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
footer a { color: var(--muted); }

/* Contact form */
.contact-form { display: grid; gap: 16px; margin: 24px 0; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form label small { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%; box-sizing: border-box;
}
.contact-form button {
  justify-self: start; font: inherit; font-weight: 600; color: var(--bg); background: var(--accent);
  border: 0; border-radius: 12px; padding: 12px 24px; cursor: pointer;
}
.contact-form .hp { position: absolute; left: -9999px; }
.notice { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
