/* The website's layer over the brand kit (brand/retavon.css, copied unchanged). Colours come
   from the kit's --rv-* tokens; the few the kit has no token for are defined here once. */

:root {
  --band: var(--rv-sidebar);
  --band-text: #f5f3ef;
  --band-muted: #b5c0c6;
  --band-line: #405059;
  --code-bg: #141d22;
  --code-key: #f28b67;
  --code-string: #8cdaad;
  --code-number: #9acbfa;
  --code-mark: #3b2924;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --wrap: 1160px;
  --gutter: 16px;
}
[data-theme="dark"] {
  --code-bg: #0b1216;
}
@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  background: var(--rv-background);
}
img {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.015em;
}
h1 {
  font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 700;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}
p,
li {
  text-wrap: pretty;
}
p {
  margin: 0;
}
a {
  color: var(--rv-primary);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--rv-primary-hover);
}
code {
  font-family: var(--mono);
  font-size: 0.875em;
}
:focus-visible {
  outline: 3px solid var(--rv-focus);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 12px;
  background: var(--rv-surface);
  color: var(--rv-text);
  border: 1px solid var(--rv-control-border);
  border-radius: var(--rv-radius-control);
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

/* Logo and screenshot variants follow the theme; the kit forbids inverting a logo. */
.logo-dark,
.shot-dark {
  display: none;
}
[data-theme="dark"] .logo-dark,
[data-theme="dark"] .shot-dark {
  display: block;
}
[data-theme="dark"] .logo-light,
[data-theme="dark"] .shot-light {
  display: none;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rv-border);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  flex-wrap: wrap;
}
.brand {
  display: block;
  padding-block: 8px;
  margin-right: auto;
}
.brand img {
  width: 151px;
  height: 32px;
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: var(--rv-radius-control);
  color: var(--rv-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover {
  background: var(--rv-surface-muted);
  color: var(--rv-text);
}
.site-nav a[aria-current="page"] {
  color: var(--rv-primary);
  box-shadow: inset 0 -2px 0 var(--rv-primary);
  border-radius: 0;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-control);
  background: transparent;
  color: var(--rv-text);
  cursor: pointer;
}
.theme-toggle[hidden] {
  display: none;
}
.theme-toggle:hover {
  background: var(--rv-surface-muted);
}
.icon-sun,
[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: block;
}
@media (max-width: 559px) {
  .site-nav {
    order: 3;
    width: 100%;
    margin-inline: -12px;
    padding-bottom: 8px;
  }
}

/* Sections */
.section {
  padding-block: 64px;
}
@media (min-width: 900px) {
  .section {
    padding-block: 96px;
  }
}
.section + .section {
  border-top: 1px solid var(--rv-border);
}
.section-head {
  max-width: 44rem;
  margin-bottom: 40px;
}
.section-head p {
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--rv-text-muted);
}

/* Hero */
.hero {
  padding-block: 56px 48px;
}
@media (min-width: 900px) {
  .hero {
    padding-block: 96px 64px;
  }
}
.hero h1 {
  max-width: 15ch;
}
.lead {
  margin-top: 24px;
  max-width: 40rem;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  color: var(--rv-text-muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.actions .rv-btn {
  font-size: 16px;
  min-height: 48px;
  padding-inline: 20px;
}
.page-hero {
  padding-block: 56px 40px;
}
@media (min-width: 900px) {
  .page-hero {
    padding-block: 80px 48px;
  }
}
.page-hero h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  max-width: 20ch;
}

/* Screenshots */
.shot {
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-card);
  overflow: hidden;
  background: var(--rv-surface);
  box-shadow: var(--rv-shadow);
}
.shot img {
  width: 100%;
}
.caption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--rv-text-muted);
}

/* The same record, twice: the screen a person works and the JSON an agent reads. */
.pair {
  display: grid;
  gap: 24px;
}
.pair .code {
  margin: 0;
}
.pair > *,
.principle,
.feature > *,
.two-ways > *,
.areas > *,
.status > * {
  min-width: 0;
}
@media (min-width: 1024px) {
  .pair {
    grid-template-columns: 7fr 5fr;
    gap: 32px 48px;
    align-items: start;
  }
  .pair .shot {
    grid-column: 1 / -1;
  }
  .pair .mapping {
    margin-top: 0;
  }
}
.pair-section {
  border-top: 0;
  padding-top: 24px;
}
.section + .pair-section {
  border-top: 0;
}
.pair-labels {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.mapping {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 15px;
}
.mapping caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 8px;
}
.mapping th,
.mapping td {
  text-align: left;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rv-border);
  vertical-align: top;
}
.mapping th {
  font-size: 14px;
  font-weight: 600;
  color: var(--rv-text-muted);
}
.mapping .button-name {
  font-weight: 600;
}

/* Code */
.code {
  margin: 0;
  background: var(--code-bg);
  color: var(--band-text);
  border: 1px solid var(--band-line);
  border-radius: var(--rv-radius-card);
  overflow: hidden;
}
.code-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--band-line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--band-muted);
}
.code-title strong {
  color: var(--band-text);
  font-weight: 600;
}
.code pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  tab-size: 2;
}
.code pre:focus-visible {
  outline-offset: -3px;
}
.code .k {
  color: var(--code-key);
}
.code .s {
  color: var(--code-string);
}
.code .n {
  color: var(--code-number);
}
.code mark {
  display: inline-block;
  min-width: 100%;
  background: var(--code-mark);
  color: inherit;
  margin-inline: -16px;
  padding-inline: 16px;
  box-sizing: content-box;
}
.code .dim {
  color: var(--band-muted);
}

/* Two ways in */
.two-ways {
  display: grid;
  gap: 32px;
}
@media (min-width: 800px) {
  .two-ways {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}
.two-ways h3 {
  margin-bottom: 12px;
}
.two-ways p + p {
  margin-top: 12px;
}
.two-ways .muted {
  color: var(--rv-text-muted);
}

/* Areas of the business */
.areas {
  display: grid;
  gap: 0 48px;
}
@media (min-width: 800px) {
  .areas {
    grid-template-columns: 1fr 1fr;
  }
}
.area {
  padding-block: 28px;
  border-top: 1px solid var(--rv-border);
}
.area h3 {
  margin-bottom: 8px;
}
.area p {
  color: var(--rv-text-muted);
}
.area ul {
  margin: 12px 0 0;
  padding-left: 20px;
}
.area li + li {
  margin-top: 4px;
}

/* The graphite band, for agents */
.band {
  background: var(--band);
  color: var(--band-text);
  padding-block: 64px;
}
@media (min-width: 900px) {
  .band {
    padding-block: 96px;
  }
}
.band .section-head p,
.band .principle p {
  color: var(--band-muted);
}
.band a {
  color: var(--code-key);
}
.band a:hover {
  color: #f7a181;
}
.band :focus-visible {
  outline-color: var(--code-key);
}
.band .rv-btn-primary {
  background: #f28b67;
  color: #202a30;
}
.band .rv-btn-primary:hover {
  background: #f7a181;
  color: #202a30;
}
.band .rv-btn-secondary {
  background: transparent;
  color: var(--band-text);
  border-color: #81919a;
}
.band .rv-btn-secondary:hover {
  background: #354249;
  color: var(--band-text);
}
.principles {
  display: grid;
  gap: 40px 48px;
}
@media (min-width: 900px) {
  .principles {
    grid-template-columns: 1fr 1fr;
  }
}
.principle h3 {
  margin-bottom: 8px;
}
.principle .code {
  margin-top: 16px;
}
.band .shot {
  border-color: var(--band-line);
  margin-top: 56px;
}
.band .caption {
  color: var(--band-muted);
}

/* Where things stand */
.status {
  display: grid;
  gap: 32px 48px;
}
@media (min-width: 800px) {
  .status {
    grid-template-columns: 1fr 1fr;
  }
}
.status h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.status ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.status li {
  padding-block: 12px;
  border-top: 1px solid var(--rv-border);
}
.status li strong {
  display: block;
  font-weight: 600;
}
.status li span {
  color: var(--rv-text-muted);
}

/* The beta */
.beta {
  background: var(--rv-surface-muted);
  padding-block: 64px;
}
@media (min-width: 900px) {
  .beta {
    padding-block: 80px;
  }
}
.beta-grid {
  display: grid;
  gap: 32px 64px;
  align-items: start;
}
@media (min-width: 900px) {
  .beta-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}
.beta p {
  margin-top: 16px;
  color: var(--rv-text-muted);
  font-size: 1.0625rem;
}
.beta ul {
  margin: 0;
  padding-left: 20px;
}
.beta li + li {
  margin-top: 8px;
}

/* Product page */
.feature {
  display: grid;
  gap: 32px;
}
.feature-text {
  max-width: 44rem;
}
.feature-text p {
  margin-top: 16px;
  color: var(--rv-text-muted);
  font-size: 1.0625rem;
}
.feature-list {
  display: grid;
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .feature-list {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.feature-list li {
  padding-block: 16px;
  border-top: 1px solid var(--rv-border);
}
.feature-list strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.feature-list span {
  color: var(--rv-text-muted);
  font-size: 15px;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 14px;
  border: 1px solid var(--rv-control-border);
  border-radius: var(--rv-radius-control);
  color: var(--rv-text);
  text-decoration: none;
  font-size: 15px;
}
.toc a:hover {
  background: var(--rv-surface-muted);
}
[id] {
  scroll-margin-top: 24px;
}

/* Questions */
.faq {
  max-width: 48rem;
}
.faq details {
  border-top: 1px solid var(--rv-border);
}
.faq details:last-child {
  border-bottom: 1px solid var(--rv-border);
}
.faq summary {
  cursor: pointer;
  padding-block: 18px;
  font-weight: 600;
  font-size: 1.0625rem;
  list-style-position: outside;
}
.faq details p {
  padding-bottom: 18px;
  color: var(--rv-text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rv-border);
  padding-block: 40px;
  font-size: 15px;
  color: var(--rv-text-muted);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.footer-row img {
  width: 151px;
  height: 32px;
  margin-bottom: 8px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  align-items: center;
}
.site-footer nav a {
  color: var(--rv-text);
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.not-found {
  padding-block: 96px;
}
.not-found p {
  margin-top: 16px;
  color: var(--rv-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.faq-list {
  margin-top: 24px;
}
.site-footer .legal {
  margin-top: 4px;
  font-size: 14px;
}
