/*
 * getvalise.dev. The palette roles, type and rules are the console's
 * (styles/valise.css and docs/design/principles.md in the Valise repo):
 * warm sand ground, cream surfaces, brown ink, royal purple as a fill only,
 * saddle leather for tags, no grey. Dark keeps the same roles on dark brown.
 */

:root {
  --background: oklch(0.962 0.018 84);
  --foreground: oklch(0.27 0.03 55);
  --card: oklch(0.978 0.017 84);
  --primary: oklch(0.36 0.12 300);
  --primary-foreground: oklch(0.97 0.015 85);
  --primary-hover: oklch(0.2 0.02 50);
  --muted: oklch(0.935 0.02 84);
  --muted-foreground: oklch(0.47 0.035 62);
  --accent: oklch(0.915 0.022 85);
  --border: oklch(0.875 0.02 82);
  --strong-rule: oklch(0.6 0.045 68);
  --ring: oklch(0.36 0.12 300);
  --brand-ink: var(--primary);
  --saddle: oklch(0.36 0.035 55);
  --saddle-foreground: oklch(0.94 0.02 85);
  --pane-ground: oklch(0.955 0.018 82);
  --ok: oklch(0.47 0.08 140);
  --warn: oklch(0.5 0.1 70);
  --stitch-top: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2712%27%20height%3D%276%27%3E%3Cpath%20d%3D%27M4.2%204.1Q5.3%202.6%207.6%202%27%20fill%3D%27none%27%20stroke%3D%27%233a2717%27%20stroke-opacity%3D%270.75%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
  --stitch-bottom: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2712%27%20height%3D%276%27%3E%3Cpath%20d%3D%27M7.8%204.1Q6.7%202.6%204.4%202%27%20fill%3D%27none%27%20stroke%3D%27%233a2717%27%20stroke-opacity%3D%270.75%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
  --stitch-left: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%276%27%20height%3D%2712%27%3E%3Cpath%20d%3D%27M4%204.2Q2.6%205.3%202%207.6%27%20fill%3D%27none%27%20stroke%3D%27%233a2717%27%20stroke-opacity%3D%270.75%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
  --stitch-right: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%276%27%20height%3D%2712%27%3E%3Cpath%20d%3D%27M2%204.2Q3.4%205.3%204%207.6%27%20fill%3D%27none%27%20stroke%3D%27%233a2717%27%20stroke-opacity%3D%270.75%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");

  --sans: "Helvetica Neue", Inter, Helvetica, Arial, system-ui, -apple-system, sans-serif;
  --display: Futura, "Futura PT", "Century Gothic", "Avenir Next", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --label-column: 11rem;
  --gutter: 16px;
  --radius: 0.5rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.205 0.016 58);
    --foreground: oklch(0.9 0.025 80);
    --card: oklch(0.235 0.018 58);
    --primary: oklch(0.44 0.15 300);
    --primary-foreground: oklch(0.96 0.015 85);
    --primary-hover: oklch(0.14 0.012 50);
    --muted: oklch(0.265 0.02 58);
    --muted-foreground: oklch(0.74 0.035 72);
    --accent: oklch(0.3 0.016 75);
    --border: oklch(0.31 0.02 58);
    --strong-rule: oklch(0.58 0.04 66);
    --ring: oklch(0.8 0.035 82);
    --brand-ink: oklch(0.84 0.035 85);
    --saddle: oklch(0.42 0.04 55);
    --saddle-foreground: oklch(0.93 0.025 85);
    --pane-ground: oklch(0.225 0.019 58);
    --ok: #9ece6a;
    --warn: #e0af68;
    --stitch-top: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2712%27%20height%3D%276%27%3E%3Cpath%20d%3D%27M4.2%204.1Q5.3%202.6%207.6%202%27%20fill%3D%27none%27%20stroke%3D%27%23b39a78%27%20stroke-opacity%3D%270.7%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
    --stitch-bottom: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2712%27%20height%3D%276%27%3E%3Cpath%20d%3D%27M7.8%204.1Q6.7%202.6%204.4%202%27%20fill%3D%27none%27%20stroke%3D%27%23b39a78%27%20stroke-opacity%3D%270.7%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
    --stitch-left: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%276%27%20height%3D%2712%27%3E%3Cpath%20d%3D%27M4%204.2Q2.6%205.3%202%207.6%27%20fill%3D%27none%27%20stroke%3D%27%23b39a78%27%20stroke-opacity%3D%270.7%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
    --stitch-right: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%276%27%20height%3D%2712%27%3E%3Cpath%20d%3D%27M2%204.2Q3.4%205.3%204%207.6%27%20fill%3D%27none%27%20stroke%3D%27%23b39a78%27%20stroke-opacity%3D%270.7%27%20stroke-width%3D%271.4%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------- base --- */

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

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

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 5.2vw, 3.25rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.08;
  max-width: 22ch;
}

h2 {
  font-size: 1.375rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}

p,
ul,
ol {
  margin: 0.75rem 0;
  max-width: 68ch;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--strong-rule);
}

a:hover {
  text-decoration-color: currentColor;
}

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

code,
pre {
  font-family: var(--mono);
  font-size: 0.875em;
}

:not(pre) > code {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--muted);
  overflow-wrap: anywhere;
}

pre {
  margin: 0.75rem 0;
  padding: 0.875rem 1rem;
  max-width: 100%;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.6;
}

pre code {
  font-size: 0.85rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  z-index: 10;
}

.skip:focus {
  left: var(--gutter);
}

.wrap {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }
}

/* -------------------------------------------------------- masthead --- */

.masthead {
  border-bottom: 1px solid var(--border);
}

.masthead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--brand-ink);
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand img {
  display: block;
}

.brand-small {
  font-size: 0.95rem;
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.9375rem;
}

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

.masthead nav a:hover {
  color: var(--foreground);
}

.masthead nav a[aria-current="page"] {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
}

/* -------------------------------------------------------- sections --- */

.hero {
  padding-block: 3.5rem 3rem;
}

@media (min-width: 48rem) {
  .hero {
    padding-block: 5.5rem 4.5rem;
  }
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--brand-ink);
}

.lede {
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  max-width: 58ch;
}

.lede strong {
  color: var(--foreground);
  font-weight: 500;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius);
  border: 1px solid var(--strong-rule);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--foreground);
  background: transparent;
}

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

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

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

.section {
  border-top: 1px solid var(--border);
  padding-block: 3rem;
}

/* Swiss measure: a label column, then everything else. */
@media (min-width: 56rem) {
  .section.split {
    display: grid;
    grid-template-columns: var(--label-column) minmax(0, 1fr);
    column-gap: 2.5rem;
  }
}

.section-label {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

.section-body {
  min-width: 0;
}

.section-body > h2:first-child {
  margin-bottom: 0.75rem;
}

.page-head {
  padding-block: 3rem 2.5rem;
}

@media (min-width: 48rem) {
  .page-head {
    padding-block: 4.5rem 3.5rem;
  }
}

.muted {
  color: var(--muted-foreground);
}

/* ------------------------------------------------------- row lists --- */

.rows {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.rows > div {
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 40rem) {
  .rows > div {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    column-gap: 1.5rem;
  }
}

.rows dt {
  font-weight: 600;
}

.rows dd {
  margin: 0.25rem 0 0;
  min-width: 0;
}

@media (min-width: 40rem) {
  .rows dd {
    margin-top: 0;
  }
}

.rows dd p:first-child {
  margin-top: 0;
}

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

/* ----------------------------------------------------------- cards --- */

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 40rem) {
  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  min-width: 0;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h3 {
  margin-bottom: 0.25rem;
}

.card p {
  margin-bottom: 0;
}

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

/* The saddle stitch, on one seam: the case the claim race sits in. */
.stitched {
  position: relative;
  padding: 1.75rem 1.5rem;
}

.stitched::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  background-image: var(--stitch-top), var(--stitch-bottom), var(--stitch-left), var(--stitch-right);
  background-position: top left, bottom left, top left, top right;
  background-repeat: space no-repeat, space no-repeat, no-repeat space, no-repeat space;
  background-size: 12px 6px, 12px 6px, 6px 12px, 6px 12px;
}

/* -------------------------------------------------------------- tags --- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li + li {
  margin: 0;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: var(--saddle);
  color: var(--saddle-foreground);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
}

/* --------------------------------------------------------- steps --- */

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

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1rem 2.5rem;
  margin: 0;
}

.steps > li + li {
  margin: 0;
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--brand-ink);
}

.steps > li:last-child {
  padding-bottom: 0;
}

/* ------------------------------------------------------- diagram --- */

.diagram {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  margin-top: 1.5rem;
}

@media (min-width: 56rem) {
  .diagram {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr);
    align-items: center;
  }
}

.diagram .clients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.diagram .clients li {
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--strong-rule);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.875rem;
}

.diagram .wire {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  text-align: center;
  white-space: nowrap;
}

.diagram .wire::before {
  content: "↓  ";
}

@media (min-width: 56rem) {
  .diagram .wire::before {
    content: "";
  }

  .diagram .wire::after {
    content: "  →";
  }
}

.diagram .case {
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 2px solid var(--foreground);
  border-radius: var(--radius);
}

.diagram .case h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--brand-ink);
}

.diagram .case p {
  margin: 0.4rem 0 0;
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------- tables --- */

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

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

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

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

th {
  font-weight: 600;
  background: var(--muted);
}

.note {
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--strong-rule);
  background: var(--pane-ground);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.note > :first-child {
  margin-top: 0;
}

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

/* ---------------------------------------------------------- footer --- */

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 3rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.footer-grid p {
  margin-bottom: 0;
}

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

.footer-links a {
  color: var(--foreground);
}

/* ------------------------------------------------------------- 404 --- */

.notfound {
  padding-block: 5rem 4rem;
}

/* Code in a table cell stays whole; the table scrolls inside its frame. */
td code,
th code {
  white-space: nowrap;
  overflow-wrap: normal;
}

@media (max-width: 40rem) {
  .steps > li {
    padding-left: 2rem;
  }

  th,
  td {
    padding: 0.5rem 0.6rem;
  }
}

.table-scroll table {
  min-width: 34rem;
}

/* The waitlist form: one email field and its button, wrapping below 30rem. */
.waitlist {
  margin-top: 2rem;
  max-width: 36rem;
}

.waitlist label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.waitlist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.waitlist input[type="email"] {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--strong-rule);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
}

.waitlist input[type="email"]:focus-visible,
.waitlist .btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.waitlist .btn {
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}

.waitlist-note {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* The honeypot: off-screen for people, still a field for naive bots. */
.waitlist-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
