/*
 * The legal pages (written by web/scripts/build.mts): the app's legal screen
 * as a page, linen by day and the green-black after dark, as the app is.
 */

@font-face {
  font-family: 'Fraunces';
  src: url('fonts/Fraunces-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F6F1EA;
  --text: #1E2B2A;
  --muted: #55605E;
  --accent: #2E6B5C;
  --border: rgba(30, 43, 42, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111816;
    --text: #EEF2EF;
    --muted: #A3AFAB;
    --accent: #7FC2AE;
    --border: rgba(238, 242, 239, 0.1);
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.bar,
.doc,
.doc-foot {
  box-sizing: border-box;
  max-width: 44rem;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.bar {
  padding-top: 20px;
  padding-bottom: 8px;
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}

h1,
h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
}

h1 {
  margin: 16px 0 6px;
  font-size: clamp(32px, 7vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 {
  margin: 36px 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

p,
li {
  white-space: pre-line;
}

p {
  margin: 0 0 12px;
}

.updated,
.basis {
  color: var(--muted);
  font-size: 15px;
}

.updated {
  margin-bottom: 24px;
}

ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.doc {
  padding-bottom: 40px;
}

.doc-foot {
  padding-top: 20px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.doc-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 15px;
}

.doc-foot a[aria-current='page'] {
  color: var(--muted);
  text-decoration: none;
}
