/*
 * Shared styling for the Confere legal pages.
 *
 * One file rather than a copy per page: these documents are read side by side
 * and a drift in type or contrast between them reads as one of them being less
 * official than the others.
 */
html { -webkit-text-size-adjust: 100%; }

:root {
    --ground: #F2F4F0;
    --surface: #FBFCFA;
    --surface-quiet: #ECEFE9;
    --border: #D9DED5;
    --border-subtle: #E4E8E0;
    --text: #14170F;
    --text-strong: #2A2E25;
    --text-body: #3C4137;
    --text-muted: #64695E;
    --text-faint: #868C80;
    --accent: #47586D;
    --accent-quiet: #E5EAF0;
    --positive: #3F6B4E;
    --positive-quiet: #E2EDE5;
    --caution: #7A5F26;
    --caution-quiet: #F3EBD8;

    --measure: 34rem;
    --step--1: 0.8125rem;
    --step-0: 1.0625rem;
    --step-1: 1.3125rem;
    --step-2: 1.75rem;
    --step-3: 2.5rem;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --ground: #101110;
      --surface: #181A19;
      --surface-quiet: #1A1C1B;
      --border: #262927;
      --border-subtle: #232624;
      --text: #F2F3F1;
      --text-strong: #E4E7E3;
      --text-body: #C9CEC9;
      --text-muted: #A3A7A3;
      --text-faint: #747A76;
      --accent: #8B9AAE;
      --accent-quiet: #1C2229;
      --positive: #79A98A;
      --positive-quiet: #172019;
      --caution: #A98F63;
      --caution-quiet: #201B12;
    }
  }

  :root[data-theme="dark"] {
    --ground: #101110;
    --surface: #181A19;
    --surface-quiet: #1A1C1B;
    --border: #262927;
    --border-subtle: #232624;
    --text: #F2F3F1;
    --text-strong: #E4E7E3;
    --text-body: #C9CEC9;
    --text-muted: #A3A7A3;
    --text-faint: #747A76;
    --accent: #8B9AAE;
    --accent-quiet: #1C2229;
    --positive: #79A98A;
    --positive-quiet: #172019;
    --caution: #A98F63;
    --caution-quiet: #201B12;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--ground);
    color: var(--text-body);
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  .wrap {
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 4.5rem) clamp(1.15rem, 5vw, 2.5rem) 5rem;
  }

  .prose { max-width: var(--measure); }

  h1, h2, h3, .label, .eyebrow, th, .chip, .mark {
    font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  }

  .eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 0 0 0.85rem;
  }

  h1 {
    font-size: var(--step-3);
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.1;
    text-wrap: balance;
    color: var(--text);
    margin: 0 0 1rem;
  }

  .standfirst {
    font-size: var(--step-1);
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 30rem;
    margin: 0 0 2rem;
  }

  .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding: 1.15rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
    font-size: var(--step--1);
    color: var(--text-muted);
  }

  .meta b {
    display: block;
    font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.2rem;
  }

  .essentials {
    margin: 2.75rem 0 3.5rem;
    padding: 1.75rem clamp(1.15rem, 4vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
  }

  .essentials h2 {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 0 0 1.25rem;
  }

  .essentials ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
  }

  .essentials li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
    color: var(--text-body);
  }

  .essentials li::before {
    content: "";
    width: 3px;
    height: 1.35em;
    border-radius: 2px;
    background: var(--positive);
    margin-top: 0.15em;
  }

  .essentials li.is-caution::before { background: var(--caution); }

  .essentials strong { color: var(--text); font-weight: 600; }

  section { margin: 0 0 3rem; scroll-margin-top: 2rem; }

  h2.section-title {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    gap: 0.5rem;
    align-items: baseline;
    font-size: var(--step-2);
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.2;
    text-wrap: balance;
    color: var(--text);
    margin: 0 0 1rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-subtle);
  }

  h2.section-title .num {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
  }

  h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 2rem 0 0.5rem;
  }

  p { margin: 0 0 1.05rem; max-width: var(--measure); }

  ul.plain, ol.plain {
    max-width: var(--measure);
    margin: 0 0 1.05rem;
    padding-left: 1.15rem;
    display: grid;
    gap: 0.55rem;
  }

  li { margin: 0; }

  strong { color: var(--text-strong); font-weight: 600; }

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

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

  .scroller {
    overflow-x: auto;
    margin: 1.5rem 0 1.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    min-width: 34rem;
  }

  th {
    text-align: left;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }

  td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
    color: var(--text-muted);
  }

  tr:last-child td { border-bottom: 0; }

  td:first-child {
    color: var(--text-strong);
    font-weight: 600;
    width: 24%;
  }

  .chip {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 3px;
    background: var(--accent-quiet);
    color: var(--accent);
    white-space: nowrap;
  }

  .chip.is-device { background: var(--positive-quiet); color: var(--positive); }
  .chip.is-consent { background: var(--caution-quiet); color: var(--caution); }

  .mark {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.05rem 0.4rem;
    border-radius: 3px;
    background: var(--caution-quiet);
    color: var(--caution);
    border: 1px dashed var(--caution);
  }

  .callout {
    margin: 1.75rem 0;
    padding: 1.25rem 1.4rem;
    background: var(--surface-quiet);
    border-left: 3px solid var(--positive);
    border-radius: 0 4px 4px 0;
    max-width: var(--measure);
  }

  .callout p:last-child { margin-bottom: 0; }

  .callout.is-caution { border-left-color: var(--caution); }

  .never {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    max-width: var(--measure);
    display: grid;
    gap: 0;
    border-top: 1px solid var(--border-subtle);
  }

  .never li {
    padding: 0.8rem 0 0.8rem 1.9rem;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    color: var(--text-body);
  }

  .never li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--text-faint);
    font-family: "IBM Plex Mono", monospace;
  }

  footer {
    margin-top: 4rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    font-size: var(--step--1);
    color: var(--text-faint);
    max-width: var(--measure);
  }

  footer p { margin-bottom: 0.6rem; }

  @media (max-width: 34rem) {
    h2.section-title { grid-template-columns: 1fr; gap: 0.15rem; }
    td:first-child { width: auto; }
  }

/* Cross-links between the legal documents. Every page carries the same strip,
   so a reader who lands on one from a store listing can reach the others. */
.docnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
}

.docnav a { color: var(--text-muted); text-decoration: none; }
.docnav a:hover { color: var(--accent); text-decoration: underline; }
.docnav a[aria-current="page"] { color: var(--text); font-weight: 600; }
