/* bracketto.com. One stylesheet, no framework.
   Neutral base (near-white, greys, near-black) with a real dark mode. Headings in Titillium Web, the
   typeface of the logo; text in Geist, data in Geist Mono. The one graphic element of our own is the
   square bracket of the name, used only around metadata ([01], [in validation]). The wine of the logo
   (--accent) is an accent and does a few things on purpose: those brackets, the underline of a link
   under the pointer, the arrow of a work card under the pointer, focus, text selection and error
   markers. RESEARCH.md says why. Shape: 8px corners on every block and control. */

@font-face {
  font-family: "Titillium Web";
  src: url("/fonts/titillium-web-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --wine: #8e1a3d;

  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --text: #171717;
  --text-2: #525252;
  --text-3: #6b6b6b;
  --line: #e8e8e8;
  --line-2: #d4d4d4;
  --btn: #171717;
  --btn-text: #fafafa;
  --btn-hover: #383838;
  --accent: var(--wine);
  --focus: var(--wine);
  --mark: rgba(142, 26, 61, 0.07);
  --mark-line: var(--wine);
  --select: rgba(142, 26, 61, 0.16);
  --code-bg: #f1f1f1;
  --shadow: 0 1px 2px rgba(23, 23, 23, 0.04), 0 12px 32px -16px rgba(23, 23, 23, 0.14);

  --display: "Titillium Web", "Geist", ui-sans-serif, system-ui, sans-serif;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 8px;
  --wrap: 1200px;
  --gutter: 20px;
  --measure: 68ch;
  --section: clamp(88px, 10vw, 152px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #111111;
    --surface-2: #171717;
    --text: #ededed;
    --text-2: #a3a3a3;
    --text-3: #8f8f8f;
    --line: #232323;
    --line-2: #343434;
    --btn: #ededed;
    --btn-text: #0a0a0a;
    --btn-hover: #cfcfcf;
    --accent: #e0839f;
    --focus: #e0839f;
    --mark: rgba(224, 131, 159, 0.1);
    --mark-line: #e0839f;
    --select: rgba(224, 131, 159, 0.28);
    --code-bg: #1a1a1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

@media (min-width: 760px) {
  :root {
    --gutter: 40px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 760px) {
  body {
    font-size: 1.0625rem;
  }
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.6rem, 1.8rem + 3.2vw, 4.4rem);
  letter-spacing: -0.025em;
  line-height: 1;
}

h2 {
  font-size: clamp(2rem, 1.5rem + 1.9vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.04;
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

p {
  margin: 0;
  text-wrap: pretty;
}

p + p {
  margin-top: 1em;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.15s var(--ease), text-decoration-color 0.15s var(--ease);
}

a:hover {
  text-decoration-color: var(--accent);
}

/* The square brackets of the name, around metadata only: [01], [in validation]. */
.tag {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--text-2);
  white-space: nowrap;
}

.tag .br {
  color: var(--accent);
}

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

code,
kbd {
  font-family: var(--mono);
  font-size: 0.85em;
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.38em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

kbd {
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05em 0.4em;
  background: var(--surface);
  white-space: nowrap;
}

strong {
  font-weight: 600;
}

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

::selection {
  background: var(--select);
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--btn);
  color: var(--btn-text);
  z-index: 20;
}

.skip:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.muted {
  color: var(--text-2);
}

.fine {
  font-size: 0.875rem;
  color: var(--text-3);
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 46ch;
  letter-spacing: -0.01em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.price {
  font-size: 1.125rem;
}

/* ---------- Header ---------- */

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

@media (min-width: 760px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand . cta" "nav nav nav";
  align-items: center;
  column-gap: 24px;
  padding-block: 12px 0;
}

.brand {
  grid-area: brand;
  display: block;
  line-height: 0;
  /* The approved logo file has 34/575 of its width as margin on the left; this lines the mark up with the text. */
  margin-left: calc(-128px * 34 / 575);
}

.brand img {
  width: 128px;
  height: auto;
}

.header-cta {
  grid-area: cta;
}

.site-nav {
  grid-area: nav;
  display: flex;
  gap: 22px;
  font-size: 0.9375rem;
  margin-top: 6px;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  padding-block: 10px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
}

@media (min-width: 760px) {
  .header-row {
    grid-template-areas: "brand nav cta";
    height: 64px;
    padding-block: 0;
  }
  .brand {
    margin-left: calc(-136px * 34 / 575);
  }
  .brand img {
    width: 136px;
  }
  .site-nav {
    justify-content: flex-end;
    gap: 30px;
    margin: 0 8px 0 0;
    font-size: 0.9375rem;
  }
}

/* ---------- Buttons and status ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--btn);
  color: var(--btn-text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.btn:hover {
  background: var(--btn-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline-offset: 2px;
  border-radius: var(--radius);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-2);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.btn[aria-disabled="true"],
.btn:disabled {
  background: var(--surface-2);
  color: var(--text-3);
  border-color: var(--line);
  cursor: not-allowed;
  transform: none;
}

.status {
  text-transform: lowercase;
}

.note {
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: 54ch;
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section) 0;
}

.section-head {
  margin-bottom: clamp(32px, 4vw, 56px);
  max-width: 46rem;
}

.section-head p {
  margin-top: 16px;
  color: var(--text-2);
}

.section-title {
  margin-bottom: clamp(28px, 3.4vw, 48px);
}

/* [01] before a section title, at the height of the capitals. */
h2 > .index {
  display: inline-block;
  vertical-align: top;
  margin: 0.55em 0.9em 0 0;
}

@media (max-width: 759px) {
  h2 > .index {
    margin-top: 0.3em;
  }
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--text-3);
}

.crumb a {
  color: var(--text-2);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--text);
}

.crumb > span[aria-hidden] {
  color: var(--line-2);
}

/* ---------- Panels, facts and lists ---------- */

.panel,
.facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.panel-title,
.facts-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.panel > p + p {
  margin-top: 0.75em;
}

.facts-list {
  margin: 0;
  display: grid;
}

.facts-list > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.facts-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.facts-list > div:last-child {
  padding-bottom: 0;
}

.facts-list dt {
  font-size: 0.875rem;
  color: var(--text-3);
  padding-top: 0.1em;
}

.facts-list dd {
  margin: 0;
  font-weight: 500;
  line-height: 1.45;
}

.facts-list dd .fine {
  display: block;
  font-weight: 400;
  margin-top: 2px;
}

@media (max-width: 479px) {
  .facts-list > div {
    grid-template-columns: 6.5rem 1fr;
    gap: 12px;
  }
}

.bullets,
.prose ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.bullets > li,
.prose ul > li {
  position: relative;
  padding-left: 20px;
}

.bullets > li::before,
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 7px;
  height: 1.5px;
  background: var(--text-3);
}

.bullets-small {
  gap: 10px;
  font-size: 0.9375rem;
}

/* ---------- Home ---------- */

.hero {
  padding-block: clamp(56px, 6.5vw, 88px) clamp(64px, 7vw, 104px);
}

.hero h1 {
  font-size: clamp(2.75rem, 1.3rem + 5.2vw, 5.75rem);
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.hero-row {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.hero .lead {
  max-width: 44ch;
}

.hero .actions {
  margin-top: 0;
}

@media (min-width: 960px) {
  .hero-row {
    grid-template-columns: 1fr auto;
    align-items: end;
    margin-top: 36px;
  }
}

.hero + .section {
  padding-top: 0;
}

/* Capabilities: four short columns. */
.caps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 40px 32px;
}

.cap {
  display: flex;
  flex-direction: column;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
}

.cap h3 {
  font-size: 1.125rem;
}

.cap > p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.9375rem;
  max-width: 40ch;
}

@media (min-width: 640px) {
  .caps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .caps {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Work: one card per file in src/work/. The first card takes a whole row; the last one too when
   it would otherwise be alone, so the grid never has an empty cell. */
.work-grid {
  display: grid;
  gap: 20px;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.work-card.has-link:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.work-media {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(20px, 3.2vw, 44px);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.work-media > picture,
.work-media > img {
  display: block;
  width: 100%;
}

.work-media img {
  display: block;
  width: 100%;
}

.work-media-sheet {
  padding: clamp(16px, 2.4vw, 32px);
}

.work-media-sheet .sheet {
  width: 100%;
  box-shadow: var(--shadow);
}

@media (max-width: 759px) {
  .work-media-sheet .sheet {
    font-size: 0.75rem;
  }
  .work-media-sheet .sheet td {
    padding-left: 5.4rem;
  }
  .work-media-sheet .sheet td::before {
    width: 5rem;
  }
}

@media (min-width: 760px) {
  .work-media-sheet table {
    table-layout: fixed;
  }
  .work-media-sheet .sheet {
    font-size: 0.75rem;
  }
  .work-media-sheet .sheet th,
  .work-media-sheet .sheet td {
    padding: 7px 10px;
  }
  .work-media-sheet th:nth-child(1) {
    width: 24%;
  }
  .work-media-sheet .sheet td,
  .work-media-sheet .sheet td code {
    overflow-wrap: break-word;
  }
}

/* A plan, not a product: a plain numbered list in text. */
.work-media-steps {
  place-items: center start;
}

.steps-label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-bottom: 14px;
}

.work-media-steps ol {
  margin: 0;
  padding-left: 1.6em;
  display: grid;
  gap: 8px;
  max-width: 30rem;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.work-media-steps li::marker {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--text-3);
}

.work-body {
  padding: 22px 24px 26px;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 0.875rem;
  color: var(--text-3);
}

.work-card h3 {
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.85rem);
  letter-spacing: -0.015em;
}

.work-state {
  margin-top: 18px;
}

.work-card h3 a {
  text-decoration: none;
}

/* The whole card is the link. */
.work-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.work-card h3 a:focus-visible {
  outline: none;
}

.work-card h3 a:focus-visible::after {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.arrow {
  display: inline-block;
  margin-left: 0.35em;
  color: var(--text-3);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.work-card:hover .arrow,
.work-card h3 a:focus-visible .arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.work-summary {
  margin-top: 8px;
  color: var(--text-2);
  max-width: 54ch;
}

@media (min-width: 880px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .work-grid > .work-card:first-child,
  .work-grid > .work-card:last-child:nth-child(even) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 7fr 5fr;
  }
  .work-grid > .work-card:first-child .work-media,
  .work-grid > .work-card:last-child:nth-child(even) .work-media {
    min-height: 420px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .work-grid > .work-card:first-child .work-body,
  .work-grid > .work-card:last-child:nth-child(even) .work-body {
    align-self: center;
    padding: 40px 44px;
  }
  .work-grid > .work-card:first-child h3,
  .work-grid > .work-card:last-child:nth-child(even) h3 {
    font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.5rem);
  }
}

/* How we work: the heading stays in view while the principles go by. */
.principles {
  display: grid;
  gap: 40px;
}

.principles-head p {
  margin-top: 16px;
  max-width: 34ch;
}

.principles-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.principles-list li {
  display: grid;
  gap: 8px 40px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}

.principles-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.principles-list p {
  color: var(--text-2);
  max-width: 60ch;
}

/* The phase number before its name: plain mono, no brackets, so it doesn't read as a section index. */
.principles-list .step {
  display: inline-block;
  min-width: 2.2em;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-3);
  vertical-align: 0.15em;
}

@media (min-width: 760px) {
  .principles-list li {
    grid-template-columns: 15rem 1fr;
  }
}

@media (min-width: 1040px) {
  .principles {
    grid-template-columns: 4fr 8fr;
    gap: 64px;
    align-items: start;
  }
  .principles-head {
    position: sticky;
    top: 112px;
  }
}

/* Contact: the one call to action, at the end. */
.contact-wrap {
  padding-block: var(--section);
}

.contact {
  display: grid;
  gap: 32px;
  padding: clamp(28px, 5vw, 64px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact h2 {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  text-wrap: balance;
}

.contact p.muted {
  margin-top: 18px;
  max-width: 46ch;
}

.mail-big {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.contact-mail .fine {
  margin-top: 14px;
}

@media (min-width: 960px) {
  .contact {
    grid-template-columns: 7fr 5fr;
    align-items: end;
    gap: 56px;
  }
}

/* Grid children may shrink below their content (wide tables and code scroll inside). */
.split > *,
.page-hero > *,
.principles > *,
.footer-grid > *,
.contact > * {
  min-width: 0;
}

/* ---------- Product pages ---------- */

.page-hero {
  padding-block: clamp(56px, 7vw, 96px) clamp(48px, 6vw, 80px);
  display: grid;
  gap: 40px;
}

.page-hero .lead {
  margin-top: 22px;
}

@media (min-width: 960px) {
  .page-hero {
    grid-template-columns: 7fr 5fr;
    gap: 72px;
    align-items: end;
  }
}

.demo {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3.4vw, 48px);
}

.demo .geotint-map {
  margin: 0;
}

.demo .geotint-legend {
  font-size: 0.9375rem;
  margin-top: 16px;
  color: var(--text-2);
}

/* Dark mode: countries without data and the borders take the panel's tones (src/site.mjs, DARK_MAP),
   so the countries with data are the brightest thing on the map. */
@media (prefers-color-scheme: dark) {
  .demo .geotint-svg {
    --geotint-border: #171717 !important;
  }
  .demo .geotint-base path {
    fill: #2a2a2a;
  }
}

.demo-caption {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: 72ch;
}

.split {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .split.wide-left {
    grid-template-columns: 7fr 5fr;
  }
}

.csv {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  padding: 14px 0;
  counter-reset: line;
}

.csv span {
  display: block;
  padding-inline: 14px;
  white-space: pre;
}

.csv span::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 2.2em;
  margin-right: 14px;
  text-align: right;
  color: var(--text-3);
}

.csv span.bad {
  background: var(--mark);
  box-shadow: inset 2px 0 0 var(--mark-line);
}

.notices {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notices li {
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.notices li.error {
  box-shadow: inset 3px 0 0 var(--mark-line);
}

.shots {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
}

.shot {
  margin: 0;
}

.shot a {
  display: block;
  cursor: zoom-in;
}

.shot a + a {
  margin-top: 10px;
}

.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shot figcaption {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: 64ch;
}

.features {
  display: grid;
  gap: 36px 56px;
}

.features > div {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.features h3 {
  margin-bottom: 8px;
}

.features p {
  color: var(--text-2);
}

@media (min-width: 760px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .features {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 11px 16px 11px 0;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-3);
  border-bottom-color: var(--line-2);
}

td code {
  white-space: nowrap;
}

/* The Rules sheet of Auto Forward Rules, drawn as a sheet. */
.sheet {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.8125rem;
}

.sheet table {
  font-size: inherit;
}

.sheet th,
.sheet td {
  padding: 8px 12px;
  border: 1px solid var(--line);
}

.sheet tr > :first-child {
  border-left: 0;
}

.sheet tr > :last-child {
  border-right: 0;
}

.sheet thead th {
  border-top: 0;
}

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

.sheet th {
  background: var(--surface-2);
  font-size: 0.75rem;
}

.sheet td code {
  background: transparent;
  padding: 0;
  white-space: normal;
  overflow-wrap: normal;
}

/* On phones each rule becomes a card: column name on the left, value on the right. */
@media (max-width: 759px) {
  .sheet thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .sheet table,
  .sheet tbody,
  .sheet tr,
  .sheet td {
    display: block;
  }
  .sheet tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .sheet tbody tr:last-child {
    border-bottom: 0;
  }
  .sheet td {
    position: relative;
    padding: 3px 0 3px 6.4rem;
    border: 0;
    overflow-wrap: break-word;
  }
  .sheet td code {
    overflow-wrap: break-word;
  }
  .sheet td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 3px;
    width: 6rem;
    font-size: 0.75rem;
    color: var(--text-3);
    padding-top: 0.1em;
  }
  .sheet td.empty {
    display: none;
  }
}

@media (min-width: 760px) {
  .sheet-full table {
    min-width: 900px;
  }
}

.sheet-caption {
  font-size: 0.8125rem;
  color: var(--text-3);
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.changelog {
  display: grid;
  margin: 0;
}

.changelog > div {
  display: grid;
  gap: 4px 28px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .changelog > div {
    grid-template-columns: 12rem 1fr;
  }
}

.changelog dt {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
}

.changelog dt .fine {
  display: block;
  font-family: var(--font);
}

.changelog dd {
  margin: 0;
  color: var(--text-2);
}

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

.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 4px 14px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}

.steps > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-2);
}

.prose .steps {
  padding-left: 0;
}

.prose .steps > li + li {
  margin-top: 0;
}

.steps > li > * {
  grid-column: 2;
}

.steps > li > :first-child {
  grid-row: 1;
  padding-top: 2px;
}

.steps ul {
  margin: 12px 0 0;
}

.steps .step-shot {
  margin-top: 18px;
}

/* ---------- Pro / waitlist ---------- */

.waitlist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3.4vw, 40px);
  display: grid;
  gap: 18px;
  max-width: 600px;
}

.waitlist h2 {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
}

.waitlist .promise {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 500;
  font-size: 0.9375rem;
}

.field input[type="email"] {
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  width: 100%;
}

.field input[type="email"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: transparent;
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.9375rem;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--text);
}

.form-error {
  font-weight: 500;
  background: var(--mark);
  border: 1px solid var(--line-2);
  box-shadow: inset 3px 0 0 var(--mark-line);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Articles (guides, legal, docs) ---------- */

.article {
  padding-block: clamp(56px, 7vw, 96px) 0;
}

.article-head {
  max-width: 54rem;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.article-head h1 {
  font-size: clamp(2.4rem, 1.75rem + 2.3vw, 3.6rem);
}

.article-head .lead {
  margin-top: 20px;
  max-width: 58ch;
}

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

.article-grid {
  display: grid;
  gap: 48px;
}

.article-grid > * {
  min-width: 0;
}

.article-aside {
  font-size: 0.9375rem;
}

.article-aside .aside-text {
  margin-bottom: 18px;
  color: var(--text-2);
}

.article-aside .facts-list > div {
  grid-template-columns: 5.5rem 1fr;
}

.article-aside .aside-links {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  line-height: 1.9;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.toc a {
  color: var(--text-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
}

@media (min-width: 1040px) {
  .article-grid {
    grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
    gap: 80px;
  }
  .article-aside > * {
    position: sticky;
    top: 96px;
  }
  .prose > h2:first-child {
    margin-top: 0;
  }
}

@media (max-width: 1039px) {
  .lead-on-phone {
    order: -1;
  }
}

@media (max-width: 759px) {
  .demo .geotint-legend-bar {
    width: 5em;
  }
}

.prose h2 {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.95rem);
  letter-spacing: -0.01em;
  margin: 2.2em 0 0.6em;
}

.prose h3 {
  margin: 1.8em 0 0.5em;
}

.prose p,
.prose ul,
.prose ol,
.prose table,
.prose .table-scroll {
  margin: 0 0 1em;
}

.prose ul {
  gap: 8px;
}

.prose ol {
  padding-left: 1.2em;
}

.prose ol > li::marker {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.9em;
}

.prose li + li {
  margin-top: 0.3em;
}

.prose ul > li + li {
  margin-top: 0;
}

.prose .table-scroll table {
  margin: 0;
}

/* Rule tables in the guides: always one card per rule, each value next to its column name,
   so nothing is ever cut at any width. */
.stack table,
.stack tbody,
.stack tr,
.stack td {
  display: block;
}

.stack thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.stack {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stack tr {
  padding: 14px 18px;
}

.stack tr + tr {
  border-top: 1px solid var(--line);
}

/* The column name sits in a gutter on the left, so the value keeps its normal inline flow
   (text and code mixed in one cell stay on one line). */
.stack td {
  position: relative;
  padding: 4px 0 4px 10.5rem;
  border: 0;
  overflow-wrap: anywhere;
}

.stack td code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.stack td::before {
  content: attr(data-label);
  position: absolute;
  left: 0;
  top: 4px;
  width: 10rem;
  font-size: 0.8125rem;
  color: var(--text-3);
  padding-top: 0.2em;
}

.stack td.empty {
  display: none;
}

@media (max-width: 479px) {
  .stack td {
    padding-left: 0;
  }
  .stack td::before {
    position: static;
    display: block;
    width: auto;
  }
}

/* Two-column reference tables (docs): on phones, the term above its explanation. */
@media (max-width: 719px) {
  .stack-sm table,
  .stack-sm tbody,
  .stack-sm tr,
  .stack-sm td {
    display: block;
  }
  .stack-sm thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .stack-sm tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .stack-sm td {
    padding: 0;
    border: 0;
  }
  .stack-sm td:first-child {
    font-weight: 500;
    margin-bottom: 2px;
  }
}

.prose .sources {
  font-size: 0.875rem;
  color: var(--text-2);
}

.prose .sources a {
  overflow-wrap: anywhere;
}

.product-box {
  margin: 2.2em 0;
}

.product-box .actions {
  margin-top: 20px;
}

.buy .actions {
  margin-top: 22px;
}

.legal-draft {
  font-size: 0.9375rem;
  color: var(--text-2);
  margin-bottom: 28px;
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.guide-list li {
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.guide-list a {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.guide-list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--line-2);
}

.guide-list p {
  margin-top: 6px;
  color: var(--text-2);
  max-width: 64ch;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--section);
  border-top: 1px solid var(--line);
  padding-block: 64px 40px;
  font-size: 0.9375rem;
}

.home .site-footer {
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 40px 24px;
  grid-template-columns: 1fr 1fr;
}

.footer-brand {
  grid-column: 1 / -1;
}

.footer-brand img {
  display: block;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-2);
  max-width: 34ch;
}

.footer-brand p + p {
  margin-top: 12px;
}

.site-footer h2 {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 14px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

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

.site-footer a:hover {
  color: var(--text);
}

.mails a {
  white-space: nowrap;
}

.footer-note {
  margin-top: 14px;
  max-width: 30ch;
}

.footer-base {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Phones: Products, then the columns with mail addresses at full width. */
@media (max-width: 559px) {
  #support,
  .footer-grid > nav[aria-label="Trust"] {
    grid-column: 1 / -1;
    order: 2;
  }
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: 4fr 2fr 3fr 2fr;
    gap: 40px;
  }
  .footer-brand {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Spacing utilities (last, so they win over component margins) ---------- */

.mt-xs {
  margin-top: 8px;
}
.mt-s {
  margin-top: 14px;
}
.mt-m {
  margin-top: 28px;
}
.mt-l {
  margin-top: 44px;
}
.mb-s {
  margin-bottom: 18px;
}
.mb-m {
  margin-bottom: 28px;
}
