:root {
  --ink: #111;
  --field: #e8e6e1;
  --soft: #3f3f3f;
  --mute: #6e6e6e;
  --line: rgba(17, 17, 17, 0.12);
  --wash: rgba(17, 17, 17, 0.05);
  --maxw: 38rem;
  --docw: 720px;
  --pad-x: clamp(24px, 6vw, 48px);
  --pad-y: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

html, body {
  min-height: 100%;
  overflow-x: clip;
}

body {
  background: var(--field);
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(17, 17, 17, 0.14);
  color: var(--ink);
}

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

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

a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* —— Shell (home + legal hub) —— */
.shell {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: var(--pad-y) var(--pad-x) 24px;
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

.shell > header,
.site-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.shell > header {
  margin-bottom: clamp(40px, 8vh, 72px);
}

.site-bar {
  max-width: var(--maxw);
  width: 100%;
  margin-inline: auto;
  padding: var(--pad-y) var(--pad-x) 0;
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
}

.mark {
  text-decoration: none;
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
  min-width: 0;
}

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

.mail,
.back {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--soft);
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mail:hover,
.back:hover {
  color: var(--ink);
  text-decoration: none;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  padding: clamp(24px, 8vh, 72px) 0 32px;
}

.stage.top {
  justify-content: flex-start;
  padding-top: 0;
  padding-bottom: 48px;
}

.standard {
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 2.5rem;
  max-width: 18ch;
}

.stage > h1 {
  font-size: clamp(1.45rem, 3.4vw, 1.9rem);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 0 0 2.25rem;
}

.rows {
  display: grid;
  gap: 1.5rem;
}

.row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
}

.label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mute);
  text-transform: uppercase;
}

.value {
  font-size: 15px;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.value.soft { color: var(--soft); }

.products-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.products-row a {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.products-row a:hover {
  text-decoration: none;
  border-bottom-color: var(--ink);
}

.services-home {
  margin-top: 2.25rem;
}

.services-home a {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

.services-home a:hover { text-decoration: none; }

.services {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  max-width: 40rem;
}

.services h1 {
  font-size: clamp(1.45rem, 3.4vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.85rem;
}

.services h2 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 2rem 0 0.55rem;
}

.services-lead,
.services p {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--soft);
}

.services-lead {
  margin: 0 0 1.5rem;
  max-width: 42ch;
  color: var(--ink);
}

.services .rows { gap: 1.15rem; }

.services .value {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--soft);
  line-height: 1.5;
}

.services-close,
.services p {
  margin: 0;
}

.services-close {
  margin-top: 1.35rem;
  max-width: 42ch;
}

.services a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.services a:hover {
  text-decoration: none;
  border-bottom-color: var(--ink);
}

.services-place {
  margin-top: 0.45rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.products,
.docs {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.products a,
.docs a {
  font-size: 15px;
  width: fit-content;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.products a:hover,
.docs a:hover {
  text-decoration: none;
  border-bottom-color: var(--ink);
}

.note {
  margin-top: 2.25rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
  max-width: 42ch;
  line-height: 1.5;
}

.shell > footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 40px;
}

.shell > footer p,
.shell > footer a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.shell > footer a:hover { color: var(--ink); text-decoration: none; }

/* —— Product pages —— */
.stage.product {
  justify-content: flex-start;
  max-width: var(--docw);
  padding-top: 0;
  padding-bottom: 48px;
}

.product-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 12px;
}

.product-title {
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.product-tag {
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 28ch;
  margin: 0 0 2rem;
  color: var(--ink);
}

.product-prose {
  display: grid;
  gap: 1rem;
  max-width: 58ch;
  margin-bottom: 2.25rem;
}

.product-prose p {
  margin: 0;
  color: var(--soft);
  font-size: 1.02rem;
  line-height: 1.55;
}

.product-meta {
  display: grid;
  gap: 1.35rem;
  margin-bottom: 0.5rem;
}

/* —— Legal documents —— */
.wrap {
  max-width: var(--docw);
  margin: 0 auto;
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
}

body.doc {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.68;
  letter-spacing: -0.003em;
}

body.doc .hero h1,
body.doc .sec-head h2 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
}

body.doc strong {
  font-weight: 600;
  font-style: normal;
}

body.doc a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

body.doc a:hover { color: var(--soft); }

body.doc .site-bar a.mark,
body.doc .site-bar a.back,
body.doc .doc-nav a,
body.doc footer .f a {
  text-decoration: none;
}

body.doc .site-bar a.mark {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

body.doc .site-bar a.back {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86em;
  background: var(--wash);
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

.hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-top: 8px;
}

.hero .lockup { margin-bottom: 14px; }

.hero h1 {
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero .doc-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 8px 0 0;
}

.hero .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
  margin: 0 0 22px;
  max-width: 48ch;
  line-height: 1.5;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.doc-nav a {
  color: var(--soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.doc-nav a:hover,
.doc-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.content {
  padding-top: 40px;
  padding-bottom: 24px;
}

.callout,
.notice {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}

.callout .label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 10px;
}

.callout p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
  max-width: 58ch;
  line-height: 1.4;
}

.notice p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  max-width: 60ch;
}

.doc-sec {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.doc-sec:first-of-type {
  border-top: none;
  padding-top: 0;
}

.sec-head {
  display: flex;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 16px;
}

.sec-head .no {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.06em;
  padding-top: 0.45rem;
  min-width: 2.4rem;
  text-transform: uppercase;
}

.sec-head h2 {
  font-weight: 400;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

.body-col { max-width: 62ch; overflow-wrap: break-word; }

.body-col p {
  margin: 0 0 14px;
  color: var(--soft);
}

.body-col p:last-child { margin-bottom: 0; }

.body-col h3 {
  font-size: 1rem;
  font-weight: 400;
  margin: 22px 0 8px;
  color: var(--ink);
}

.body-col ul {
  margin: 0 0 14px;
  padding-left: 1.2rem;
}

.body-col li {
  margin-bottom: 7px;
  color: var(--soft);
}

.body-col li:last-child { margin-bottom: 0; }

body.doc > footer {
  padding: 32px 0 56px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

body.doc > footer .f {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.04em;
}

body.doc > footer .f a {
  color: var(--mute);
}

body.doc > footer .f a:hover { color: var(--ink); }

@media (max-width: 560px) {
  :root {
    --pad-x: clamp(28px, 9vw, 40px);
    --pad-y: 32px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .label { margin-bottom: 0.1rem; }

  .shell {
    padding-bottom: max(36px, env(safe-area-inset-bottom, 0px));
  }

  .shell > header {
    margin-bottom: 36px;
    align-items: baseline;
  }

  .stage {
    padding: 16px 0 36px;
  }

  .stage.product,
  .stage.top {
    padding-top: 0;
  }

  .standard {
    max-width: none;
    font-size: clamp(1.7rem, 8vw, 2.1rem);
    margin-bottom: 1.75rem;
  }

  .products-row { gap: 0; }

  .services-home a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .services {
    margin-top: 0;
    padding-top: 0;
  }

  .services h1,
  .services h2 { font-size: clamp(1.35rem, 6.5vw, 1.6rem); }

  .services a {
    overflow-wrap: anywhere;
  }

  .products-row a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0;
  }

  .docs a,
  .products a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0;
  }

  .shell > footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 36px;
  }

  .hero { padding: 36px 0 28px; }
  .hero h1 { overflow-wrap: anywhere; }
  .content {
    padding-top: 32px;
    padding-bottom: 20px;
  }
  .doc-sec { padding: 28px 0; }
  .product-tag { max-width: none; }

  body.doc > footer {
    padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stage > * {
    animation: in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .stage .standard,
  .stage > h1 { animation-delay: 0.05s; }
  .stage .rows,
  .stage .products-row { animation-delay: 0.16s; }
}

@keyframes in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media print {
  body { background: #fff; }
  .site-bar { display: none; }
  .hero { padding-top: 0; }
  .callout, .notice, .doc-sec { break-inside: avoid; }
}
