/* Routix Dash website: shared tokens, header, footer, buttons, cards and the home page.
   Dark graphite, one accent (the needle color of the app icon). */
:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-2: #0e0f12;
  --surface: #121317;
  --surface-2: #17181d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f3f4;
  --text-soft: #c5c7cd;
  --muted: #9b9ea6;
  /* Lightest grey that still reads at 4.5:1 on --bg, --surface and --surface-2. */
  --faint: #83868e;
  --accent: #f5921e;
  --accent-soft: rgba(245, 146, 30, 0.14);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* Keyboard focus ring; the white primary button needs more than the browser default. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 9, 11, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  width: 32px;
  height: 32px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.site-nav a.btn-primary {
  color: #0a0a0b;
}

/* Phone menu: a <details> disclosure that stands in for the nav links at 680px and below. */
.site-menu {
  display: none;
  position: relative;
}

.site-menu summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  list-style: none;
  cursor: pointer;
}

.site-menu summary::-webkit-details-marker {
  display: none;
}

.site-menu[open] summary {
  background: rgba(255, 255, 255, 0.06);
}

.site-menu summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.site-menu-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  display: grid;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

.site-nav .site-menu-panel a {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 1rem;
}

.site-nav .site-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-primary {
  background: #fff;
  color: #0a0a0b;
  border-color: #fff;
}

.btn-primary:hover {
  background: #e9e9ea;
  border-color: #e9e9ea;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

/* Small uppercase label above headings */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 0;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(40% 30% at 50% 78%, rgba(245, 146, 30, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.hero h1 {
  margin: 1.4rem 0 1.2rem;
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero h1 span {
  color: var(--muted);
}

.hero p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.1rem;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 0;
  flex-wrap: wrap;
}

.hero p.hero-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--faint);
}

/* Device stage under the hero text: a lit floor with a perspective grid.
   As tall as the iPad (its width times 1434/1099), so the iPad never rises into the text. */
.hero-stage {
  position: relative;
  margin: 64px auto 0;
  max-width: 1100px;
  height: calc(clamp(300px, 46vw, 560px) * 1434 / 1099);
}

.hero-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 160%;
  height: 62%;
  transform: translateX(-50%) perspective(600px) rotateX(62deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(55% 80% at 50% 100%, #000 30%, transparent 100%);
  mask-image: radial-gradient(55% 80% at 50% 100%, #000 30%, transparent 100%);
  pointer-events: none;
}

/* Fades the floor out; as wide as the grid so its last line does not show past the stage. */
.hero-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 160%;
  transform: translateX(-50%);
  height: 120px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

.hero-ipad {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(300px, 46vw, 560px);
  transform: translateX(-42%);
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.7));
}

.hero-iphone {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(120px, 18vw, 220px);
  transform: translateX(-150%);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.75));
  z-index: 2;
}

/* Platforms / protocols strip */
.strip {
  padding: 40px 0 8px;
}

.strip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2.4rem;
  color: var(--faint);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.strip-row + .strip-row {
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 500;
}

/* Generic section */
.section {
  padding: 112px 0 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-head h2 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  text-wrap: balance;
}

/* Intro: three short cards */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-wrap: pretty;
}

/* How it works: four small steps with arrows between them */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.flow-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
}

.flow-step + .flow-step::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid var(--faint);
  border-right: 1.5px solid var(--faint);
  transform: translateY(-50%) rotate(45deg);
}

.flow-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.flow-step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-wrap: pretty;
}

/* Features: alternating rows, text + framed screenshot */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature + .feature {
  margin-top: 16px;
}

.feature:nth-child(even) .feature-media {
  order: -1;
}

.feature h3 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  text-wrap: pretty;
}

.feature ul {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.feature li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text);
  font-size: 0.95rem;
}

.feature li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.feature-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 420px;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(70% 60% at 50% 100%, rgba(255, 255, 255, 0.06), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.feature-media img {
  width: 78%;
  max-width: 440px;
  margin-top: 40px;
  margin-bottom: -18%;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7));
}

.feature-media.is-phone img {
  width: 48%;
  max-width: 230px;
  margin-bottom: -22%;
}

/* The screenshot's content sits low on the screen: crop only the bottom bezel. */
.feature-media.is-phone.is-full img {
  margin-bottom: -2%;
}

/* A clip inside the iPhone bezel: the video sits in the screen cutout, the bezel is drawn over it */
.device {
  position: relative;
  width: 48%;
  max-width: 230px;
  margin-top: 40px;
  margin-bottom: -22%;
  aspect-ratio: 460 / 939;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7));
}

.device video {
  position: absolute;
  left: 5.1%;
  top: 2.2%;
  width: 89.8%;
  height: 95.6%;
  object-fit: cover;
  border-radius: 11% / 5.4%;
  background: #000;
}

.feature-media .device .bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  filter: none;
  pointer-events: none;
}

/* An animated diagram that fills the media box; the clip's background is --bg-2, so its edges blend in */
.feature-media.is-flow {
  display: block;
  min-height: 0;
  background: var(--bg-2);
}

.feature-media.is-flow video {
  display: block;
  width: 100%;
  height: auto;
}

/* More features: four phone cards */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card-media {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 260px;
  overflow: hidden;
  padding: 28px 28px 0;
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 70%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.feature-card-media img {
  width: 100%;
  max-width: 200px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.7));
}

.feature-card-body {
  padding: 20px 22px 24px;
}

.feature-card h3 {
  margin: 0.7rem 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-wrap: pretty;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.plan-pro {
  border-color: rgba(245, 146, 30, 0.45);
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(245, 146, 30, 0.12), transparent 70%),
    var(--surface);
}

.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.plan h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.plan-price {
  color: var(--muted);
  font-size: 0.9rem;
}

.plan-tag {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.4rem 0 1.2rem;
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.plan li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
}

.plan-pro li::before {
  border-color: var(--accent);
}

.plan-note {
  margin: 1.2rem 0 0;
  color: var(--faint);
  font-size: 0.82rem;
}

/* Download */
.downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.download {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.2rem 0.75rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  text-decoration: none;
  min-width: 190px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.download:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.28);
}

.download svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.download-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.download-text small {
  color: var(--muted);
  font-size: 0.72rem;
}

.download-text strong {
  font-size: 1.02rem;
}

/* Footer */
.site-footer {
  margin-top: 112px;
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--text);
}

.footer-copy {
  color: var(--faint);
  font-size: 0.85rem;
}

@media (max-width: 980px) {
  .cards-4,
  .flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-step:nth-child(3)::before {
    display: none;
  }

  .feature {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px;
  }

  .feature:nth-child(even) .feature-media {
    order: 0;
  }

  .feature-media {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  .site-header-inner {
    gap: 0.5rem;
  }

  .site-nav {
    gap: 0.5rem;
  }

  .site-nav > a:not(.btn) {
    display: none;
  }

  .site-menu {
    display: block;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-stage {
    height: 104vw;
  }

  .hero-iphone {
    display: none;
  }

  .hero-ipad {
    width: 80vw;
    transform: translateX(-50%);
  }

  .section {
    padding-top: 80px;
  }

  .cards-3,
  .cards-4,
  .flow,
  .plans {
    grid-template-columns: 1fr;
  }

  .flow-step + .flow-step::before {
    display: none;
  }

  .feature-media img {
    width: 90%;
  }

  .feature-media.is-phone img,
  .device {
    width: 60%;
  }

  .download {
    width: 100%;
    justify-content: center;
  }

  .footer-links {
    row-gap: 0;
  }

  .footer-links a {
    padding: 0.5rem 0;
  }
}

/* Smallest phones: brand, Download and the menu button still share one row. */
@media (max-width: 360px) {
  .brand {
    gap: 0.45rem;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

  .site-nav .btn-sm {
    padding: 0.55rem 0.8rem;
  }
}

/* ---------- Inner pages (legal, docs, error, maintenance) ---------- */

/* Keeps the footer at the bottom of short pages. */
body.site-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.site-page > main,
body.site-page > .page-body {
  flex: 1 0 auto;
}

body.site-page .site-footer {
  margin-top: 96px;
}

/* Short centred page: the hero glow with a title, a message and actions (error page). */
.status-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 32px;
}

.status-page h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.status-page .status-code {
  margin: 0 auto 0.75rem;
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.06));
  -webkit-background-clip: text;
  background-clip: text;
}

/* Page title block of inner pages */
.page-head {
  max-width: 760px;
  margin: 0 auto 40px;
  padding-top: 72px;
  text-align: center;
}

.page-head h1 {
  margin: 1rem 0 0.6rem;
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Long-form text: legal pages and documentation */
.prose {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}

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

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

.prose [id] {
  scroll-margin-top: 88px;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

.prose h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.prose h2 {
  margin: 2.6em 0 0.8em;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 2em 0 0.6em;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.prose h4 {
  margin: 1.6em 0 0.5em;
  font-size: 1rem;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(245, 146, 30, 0.35);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease;
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.prose li {
  margin: 0.35em 0;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--faint);
}

.prose ul > li::marker {
  color: var(--accent);
}

.prose li > ul,
.prose li > ol {
  margin: 0.35em 0 0;
}

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

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.38em;
}

.prose pre {
  margin: 1.4em 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.prose pre code {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.86rem;
  white-space: pre;
}

/* Tables scroll sideways inside their own rounded frame on narrow screens. */
.prose table {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 1.4em 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.prose th,
.prose td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th + th,
.prose td + td {
  border-left: 1px solid var(--line);
}

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

.prose th {
  color: var(--text);
  font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}

.prose td:not(:first-child) {
  min-width: 9rem;
}

.prose tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.prose img {
  width: auto;
  max-width: min(100%, 26rem);
  margin: 1.6em auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
}

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

@media (max-width: 680px) {
  body.site-page .site-footer {
    margin-top: 72px;
  }

  .page-head {
    padding-top: 48px;
    margin-bottom: 28px;
  }

  .prose h2 {
    font-size: 1.3rem;
  }

  .prose pre {
    padding: 14px 16px;
  }
}
