/* =========================================================
   Keyboard Corrector — website styles
   Plain CSS, no build step, no external fonts or assets.
   ========================================================= */

:root {
  --bg: #0B1020;
  --bg-alt: #111827;
  --blue: #5B8CFF;
  --blue-hover: #7AA2FF;
  --purple: #8B5CF6;
  --text: #F3F6FF;
  --muted: #9AA4BC;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --green: #4ADE80;
  --amber: #FBBF24;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.65);
  --header-h: 68px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--blue);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; text-decoration: none; color: var(--bg); }

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow { max-width: 820px; }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Placeholders (clearly visible to the site owner) ---------- */
.placeholder {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  border-radius: 6px;
  padding: 0 6px;
  border-bottom: 1px dashed rgba(251, 191, 36, 0.7);
}

/* =========================================================
   Header / navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 32, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); text-decoration: none; }
.logo-mark { width: 32px; height: 32px; }

.primary-nav { margin-inline: auto; }
.primary-nav ul { display: flex; gap: 4px; }
.primary-nav a {
  display: block;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.primary-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.primary-nav a.is-active { color: var(--text); background: rgba(91, 140, 255, 0.16); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Language selector (native <select>, styled to match the header) */
.lang-switch { position: relative; display: inline-flex; align-items: center; }
.lang-globe {
  position: absolute;
  inset-inline-start: 11px;
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.lang-select {
  -webkit-appearance: none;
  appearance: none;
  padding: 8px 30px 8px 34px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.500-3.500' fill='none' stroke='%239aa6c5' stroke-width='1.600' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.lang-select:hover { background-color: rgba(255, 255, 255, 0.09); }
.lang-select option { color: #e8edff; background: #111827; }
[dir="rtl"] .lang-select { padding: 8px 34px 8px 30px; background-position: left 10px center; }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  cursor: pointer;
}
.menu-toggle:hover { background: var(--card-hover); }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--blue);
  color: var(--bg);
  box-shadow: 0 10px 30px -12px rgba(91, 140, 255, 0.8);
}
.btn-primary:hover { background: var(--blue-hover); color: var(--bg); box-shadow: 0 14px 34px -12px rgba(91, 140, 255, 0.95); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); border-color: rgba(255, 255, 255, 0.3); }

.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row-center { justify-content: center; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 90%;
  z-index: -2;
  background:
    radial-gradient(48% 55% at 18% 20%, rgba(91, 140, 255, 0.24), transparent 70%),
    radial-gradient(40% 50% at 85% 10%, rgba(139, 92, 246, 0.2), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 20%, #000 10%, transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  margin-bottom: 22px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 0 12px rgba(91, 140, 255, 0.9);
}

.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 4.1rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}
.grad-text {
  background: linear-gradient(100deg, var(--blue) 10%, var(--purple) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
}
.hero .btn-row { margin-top: 32px; }
.hero-note { margin-top: 20px; font-size: 0.92rem; color: var(--muted); }

/* ---------- Product preview ---------- */
.preview { position: relative; margin: 0; }
.preview-glow {
  position: absolute;
  inset: 6% 4% 10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(91, 140, 255, 0.35), transparent 75%);
  filter: blur(30px);
}

.demo { position: relative; padding: 18px 0 26px; }

.app-window {
  background: linear-gradient(180deg, #161d33, #10162a);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}
.app-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
.app-dots { display: inline-flex; gap: 6px; }
.app-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.app-dots i:nth-child(1) { background: #ff6b6b; }
.app-dots i:nth-child(2) { background: #fbbf24; }
.app-dots i:nth-child(3) { background: #4ade80; }
.app-title { flex: 1; text-align: center; margin-right: 46px; }

.app-body { padding: 20px; }

.app-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.field-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.field-value { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.95rem; }
.field-value small { color: var(--muted); }

.doc {
  position: relative;
  margin-top: 16px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  min-height: 190px;
}
.doc-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.09); }
.w60 { width: 60%; } .w70 { width: 70%; } .w85 { width: 85%; } .w55 { width: 55%; } .w80 { width: 80%; }

.doc-line { display: flex; flex-direction: column; gap: 6px; }
.doc-label { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.demo-text {
  display: grid;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 650;
  line-height: 1.45;
  min-height: 3.1em;      /* keeps the card height steady when a sentence wraps to two lines */
  align-content: start;
}
.demo-before, .demo-after {
  grid-area: 1 / 1;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 2px 8px;
  border-radius: 8px;
  transition: opacity 0.35s ease, background-color 0.3s ease, transform 0.35s ease;
}
.demo-before { color: #cbd5f5; }
.demo-after {
  color: var(--text);
  background: linear-gradient(100deg, rgba(91, 140, 255, 0.3), rgba(139, 92, 246, 0.3));
  justify-self: start;
}

.ctx-menu {
  position: absolute;
  right: 18px;
  bottom: 14px;
  min-width: 190px;
  padding: 6px;
  background: #1b2340;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.ctx-item { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); }
.ctx-sep { display: block; height: 1px; margin: 4px 6px; background: var(--border); }
.ctx-active { color: var(--text); }

.app-footer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.mock-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--blue);
  color: var(--bg);
  border-radius: 10px;
}
.mock-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.mock-check i { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border-strong); }

.chip {
  position: absolute;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.chip b { color: var(--text); font-weight: 650; }
.chip-before { left: -14px; top: -8px; }
.chip-after { right: -10px; bottom: 6px; }

/* Demo states, driven by data-state on .demo (see script.js).
   Default ("done") shows the corrected result with no JavaScript. */
.demo[data-state="done"] .demo-before { opacity: 0; transform: translateY(-4px); }
.demo[data-state="done"] .demo-after { opacity: 1; }
.demo[data-state="done"] .chip-before { opacity: 0.55; }
.demo[data-state="done"] .chip-after { opacity: 1; }

.demo:not([data-state="done"]) .demo-after { opacity: 0; transform: translateY(4px); }
.demo:not([data-state="done"]) .chip-after { opacity: 0; transform: translateY(6px); }
.demo[data-state="typed"] .chip-before { opacity: 1; }

.demo[data-state="selected"] .demo-before,
.demo[data-state="menu"] .demo-before { background: rgba(91, 140, 255, 0.38); color: #fff; }
.demo[data-state="menu"] .ctx-menu { opacity: 1; transform: none; }
.demo[data-state="menu"] .ctx-active { background: rgba(91, 140, 255, 0.28); }

.preview-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.demo-tag {
  flex: none;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
}

/* =========================================================
   Sections
   ========================================================= */
.section { padding: clamp(64px, 8vw, 108px) 0; }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-kicker {
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.section-head h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); font-weight: 720; }
.section-head p:not(.section-kicker) { margin-top: 16px; font-size: 1.06rem; color: var(--muted); }

/* ---------- Feature cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(91, 140, 255, 0.45);
  box-shadow: 0 20px 44px -26px rgba(91, 140, 255, 0.6);
}
.card-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 46px; height: 46px;
  margin-bottom: 18px;
  color: var(--blue);
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(91, 140, 255, 0.3);
  border-radius: 13px;
}
.card-icon .icon { width: 22px; height: 22px; }
.card h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card em { color: var(--text); font-style: normal; font-weight: 600; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step {
  position: relative;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-ill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 140px;
  padding: 18px;
  margin-bottom: 22px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ill-line { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.ill-sel, .ill-done {
  height: auto;
  width: fit-content;
  overflow-wrap: anywhere;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.4;
}
.ill-sel { background: rgba(91, 140, 255, 0.4); color: #fff; }
.ill-done { background: linear-gradient(100deg, rgba(91, 140, 255, 0.3), rgba(139, 92, 246, 0.3)); color: var(--text); }
.ill-menu {
  align-self: center;
  min-width: 190px;
  padding: 6px;
  background: #1b2340;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 0.85rem;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7);
}
.ill-menu span { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); }
.ill-menu i { display: block; height: 1px; margin: 3px 6px; background: var(--border); }
.ill-menu .ill-menu-active { color: var(--text); background: rgba(91, 140, 255, 0.28); }

.step-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 50%;
}
.step h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Languages ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.lang {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 10px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.lang:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, 0.5); }
.lang-native { font-family: var(--font-display); font-size: 1.5rem; font-weight: 650; }
.lang-name { font-size: 0.85rem; color: var(--muted); }

.rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.rule {
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.rule h3 { font-size: 1.25rem; font-weight: 680; margin: 14px 0 8px; }
.rule p { color: var(--muted); }
.rule-free { border-color: rgba(74, 222, 128, 0.35); background: linear-gradient(180deg, rgba(74, 222, 128, 0.07), var(--card)); }
.rule-paid { border-color: rgba(139, 92, 246, 0.4); background: linear-gradient(180deg, rgba(139, 92, 246, 0.09), var(--card)); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
}
.badge-free { color: var(--green); background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.35); }
.badge-paid { color: #c4b5fd; background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.4); }

.table-wrap { margin-top: 28px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.pair-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; text-align: center; }
.pair-table caption { padding: 16px; font-size: 0.85rem; color: var(--muted); caption-side: bottom; }
.pair-table th, .pair-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); }
.pair-table thead th { font-weight: 600; color: var(--muted); }
.pair-table tbody th { text-align: start; font-weight: 600; padding-inline-start: 18px; white-space: nowrap; }
.pair-table .na { color: rgba(255, 255, 255, 0.25); }
.pair-table .paid { color: #c4b5fd; }
.pair-table .free { color: var(--green); font-weight: 700; background: rgba(74, 222, 128, 0.09); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 900px; margin-inline: auto; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.plan h3 { font-size: 1.4rem; font-weight: 700; }
.plan-for { margin-top: 6px; color: var(--muted); }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; margin: 22px 0; }
.plan-price[hidden] { display: none; }
.plan .price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 750; letter-spacing: -0.02em; }
.plan .price.placeholder { font-size: 1.5rem; padding: 2px 10px; }
.plan .per { font-size: 0.92rem; color: var(--muted); }
.plan-list { display: grid; align-content: start; gap: 12px; margin-bottom: 28px; flex: 1; }
.plan-list li { display: flex; align-items: flex-start; gap: 10px; color: #d7def2; font-size: 0.97rem; }
.plan-list .icon { margin-top: 3px; width: 18px; height: 18px; color: var(--green); }
.plan-fine { margin-top: 14px; font-size: 0.82rem; color: var(--muted); text-align: center; }

.plan-premium {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    linear-gradient(135deg, var(--blue), var(--purple)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 30px 70px -40px rgba(91, 140, 255, 0.7);
}
.plan-flag {
  position: absolute;
  top: 22px; inset-inline-end: 22px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(100deg, var(--blue), #a78bfa);
  border-radius: 999px;
}

.billing-toggle {
  display: none;
  align-self: flex-start;
  margin-top: 20px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.js .billing-toggle { display: inline-flex; }
.seg {
  padding: 8px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.seg:hover { color: var(--text); }
.seg.is-active { color: var(--bg); background: var(--blue); }
.plan-panels { min-height: 1px; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item h3 { font-size: inherit; letter-spacing: 0; font-family: var(--font); }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 20px 24px;
  font: inherit;
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: start;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s;
}
.faq-q:hover { background: rgba(255, 255, 255, 0.04); }
.faq-q:focus-visible { outline-offset: -3px; border-radius: 0; }

.faq-icon { position: relative; flex: none; width: 18px; height: 18px; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 2px;
  margin-top: -1px;
  background: var(--blue);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }

.faq-a { overflow: hidden; }
.faq-a[hidden] { display: none; }
.faq-a-inner { padding: 0 24px 22px; color: var(--muted); }
.faq-a-inner p + p { margin-top: 12px; }
.js .faq-a:not([hidden]) .faq-a-inner { animation: faq-in 0.3s ease; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Final CTA ---------- */
.cta-section { padding-top: clamp(56px, 7vw, 96px); }
.cta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 64px);
  text-align: center;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.16), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 28px;
  isolation: isolate;
}
.cta-glow {
  position: absolute;
  inset: -40% 20% auto;
  height: 80%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(91, 140, 255, 0.35), transparent);
  filter: blur(30px);
}
.cta-card h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 740; }
.cta-card > p { max-width: 36em; margin: 16px auto 30px; font-size: 1.08rem; color: #c3cbe3; }
.cta-note { margin-top: 20px !important; margin-bottom: 0 !important; font-size: 0.88rem !important; color: var(--muted) !important; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding: 56px 0 28px; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { margin-top: 14px; max-width: 28em; color: var(--muted); font-size: 0.93rem; }
.footer-title { margin-bottom: 14px; font-family: var(--font); font-size: 0.8rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { display: grid; gap: 10px; }
.site-footer li a { color: #d7def2; font-size: 0.95rem; }
.site-footer li a:hover { color: var(--blue-hover); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }


/* =========================================================
   Scroll reveal (only when JavaScript is available)
   ========================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* =========================================================
   Document pages (privacy, terms, support)
   ========================================================= */
.page-hero {
  padding: clamp(48px, 6vw, 80px) 0 clamp(24px, 3vw, 40px);
  background:
    radial-gradient(50% 120% at 15% 0%, rgba(91, 140, 255, 0.16), transparent 70%),
    radial-gradient(40% 100% at 90% 0%, rgba(139, 92, 246, 0.14), transparent 70%);
}
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 740; }
.page-hero p { margin-top: 14px; max-width: 40em; color: var(--muted); font-size: 1.08rem; }
.page-meta { font-size: 0.9rem !important; }

.doc-page { padding: 24px 0 clamp(64px, 8vw, 104px); }
.prose { max-width: 760px; }
.prose h2 { margin: 44px 0 14px; font-size: 1.5rem; font-weight: 700; }
.prose h3 { margin: 26px 0 10px; font-size: 1.12rem; font-weight: 650; }
.prose p { margin-bottom: 14px; color: #cfd6ea; }
.prose ul { display: grid; gap: 8px; margin: 0 0 18px; padding-inline-start: 4px; }
.prose li { position: relative; padding-inline-start: 22px; color: #cfd6ea; }
.prose li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.prose strong { color: var(--text); }
.prose code {
  padding: 2px 7px;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.88em;
  color: #d7def2;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.notice {
  margin: 0 0 8px;
  padding: 16px 20px;
  font-size: 0.95rem;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.09);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-sm);
}
.notice strong { color: #fef3c7; }

.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 8px 0 0; max-width: 900px; }
.help-card { padding: 22px 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.help-card h3 { margin: 0 0 8px; font-size: 1.08rem; font-weight: 650; }
.help-card p { margin: 0; font-size: 0.96rem; color: var(--muted); }

.page-toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.page-toc a {
  padding: 7px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.page-toc a:hover { color: var(--text); text-decoration: none; border-color: rgba(91, 140, 255, 0.5); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1020px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero .btn-row { justify-content: center; }
  .preview { max-width: 560px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .lang-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pricing-grid, .rule-grid, .help-grid { grid-template-columns: 1fr; }
  .pricing-grid { max-width: 520px; }
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .header-inner { gap: 12px; }
  .header-actions { margin-inline-start: auto; }

  .primary-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    margin: 0;
    padding: 12px 24px 20px;
    background: rgba(11, 16, 32, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
  }
  .site-header.is-open .primary-nav { display: block; }
  .primary-nav ul { flex-direction: column; gap: 2px; }
  .primary-nav a { padding: 14px 14px; font-size: 1.02rem; border-radius: 12px; }
}

@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-lg { width: 100%; }
  .app-body { padding: 14px; }
  .app-row { grid-template-columns: 1fr; }
  .ctx-menu { right: 10px; min-width: 170px; }
  .chip-before { left: 0; }
  .chip-after { right: 0; }
  .plan { padding: 28px 22px; }
  .faq-q { padding: 18px; }
  .faq-a-inner { padding: 0 18px 20px; }
  .brand-name { font-size: 0.98rem; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@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;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .lang:hover { transform: none; }
}
.ill-menu { direction: ltr; }

/* =========================================================
   Disabled actions, status lines, billing note, TODO markers
   ========================================================= */
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: grayscale(0.25);
}
.btn.is-disabled:hover,
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: none; }

.download-status {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #fde68a;
}
.download-status[hidden] { display: none; }
.cta-card .download-status { margin-top: 8px; }

.billing-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Internal TODO markers: visible on purpose so none can be published by accident.
   Remove them (and run tools/check-site.js) before going live. */
.todo {
  margin: 0 0 28px;
  padding: 16px 20px;
  font-size: 0.92rem;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.09);
  border: 1px dashed rgba(248, 113, 113, 0.7);
  border-radius: 14px;
}
.todo p, .todo li { color: #fecaca; }
.todo strong { color: #fee2e2; }
.todo ul { margin: 8px 0 0; }
.todo li::before { background: #f87171; }
.todo-inline {
  padding: 1px 6px;
  color: #fecaca;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.14);
  border: 1px dashed rgba(248, 113, 113, 0.7);
  border-radius: 6px;
}
