/* BinaryPHP landing — Open 粉圓 + system fallback, dark theme, single-file.
 *
 * Font loading strategy:
 *   1. <link rel="preload" ...> in <head> kicks off the font download as early
 *      as the HTML byte stream is parsed.
 *   2. @font-face below uses `font-display: swap` so first paint uses the OS
 *      sans-serif (instant, no FOIT) and the page swaps to Open Huninn
 *      mid-render once the woff2 finishes downloading (~2.1 MB).
 *   3. The font is served from download.binaryphp.com (Cloudflare R2 public
 *      bucket via custom domain) — globally CDN-cached at CF edge so a
 *      visitor in Taiwan, the US, and Europe all download from the nearest
 *      PoP. Origin /assets/fonts/ is kept as a same-origin fallback only.
 */
@font-face {
  font-family: 'Open Huninn';
  src: url('https://download.binaryphp.com/fonts/jf-openhuninn-2.1.woff2') format('woff2');
  font-weight: 100 900;        /* variable-ish range; jf-openhuninn ships one weight */
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E,  /* Basic Latin */
                 U+00A0-00FF,  /* Latin-1 Supplement */
                 U+2000-206F,  /* General Punctuation */
                 U+3000-303F,  /* CJK Symbols and Punctuation */
                 U+3100-312F,  /* Bopomofo */
                 U+31A0-31BF,  /* Bopomofo Extended */
                 U+4E00-9FFF,  /* CJK Unified Ideographs */
                 U+FF00-FFEF;  /* Halfwidth/Fullwidth Forms */
}

/* Per-language fonts — full character coverage (no subsetting), so user-typed
   content (support tickets, plugin names) renders consistently. Sizes:
   TangYuan ~1.3 MB, Kosugi Maru ~1.5 MB, Nanum Square Round ~240 KB.
   Loaded only when html[lang] matches via the body[lang=...] selector below.
   font-display: swap — system font shows first, swap once webfont arrives. */
@font-face {
  font-family: 'TangYuan';
  src: url('https://download.binaryphp.com/fonts/tangyuan-full.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Kosugi Maru';
  src: url('https://download.binaryphp.com/fonts/kosugimaru-full.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nanum Square Round';
  src: url('https://download.binaryphp.com/fonts/nanumsquareround-full.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
/* MiSans Thai — variable font, ~22 KB, covers full Thai script + Latin.
   The variation axis spans Thin (100) → Heavy (900). */
@font-face {
  font-family: 'MiSans Thai';
  src: url('https://download.binaryphp.com/fonts/misansthai-vf.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Nunito — rounded geometric sans, variable font, ~99 KB. Covers Latin
   Extended-A (German umlauts ä ö ü ß), Latin Extended-B, and Cyrillic.
   Used for de + fr to match the rounded visual style of the CJK fonts. */
@font-face {
  font-family: 'Nunito';
  src: url('https://download.binaryphp.com/fonts/nunito-vf.woff2') format('woff2-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* Apply language-specific fonts via html[lang]. Each rule overrides --sans so
   every place in the codebase that uses var(--sans) (i.e. body and most text)
   automatically picks up the right font. The original Open Huninn fallback
   chain is preserved as fallbacks after the language-specific font. */
html[lang="zh-CN"] {
  --sans: 'TangYuan', 'Open Huninn', -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[lang="ja"] {
  --sans: 'Kosugi Maru', 'Open Huninn', -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[lang="ko"] {
  --sans: 'Nanum Square Round', 'Open Huninn', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans CJK KR", "Malgun Gothic", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[lang="th"] {
  --sans: 'MiSans Thai', 'Open Huninn', -apple-system, BlinkMacSystemFont, "Sukhumvit Set", "Krub", "Noto Sans Thai", "Thonburi", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[lang="de"], html[lang="fr"] {
  --sans: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

:root {
  --bg: #0b0d10;
  --bg-soft: #14171c;
  --bg-card: #181c22;
  --border: #232830;
  --text: #e6e8eb;
  --text-dim: #9aa3ad;
  --text-muted: #6c7480;
  --accent: #ff7a18;        /* warm orange — "binary heat" */
  --accent-soft: #ffd9b8;
  --good: #4ade80;
  --code-bg: #0e1116;
  --shadow: 0 1px 0 rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.4);
  --max: 1100px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: 'Open Huninn', -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ─────────────────────────────────────── */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(11,13,16,.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}
.brand-mark {
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: -1px;
}
.brand-name { letter-spacing: -.5px; }
.accent { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;       /* lang switcher must not drop to a second row */
  min-width: 0;            /* allow children to shrink instead of overflowing the row */
}

/* Mobile hamburger — checkbox + label trick (no JS). The hidden checkbox
   stores the open/closed state; the <label class="hamburger"> is what the
   user clicks. On desktop the checkbox + hamburger are hidden via display:none
   and .nav-links renders normally. On mobile <=720px the hamburger appears
   and .nav-links is hidden until `.nav-toggle-input:checked` is set, at which
   point the sibling selector ~ .nav-links shows the dropdown panel. */
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.hamburger { display: none; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  transition: color .15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }

/* Language switcher (header dropdown). <details>/<summary> for keyboard +
   no-JS support; the menu stays open while focused inside. */
.lang-switch {
  position: relative;
  margin-left: 12px;
  /* <details> is display:block by default, which makes it span the full row
     and push everything else to a second line. inline-block keeps it inline
     with the other nav items even if .nav-links isn't flex. */
  display: inline-block;
  flex-shrink: 0;
}
.lang-switch summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  transition: border-color .15s, background .15s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { border-color: var(--accent); }
.lang-switch[open] summary { border-color: var(--accent); }
.lang-switch .lang-caret { color: var(--text-muted); font-size: 10px; }
.lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.lang-menu li { margin: 0; }
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-left: 0;       /* override .nav-links a */
  border-radius: 5px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background .12s;
}
.lang-menu a:hover { background: rgba(255,122,24,.08); color: var(--text); }

/* Footer: horizontal row of all flags, no dropdown — current lang is dimmed
   so it's clear it's the active selection. */
.lang-switch-footer {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;        /* 6 flags wrap on very narrow viewports */
  gap: 8px;
  margin-left: 12px;
}
.lang-switch-footer a {
  display: inline-flex;
  margin-left: 0;
  opacity: .55;
  transition: opacity .12s;
}
.lang-switch-footer a:hover { opacity: 1; }
.lang-switch-footer a.lang-current {
  opacity: 1;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-radius: 2px;
  pointer-events: none;
  cursor: default;
}

.flag {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

/* ── Hero ────────────────────────────────────── */
.hero {
  padding: 80px 0 100px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,122,24,.10), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(255,122,24,.06), transparent 40%);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin: 0 0 24px;
  font-weight: 800;
}
.lede {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 0 32px;
}
.lede strong { color: var(--text); font-weight: 600; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .1s, background .15s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #1a0d04;
}
.btn-primary:hover { background: #ff8a30; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-dim); }
.btn-large { padding: 16px 28px; font-size: 16px; }

/* ── Code snippet ────────────────────────────── */
.snippet {
  margin-top: 56px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.snippet-tabs {
  display: flex;
  background: #0a0c10;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
}
.tab {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.tab-active { color: var(--text); border-bottom-color: var(--accent); }
.snippet pre {
  margin: 0;
  padding: 24px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}
.c-prompt { color: var(--accent); user-select: none; margin-right: 8px; }
.c-out { color: var(--text-dim); }

/* ── Section base ────────────────────────────── */
section { padding: 88px 0; border-top: 1px solid var(--border); }
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.8px;
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.15;
}
.section-sub {
  color: var(--text-dim);
  font-size: 17px;
  margin: 0 0 48px;
}

/* ── Problem section ─────────────────────────── */
.problem h2 { margin-bottom: 40px; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.prob-card, .feat, .price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.prob-card h3, .feat h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.3px;
}
.prob-card p, .feat p {
  color: var(--text-dim);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent-soft);
}

/* ── How it works ────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  position: relative;
}
.step-num {
  font-family: var(--mono);
  font-size: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a0d04;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { margin: 0 0 12px; font-size: 18px; }
.step p { color: var(--text-dim); margin: 0; font-size: 15px; }

/* ── Install section ─────────────────────────── */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.install-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.install-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 16px;
}
.install-tag-pro {
  color: var(--accent);
  border-color: rgba(255,122,24,.3);
  background: rgba(255,122,24,.08);
}
.install-block h3 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -.4px;
}
.install-block p { color: var(--text-dim); }
.install-block pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 16px 0;
  white-space: pre;
}
/* Inline `code` inside install pre/code shouldn't get a second background. */
.install-block pre code { background: transparent; border: none; padding: 0; }
/* Bullet list used in the install card (replaces what was a fake shell block). */
.install-block .feature-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.install-block .feature-list li {
  position: relative;
  padding: 6px 0 6px 24px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  border-bottom: 1px dashed var(--border);
}
.install-block .feature-list li:last-child { border-bottom: none; }
.install-block .feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--accent);
  font-weight: 700;
}
.install-block .feature-list code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 12px;
  color: var(--text);
}
/* PHP version download grid in the install card. Each row of 2-4 buttons. */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0 8px;
}
.dl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  transition: border-color .15s, background .15s, transform .1s;
}
.dl-btn:hover {
  border-color: var(--accent);
  background: rgba(255,122,24,.08);
  color: var(--accent);
  transform: translateY(-1px);
}
.dl-btn span { font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.dl-btn small { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.tiny { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* ── Pricing ─────────────────────────────────── */
.pricing { background: var(--bg-soft); }
.price-card {
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 32px rgba(255,122,24,.15);
  transform: translateY(-4px);
}
/* Replaces the CTA button on the card the visitor is already subscribed to.
   Subdued so it reads as a status indicator, not a clickable action. */
.tier-current-plan {
  margin-top: auto;
  padding: 12px 18px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  background: var(--bg-soft);
}
.price-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #1a0d04;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
}
.price-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text-dim);
  font-weight: 600;
}
.price {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}
.price span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex-grow: 1;
}
.price-card li {
  padding: 8px 0;
  color: var(--text-dim);
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.price-card li:before { content: "✓ "; color: var(--good); margin-right: 4px; }
.price-card li:last-child { border-bottom: none; }
.price-card .btn { text-align: center; }

/* ── FAQ ─────────────────────────────────────── */
.faq .qa {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 22px;
  color: var(--text-muted);
  transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .qa p {
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Customers ───────────────────────────────── */
.customers .customer-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.customers .customer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
}
.customers .customer-card header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.customers .customer-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.customers .customer-card h3 a { color: var(--accent); text-decoration: none; }
.customers .customer-card h3 a:hover { text-decoration: underline; }
.customers .customer-tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.customers .customer-card blockquote {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

/* ── Final CTA ───────────────────────────────── */
.cta-final {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,122,24,.15), transparent 60%),
    var(--bg);
  text-align: center;
  padding: 100px 0;
}
.cta-final h2 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -1px;
  margin: 0 0 12px;
  font-weight: 800;
}
.cta-final p { color: var(--text-dim); font-size: 18px; margin: 0 0 32px; }
.cta-final .cta { justify-content: center; }

/* ── Footer ──────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg-soft);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;        /* on narrow viewports, links + flag row wrap onto multiple lines */
  align-items: center;
  gap: 12px 24px;         /* tighter row gap, original column gap */
  max-width: 100%;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}
.footer-links a:hover { color: var(--text); }

/* ── Performance / benchmark table ───────────── */
.performance { background: var(--bg-soft); }

/* Horizontal bar chart for the 1M-iter hot loop comparison.
   Pure CSS — bar widths are driven by `style="--w:NN%"` set inline so the
   numbers stay in the HTML next to the data they describe. Bars cap at the
   slowest entry's width (i.e. ~90% leaves room for the value label). */
.bench-chart {
  margin: 32px 0 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.bench-chart-caption {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  text-align: center;
}
.bench-chart-caption code {
  background: transparent; border: none; padding: 0;
  color: var(--text); font-size: 12px;
}
.bench-chart-rows { display: flex; flex-direction: column; gap: 10px; }
.bench-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.bench-label {
  text-align: right;
  font-family: var(--mono);
  color: var(--text-dim);
  white-space: nowrap;
}
.bench-label small { color: var(--text-muted); }
.bench-bar {
  width: var(--w, 50%);
  height: 30px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 12px;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  font-family: var(--mono);
  position: relative;
  min-width: 90px;
  transition: width .4s cubic-bezier(.4,.2,.2,1);
}
.bench-bar-plain { background: linear-gradient(90deg, #15803d, #22c55e); }
.bench-bar-rs    { background: linear-gradient(90deg, #15803d, #22c55e); }
.bench-bar-jit   { background: linear-gradient(90deg, #c2410c, #fb923c); }
.bench-bar-vm    { background: linear-gradient(90deg, #9a3412, #ea580c); }
.bench-mult { color: var(--text-muted); font-family: var(--mono); font-size: 12px; }

.bench-chart-legend {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}
.bench-chart-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.bench-chart-legend .dot-plain { background: #22c55e; }
.bench-chart-legend .dot-jit   { background: #fb923c; }
.bench-chart-legend .dot-vm    { background: #ea580c; }

@media (max-width: 600px) {
  .bench-row { grid-template-columns: 110px 1fr 48px; gap: 8px; }
  .bench-label { font-size: 11px; }
  .bench-bar { font-size: 11px; padding: 0 8px; min-width: 70px; }
}

.bench-table { margin-top: 32px; overflow-x: auto; }
.bench-table table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.bench-table th, .bench-table td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.bench-table th {
  background: rgba(255,122,24,.06);
  color: var(--text); font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
}
.bench-table tr:last-child td { border-bottom: none; }
.bench-table td:first-child { font-weight: 500; }
.bench-table code {
  background: transparent; border: none; padding: 0;
  color: var(--text); font-size: 13px;
}
.verdict-good { color: var(--good); font-size: 13px; }
.verdict-ok   { color: var(--accent); font-size: 13px; }
.bench-note   { color: var(--text-muted); font-size: 13px; margin-top: 16px; line-height: 1.6; }
.th-sub       { display: block; color: var(--text-muted); font-size: 11px; font-weight: 500; margin-top: 2px; }
.bench-table small { color: var(--text-muted); font-size: 11px; }
.bench-callout {
  margin-top: 28px;
  background: rgba(74,222,128,.08);
  border: 1px solid rgba(74,222,128,.2);
  border-radius: 8px;
  padding: 20px 24px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
.bench-callout strong { color: var(--good); }

/* ── Legal pages (privacy / terms) ───────────── */
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.container-tight  { max-width: 480px; margin: 0 auto; padding: 0 24px; }
.legal { padding: 60px 0 100px; }
.legal h1 { font-size: 36px; letter-spacing: -1px; margin: 8px 0 16px; }
.legal h2 {
  font-size: 22px; margin: 40px 0 12px;
  letter-spacing: -.4px; color: var(--text);
  border-top: 1px solid var(--border); padding-top: 32px;
}
.legal h2:first-of-type { border-top: none; padding-top: 0; }
.legal h3 { font-size: 17px; margin: 24px 0 8px; color: var(--text); }
.legal p, .legal li {
  color: var(--text-dim); font-size: 15px; line-height: 1.7;
}
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal .lede-small {
  font-size: 16px; color: var(--text-dim);
  border-left: 3px solid var(--accent);
  padding: 8px 16px; margin: 24px 0 32px;
  background: rgba(255,122,24,.04); border-radius: 0 6px 6px 0;
}
.legal-table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.legal-table th, .legal-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.legal-table th {
  background: var(--bg-soft); color: var(--text); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; font-size: 12px;
}
.legal-table tr:last-child td { border-bottom: none; }

/* ── User pill in nav (logged-in indicator) ──── */
.user-pill {
  margin-left: 24px;
  font-size: 13px;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.user-pill a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 4px;
}
.user-pill a:hover { text-decoration: underline; }
/* Email itself reads as text but links to /account/. Keep it dim so the
   nav doesn't gain a second accent-coloured link beside "Sign out". */
.user-pill a.user-email {
  color: inherit;
  margin-left: 0;
}
.user-pill a.user-email:hover { color: var(--accent); text-decoration: underline; }

/* ── Login page ──────────────────────────────── */
.login-page { padding: 60px 0 100px; }
.login-card {
  max-width: 380px; margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.brand-mark-lg {
  font-family: var(--mono);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.login-card h1 {
  font-size: 22px; letter-spacing: -.5px; margin: 0 0 4px;
  font-weight: 700;
}
.login-sub {
  color: var(--text-dim); font-size: 14px;
  margin: 0 0 24px;
}

.provider-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.provider {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.provider:hover:not(.provider-disabled) {
  background: var(--bg-card);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.provider-icon {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.provider-icon svg { width: 100%; height: 100%; display: block; }
.provider-label {
  text-align: left;
  font-size: 14px;
}
.provider-google:hover { border-color: #fff; }
.provider-disabled {
  opacity: .45;
  cursor: not-allowed;
}
.provider-disabled .provider-label { color: var(--text-muted); }
.provider-soon {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 3px;
}

.login-fineprint {
  color: var(--text-muted); font-size: 11px;
  margin: 16px 0 0; line-height: 1.6;
}
.login-fineprint a { color: var(--text-dim); text-decoration: underline; text-decoration-color: var(--border); }
.login-fineprint a:hover { color: var(--text); text-decoration-color: var(--text-dim); }

.login-divider {
  margin: 20px 0 16px; text-align: center; position: relative;
}
.login-divider:before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.login-divider span {
  background: var(--bg-card); padding: 0 10px;
  position: relative; color: var(--text-muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
}
.login-anon {
  color: var(--text-dim); font-size: 13px; margin: 0;
  line-height: 1.6;
}
.login-anon a { color: var(--accent); text-decoration: none; }
.login-anon a:hover { text-decoration: underline; }

/* ── Pricing / billing page ──────────────────── */
.pricing-page { padding: 60px 0 100px; }
.pricing-page h1 {
  text-align: center;
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
  letter-spacing: -.5px;
}
.pricing-page .lede {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 640px;
}
.current-plan-banner {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 14px 20px;
  background: rgba(74, 222, 128, .07);
  border: 1px solid rgba(74, 222, 128, .25);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  text-align: center;
}
.current-plan-banner a {
  color: var(--good);
  text-decoration: none;
  font-weight: 600;
  margin-left: 8px;
}
.current-plan-banner a:hover { text-decoration: underline; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
  max-width: 1080px;
  margin: 0 auto;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color .15s, transform .15s;
}
.plan-card:hover { border-color: var(--text-muted); }
.plan-card h3 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -.3px;
}
.plan-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 32px rgba(255,122,24,.12);
}
.plan-card-featured::before {
  content: "Most popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #1a0d04;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 999px;
}
.plan-price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 12px 0 18px;
  color: var(--text);
}
.plan-price small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.billing-cycle {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  margin: 0 0 18px;
  background: var(--bg-soft);
}
.billing-cycle legend {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 6px;
}
.billing-cycle label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background .12s;
}
.billing-cycle label:hover { background: rgba(255,255,255,.03); }
.billing-cycle label:has(input:checked) {
  background: rgba(255,122,24,.08);
  color: var(--text);
}
.billing-cycle input[type=radio] { accent-color: var(--accent); margin: 0; }
.billing-cycle strong { color: var(--text); font-weight: 700; }
.billing-cycle .discount {
  font-style: normal;
  color: var(--good);
  font-size: 12px;
  margin-left: 4px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex: 1;
}
.plan-features li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 14px;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--accent);
  font-weight: 700;
}

.plan-cta {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #1a0d04;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.plan-cta:hover { background: #ff8a30; transform: translateY(-1px); }
.plan-cta-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.plan-cta-secondary:hover { background: var(--bg-soft); border-color: var(--text-muted); }

.pricing-fineprint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin: 32px auto 0;
  max-width: 640px;
}
.pricing-warn {
  text-align: center;
  margin: 16px auto 0;
  max-width: 640px;
  padding: 12px 16px;
  background: rgba(255, 200, 50, .08);
  border: 1px solid rgba(255, 200, 50, .25);
  border-radius: 8px;
  color: #fbbf24;
  font-size: 13px;
}

/* ── Billing result (success / cancel) ───────── */
.billing-result { padding: 80px 0 100px; }
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 36px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.result-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
  background: rgba(74, 222, 128, .1);
  color: var(--good);
  border: 2px solid rgba(74, 222, 128, .3);
}
.result-icon-muted {
  background: var(--bg-soft);
  color: var(--text-muted);
  border-color: var(--border);
  font-size: 40px;
  line-height: 0.5;
}
.result-card h1 {
  font-size: 26px;
  margin: 0 0 12px;
  letter-spacing: -.3px;
}
.result-card p {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 28px;
  line-height: 1.6;
}
.result-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.result-actions .cta {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #1a0d04;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.result-actions .cta:hover { background: #ff8a30; transform: translateY(-1px); }
.result-actions .cta-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}
.result-actions .cta-link:hover { color: var(--text); text-decoration: underline; }

/* ── Account dashboard ───────────────────────── */
.account-page { padding: 60px 0 100px; }
.account-page h1 {
  font-size: clamp(28px, 4vw, 36px);
  margin: 0 0 24px;
  letter-spacing: -.5px;
}
.account-page h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin: 0 0 16px;
  font-weight: 600;
}
.container-tight { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.account-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 0 0 16px;
  font-size: 14px;
}
.account-dl dt {
  color: var(--text-muted);
  font-size: 13px;
}
.account-dl dd {
  margin: 0;
  color: var(--text);
}
.account-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}
.account-actions .cta,
.account-actions button.cta {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #1a0d04;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
.account-actions .cta:hover { background: #ff8a30; transform: translateY(-1px); }
.account-actions .cta-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}
.account-actions .cta-link:hover { color: var(--text); text-decoration: underline; }
.muted { color: var(--text-muted); font-size: 13px; }

/* ── Contact + Support pages ─────────────────── */
.contact-page,
.support-page {
  padding: 80px 0 100px;
  min-height: 70vh;
}
.contact-page a:not(.btn),
.support-page a:not(.btn) {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.contact-page a:not(.btn):hover,
.support-page a:not(.btn):hover {
  border-bottom-color: var(--accent);
}
/* Override accent for links *inside* the ticket table (we want them to
   read like body text in the row, with the accent only on hover). */
.ticket-table a { color: var(--text); border-bottom: 0; }
.ticket-table a:hover { color: var(--accent); }
.contact-page h1,
.support-page h1 {
  margin-top: 0;
  font-size: 32px;
  letter-spacing: -0.01em;
}
.contact-form,
.ticket-reply {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.contact-form label,
.ticket-reply label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
}
.contact-form input,
.contact-form textarea,
.ticket-reply textarea {
  font: inherit;
  background: var(--bg-card);
  border: 1px solid #2a2f37;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus,
.ticket-reply textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form input[readonly] {
  opacity: 0.7;
  cursor: not-allowed;
}
.contact-flash,
.contact-error {
  padding: 12px 14px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 14px;
}
.contact-flash {
  background: rgba(255, 122, 24, 0.1);
  border: 1px solid rgba(255, 122, 24, 0.4);
  color: var(--accent-soft);
}
.contact-error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fca5a5;
}

/* Ticket list */
.ticket-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}
.ticket-table th,
.ticket-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #2a2f37;
}
.ticket-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ticket-table tr:hover td { background: var(--bg-card); }
.ticket-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.ticket-status-open {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}
.ticket-status-closed {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

/* Ticket detail thread */
.ticket-thread {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ticket-msg {
  background: var(--bg-card);
  border: 1px solid #2a2f37;
  border-radius: 12px;
  padding: 16px 18px;
}
.ticket-msg-admin {
  border-left: 3px solid var(--accent);
}
.ticket-msg header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.ticket-msg header strong { color: var(--text); }
.ticket-msg header small { color: var(--text-muted); }
.ticket-msg-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.55;
}
.ticket-msg-body code {
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 880px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 520px; }
  .plan-card-featured { transform: none; }
  .account-dl { grid-template-columns: 1fr; gap: 2px; }
  .account-dl dt { margin-top: 8px; }
}
@media (max-width: 720px) {
  /* Hamburger button (≤720px). 3 stacked spans → 3 horizontal bars. */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    padding: 4px 0;
    cursor: pointer;
    margin-left: auto;        /* push to right edge of nav-row */
  }
  .hamburger > span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }

  /* Default state on mobile: nav hidden. The :checked sibling selector
     reveals it as a positioned dropdown panel. */
  .nav-links { display: none; }
  .nav-toggle-input:checked ~ .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 64px;                /* below the 64px-tall nav row */
    right: 16px;
    min-width: 220px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    z-index: 100;
  }
  .nav-toggle-input:checked ~ .nav-links > a {
    margin-left: 0;
    padding: 10px 12px;
    border-radius: 6px;
  }
  .nav-toggle-input:checked ~ .nav-links > a:hover { background: rgba(255,122,24,.08); }
  .nav-toggle-input:checked ~ .nav-links .user-pill {
    margin-left: 0;
    margin-bottom: 6px;
    width: 100%;
    box-sizing: border-box;
  }
  .nav-toggle-input:checked ~ .nav-links .lang-switch {
    margin-left: 0;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    width: 100%;
  }
  .nav-toggle-input:checked ~ .nav-links .lang-switch > summary {
    width: 100%; justify-content: flex-start;
  }
  /* Sub-dropdown anchors to the lang-switch row on mobile. */
  .nav-toggle-input:checked ~ .nav-links .lang-menu { right: auto; left: 0; }

  .hero { padding: 60px 0 70px; }
  section { padding: 60px 0; }
  .price-card-featured { transform: none; }
}
