/* ════════════════════════════════════════════════
   CHIZL — LEGAL PAGES
   Shared by privacy.html and terms.html. Both pages
   are structurally identical; only the title and the
   document type differ, so the stylesheet is written
   once and linked twice.

   Self-contained on purpose: index.html keeps its CSS
   inline and is not touched by these pages. The token
   values below are copied verbatim from index.html's
   :root so the two stay in visual lockstep — if a
   token changes there, change it here too.
   ════════════════════════════════════════════════ */

/* ─── INTER, SELF-HOSTED (verbatim from index.html) ───
   Google Fonts' own css2 response for Inter 300–700, verbatim but for the
   URLs: one variable woff2 per subset, each listed once per weight, so the
   browser picks exactly the face it picked from Google. Self-hosting drops
   two third-party connections that blocked first paint. To change weights,
   re-fetch css2 and regenerate rather than hand-editing. Licence: fonts/OFL.txt */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-greek-ext.woff2) format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-greek-ext.woff2) format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-greek-ext.woff2) format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-greek-ext.woff2) format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-greek-ext.woff2) format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ─── DESIGN TOKENS (verbatim from index.html) ─── */
:root {
  --paper:        #F6F4EF;
  --paper-deep:   #EFECE4;
  --card:         #FBFAF7;
  --ink:          #14120E;
  --ink-soft:     rgb(93, 93, 93);
  --ink-faint:    #9C978C;
  --rule:         rgba(20, 18, 14, 0.12);
  --rule-soft:    rgba(20, 18, 14, 0.07);
  --accent:       #D9530F;
  --accent-soft:  rgba(217, 83, 15, 0.09);
  --accent-edge:  rgba(217, 83, 15, 0.28);
  --accent-glow:  rgba(217, 83, 15, 0.16);

  --serif: 'Inter', sans-serif;
  --sans:  'Inter', sans-serif;
  --mono:  'Inter', sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --sec-pad: 140px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);

  /* Measure for long-form legal prose. Narrower than --max
     on purpose: --max frames a marketing grid, this frames
     a paragraph someone has to actually read. */
  --measure: 760px;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--paper); }

/* ─── SLIM HEADER ─── */
.legal-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding: 20px var(--gutter);
}
.legal-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; }
/* Brand lockup: the same transparent PNG index.html uses, same 22px height */
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
.header-link {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-soft);
  transition: color 0.25s ease;
  white-space: nowrap;
}
.header-link:hover { color: var(--accent); }

/* ─── PAGE BODY ─── */
main {
  flex: 1;
  padding: clamp(56px, 9vw, 104px) var(--gutter) clamp(80px, 10vw, 128px);
}
.legal-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

/* The rule lives on the wrapper, not on .last-updated, so the
   separator survives when updated_at is null and the date line
   is hidden. */
.legal-head {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}
.legal-head h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.last-updated {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.last-updated[hidden] { display: none; }

/* ─── INJECTED PROSE ───
   Everything under #legal-content is authored in the admin
   legal editor and arrives as an HTML string, so these rules
   have to cover whatever a WYSIWYG can emit rather than a
   markup shape we control. */
#legal-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 300;
}
#legal-content > *:first-child { margin-top: 0; }
#legal-content > *:last-child { margin-bottom: 0; }

#legal-content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 56px 0 18px;
}
#legal-content h3 {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 38px 0 12px;
}
#legal-content h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 32px 0 12px;
}

#legal-content p { margin: 0 0 18px; }

#legal-content ul,
#legal-content ol { margin: 0 0 22px; padding-left: 22px; }
#legal-content ul ul,
#legal-content ol ol,
#legal-content ul ol,
#legal-content ol ul { margin: 10px 0 0; }
#legal-content li { margin-bottom: 10px; padding-left: 4px; }
#legal-content li:last-child { margin-bottom: 0; }
#legal-content li::marker { color: var(--ink-faint); }

#legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-edge);
  transition: text-decoration-color 0.25s ease;
}
#legal-content a:hover { text-decoration-color: var(--accent); }

#legal-content strong, #legal-content b { font-weight: 500; color: var(--ink); }
#legal-content em, #legal-content i { font-style: italic; }

#legal-content blockquote {
  margin: 28px 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--accent-edge);
  color: var(--ink-soft);
}
#legal-content blockquote p:last-child { margin-bottom: 0; }

#legal-content hr {
  border: none;
  border-top: 1px solid var(--rule-soft);
  margin: 44px 0;
}

#legal-content img { max-width: 100%; height: auto; display: block; }

/* display:block lets a wide table scroll inside the measure
   instead of pushing the page sideways. */
#legal-content table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14.5px;
}
#legal-content th, #legal-content td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-soft);
}
#legal-content th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

/* ─── LOADING / EMPTY / ERROR STATES ───
   The page is never blank: one of these is always on screen. */
.legal-state {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: clamp(28px, 4vw, 40px);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}
.legal-state .state-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.legal-state p { margin: 0 0 14px; }
.legal-state p:last-child { margin-bottom: 0; }
.legal-state a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-edge);
  transition: text-decoration-color 0.25s ease;
}
.legal-state a:hover { text-decoration-color: var(--accent); }
.legal-state.is-loading .state-label::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  animation: legal-pulse 1.4s var(--ease) infinite;
}
@keyframes legal-pulse {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

/* ─── SLIM FOOTER ─── */
.legal-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 28px var(--gutter);
}
.legal-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.legal-footer a {
  color: var(--ink-soft);
  transition: color 0.25s ease;
}
.legal-footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  /* The loading dot is the one infinite animation on the page; without this it
     would flicker rather than stop. */
  .legal-state.is-loading .state-label::after { animation-iteration-count: 1 !important; opacity: 1; }
}

@media (max-width: 640px) {
  main { padding: 48px var(--gutter) 72px; }
  .legal-header { padding: 16px var(--gutter); }
  .header-link { font-size: 12.5px; }
  .legal-head { padding-bottom: 26px; margin-bottom: 36px; }
  .eyebrow { margin-bottom: 20px; }
  #legal-content { font-size: 15.5px; }
  #legal-content h2 { margin-top: 44px; }
  #legal-content ul, #legal-content ol { padding-left: 18px; }
  .legal-footer .inner { justify-content: flex-start; gap: 12px; }
}
