/* Smith Center — styles for the standalone legal pages (terms.html, privacy.html).
   The main site inlines everything inside its bundled payload; these two pages
   are plain static HTML, so they share this sheet instead. Colours, type and
   breakpoints follow index.html. */

/* Archivo is a variable font: one file covers 400-700. Both faces are the
   latin subsets lifted out of the index.html bundle, so nothing is fetched
   from a third party. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/space-mono-latin-400.woff2") format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-mono-latin-700.woff2") format('woff2');
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Archivo, Helvetica, sans-serif;
  color: #2E2A24;
  background: #F4F1EA;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Same link treatment as index.html. */
a { color: #453F35; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #B0693F; }
::selection { background: #B0693F; color: #F4F1EA; }
img, iframe { max-width: 100%; }

.pad { max-width: 1180px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.mono {
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── The nine-square mark ────────────────────────────────────────────
   Drawn with positioned divs rather than an <img> so it matches the
   header and footer of index.html exactly. See tools/apply_branding.py. */
.mark { position: relative; flex: none; }
.mark i { position: absolute; width: 18.75%; height: 18.75%; background: var(--ink); }
.mark i:nth-child(1) { left: 15.625%; top: 15.625%; }
.mark i:nth-child(2) { left: 40.625%; top: 15.625%; }
.mark i:nth-child(3) { left: 65.625%; top: 15.625%; }
.mark i:nth-child(4) { left: 15.625%; top: 40.625%; }
.mark i:nth-child(5) { left: 40.625%; top: 40.625%; }
.mark i:nth-child(6) { left: 65.625%; top: 40.625%; }
.mark i:nth-child(7) { left: 15.625%; top: 65.625%; }
.mark i:nth-child(8) { left: 65.625%; top: 65.625%; }
.mark i:nth-child(9) { left: 40.625%; top: 65.625%; height: 34.375%; background: #B0693F; }

/* ── Header ─────────────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: #F4F1EA; border-bottom: 1px solid #DAD3C6;
}
.hdr .pad {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo .mark { --ink: #F4F1EA; width: 46px; height: 46px; background: #2E2A24; border: 1px solid #DAD3C6; }
.logo-name {
  font-weight: 600; letter-spacing: -0.012em; font-size: 17px; line-height: 0.95; color: #2E2A24;
}
.logo-sub { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #7B7160; }
.hdr nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.navlink {
  padding: 8px 4px; margin: 0 8px;
  font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: #2E2A24; text-decoration: none; border-bottom: 1px solid transparent;
}
.navlink:hover, .navlink[aria-current="page"] { border-bottom-color: #B0693F; }
.callbtn {
  margin-left: 14px; background: #2E2A24; color: #F4F1EA; border: 1px solid #2E2A24;
  padding: 11px 18px; font-weight: 600; letter-spacing: -0.012em; font-size: 16px; text-decoration: none;
}

/* ── Title block ────────────────────────────────────────────────────── */
.title { border-bottom: 1px solid #DAD3C6; }
.title .pad { padding-top: 56px; padding-bottom: 40px; }
.eyebrow { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #7B7160; }
h1 { font-weight: 600; letter-spacing: -0.012em; font-size: 42px; line-height: 1.05; margin: 14px 0 18px; }
.lede { font-size: 19px; line-height: 1.55; color: #4A453C; max-width: 34em; }
.stamp {
  margin-top: 22px; display: flex; gap: 26px; flex-wrap: wrap;
  font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #7B7160;
}

/* ── Body: sticky contents rail beside the prose ────────────────────── */
.doc { padding-top: 46px; padding-bottom: 64px; display: grid; grid-template-columns: 220px 1fr; gap: 52px; align-items: start; }
.toc { position: sticky; top: 96px; }
.toc-head { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #7B7160; padding-bottom: 12px; border-bottom: 1px solid #DAD3C6; }
.toc ol { list-style: none; counter-reset: toc; margin-top: 12px; }
.toc li { counter-increment: toc; }
.toc a {
  display: block; padding: 5px 0; font-size: 14px; line-height: 1.35;
  color: #4A453C; text-decoration: none;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero) "  ";
  font-family: 'Space Mono', monospace; font-size: 11px; color: #A9A192;
}
.toc a:hover { color: #B0693F; }

.prose { max-width: 44em; counter-reset: sec; }
.prose section { counter-increment: sec; padding-top: 34px; }
.prose section:first-child { padding-top: 0; }
.prose h2 {
  font-weight: 600; letter-spacing: -0.012em; font-size: 25px; line-height: 1.15;
  margin-bottom: 14px; scroll-margin-top: 96px;
}
.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block; margin-bottom: 8px;
  font-family: 'Space Mono', monospace; font-weight: 400; font-size: 11px;
  letter-spacing: 0.14em; color: #B0693F;
}
.prose h3 { font-weight: 600; letter-spacing: -0.012em; font-size: 17px; margin: 22px 0 8px; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; color: #4A453C; }
/* Anything followed by a paragraph gets the same gap — several sections close
   with a line of prose after a list or a pulled-out block. */
.prose p + p,
.prose ul + p,
.prose ol + p,
.prose .note + p,
.prose .card + p { margin-top: 13px; }
.prose ul, .prose ol { margin: 13px 0 0 22px; }
.prose li + li { margin-top: 7px; }
.prose strong { color: #2E2A24; font-weight: 600; }
.prose a { color: #2E2A24; }

/* Pulled-out block for the things a reader should not skim past. */
.note {
  margin-top: 18px; background: #FCFBF7; border: 1px solid #DAD3C6;
  border-left: 3px solid #B0693F; border-radius: 4px;
  box-shadow: 0 1px 3px rgba(46, 42, 36, 0.06); padding: 18px 20px;
}
.note p { color: #2E2A24; }

/* Contact card at the foot of each document. */
.card { margin-top: 18px; background: #EBE6DC; border: 1px solid #DAD3C6; padding: 22px 24px; }
.card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 26px; }
.card dt { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #7B7160; margin-bottom: 4px; }
.card dd { font-size: 16px; line-height: 1.5; color: #2E2A24; }

/* ── Footer ─────────────────────────────────────────────────────────── */
footer { background: #211E19; color: #F4F1EA; border-top: 1px solid #DAD3C6; }
footer .pad { padding-top: 52px; padding-bottom: 34px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
footer a { color: #F4F1EA; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.foot-brand .mark { --ink: #211E19; width: 42px; height: 42px; background: #F4F1EA; }
.foot-name { font-weight: 600; letter-spacing: -0.012em; font-size: 17px; line-height: 1; color: #F4F1EA; }
.foot-sub { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #A9A192; }
.foot-blurb { font-size: 15px; line-height: 1.6; color: #D5CFC3; max-width: 30em; }
.foot-head { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #A9A192; margin-bottom: 14px; }
.foot-links { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.foot-rule { border-top: 1px solid #453F35; }
.foot-rule .pad {
  display: block; padding-top: 18px; padding-bottom: 18px;
  font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8F8879;
}

/* ── Narrow tablet: drop the contents rail ──────────────────────────── */
@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 34px; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 26px; }
  h1 { font-size: 36px; }
}

/* ── Phone ──────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .pad { padding-left: 16px; padding-right: 16px; }

  /* Same trick as the main site: display:contents lifts the nav's children
     into the header's flex line so the ::after break can split them. */
  .hdr .pad { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .hdr .pad::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .hdr nav { display: contents; }
  .callbtn { order: 1; margin-left: auto; padding: 10px 13px; font-size: 14px; }
  .navlink { order: 3; flex: 1 1 0; margin: 0; padding: 4px 0; font-size: 13px; }
  .logo .mark { width: 38px; height: 38px; }

  .title .pad { padding-top: 34px; padding-bottom: 28px; }
  h1 { font-size: 31px; line-height: 1.04; }
  .lede { font-size: 17px; }
  .stamp { gap: 6px; flex-direction: column; }

  .doc { padding-top: 32px; padding-bottom: 44px; }
  .toc ol { columns: 1; }
  .prose h2 { font-size: 23px; }
  .card dl { grid-template-columns: 1fr; gap: 14px; }

  footer .pad { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Print: contents rail and site chrome are noise on paper ────────── */
@media print {
  .hdr, .toc, footer, .callbtn { display: none; }
  body { background: #fff; }
  .doc { display: block; padding-top: 0; }
  .prose { max-width: none; }
  .prose section { break-inside: avoid; }
}
