/* Visicodes. Brand colours: Ink, Paper, Highlight, Green, Red, Grey.
   Highlight is used only behind a code (and behind "codes" in the wordmark). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.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: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}
/* Fallback with Inter's metrics, so text does not move when Inter loads. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.06%;
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
}

:root {
  --ink: #111827;
  --paper: #fafaf7;
  --highlight: #ffe45c;
  --green: #0b7a4b;
  --red: #b42318;
  --grey: #5b6472;
  --rule: rgb(17 24 39 / 0.14);
  --sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 46rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "cv11", "ss03";
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); font-weight: 750; letter-spacing: -0.03em; }
h2 { font-size: 1.375rem; font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 650; }
p { margin: 0; }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1rem; }
.grey { color: var(--grey); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 0.75rem; z-index: 10; }

/* Header and wordmark */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.25rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 1.375rem; line-height: 1; text-decoration: none; letter-spacing: -0.01em;
}
.wordmark .wm-visi { font-family: var(--sans); font-weight: 700; }
.wordmark .wm-codes {
  font-family: var(--mono); font-weight: 600; letter-spacing: 0;
  background: var(--highlight); padding: 0.22em 0.34em; margin-left: 0.14em; border-radius: 4px;
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

main { padding: 2.5rem 0 4rem; }
section + section, .cards + section { margin-top: 3.5rem; }

/* Home hero and search */
.hero h1 { max-width: 14ch; }
.lede { margin-top: 1rem; font-size: 1.1875rem; max-width: 34rem; }
.search { margin-top: 2rem; }
.search label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.4rem; }
.search-row { display: flex; gap: 0.5rem; }
.search input {
  flex: 1 1 auto; min-width: 0; height: 3rem; padding: 0 0.9rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--grey); border-radius: 8px;
}
.search input::placeholder { color: var(--grey); opacity: 1; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: 8px;
  background: var(--ink); color: var(--paper);
  font: 600 0.9375rem/1 var(--sans); cursor: pointer; white-space: nowrap;
}
.button:hover { background: #26303f; }
.search .button { height: 3rem; }
.search-results {
  list-style: none; margin: 0.5rem 0 0; padding: 0.25rem 0;
  border: 1px solid var(--rule); border-radius: 8px; max-height: 22rem; overflow: auto;
}
.search-results a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6rem;
  padding: 0.6rem 0.9rem; text-decoration: none; min-height: 44px;
}
.search-results a:hover strong { text-decoration: underline; }
.search-results strong { font-weight: 600; }
.search-results span { color: var(--grey); font-size: 0.9375rem; }
.search-empty { margin-top: 0.75rem; }

/* Code card and code chip */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.section-head p { color: var(--grey); font-size: 0.9375rem; }
.cards { display: grid; gap: 1rem; margin-top: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) { .cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.code-card { border: 1px solid var(--rule); border-radius: 12px; padding: 1.1rem 1.1rem 0.5rem; min-width: 0; }
.code-card h3 a { text-decoration: none; }
.code-card h3 a:hover { text-decoration: underline; }
.discount { margin-top: 0.2rem; }
.code-card.solo .discount { margin-top: 0; font-size: 1.1875rem; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.85rem; }
.chip {
  font: 600 1.3125rem/1.25 var(--mono);
  color: var(--ink); background: var(--highlight);
  padding: 0.5rem 0.75rem; border-radius: 6px;
  overflow-wrap: anywhere; max-width: 100%;
  -webkit-user-select: all; user-select: all;
}
.chip-note { margin-top: 0.7rem; color: var(--grey); font-size: 0.9375rem; line-height: 1.45; }
.worked { color: var(--green); font-weight: 600; }
.stopped { color: var(--red); font-weight: 600; }
.copy-status { min-height: 1.5rem; margin-top: 0.3rem; font-size: 0.9375rem; line-height: 1.5rem; font-weight: 500; }

/* Store page */
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 1.25rem; padding: 0; color: var(--grey); font-size: 0.9375rem; }
.breadcrumb li + li::before { content: "/"; margin: 0 0.5rem; }
.breadcrumb a { color: var(--grey); }
.page-head p { margin-top: 0.6rem; color: var(--grey); }
.page-head + .cards { margin-top: 1.75rem; }
.facts { margin: 1rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
.facts dt { color: var(--grey); font-size: 0.9375rem; }
.facts dd { margin: 0.1rem 0 0; overflow-wrap: anywhere; }
.facts ul { list-style: none; margin: 0; padding: 0; }
.note { margin-top: 1rem; max-width: 36rem; }

/* Stores A to Z */
.letters { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.letters a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem;
  border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; font-weight: 600;
}
.letters a:hover { border-color: var(--ink); }
.az { margin-top: 2rem; }
.az .az-group { margin-top: 0; }
.az-group { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 0.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.az-group h2 { font-size: 1.375rem; line-height: 44px; }
.az-group ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 36rem) { .az-group ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; } }
.az-group a { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; padding: 0.55rem 0; min-height: 44px; text-decoration: none; }
.az-group a strong { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.az-group a span { color: var(--grey); font-size: 0.9375rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 1.75rem 0 2.5rem; color: var(--grey); font-size: 0.9375rem; }
.site-footer p { max-width: 36rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0.75rem 0 0; padding: 0; }
.site-footer a { color: var(--grey); display: inline-flex; align-items: center; min-height: 44px; }

/* Text pages: pledge, contact, privacy, terms */
.prose { max-width: 38rem; }
.prose h2 { margin-top: 2.25rem; font-size: 1.25rem; }
.prose p, .prose ul, .prose address { margin-top: 0.75rem; }
.prose .lede { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.4rem; }
.prose address { font-style: normal; }
.notice { margin-top: 1.5rem; padding: 0.9rem 1rem; border: 1.5px solid var(--grey); border-radius: 8px; max-width: 34rem; }

/* Submit form */
.form { margin-top: 2rem; max-width: 30rem; display: grid; gap: 1.25rem; }
.field label, .check label { font-weight: 600; font-size: 0.9375rem; }
.field label { display: block; margin-bottom: 0.4rem; }
.field input {
  display: block; width: 100%; height: 3rem; padding: 0 0.9rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--grey); border-radius: 8px;
}
.field input.mono { font-family: var(--mono); font-weight: 600; }
.field input[type="date"] { max-width: 14rem; }
.optional { font-weight: 400; color: var(--grey); }
.hint { margin-top: 0.35rem; color: var(--grey); font-size: 0.9375rem; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.check input { width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; accent-color: var(--ink); }
.check label { font-weight: 500; line-height: 1.5; }
.form .button { justify-self: start; min-width: 9rem; height: 3rem; }
.button[disabled] { opacity: 0.6; cursor: default; }
.form-status { min-height: 1.5rem; font-size: 0.9375rem; font-weight: 500; margin-top: -0.5rem; }
.form > .hint { margin-top: -0.75rem; }
/* Spam trap: real people never see or reach this field. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
