/* ReStem 2 product site — standalone stylesheet (no theme dependencies). */

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 100 900;
  /* 'optional' instead of 'swap': the browser gives Raleway a brief block window and then
     never swaps mid-life. With the <head> preload it wins that window on virtually every
     navigation, so the nav text never repaints from a fallback font to Raleway -- which is
     what made the top menu flicker on each page load. */
  font-display: optional;
  src: url('/modules/custom/restem2_site/assets/fonts/raleway-latin.woff2') format('woff2');
}

:root {
  --bg0: #06080f;
  --bg1: #0b0e18;
  --bg2: #0f1320;
  --card: #131826;
  --card-hi: #171d2e;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --ink: #eef1f7;
  --body: #a9b1c6;
  --dim: #8f97ab;
  --teal: #53d7cc;
  --teal-soft: rgba(83, 215, 204, 0.13);
  --coral: #f0645c;
  --coral-hi: #ff7b6e;
  --gold: #f5c04a;
  --green: #63e6a0;
  --blue: #6fa8ff;
  --purple: #c08cff;
  --amber: #ffb84d;
  --orange: #ff8a5c;
  --maxw: 1140px;
  --nav-h: 66px;
  --radius: 14px;
  --font-display: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

/* Cross-document view transitions. Every nav click is a full page load, and the repaint
   gap made the fixed menu visibly blink on each navigation. With this opt-in the browser
   holds the old frame until the new page is ready and cross-fades, so the nav (its own
   named group above, identical on every page) stays rock-steady. Browsers without support
   ignore the rule and get a plain navigation. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
html, body { overflow-x: clip; }

body {
  background: var(--bg1);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 450;
  letter-spacing: 0.012em;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: #7ce8df; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.008em;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.28rem; font-weight: 600; }

p strong, li strong { color: var(--ink); font-weight: 600; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line-soft);
  /* Own view-transition group: identical on every page, so it stays perfectly steady
     while the rest of the page cross-fades during navigation (see @view-transition). */
  view-transition-name: site-nav;
}
/* The frosted-glass background lives on a pseudo-element with its own pinned GPU layer,
   NOT on .nav itself. WebKit rebuilds a backdrop-filtered layer whenever anything inside
   it repaints (link hover states included), which made the whole bar flicker; isolating
   the blur from the nav's content decouples those repaints from the blur layer. */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8, 10, 18, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translate3d(0, 0, 0);
}
.nav-inner {
  /* [2026-08-05] The nav row gets a WIDER cap than page content: with the Account icon the
     ENGLISH row alone now fills the old var(--maxw) 1140px exactly (measured margin-right:auto
     == 0px), so any font-metric variance painted the brand over the first link AT EVERY window
     width — the burger can't save a row whose CONTAINER is the bottleneck. 1320px restores
     ~180px English / ~67px Spanish slack. Keep the breakpoint below in step with the two in
     tools/build_i18n.py (LANG_SWITCH_CSS). */
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  color: var(--ink);
  flex-shrink: 0;   /* [2026-08-05] never let the brand shrink: its overflowing text painted
                       over the first nav link when the row went tight */
}
.nav-brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: 0.01em;
}
.nav-brand:hover { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--body);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  /* A flex item may shrink to its min-content width, so without this a tight bar
     silently breaks "Built-in Effects" and "Replace & Trigger" onto two lines
     instead of overflowing -- which looks like a bug and is invisible to any
     overflow measurement. Labels stay on one line at every width; when they no
     longer fit, the max-width rule below hands over to the menu button. */
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--teal); }
.nav-buy {
  background: linear-gradient(135deg, var(--coral), #e5484d);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 999px;
  font-weight: 600 !important;
  border-bottom: none !important;
  box-shadow: 0 4px 18px rgba(240, 100, 92, 0.28);
}
/* Hover swaps to a pre-brightened gradient instead of a filter: applying a filter
   mid-hover creates a new compositing layer inside the bar, which flashes in Safari. */
.nav-buy:hover { background: linear-gradient(135deg, var(--coral-hi), #f25459); }
/* The trial sits beside Buy as a peer action rather than a plain nav link:
   visitors who cannot see a way to try it read the site as buy-or-nothing.
   Outlined so Buy keeps the visual lead. */
.nav-try {
  color: var(--teal) !important;
  padding: 8px 15px !important;
  border: 1px solid rgba(83, 215, 204, 0.42);
  border-radius: 999px;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(83, 215, 204, 0.42) !important;
  white-space: nowrap;
}
.nav-try:hover { color: #fff !important; border-color: var(--teal); background: rgba(83, 215, 204, 0.12); }
.nav-try.active { border-bottom-color: rgba(83, 215, 204, 0.42) !important; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px 10px;
  /* DOM order is brand, toggle, links, account; this keeps the burger at the
     far edge on mobile, after the always-visible account icon. */
  order: 10;
}
/* Account entry point (added 2026-08-05): support replies and the manual tell
   customers to "log in at restemapp.com", and the page had no way in. Lives
   OUTSIDE .nav-links so it never disappears into the burger menu -- on phones
   it sits in the bar next to the toggle. Icon-only because the es/pt/de rows
   have no pixel budget for another label (see the collapse-breakpoint note
   below); title/aria-label carry the word for tooltips and screen readers. */
.nav-account {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: var(--body);
  padding: 6px 8px;
}
.nav-account svg { width: 21px; height: 21px; }
.nav-account:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 84px) 0 30px;
  background:
    radial-gradient(1100px 500px at 72% -10%, rgba(83, 215, 204, 0.09), transparent 60%),
    radial-gradient(900px 480px at 12% 4%, rgba(93, 82, 172, 0.16), transparent 62%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 88%);
  overflow: hidden;
}
.hero .starfield {
  position: absolute;
  /* Start below the fixed nav: animated pixels directly beneath the bar would force its
     backdrop blur to recompute every frame, which shows up as spontaneous flicker. */
  inset: var(--nav-h) 0 0 0;
  pointer-events: none;
  opacity: 0.75;
}
.hero .wrap { position: relative; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 22px;
}
.hero-kicker::before {
  content: '';
  width: 26px; height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
/* Hero headlines stay on one line where they fit; pages that need a controlled
   two-line fallback wrap each half in a .nowrap span, so the only possible break
   point is the intended one. */
.hero h1 { max-width: none; }
.hero .lede {
  margin: 26px 0 34px;
  max-width: 60ch;
  font-size: 1.16rem;
  color: var(--body);
}
.hero .lede strong { color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--coral), #e5484d);
  color: #fff;
  box-shadow: 0 8px 30px rgba(240, 100, 92, 0.32);
}
.btn-primary:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 10px 36px rgba(240, 100, 92, 0.42); }
.btn-ghost {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.38); color: #fff; }
.cta-note { font-size: 0.88rem; color: var(--dim); margin-top: 16px; }
/* The documentation links are a separate offer from the buttons above them, not
   a footnote to them, so they sit further off than a normal cta-note. */
.cta-note.cta-docs { margin-top: 34px; }

.hero-shot { margin-top: 62px; position: relative; }
.hero-shot::before {
  content: '';
  position: absolute;
  inset: -8% -10% auto;
  height: 70%;
  background: radial-gradient(60% 55% at 50% 42%, rgba(83, 215, 204, 0.12), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: var(--bg0);
  overflow: hidden;
}
.shot img { width: 100%; }
.shot-caption {
  text-align: center;
  font-size: 0.86rem;
  color: var(--dim);
  margin-top: 14px;
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section.tint { background: var(--bg2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
/* Headings run the full content width so they can sit on one line; only the intro
   paragraph keeps the 660px prose measure. */
.section-head { margin-bottom: 54px; }
.section-head p { max-width: 660px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.section-head .eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.section-head p { margin-top: 18px; font-size: 1.08rem; }

/* Alternating feature rows */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 44px 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--line-soft); }
.feature-row .copy h2, .feature-row .copy h3 { margin-bottom: 16px; }
.feature-row .copy p { margin-bottom: 14px; }
.feature-row .copy .more { font-weight: 600; font-size: 0.97rem; }
.feature-row .copy .more::after { content: ' \2192'; }
.feature-row.flip .media { order: 2; }
.feature-row.flip .copy { order: 1; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }

/* Card grids */
.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.96rem; }
.tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(245, 192, 74, 0.35);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 10px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}
.tag.new {
  color: var(--teal);
  border-color: rgba(83, 215, 204, 0.4);
  background: var(--teal-soft);
}

/* "New in ReStem 2" band — each card flags a v1 -> v2 delta */
.new-card { position: relative; }
.new-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.new-card h3 .tag.new { margin-left: 0; top: 0; }
.new-card .more { margin-top: 12px; display: inline-block; }

/* Small inline NEW pill for mode cards */
.pill-new {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(83, 215, 204, 0.4);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: 2px;
}

/* Quality mode cards (echo the in-plugin menu) */
.mode-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px 20px;
  display: flex;
  gap: 16px;
}
.mode-card .bar { width: 4px; border-radius: 3px; flex: none; }
.mode-card h3 { font-size: 1.06rem; margin-bottom: 5px; }
.mode-card .sub { font-size: 0.85rem; color: var(--dim); margin-bottom: 10px; }
.mode-card p { font-size: 0.92rem; }

/* Stem chips strip */
.stems-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stem-pill {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
}
.stem-pill i { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- Pricing ---------- */

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; }
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 34px 32px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  background: linear-gradient(180deg, #191426 0%, var(--card) 60%);
  border-color: rgba(240, 100, 92, 0.45);
  box-shadow: 0 22px 70px rgba(240, 100, 92, 0.1);
  position: relative;
}
.price-card .plan { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.price-card .plan-sub { color: var(--dim); font-size: 0.94rem; margin-top: 4px; }
.price-card .price { font-family: var(--font-display); font-size: 3.1rem; font-weight: 700; color: var(--ink); margin: 22px 0 2px; }
.price-card .price small { font-size: 1.05rem; font-weight: 500; color: var(--dim); }
.price-card ul { list-style: none; margin: 24px 0 30px; flex: 1; }
.price-card li { padding: 7px 0 7px 30px; position: relative; font-size: 0.97rem; }
.price-card li::before {
  content: '\2713';
  position: absolute; left: 2px; top: 7px;
  color: var(--teal);
  font-weight: 700;
}
.price-card li.no { color: var(--dim); }
.price-card li.no::before { content: '\2014'; color: var(--dim); font-weight: 400; }
.price-card .btn { justify-content: center; }
.badge-popular {
  position: absolute; top: -13px; right: 28px;
  background: linear-gradient(135deg, var(--coral), #e5484d);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}

/* Comparison table */
.compare { width: 100%; max-width: 880px; border-collapse: collapse; font-size: 0.96rem; }
.compare th, .compare td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.compare thead th { font-family: var(--font-display); color: var(--ink); font-size: 1.02rem; border-bottom: 1px solid var(--line); }
.compare thead th:nth-child(n+2), .compare td:nth-child(n+2) { text-align: center; width: 170px; }
.compare tbody th { font-weight: 500; color: var(--body); }
.compare td .yes { color: var(--teal); font-weight: 700; }
.compare td .no { color: var(--dim); }
.compare tbody tr.group th {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  padding-top: 28px;
  font-size: 0.99rem;
}
.table-scroll { overflow-x: auto; }

/* ---------- Specs / FAQ ---------- */

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.spec-table th, .spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.spec-table th { color: var(--ink); font-weight: 600; width: 230px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
  position: relative;
  padding-right: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 22px; top: 14px;
  font-size: 1.4rem; color: var(--dim);
}
.faq details[open] summary::after { content: '\2212'; }
.faq details p { padding: 0 22px 18px; font-size: 0.96rem; }
.faq details p + p { margin-top: 10px; }

/* Callout */
.callout {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 0.96rem;
  max-width: 760px;
  margin: 26px 0;
}

.nowrap { white-space: nowrap; }

/* Assurance strip: one prose band instead of a card grid */
.assurance {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 40px 0;
  font-size: 1.05rem;
  color: var(--body);
}
.assurance p { max-width: 62ch; }
.assurance p + p { margin-top: 12px; }
.assurance strong { color: var(--ink); }

/* Plain notes list */
.notes { list-style: none; margin: 18px 0 0; }
.notes li {
  padding: 9px 0 9px 22px;
  position: relative;
  font-size: 0.97rem;
  border-bottom: 1px solid var(--line-soft);
}
.notes li:last-child { border-bottom: none; }
.notes li::before {
  content: '';
  position: absolute;
  left: 4px; top: 19px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.7;
}

/* Text-link CTA (secondary action, not a twin button) */
.link-cta {
  font-weight: 600;
  font-size: 1.0rem;
  color: var(--teal);
}
.link-cta::after { content: ' \2192'; }

/* CTA band */
.cta-band {
  text-align: center;
  padding: 88px 0;
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(83, 215, 204, 0.1), transparent 70%),
    var(--bg0);
  border-top: 1px solid var(--line-soft);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { max-width: 54ch; margin: 0 auto 30px; }
.cta-band .cta-row { justify-content: center; }

/* ---------- Footer ---------- */

.footer {
  background: var(--bg0);
  border-top: 1px solid var(--line-soft);
  padding: 52px 0 42px;
  font-size: 0.9rem;
  color: var(--dim);
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 34px; align-items: center; justify-content: space-between; }
.footer img { height: 38px; width: auto; opacity: 0.85; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--dim); }
.footer-links a:hover { color: var(--body); }
/* The trial, the manual and the release notes are not more page navigation, and
   sitting in the same grey run as six section links is how they get missed.
   A rule before the first of them separates the two groups, and they carry the
   body colour so they read as the brighter, actionable half of the footer. */
.footer-links a.res { color: var(--body); }
.footer-links a.res:hover { color: var(--ink); }
/* The boundary link, i.e. the first .res after the last plain one. There is no
   :first-of-class in CSS, and a.res:first-of-type would test "first <a> among
   the siblings" -- which is Separation -- so it would never match. */
.footer-links a:not(.res) + a.res { border-left: 1px solid var(--line); padding-left: 22px; }
@media (max-width: 640px) {
  /* Wrapped onto its own line the rule would float mid-row, so drop it. */
  .footer-links a:not(.res) + a.res { border-left: 0; padding-left: 0; }
}

/* ---------- Reveal on scroll (progressive enhancement: hidden only once JS is live) ---------- */

.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.pre { opacity: 0; transform: translateY(22px); }
.reveal.pre.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.pre { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 30px; padding: 34px 0; }
  .feature-row.flip .media { order: 0; }
  .pricing { grid-template-columns: 1fr; }
}

/* The bar collapses to the menu button well before phone width.
   .nav has a fixed height, so an overfull single row cannot wrap -- it runs off
   the right edge and takes the language button with it. Measured 2026-08-02
   across all eight languages, the row needs up to 1150px once the Free Trial
   item is in it (Spanish is the widest; German 1050, French and Italian 1020,
   English 980). It was already overflowing below ~1020px in Spanish, Portuguese
   and German before that item existed. 1180px left the widest language ~30px
   of slack; below it the menu button is both correct and better looking than a
   clipped row. 2026-08-05: the Account icon joined the bar (outside .nav-links;
   costs ~47px = 26px .nav-inner gap + 21px icon), more than that 30px slack, so
   the breakpoint moved 1180 -> 1230, then -> 1280 on 2026-08-05 with the nav-inner 1320px cap (see .nav-inner). Keep this value in step with the two
   breakpoints in tools/build_i18n.py (LANG_SWITCH_CSS), which style the
   language switcher. */
@media (max-width: 1279px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(8, 10, 18, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 10px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 2px; font-size: 1.05rem; width: 100%; }
  .nav-buy { margin-top: 10px; text-align: center; width: auto; }
  .nav-try { margin-top: 10px; text-align: center; width: auto; }
  .nav-toggle { display: block; }
}

/* The hero headline's .nowrap spans force the DESKTOP line break to land at the
   intended place. On a narrow screen holding each half together instead pushes
   the text past the viewport edge, where body{overflow-x:clip} silently cuts it
   off -- the headline simply ends mid-word. Measured 2026-08-02, the width below
   which each language is actually clipped: Italian 510px, Spanish 450, Japanese
   440, French 420; English, German, Portuguese and Chinese never clip. 560px
   clears all of them. Above it the spans still do their job. A less elegant
   wrap beats a truncated headline. */
@media (max-width: 560px) {
  .hero h1 .nowrap { white-space: normal; }
}

@media (max-width: 400px) {
  /* Shrinks the hero headline on phones. */
  .hero h1 { font-size: 2.15rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--nav-h) + 56px); }
  .wrap { padding: 0 20px; }
  .compare thead th:nth-child(n+2), .compare td:nth-child(n+2) { width: 90px; }
}
