@import url('design-tokens.css?v=20261023e');

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: clip;
}

*:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

h1, h2, h3, h4, h5 {
  letter-spacing: -0.01em;
}
h1, h2, h3, .h1, .h2, .h3 {
  color: var(--heading-accent);
}
h4, h5, h6, .h4, .h5, .h6 {
  color: var(--heading-accent);
}

/* Content links use the theme accent so they match the red/orange palette
   in both dark and light modes (Bootstrap's default link color is blue).
   Colors are muted per mode so they stay readable without glaring. */
a {
  color: var(--link-color);
  text-decoration-color: color-mix(in srgb, var(--link-color) 45%, transparent);
  text-underline-offset: 2px;
}
a:hover,
a:focus {
  color: var(--link-hover);
}

/* Keep Bootstrap components (cards, etc.) on the theme text color instead of
   Bootstrap's default near-black --bs-body-color, which is invisible on the
   dark card surface. */
:root {
  --bs-body-color: var(--text-primary);
  --bs-body-bg: var(--bg-primary);
}

/* Inline code inherits the theme palette (Bootstrap default is pink). */
code {
  color: var(--link-color);
}

img { max-width: 100%; height: auto; }
.container { max-width: var(--container-max); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0.5rem;
  background: var(--accent);
  color: var(--accent-text);
  padding: var(--space-xs) var(--space-sm);
  text-decoration: none;
  border-radius: var(--border-radius);
  z-index: 2000;
}
.skip-link:focus { top: 0.5rem; }

/* Header */
.site-header {
  background-color: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1020;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--font-size-xl);
  letter-spacing: -0.02em;
}
.site-logo {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  /* The artwork is a black tile, so a hairline ring keeps it from dissolving
     into the dark header (and into the white one in light mode). */
  box-shadow: 0 0 0 1px var(--border-color);
}

/* Map Bootstrap navbar variables to our theme tokens so the active link,
   hover states and toggler use theme-aware colors in both modes. */
.navbar {
  --bs-navbar-color: var(--text-secondary);
  --bs-navbar-hover-color: var(--text-heading);
  --bs-navbar-active-color: var(--accent-hover);
  --bs-navbar-brand-color: var(--text-heading);
  --bs-navbar-brand-hover-color: var(--text-heading);
  --bs-navbar-toggler-border-color: var(--border-color);
}

/* Always-visible actions (theme toggle + hamburger) pinned to the top-right on mobile */
.navbar-actions {
  margin-left: auto;
}
/* On desktop the nav sits after this group, so drop the auto margin (two auto
   margins would split the free space and make the gap to the menu inconsistent)
   and use a fixed gap that matches the spacing between nav items. */
@media (min-width: 992px) {
  .navbar-actions {
    margin-left: 1rem;
  }
}

.nav-link {
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--text-heading);
  background-color: var(--bg-tertiary);
}
.nav-link.active {
  color: var(--accent-hover);
  font-weight: 700;
}
.nav-link.active:hover,
.nav-link.active:focus {
  color: var(--accent-hover);
  background-color: var(--bg-tertiary);
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    padding: 0.7rem 0.75rem;
  }
  /* A hairline between items so each row reads as its own tap target. */
  .navbar-nav .nav-item {
    border-bottom: 1px solid var(--border-color);
  }
  .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }
}

.navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--text-heading);
  border-color: var(--border-color);
  -webkit-tap-highlight-color: transparent;
}
.navbar-toggler:focus {
  box-shadow: none;
}
.navbar-toggler:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}
.navbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.navbar-icon svg {
  display: block;
}
.navbar-icon-close {
  display: none;
}
.navbar-toggler[aria-expanded="true"] .navbar-icon-menu {
  display: none;
}
.navbar-toggler[aria-expanded="true"] .navbar-icon-close {
  display: inline-flex;
}

/* Theme toggle - the button previews the theme it will switch TO.
   Dark mode active -> light button (sun). Light mode active -> dark button (moon).
   The colours come from --toggle-* in design-tokens.css, so the toggle is
   rebranded together with the rest of the palette. */
.theme-toggle {
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  color: var(--toggle-text);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover,
.theme-toggle:focus {
  filter: brightness(0.93);
}
/* In light mode the toggle is the dark one, so hovering brightens it. */
[data-theme="light"] .theme-toggle:hover,
[data-theme="light"] .theme-toggle:focus {
  filter: brightness(1.18);
}

/* Show the icon/label of the TARGET theme */
.theme-toggle .icon-moon,
.theme-toggle .label-dark { display: none; }

[data-theme="light"] .theme-toggle .icon-sun,
[data-theme="light"] .theme-toggle .label-light { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline-flex; }
[data-theme="light"] .theme-toggle .label-dark { display: inline; }

@media (max-width: 575.98px) {
  .site-title {
    min-width: 0;
    gap: 0.4rem;
    font-size: var(--font-size-lg);
  }
  .site-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .navbar-actions {
    flex: 0 0 auto;
  }
  .theme-toggle {
    gap: 0.35rem;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
}

@media (max-width: 359.98px) {
  .theme-label {
    display: none !important;
  }
  .theme-toggle {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: var(--space-2xl) 0;
  background-image: var(--gradient-hero),
    linear-gradient(180deg, transparent 0%, var(--bg-gradient-end) 100%);
  background-color: var(--bg-primary);
  overflow: hidden;
}

.hero-title {
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.text-gradient {
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-text {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  max-width: 58ch;
  margin-bottom: var(--space-lg);
}

.hero-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-heading);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: var(--space-md);
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
}

.hero-art {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  width: 100%;
}

/* Phone screenshot in the hero - thin glowing accent border, no thick bezel */
.hero-phone {
  max-width: 320px;
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 30px -6px color-mix(in srgb, var(--accent) 50%, transparent), var(--shadow-lg);
}
.hero-phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* Hero media column: centred when the hero stacks on mobile, hugging the right
   edge on desktop. */
.hero-media {
  display: flex;
  justify-content: center;
}
@media (min-width: 992px) {
  .hero-media { justify-content: flex-end; }
}

.hero-text.lead{
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  max-width: 100%;
  margin-bottom: var(--space-lg);
  font-weight:var(--bs-body-font-weight);
}

/* Guide-page hero. Same gradient and phone as the homepage, with a tighter
   headline, one screenshot per page, and the table of contents below it. */
.page-hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}
.page-hero .hero-title { font-size: clamp(1.55rem, 2.8vw, 2.05rem); line-height: 1.2; }
.page-hero .hero-phone { max-width: 270px; }
.page-hero .breadcrumb { margin-bottom: var(--space-md); }
.hero-note {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

/* Plain page header for the reference pages. The about, contact and legal
   pages open like the ik7z pages: breadcrumb, title and lead on the page
   surface, with no hero screenshot and no second column. */
.page-head {
  margin-bottom: var(--space-lg);
}
.page-head .section-title,
.faq-head .section-title {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.page-head .page-lead {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  margin-bottom: 0;
}
.page-note {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

/* Square brand plate, used where a screenshot would mislead. */
.hero-mark {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    var(--bg-card);
  box-shadow: 0 0 30px -6px color-mix(in srgb, var(--accent) 50%, transparent), var(--shadow-lg);
}
.hero-mark img { width: 96px; height: 96px; }

/* Responsive screenshots gallery: full-width on mobile, growing to 3 columns */
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.screenshot-grid .shot-item {
  margin: 0;
}
.screenshot-grid .shot-caption {
  display: block;
  margin-top: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.45;
}
.screenshot-grid .shot {
  margin: 0;
  aspect-ratio: 480 / 1046;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 28px -8px color-mix(in srgb, var(--accent) 55%, transparent), 0 12px 30px -16px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.screenshot-grid .shot:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 32px -6px color-mix(in srgb, var(--accent) 60%, transparent), 0 16px 34px -16px rgba(0, 0, 0, 0.75);
}
.screenshot-grid .shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
@media (min-width: 640px) {
  .screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .screenshot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* App facts - six separate boxes under the hero, three per row on desktop and
   two on a phone. Never a single hairline strip: that read as one long bar at
   1440px and squeezed the package name. */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
}
.spec-cell {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1rem 1.1rem;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.spec-cell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0.85;
}
.spec-cell:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-color));
  transform: translateY(-2px);
}
.spec-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.spec-value {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-heading);
  overflow-wrap: anywhere;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.card-title { color: var(--heading-accent); }
.card-text { color: var(--text-secondary); }

/* Feature icon chip */
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: #fff;
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-accent);
}

/* Centred information card. The homepage "About this site" trio used the
   default left-aligned card, which looked broken on a phone because the icon
   floated above a left-aligned block. */
.info-card {
  text-align: center;
}
.info-card .feature-icon {
  margin-left: auto;
  margin-right: auto;
}
.info-card .card-title {
  margin-bottom: 0.5rem;
}

/* Closing download panel. The guides and the reference pages end with one
   plain prompt, in the same shape on every page, so a reader who reached the
   bottom without downloading can act without scrolling back to the hero. */
.download-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: var(--space-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  background-color: color-mix(in srgb, var(--bg-tertiary) 78%, transparent);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}
.download-cta .download-cta-title {
  margin: 0 0 0.45rem;
  font-size: var(--font-size-xl);
}
.download-cta p {
  margin: 0;
  max-width: 54ch;
  color: var(--text-secondary);
}
.download-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  gap: 0.4rem;
}
.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
}
.btn-lg { padding: 0.75rem 1.4rem; }

/* One download icon sitewide. Drawing it in CSS keeps every button that
   carries data-download-btn identical to the homepage hero without repeating
   the same SVG in fourteen pages. The mask uses currentColor, so it follows
   the button text in both themes. */
.btn[data-download-btn]::before {
  content: "";
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The download button is the one gold element on the page: the gold comes from
   the logo, everything else stays azure, so the primary action reads as the
   brand mark. Dark text on gold keeps it above 11:1 contrast. */
.btn-primary {
  background: var(--gradient-gold);
  border: none;
  color: var(--gold-text);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--gradient-gold);
  filter: brightness(1.07);
  color: var(--gold-text);
}

.btn-outline-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  background: transparent;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--bg-tertiary);
  border-color: var(--accent);
  color: var(--text-heading);
}

/* Accent outline button - clearly reads as a button */
.btn-outline-primary {
  border: 1.5px solid var(--accent);
  color: var(--accent-hover);
  background: transparent;
  font-weight: 600;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--gradient-accent);
  border-color: transparent;
  color: var(--accent-text);
  box-shadow: var(--shadow-accent);
}

/* Sections */
.section { padding: var(--space-xl) 0; }
.section-alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: var(--space-lg);
  color: var(--heading-accent);
}
/* Soft lighter-to-darker theme gradient on section headings.
   Transparent fill is applied only when background-clip: text is supported,
   so the solid fallback above is never lost. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .section-title,
  .hero-title {
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--heading-accent);
  margin-bottom: 0.5rem;
}

/* Tables. Cells wrap at any character, so a long package name or URL cannot
   widen the table and force a scrollbar. Under 768px each row becomes a card
   and the column names come from the data-label attribute on each cell. */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-color);
  color: var(--text-primary);
  background-color: transparent;
  border-color: var(--border-color);
  margin-bottom: 0;
  width: 100%;
}
.table thead th {
  background-color: var(--bg-secondary);
  color: var(--text-heading);
  border-color: var(--border-color);
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  vertical-align: bottom;
}
.table td,
.table th {
  border-color: var(--border-color);
  padding: 0.9rem 1rem;
  line-height: 1.6;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.table tbody tr:last-child td,
.table tbody tr:last-child th { border-bottom: 0; }
.table-responsive {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background-color: var(--bg-card);
}
@media (max-width: 767.98px) {
  .table-responsive { border: 0; background-color: transparent; }
  .table,
  .table thead,
  .table tbody,
  .table tr,
  .table th,
  .table td { display: block; width: 100%; }
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .table tbody tr {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    padding: 0.35rem 0;
  }
  .table tbody td,
  .table tbody th {
    border: 0;
    padding: 0.4rem 1rem;
  }
  .table tbody td:first-child,
  .table tbody th {
    font-weight: 700;
    color: var(--text-heading);
  }
  .table tbody td:first-child { padding-top: 0.75rem; }
  .table tbody td:last-child { padding-bottom: 0.75rem; }
  .table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .table tbody td:first-child::before { content: none; }

  /* Reference tables (contact and the legal pages) keep their columns on a
     phone and scroll sideways inside the wrapper instead of stacking. The
     page itself never scrolls horizontally; only the table does. */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll .table {
    display: table;
    min-width: 560px;
    margin-bottom: 0;
  }
  .table-scroll .table thead {
    display: table-header-group;
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
  .table-scroll .table tbody { display: table-row-group; }
  .table-scroll .table tr {
    display: table-row;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    padding: 0;
  }
  .table-scroll .table th,
  .table-scroll .table td {
    display: table-cell;
    width: auto;
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0.9rem;
  }
  .table-scroll .table thead th {
    border-bottom: 2px solid var(--border-color);
    padding: 0.8rem 0.9rem;
  }
  .table-scroll .table td::before { content: none; }
  .table-scroll .table tbody td:first-child,
  .table-scroll .table tbody td:last-child {
    padding: 0.8rem 0.9rem;
  }
  .table-scroll .table tbody td:first-child,
  .table-scroll .table tbody th {
    font-weight: 400;
    color: var(--text-primary);
  }
  .table-scroll .table tbody th {
    font-weight: 700;
    color: var(--text-heading);
  }
}

/* Alerts.
   Each alert is a tinted copy of the card surface, not a translucent wash over
   whatever happens to be behind it. The old mix used `transparent`, so inside a
   card on the hero gradient the box picked up the background and turned muddy.
   Mixing with --bg-card keeps the tint identical in every context and in both
   themes, and the 4px left rail carries the signal colour. */
.alert {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius);
}
.alert-warning {
  background-color: color-mix(in srgb, var(--gold) 7%, var(--bg-card));
  border-color: color-mix(in srgb, var(--gold) 38%, var(--border-color));
  border-left: 4px solid var(--gold);
  color: var(--text-primary);
  border-radius: var(--border-radius);
}
.alert-info {
  background-color: color-mix(in srgb, var(--accent-2) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent-2) 38%, var(--border-color));
  border-left: 4px solid var(--accent-2);
  color: var(--text-primary);
  border-radius: var(--border-radius);
}
.alert-success {
  background-color: color-mix(in srgb, var(--success) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--success) 38%, var(--border-color));
  border-left: 4px solid var(--success);
  color: var(--text-primary);
  border-radius: var(--border-radius);
}
.alert-danger {
  background-color: color-mix(in srgb, var(--danger) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--danger) 38%, var(--border-color));
  border-left: 4px solid var(--danger);
  color: var(--text-primary);
  border-radius: var(--border-radius);
}
.alert-warning strong,
.alert-info strong,
.alert-success strong,
.alert-danger strong { color: var(--text-heading); }

/* Accordion */
.accordion-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius) !important;
  overflow: hidden;
}
.accordion-button {
  background-color: var(--bg-card);
  color: var(--text-heading);
  font-weight: 600;
}
.accordion-button:not(.collapsed) {
  background-color: var(--bg-tertiary);
  color: var(--text-heading);
  box-shadow: none;
}
.accordion-button::after {
  filter: invert(var(--theme-invert, 1));
}
.accordion-button:focus {
  box-shadow: none;
  border-color: var(--accent);
}
.accordion-body { color: var(--text-primary); line-height: 1.75; }
/* Separate the questions with a gap so each keeps its own border. The items
   themselves stay a normal card surface; the tinted band belongs to the whole
   FAQ section, header included, not to the individual boxes. */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.accordion-item {
  box-shadow: var(--shadow-sm);
}


/* Breadcrumb */
.breadcrumb { background-color: transparent; padding: 0; margin-bottom: var(--space-md); }
.breadcrumb-item a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--link-hover); }
.breadcrumb-item.active { color: var(--text-primary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-secondary); }

/* Table of contents - compact chip grid */
.toc {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
}
.toc-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--heading-accent);
  margin-bottom: 0.75rem;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .toc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.toc-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--link-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.toc-list a:hover,
.toc-list a:focus {
  color: var(--link-hover);
  border-color: color-mix(in srgb, var(--link-color) 45%, transparent);
  background-color: var(--bg-card);
}

/* The same table of contents, collapsed behind its own heading on a phone so it
   costs one line instead of a screenful. main.js opens it on desktop. */
details.toc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
details.toc > summary::-webkit-details-marker { display: none; }
details.toc > summary .toc-title { margin-bottom: 0; }
details.toc > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.2rem;
  border-right: 2px solid var(--heading-accent);
  border-bottom: 2px solid var(--heading-accent);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
details.toc[open] > summary { margin-bottom: 0.85rem; }
details.toc[open] > summary::after { transform: rotate(-135deg); margin-top: 0.2rem; }
details.toc:not([open]) { padding-top: 0.2rem; padding-bottom: 0.2rem; }

/* Full-width reading column, matching the header, hero and footer. The guide
   pages used to cap this at 960px, which left the body narrower than every
   band above and below it. */
.article {
  width: 100%;
}

/* Reading rhythm. Bootstrap's default line-height is too tight for long-form
   text, and consecutive paragraphs need more air than the browser gap. */
body { line-height: 1.7; }
.article p,
.article li { line-height: 1.8; }
.article p { margin-bottom: 1.15rem; }
.article ul,
.article ol { margin-bottom: 1.25rem; padding-left: 1.25rem; }
.article li + li { margin-top: 0.35rem; }
.article h2 { margin-bottom: 0.9rem; }
.article h3 { margin-bottom: 0.7rem; }
.article .table { margin-bottom: 1.5rem; }
.article .alert { padding: 1.1rem 1.25rem; line-height: 1.7; }

/* Related links */
.related-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.related-list a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.related-list a:hover {
  color: var(--link-hover);
  border-bottom-color: currentColor;
}

/* Guide picker: eight cards, each with a number, a one-line promise and a
   button-style action. The numbers keep the reading order, and the action
   makes the destination explicit without a second link inside the card. */
.guide-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 576px) {
  .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .guide-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.guide-card:hover,
.guide-card:focus {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.guide-card-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--heading-accent);
}
.guide-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--text-heading);
}
.guide-card-text {
  flex: 1 1 auto;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.guide-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  align-self: flex-start;
  min-height: 44px;
  margin-top: 0.6rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-accent);
}
.guide-card:hover .guide-card-cta,
.guide-card:focus .guide-card-cta {
  background: var(--gradient-accent);
  border-color: transparent;
  color: var(--accent-text);
}

/* Question boxes on the homepage. A slim tag and a text link keep the shape
   distinct from the centred info cards further up the same page. */
.qa-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .qa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.qa-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.qa-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-color));
  transform: translateY(-2px);
}
.qa-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--heading-accent);
  margin-bottom: 0.4rem;
}
.qa-card h3 {
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}
.qa-card p {
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}
.qa-card a {
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Link cards: a box with an icon, a title, a line of text and a button-like
   action. Used for "Where to go next" and the 404 shortlist. */
.link-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 576px) {
  .link-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .link-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem;
  color: inherit;
  text-decoration: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.link-card:hover,
.link-card:focus-visible {
  color: inherit;
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border-color));
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.link-card-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: var(--border-radius);
  color: var(--accent-hover);
  background-color: color-mix(in srgb, var(--accent) 14%, transparent);
}
.link-card-title {
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
}
.link-card-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}
.link-card-action {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--link-color);
}
.link-card:hover .link-card-action { color: var(--link-hover); }

/* Steps */
.step {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px dashed var(--border-color);
}
.step:last-child { border-bottom: none; }
.steps-narrow { max-width: 760px; }
.step-num {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Vertical stepper (How to download & install) */
.stepper {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
}
.stepper-step {
  position: relative;
  display: flex;
  gap: 1.15rem;
  padding-bottom: 1.6rem;
}
.stepper-step:last-child { padding-bottom: 0; }
.stepper-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 46px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(
    color-mix(in srgb, var(--accent) 55%, transparent),
    color-mix(in srgb, var(--accent) 12%, transparent)
  );
}
.stepper-num {
  position: relative;
  z-index: 1;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-accent);
}
.stepper-body { padding-top: 0.3rem; }
.stepper-title {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}
.stepper-text {
  color: var(--text-secondary);
  margin: 0;
}

/* Footer */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-xl) 0 var(--space-lg);
  color: var(--text-secondary);
}
.footer-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--heading-accent);
  margin-bottom: 1rem;
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-list li { margin-bottom: 0.35rem; }
.footer-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
}
.footer-link::before {
  content: "\203A";
  color: var(--link-color);
  font-weight: 700;
}
.footer-link:hover,
.footer-link:focus { color: var(--link-hover); }

/* Mobile menu download CTA */
.mobile-cta { padding: 0 0.25rem; }

/* Mobile sticky download bar */
.mobile-download-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
}
.mobile-download-bar .btn { flex: 1; white-space: nowrap; }
.mobile-download-bar .btn[data-download-btn] { flex: 1.4; }
.mobile-cta .btn { white-space: nowrap; }

/* Utilities */
.text-muted { color: var(--text-secondary) !important; }
.border { border-color: var(--border-color) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }

/* Touch targets */
.btn, .nav-link, .theme-toggle, .footer-link { min-height: 44px; }
.btn, .nav-link, .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.footer-link, .accordion-button { min-height: 44px; }
.accordion-button { display: flex; }

/* ---------- Mobile refinements (<=767px) ---------- */
@media (max-width: 767.98px) {
  .mobile-download-bar { display: flex; }
  body.has-mobile-bar { padding-bottom: 82px; }

  /* Center hero content and CTAs on small screens */
  .hero { text-align: center; }
  .hero-text { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; width: 100%; }
  .cta-row .btn { width: 100%; }

  /* Guide cards: centred, with a full-width action on a phone. */
  .guide-card { text-align: center; align-items: center; }
  .guide-card .guide-card-cta { align-self: stretch; }

  /* Closing download panel: stacked, full-width, centred like the reference. */
  .download-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .download-cta p { margin-left: auto; margin-right: auto; }
  .download-cta-actions { flex-direction: column; align-items: stretch; }
  .download-cta-actions .btn { width: 100%; }

  /* Center section headings and card headings */
  .section-title,
  .eyebrow,
  .card-title { text-align: center; }

  /* Feature cards: bigger, centered icons and text */
  .feature-card { text-align: center; }
  .feature-card .feature-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    margin-left: auto;
    margin-right: auto;
  }
  .feature-card .feature-icon svg { width: 32px; height: 32px; }
  .feature-card .card-text { margin-left: auto; margin-right: auto; }
  .feature-card .btn { margin-left: auto; margin-right: auto; }

  /* Center step titles */
  .howto-intro { text-align: center; }
}
