/*
 * Find Me Matcha — one stylesheet for the whole site.
 *
 * No build step, no framework, no third-party request of any kind. A privacy
 * policy that loads a tracker is an embarrassment, and the cheapest way to
 * be sure there is no tracker is for the page to fetch nothing but its own
 * files.
 */

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Karla";
  src: url("/assets/fonts/Karla.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Karla";
  src: url("/assets/fonts/Karla_bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Reset, lightly ─────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* A long unbroken token — an email address, a URL somebody pastes into a
     correction — must wrap rather than push the page sideways. These pages
     are read on a phone held in one hand. */
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* ── Focus. Visible, on every theme, on every control ───────────────── */

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: var(--gutter);
  top: 0.6rem;
}

/* Links, base. Declared here rather than with the rest of the type, because
   `.site-nav a` and `.site-footer a` override them and a stylesheet reads
   better when the specific rule comes after the general one. */
a {
  color: var(--accent-600);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

/* ── Layout ─────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--wide {
  max-width: var(--container-wide);
}

main {
  display: block;
  padding-bottom: 4rem;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  max-width: var(--container-wide);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
  margin-right: auto;
}

.site-header__brand:hover {
  color: var(--accent-600);
}

/* The bowl seen from above. Its own colour, not the wordmark's, so the
   brand link can go dark on hover without taking the mark with it. */
.brand-mark {
  color: var(--accent-500);
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent-500);
}

/* ── Type ───────────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  margin: 0 0 0.6rem;
}

h2 {
  font-size: clamp(1.5rem, 4.5vw, 1.95rem);
  margin: 2.75rem 0 0.75rem;
}

h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0;
  margin: 1.75rem 0 0.4rem;
}

p {
  margin: 0 0 1.05rem;
}

strong {
  color: var(--ink);
}

ul,
ol {
  margin: 0 0 1.05rem;
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.4rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin: 0 0 0.5rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-2);
}

.page-head {
  padding-top: 3rem;
  margin-bottom: 1.5rem;
}

.last-updated {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.small {
  font-size: 0.92rem;
  color: var(--muted);
}

.path {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  white-space: nowrap;
}

/* ── Cards ──────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin: 1.5rem 0;
}

/* ── The trust chips, borrowed from the app ─────────────────────────── */

.chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.chip--confirmed {
  color: var(--chip-confirmed);
  background: var(--accent-soft);
}

.chip--think {
  color: var(--chip-think);
  background: var(--machine-soft);
}

.chip--disputed {
  color: var(--chip-disputed);
  background: var(--warn-soft);
}

.chip--unknown {
  color: var(--chip-unknown);
  background: var(--surface-2);
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(3rem, 9vw, 5.5rem) 0 1rem;
}

.hero h1 {
  max-width: 15ch;
}

.hero .lede {
  max-width: 42ch;
}

.hero__note {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 46ch;
}

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq-item {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0 0.4rem;
}

.faq-item h2 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0;
  margin: 0 0 0.6rem;
}

.faq-toc {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2.5rem;
}

.faq-toc li {
  margin-bottom: 0.35rem;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2.5rem 0 3rem;
  font-size: 0.95rem;
}

.site-footer__grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  max-width: var(--container-wide);
}

.site-footer h2 {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-600);
  text-decoration: underline;
}

.site-footer__legal {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.25rem;
  color: var(--muted);
  font-size: 0.87rem;
}

.site-footer__legal p {
  margin: 0 0 0.4rem;
}

/* ── The one place a page shouts ────────────────────────────────────── */

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-500);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0;
}

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

/* ── Steps ──────────────────────────────────────────────────────────── */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.9rem;
  margin-bottom: 1.1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-500);
  color: var(--on-accent);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-ui);
}

/* ── Tables ─────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

/* ── Print: the legal pages get printed ─────────────────────────────── */

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
