/* The public site's only stylesheet. No external fonts, no scripts. */

:root {
  color-scheme: light dark;
  --bg: #fbf6f0;
  --surface: #fffdf9;
  --text: #2a1424;
  --muted: #6e5866;
  --accent: #c2185b;
  --accent-strong: #9c1149;
  --on-accent: #ffffff;
  --line: #ecdde2;
  --todo-bg: #fff0a8;
  --todo-text: #4d3a00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #180b14;
    --surface: #23111d;
    --text: #f6eaef;
    --muted: #c7b0bc;
    --accent: #f48fb1;
    --accent-strong: #f8bbd0;
    --on-accent: #180b14;
    --line: #3b2232;
    --todo-bg: #5a4300;
    --todo-text: #fff2c4;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-strong); }

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
}
.skip:focus { top: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
.brand::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  background: url("/favicon.svg") center / contain no-repeat;
}
.brand:hover { color: var(--text); }

.lang {
  display: flex;
  gap: 6px;
  font-size: 0.9rem;
}
.lang a,
.lang span {
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
}
.lang span {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.lang a {
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Content (main.wrap, so .wrap's padding shorthand does not undo it) */
main.wrap {
  padding-top: 32px;
  padding-bottom: 48px;
}

h1, h2, h3 {
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.25;
}
h1 { margin: 0 0 8px; font-size: 2rem; }
h2 { margin: 2.2em 0 0.6em; font-size: 1.4rem; }
h3 { margin: 1.6em 0 0.4em; font-size: 1.12rem; }

p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.3em 0; }

.updated {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.lead {
  color: var(--muted);
  font-size: 1.2rem;
}

.summary {
  margin: 24px 0;
  padding: 4px 20px 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}
.summary h2 {
  margin-top: 0.8em;
  font-size: 1.15rem;
}

.toc {
  margin: 24px 0 8px;
  font-size: 0.95rem;
}
.toc ol { padding-left: 1.5em; }
.toc li { margin: 0.15em 0; }

.table-wrap {
  margin: 0 0 1em;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { font-weight: 600; }

.lettered {
  padding-left: 0;
  list-style: none;
}

.faq dt {
  margin-top: 1.2em;
  font-weight: 600;
}
.faq dd { margin: 0.3em 0 0; }

/* Open-source licenses page: a name, its copyright lines, and license texts as written. */
h3.notice-name {
  margin: 1.4em 0 0.2em;
  font-family: inherit;
  font-size: 1rem;
}
p.notice {
  margin: 0 0 0.6em;
  color: var(--muted);
  font-size: 0.9rem;
}
pre.license {
  margin: 0 0 1em;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: 0.8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* A value the owner or a lawyer must still fill in or confirm. */
mark.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--todo-bg);
  color: var(--todo-text);
  font-size: 0.9em;
  font-weight: 600;
}

/* Home page */
.cards {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}
.cards li { margin: 0; }
.cards a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.cards a:hover { border-color: var(--accent); }
.cards strong {
  display: block;
  color: var(--accent);
  font-size: 1.05rem;
}

.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { color: var(--on-accent); }

/* Footer */
.site-footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 0;
  list-style: none;
}
.footer-links li { margin: 0; }
.footer-links a {
  display: inline-block;
  padding: 6px 0;
}
.fine { font-size: 0.85rem; }

@media (max-width: 480px) {
  body { font-size: 16.5px; }
  h1 { font-size: 1.7rem; }
}
