/*
 * Twarita website. Colours follow the app's tokens (app/src/styles/tokens.css): Twarita Black #0B0B0C,
 * Twarita Red #E0182D on dark (#D7192A on light) and the app's ink greys. Dark is the default;
 * [data-theme="light"] on <html> switches to the light theme (assets/theme.js).
 * Fonts are the app's stacks: no font files are downloaded, the system's own fonts are used.
 */
:root {
  --font-sans: 'Hanken Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-display: 'Sora', 'Hanken Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;

  --spark: #e0182d;
  --bg: #0b0b0c;
  --surface: #151517;
  --surface-2: #1e1e21;
  --border: #2c2c31;
  --text: #f2f2f3;
  --muted: #a0a0a8;
  --brand-text: #ff4d58;
  --brand-tint: #2a1215;
  --logo-tile: #1a1a1d;
  --logo-ink: #f4f4f5;
  --success: #47cd89;
  --warning: #fdb022;
  --warning-tint: #2b2110;
  --warning-border: #5c4413;
  --btn-from: #e01b2c;
  --btn-to: #a8101e;
  --btn-glow: 0 6px 16px rgb(215 25 42 / 0.3);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px rgb(0 0 0 / 0.35);
  --header-bg: rgb(11 11 12 / 0.88);
  --glow: radial-gradient(60% 50% at 70% 0%, rgb(224 24 45 / 0.16), transparent 70%);

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  /* One spacing rhythm: section padding, the gap under a section heading, and the gap between cards. */
  --space-section: clamp(3.5rem, 7vw, 5.5rem);
  --space-head: clamp(1.75rem, 3vw, 2.5rem);
  --space-gap: clamp(1rem, 1.6vw, 1.25rem);
  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --border: #e2e2e6;
  --text: #0b0b0c;
  --muted: #5c5c66;
  --brand-text: #c0141f;
  --brand-tint: #fdecee;
  --logo-tile: #0b0b0c;
  --logo-ink: #0b0b0c;
  --success: #067647;
  --warning: #b54708;
  --warning-tint: #fffaeb;
  --warning-border: #fedf89;
  --btn-from: #d7192a;
  --btn-glow: 0 4px 12px rgb(215 25 42 / 0.22);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 0 0 / 0.06);
  --header-bg: rgb(247 247 248 / 0.9);
  --glow: radial-gradient(60% 50% at 70% 0%, rgb(215 25 42 / 0.08), transparent 70%);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-text);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus {
  outline: none;
}

/* The app's focus ring: Twarita Red, offset from the element, following its own corners. */
:focus-visible {
  outline: 2px solid var(--spark);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 2.6vw + 1.1rem, 3.4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2.1rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.05rem, 0.3vw + 1rem, 1.2rem);
  font-weight: 650;
}

p,
li {
  text-wrap: pretty;
}

p {
  margin: 0 0 1em;
}

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

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  overflow-wrap: normal;
}

kbd {
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  padding: 0.05em 0.4em;
}

.wrap {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}

.skip:focus {
  top: 1rem;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.mark {
  width: 32px;
  height: 32px;
}

.mark .tile {
  fill: var(--logo-tile);
}

.wordmark {
  height: 19px;
  width: auto;
}

.wordmark .ink {
  stroke: var(--logo-ink);
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface-2);
}

.site-nav a[aria-current='page'] {
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  color: #fff;
  box-shadow: var(--btn-glow);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
}

[data-theme='light'] .theme-toggle .moon,
:root:not([data-theme='light']) .theme-toggle .sun {
  display: none;
}

/* Below this width the four links and the logo would crowd or wrap, so they move into the menu. */
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gutter) 1rem;
    box-shadow: var(--shadow-card);
  }

  .js .site-nav.open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
  }

  .site-nav a {
    padding: 0.7rem 0.9rem;
  }

  html:not(.js) .site-header .wrap {
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--btn-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--btn-to), var(--btn-to));
}

.btn[aria-disabled='true'] {
  opacity: 0.6;
  pointer-events: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Sections */
main {
  display: block;
}

.section {
  padding: var(--space-section) 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-text);
  margin-bottom: 0.8rem;
}

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

.small {
  font-size: 0.9rem;
}

/* Hero */
.hero {
  background: var(--glow);
  padding: clamp(3rem, 7vw, 5.5rem) 0 var(--space-section);
}

/* Text and illustration side by side from 1024 px; stacked and centred below that (tablet portrait, phones). */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero .lead {
  margin-bottom: 1.8rem;
}

.hero-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-note + .hero-note {
  margin-top: 0.35rem;
}

@media (max-width: 999px) {
  .hero .wrap > :first-child {
    text-align: center;
  }

  .hero .lead {
    margin-inline: auto;
  }

  .hero .actions {
    justify-content: center;
  }
}

@media (min-width: 1000px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  }
}

/* Page header (inner pages): centred, like every section heading. */
.page-head {
  background: var(--glow);
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.page-head .lead {
  margin: 0 auto;
}

.page-head .actions {
  justify-content: center;
  margin-top: 1.8rem;
}

/* Cards: every row of a grid has equal-height cards (grid items stretch). */
.grid {
  display: grid;
  gap: var(--space-gap);
  grid-template-columns: minmax(0, 1fr);
}

.grid > * {
  min-width: 0;
}

/* Four benefit cards: one column on phones, two on tablets, four on laptops and wider; never 3 + 1. */
@media (min-width: 600px) {
  .grid-4,
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 600px) and (max-width: 759px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

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

.card p {
  color: var(--muted);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand-text);
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

/* Phones: the icon sits beside the heading instead of above it, and the text runs under both. */
@media (max-width: 599px) {
  :is(.card, .feature > div):has(> .card-icon:first-child) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.85rem;
    row-gap: 0.7rem;
    align-items: center;
  }

  :is(.card, .feature > div):has(> .card-icon:first-child) > * {
    grid-column: 1 / -1;
    margin-top: 0;
    margin-bottom: 0;
  }

  :is(.card, .feature > div):has(> .card-icon:first-child) > .card-icon {
    grid-column: 1;
    width: 40px;
    height: 40px;
  }

  :is(.card, .feature > div):has(> .card-icon:first-child) > .card-icon + * {
    grid-column: 2;
  }

  :is(.card, .feature > div):has(> .card-icon:first-child) > .btn {
    justify-self: start;
  }
}

/* Section headings are centred over their content on every page. */
.section-head {
  max-width: 46rem;
  margin: 0 auto var(--space-head);
  text-align: center;
}

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

.section-head .lead {
  margin-inline: auto;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-gap);
  grid-template-columns: minmax(0, 1fr);
  counter-reset: step;
}

/* Three steps side by side only where each card stays roomy; stacked below. */
@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-top: 3.6rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
}

/* Phones: the step number sits beside the heading, like the card icons. */
@media (max-width: 599px) {
  .steps > li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.85rem;
    row-gap: 0.7rem;
    align-items: center;
    padding-top: 1.5rem;
  }

  .steps > li::before {
    position: static;
  }

  .steps > li > * {
    grid-column: 1 / -1;
    margin-top: 0;
    margin-bottom: 0;
  }

  .steps > li > h3 {
    grid-column: 2;
  }
}

/* Approval card illustration (looks like the app's Inbox card) */
.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}

.mock-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}

.chip svg {
  width: 14px;
  height: 14px;
}

.chip .ok {
  color: var(--success);
}

.mock-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.mock-card + .mock-card {
  margin-top: 0.75rem;
}

.mock-card.calm {
  border-left-color: var(--success);
}

.mock-title {
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.mock-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.8rem;
}

.mock-risk {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--warning);
  background: var(--warning-tint);
  border: 1px solid var(--warning-border);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  margin-bottom: 0.6rem;
}

.mock-actions {
  display: flex;
  gap: 0.5rem;
}

.mock-actions span {
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.mock-actions .yes {
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  border-color: transparent;
  color: #fff;
}

.mock-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 0.6rem;
}

.mock-progress span {
  display: block;
  height: 100%;
  width: 62%;
  background: linear-gradient(90deg, var(--btn-from), var(--btn-to));
}

/* FAQ */
/* The FAQ column is centred on the page; each question and answer stays left-aligned. */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
  margin: 0 auto;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1.2rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq summary::after {
  content: '+';
  color: var(--brand-text);
  font-size: 1.3rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details > div {
  padding-bottom: 1rem;
  color: var(--muted);
}

/* Download page */
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dl-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.dl-card h3 svg {
  width: 26px;
  height: 26px;
}

.dl-card.yours {
  border-color: var(--spark);
}

.dl-card .btn {
  align-self: flex-start;
  margin-top: 0.4rem;
}

.dl-files {
  display: grid;
  gap: 0.9rem;
}

.dl-file {
  display: grid;
  gap: 0.35rem;
}

.dl-file .btn {
  justify-self: start;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--muted);
  vertical-align: middle;
}

.badge.ready {
  color: var(--success);
  border-color: currentColor;
}

.hash {
  font-size: 0.8rem;
  color: var(--muted);
}

.hash code {
  font-size: 0.95em;
  word-break: break-all;
}

.note {
  border: 1px solid var(--warning-border);
  background: var(--warning-tint);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

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

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

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

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

th {
  font-weight: 650;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table-wrap tr:last-child > * {
  border-bottom: 0;
}

/* Guides */
/* Contents and text as one centred block, so wide screens get even margins on both sides. */
.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 46rem);
  justify-content: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: var(--space-section);
}

.toc {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  font-size: 0.95rem;
}

.toc p {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.toc a {
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
  border-left-color: var(--spark);
}

.doc-body {
  max-width: 46rem;
}

.doc-body section {
  padding-bottom: 2.2rem;
  margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--border);
}

.doc-body section:last-child {
  border-bottom: 0;
}

.doc-body h2 {
  font-size: 1.6rem;
}

.doc-body h3 {
  margin-top: 1.6rem;
}

.doc-body ol,
.doc-body ul {
  padding-left: 1.3rem;
}

.doc-body li {
  margin-bottom: 0.45rem;
}

.doc-body li::marker {
  color: var(--brand-text);
  font-weight: 700;
}

.ui {
  font-weight: 700;
  color: var(--text);
}

.doc-body .mock {
  margin: 1.2rem 0 1.5rem;
  justify-self: start;
}

@media (max-width: 900px) {
  .doc {
    grid-template-columns: minmax(0, 46rem);
    gap: 1.5rem;
  }

  .toc {
    position: static;
  }
}

/* Lists laid out as card grids (security controls). */
ul.grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Six items: one column on phones, two on tablets, three from laptops up. */
@media (min-width: 600px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.section-head .eyebrow,
.page-head .eyebrow {
  display: block;
}

.section-foot {
  margin: var(--space-head) 0 0;
}

.card-title {
  font-size: clamp(1.05rem, 0.3vw + 1rem, 1.2rem);
}

/* The job search feature: text and a check list side by side from 900 px. */
.feature {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: var(--space-gap);
}

.feature h3 {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem);
}

.feature .btn {
  margin-top: 0.5rem;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.checks li {
  position: relative;
  padding-left: 2.1rem;
  color: var(--muted);
}

.checks strong {
  color: var(--text);
}

/* A drawn tick in a red-tinted circle (no image, so nothing extra to load). */
.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--brand-tint);
}

.checks li::after {
  content: '';
  position: absolute;
  left: 0.48rem;
  top: 0.38rem;
  width: 0.38rem;
  height: 0.68rem;
  border: solid var(--brand-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Legal pages */
.updated {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.legal h2 {
  scroll-margin-top: 5rem;
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.1rem 2.6rem;
  margin: 0 0 2rem;
  columns: 2 14rem;
  column-gap: 2rem;
}

.legal-toc li {
  margin-bottom: 0.3rem;
  break-inside: avoid;
}

.legal-toc a {
  color: var(--text);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--brand-text);
  text-decoration: underline;
}

/* A long email address may wrap inside its button on small phones. */
.btn-wrap {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
  font-size: 0.92rem;
  color: var(--muted);
}

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

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
}

@media (min-width: 760px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 420px) {
  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.footer-brand .brand {
  margin-bottom: 0.75rem;
}

.footer-brand .product-of {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

.footer-bottom a,
.product-of a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.6rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.site-footer ul a {
  display: inline-block;
  padding: 0.2rem 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Requirement cards (download page) */
.specs {
  display: grid;
  grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr);
  gap: 0.6rem 1.2rem;
  margin: 0;
}

.specs dt {
  font-weight: 650;
  color: var(--text);
}

.specs dd {
  margin: 0;
  color: var(--muted);
}

.center {
  text-align: center;
}

/* Release notes and plain text pages */
.notes,
.prose {
  max-width: 46rem;
  margin: 0 auto;
}

.notes ul,
.prose ul {
  margin: 0 0 1em;
  padding-left: 1.3rem;
}

.notes li,
.prose li {
  margin-bottom: 0.5rem;
}

.notes li {
  color: var(--muted);
}

.notes li::marker,
.prose li::marker {
  color: var(--brand-text);
}

.prose h2 {
  font-size: 1.4rem;
  margin-top: 2.2rem;
}

/* A two-column table reads as stacked rows on phones. */
@media (max-width: 599px) {
  .stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .stack tr {
    display: block;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
  }

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

  .stack td {
    display: block;
    padding: 0;
    border: 0;
  }

  .stack td:first-child {
    font-weight: 650;
    color: var(--text);
    margin-bottom: 0.25rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .btn,
  .site-nav a,
  .icon-btn {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
  }

  .pulse {
    animation: pulse 2.4s ease-in-out infinite;
    transform-origin: 396px 167px;
  }

  @keyframes pulse {
    0%,
    100% {
      opacity: 0.4;
    }

    50% {
      opacity: 0.1;
    }
  }
}

@media print {
  .site-header,
  .toc,
  .site-footer {
    display: none;
  }
}
