:root {
  --ink: #1c2f47;
  --ink-rgb: 28, 47, 71;
  --ink-70: rgba(var(--ink-rgb), 0.7);
  --ink-2: #213852;
  --paper: #fbf6ee;
  --paper-2: #fffaf5;
  --dark-copy: rgba(255, 250, 245, 0.8);
  --body: var(--ink-70);
  --muted: var(--ink-70);
  --slate: var(--body);
  --overline: #8d96a2;
  --overline-gap: 8px;
  --line: #e1d5c2;
  --coral: #fd9c81;
  --coral-2: #e87961;
  --ink-glow: #6686aa;
  --ink-glow-rgb: 102, 134, 170;
  --white: #ffffff;
  --green: #2f7a5a;
  --amber: #9c6d1c;
  --red: #a33a32;
  --serif: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 400;
  --weight-semibold: 400;
  --weight-bold: 400;
  --weight-title: 700;
  --weight-action: 700;
  --text-line-height: 1.5;
  --title-line-height: 0.9;
  --tracking-text: 0px;
  --tracking-title: 0px;
  --page: min(1160px, calc(100vw - 40px));
  --gutter: clamp(20px, 4vw, 44px);
  --nav-height: 74px;
  --radius: 12px;
  --paper-grid:
    linear-gradient(90deg, rgba(28, 47, 71, 0.035) 1px, transparent 1px) 0 0 / 64px 64px;
  --shadow: 0 18px 50px rgba(28, 47, 71, 0.12);
  --shadow-card-soft: 0 0 32px rgba(28, 47, 71, 0.05);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  margin: 0;
  color: var(--body);
  background:
    var(--paper-grid),
    linear-gradient(180deg, var(--paper-2), #f5e6d2 52%, var(--paper));
  font-family: var(--sans);
  font-size: 16px;
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-text);
  line-height: var(--text-line-height);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

button {
  font: inherit;
}

strong,
b {
  font-weight: var(--weight-regular);
}

[hidden] {
  display: none !important;
}

code {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid rgba(28, 47, 71, 0.12);
  border-radius: 5px;
  color: var(--ink);
  background: rgba(255, 250, 245, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

[id] {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

::selection {
  color: var(--ink);
  background: var(--coral);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
.threshold-table:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: var(--weight-title);
  letter-spacing: var(--tracking-title);
  line-height: var(--title-line-height);
  text-wrap: balance;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  width: 100%;
  min-height: var(--nav-height);
  padding: 14px max(20px, calc((100vw - 1160px) / 2));
  color: var(--ink);
  background: rgba(251, 246, 238, 0.94);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  backdrop-filter: blur(22px) saturate(155%);
  box-shadow: 0 8px 18px rgba(23, 40, 61, 0.08);
}

.site-header.is-open {
  background: rgba(251, 246, 238, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: var(--weight-medium);
  line-height: 1;
}

.brand img {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.nav-cluster {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0;
}

.top-nav,
.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(12px, 1.65vw, 24px);
  color: var(--ink);
  font-size: 14px;
  font-weight: var(--weight-semibold);
}

.top-nav {
  justify-self: end;
}

.menu-button {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: rgba(23, 40, 61, 0.08);
  cursor: pointer;
}

.menu-button span {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease;
}

.menu-button span:first-child {
  transform: translateY(-4px);
}

.menu-button span:last-child {
  transform: translateY(4px);
}

.menu-button[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--nav-height) 0 auto 0;
  z-index: 11;
  display: grid;
  gap: 4px;
  padding: 16px 20px 24px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 18px rgba(23, 40, 61, 0.08);
}

.mobile-menu a {
  padding: 13px 4px;
  font-weight: var(--weight-semibold);
}

.top-nav a,
.footer nav a {
  text-underline-offset: 5px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.78fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: 100%;
  padding: calc(var(--nav-height) + 62px) max(20px, calc((100vw - 1160px) / 2)) 70px;
  background:
    radial-gradient(circle at 16% 18%, rgba(253, 156, 129, 0.2), transparent 32%),
    radial-gradient(circle at 86% 24%, rgba(var(--ink-glow-rgb), 0.16), transparent 29%),
    var(--paper-grid),
    linear-gradient(180deg, var(--paper-2), var(--paper));
}

.hero__copy,
.section-head {
  display: grid;
  gap: 0;
}

.eyebrow {
  margin: 0 0 var(--overline-gap);
  color: var(--coral-2);
  font-size: 0.72rem;
  font-weight: var(--weight-action);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.4rem, 7vw, 64px);
  line-height: var(--title-line-height);
}

.hero p,
.section-head p {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--slate);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: var(--weight-bold);
  line-height: 1.1;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 160ms ease;
}

.button:hover {
  text-decoration: none;
}

.button--primary {
  color: var(--ink);
  background: var(--coral);
}

.button--primary:hover {
  background: #ffb097;
}

.button--secondary-dark {
  color: var(--paper-2);
  background: var(--ink);
}

.button--secondary-dark:hover {
  background: var(--ink-2);
}

.button--secondary {
  color: var(--ink);
  border: 1px solid rgba(28, 47, 71, 0.14);
  background: rgba(255, 250, 245, 0.72);
}

.certificate-sheet,
.lookup-style-card {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 12px;
  color: var(--paper-2);
  background:
    linear-gradient(135deg, rgba(253, 156, 129, 0.16), transparent 44%),
    var(--ink);
  box-shadow: var(--shadow);
}

.certificate-sheet__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.certificate-sheet__head span,
.certificate-sheet dt {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: var(--weight-action);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.certificate-sheet__head strong {
  color: var(--paper-2);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: var(--title-line-height);
}

.certificate-sheet dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.certificate-sheet dl div {
  display: grid;
  grid-template-columns: minmax(96px, 0.34fr) 1fr;
  gap: 16px;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 250, 245, 0.14);
}

dt,
dd {
  margin: 0;
}

.certificate-sheet dd {
  color: var(--dark-copy);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}

.certificate-sheet p {
  margin: 0;
  color: var(--dark-copy);
  font-weight: var(--weight-light);
  line-height: 1.62;
}

.registry,
.states,
.mechanics,
.privacy {
  width: var(--page);
  margin-inline: auto;
  padding: clamp(70px, 9vw, 120px) 0;
}

.page-band {
  width: 100%;
  padding: clamp(70px, 9vw, 120px) max(20px, calc((100vw - 1160px) / 2));
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.64), rgba(251, 246, 238, 0.92));
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(30px, 5vw, 54px);
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 4.4vw, 56px);
  line-height: var(--title-line-height);
}

.registry-grid,
.field-grid,
.mechanics-grid,
.verification-grid,
.privacy-grid,
.state-list {
  display: grid;
  gap: 14px;
}

.registry-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field-grid,
.verification-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mechanics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.privacy-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.state-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card,
.empty-registry,
.field-grid article,
.state-list article,
.mechanics-grid article,
.verification-grid article,
.privacy-grid article {
  border: 1px solid rgba(28, 47, 71, 0.1);
  border-radius: 10px;
  background: rgba(255, 250, 245, 0.72);
  box-shadow: var(--shadow-card-soft);
}

.metric-card {
  display: grid;
  min-height: 188px;
  align-content: start;
  gap: 10px;
  padding: clamp(20px, 2.4vw, 26px);
}

.metric-card span {
  color: var(--coral-2);
  font-size: 0.72rem;
  font-weight: var(--weight-action);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: var(--weight-title);
  line-height: var(--title-line-height);
}

.metric-card p,
.empty-registry p,
.state-list p,
.mechanics-grid p,
.verification-grid p,
.privacy-grid p {
  margin: 0;
  color: var(--slate);
  line-height: 1.62;
}

.empty-registry {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: clamp(20px, 2.8vw, 28px);
  border-style: dashed;
}

.empty-registry h3,
.field-grid h3,
.mechanics-grid h3,
.verification-grid h3,
.privacy-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: var(--title-line-height);
}

.field-grid article,
.verification-grid article,
.privacy-grid article {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
}

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

.field-grid li {
  position: relative;
  padding-left: 22px;
  color: var(--slate);
  line-height: 1.58;
}

.field-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral-2);
}

.state-list article {
  display: grid;
  min-height: 164px;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.status {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: var(--weight-action);
  line-height: 1;
}

.status--certified {
  color: var(--green);
  background: rgba(47, 122, 90, 0.1);
}

.status--pending {
  color: var(--ink-glow);
  background: rgba(var(--ink-glow-rgb), 0.12);
}

.status--review {
  color: var(--amber);
  background: rgba(156, 109, 28, 0.12);
}

.status--bad,
.status--revoked {
  color: var(--red);
  background: rgba(163, 58, 50, 0.1);
}

.threshold-table {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(28, 47, 71, 0.1);
  border-radius: 10px;
  background: rgba(255, 250, 245, 0.72);
  box-shadow: var(--shadow-card-soft);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(28, 47, 71, 0.1);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--ink);
  background: rgba(28, 47, 71, 0.04);
  font-size: 0.78rem;
  font-weight: var(--weight-action);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

tbody th {
  width: 32%;
  color: var(--ink);
  font-weight: var(--weight-action);
}

tbody td {
  color: var(--slate);
}

.mechanics-grid article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  align-items: start;
  padding: clamp(18px, 2.4vw, 24px);
}

.mechanics-grid span {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--paper-2);
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: var(--weight-action);
}

.footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  width: var(--page);
  margin-inline: auto;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

@media (max-width: 980px) {
  :root {
    --page: min(720px, calc(100vw - 32px));
  }

  .site-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    min-height: var(--nav-height);
    padding: 14px 16px;
  }

  .brand img {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .nav-cluster {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: calc(var(--nav-height) + 64px);
    padding-inline: max(16px, calc((100vw - 720px) / 2));
  }

  .registry-grid,
  .field-grid,
  .mechanics-grid,
  .verification-grid,
  .privacy-grid,
  .state-list {
    grid-template-columns: 1fr;
  }

  .footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero,
  .registry,
  .page-band,
  .states,
  .mechanics,
  .privacy {
    padding-block: 54px;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 70px);
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.55rem, 10vw, 3.1rem);
  }

  .hero p,
  .section-head p {
    margin-top: 16px;
    font-size: 1rem;
    line-height: 1.58;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .section-head h2 {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .hero__actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .certificate-sheet {
    padding: 22px;
  }

  .certificate-sheet dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .metric-card,
  .state-list article {
    min-height: 0;
  }

  .threshold-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    padding: 18px;
    border: 1px solid rgba(28, 47, 71, 0.1);
    border-radius: 10px;
    background: rgba(255, 250, 245, 0.72);
    box-shadow: var(--shadow-card-soft);
  }

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

  tbody th {
    width: auto;
    padding: 0 0 12px;
    font-size: 1rem;
  }

  tbody td {
    display: grid;
    grid-template-columns: minmax(94px, 0.38fr) minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
  }

  tbody td::before {
    color: var(--coral-2);
    font-size: 0.72rem;
    font-weight: var(--weight-action);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  tbody td:nth-of-type(1)::before {
    content: "Avert.";
  }

  tbody td:nth-of-type(2)::before {
    content: "Échec";
  }

  .mechanics-grid article {
    grid-template-columns: 1fr;
  }

  .mechanics-grid span {
    grid-row: auto;
  }
}
