/*
 * Shared styling for the document pages: privacy.html and contact.html.
 *
 * The landing page is deliberately one self-contained file, and these are not.
 * Two documents that must look identical to each other, and that will be edited
 * by hand for years, drift the moment the palette lives in both of them. It is
 * still one request to our own origin: the promise on the privacy page is that
 * nothing loads from a third party, and that stays true.
 *
 * Tokens are copied from index.html rather than imported, because index.html
 * has no stylesheet to import from. If a colour changes there, change it here.
 */
html { font-size: 18px; }

:root {
  --ground:      #FBFAF7;
  --ground-2:    #F3F0E9;
  --ink:         #191713;
  --ink-2:       #56514A;
  --ink-3:       #726B60;
  --rule:        #E3DED2;
  --rule-soft:   #EEEAE0;
  --accent:      #C2410C;
  --accent-deep: #9A3412;   /* the accent at a contrast ratio text can use */
  --night-accent: #F97316;  /* and the step that survives on a near-black panel */   /* the accent at a contrast ratio text can use */

  --f-display: Fraunces, "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --f-body:    "Instrument Sans", "Instrument Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 52rem;

  /* Light for everyone, like the landing page, so the brand looks the same to
     every reader and the browser leaves form controls and scrollbars alone. */
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── the bar at the top, same as the landing page ─────────────────────── */
.brandline {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding-block: 1.75rem 0;
}
.brandline a.mark {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
/* Set apart from .back on purpose: this describes the company, it is not a
   place to go. Same reasoning as the home page. */
.brandline span {
  font-family: var(--f-display);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}
.brandline .back {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}
.brandline .back:hover { color: var(--ink); border-color: var(--accent); }
@media (max-width: 30rem) {
  .brandline { flex-wrap: wrap; gap: 0.5rem 0.9rem; }
  .brandline span { flex: 1 0 100%; order: 3; }
}

/* ── type ─────────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
}

h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; }
h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}
h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 26ch;
}
h3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
}

p, li { max-width: 66ch; }
p { margin: 1rem 0 0; }
.lede {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: 1.25rem;
}
.dim { color: var(--ink-2); }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-deep); }
a:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

code, .mono { font-family: var(--f-mono); font-size: 0.86em; }
code { background: var(--ground-2); padding: 0.1em 0.35em; border-radius: 2px; word-break: break-word; }

/* ── page head ────────────────────────────────────────────────────────── */
.pagehead { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.stamp {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

/* ── the plain-language box ───────────────────────────────────────────── */
.summary {
  margin-top: 2.5rem;
  background: var(--ground-2);
  border-left: 2px solid var(--accent);
  padding: 1.5rem clamp(1.1rem, 3vw, 1.75rem);
}
.summary h2 { font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.summary ul { margin: 0.9rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.summary li { font-size: 0.95rem; color: var(--ink-2); }
.summary li b { color: var(--ink); }
.summary p:last-child { font-size: 0.875rem; color: var(--ink-3); }

/* ── contents ─────────────────────────────────────────────────────────── */
.toc {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 1.25rem;
}
.toc ol {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2.5rem;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
}
.toc li { margin-bottom: 0.45rem; break-inside: avoid; max-width: none; }
.toc a { text-decoration: none; border-bottom: 1px solid transparent; }
.toc a:hover { border-bottom-color: var(--accent); }
.toc .n { color: var(--ink-3); margin-right: 0.5rem; }
@media (max-width: 34rem) { .toc ol { columns: 1; } }

/* ── sections ─────────────────────────────────────────────────────────── */
main { padding-bottom: 4rem; }
section.doc { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
section.doc > h2 { display: flex; gap: 0.85rem; align-items: baseline; max-width: none; }
section.doc > h2 .n {
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  flex: none;
}
section.doc h3 { margin-top: 1.75rem; }
section.doc ul { margin: 1rem 0 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.5rem; }
section.doc ul li { color: var(--ink-2); }
section.doc ul li b, section.doc p b { color: var(--ink); }

/* ── tables ───────────────────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; margin-top: 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 33rem; font-size: 0.9375rem; }
th, td { text-align: left; padding: 0.7rem 1.25rem 0.7rem 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
th {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}
td { color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 600; width: 30%; }

/* ── the deletion block, which Meta links to directly ─────────────────── */
.callout {
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  padding: 1.4rem clamp(1.1rem, 3vw, 1.6rem);
  background: #FFFFFF;
}
.callout h3 { margin-top: 0; }
.callout ol { margin: 1rem 0 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; }
.callout ol li { color: var(--ink-2); }

/* An anchored section should not land with its heading against the top edge. */
:target { scroll-margin-top: 1.5rem; }

/* ── contact cards ────────────────────────────────────────────────────── */
.cards {
  margin-top: 2.5rem;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card { background: var(--ground); padding: 1.4rem 1.25rem 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card .eyebrow { margin: 0; }
.card p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.card a.big { font-family: var(--f-mono); font-size: 0.9375rem; word-break: break-word; }

/* ── footer, same as the landing page ─────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3.5rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}
footer a { color: var(--ink-3); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
footer a:hover { color: var(--ink); border-color: var(--accent); }
footer nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
