/* ==========================================================================
   Ecryptgram · ecryptgram.net
   Visual system — "official Telegram skeleton + brand-red accent"
   Sections:
     01 tokens        02 reset        03 typography   04 layout
     05 header/nav    06 buttons      07 chips/badges 08 cards
     09 hero          10 features     11 compare      12 download
     13 steps         14 legend       15 faq          16 footer
     17 utilities     18 responsive
   ========================================================================== */

/* --- 01 tokens ----------------------------------------------------------- */
:root {
  /* surface */
  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --card: #ffffff;
  --line: #e7ebf0;
  --line-strong: #d9e0e9;

  /* ink */
  --ink: #0f172a;
  --body: #475569;
  --muted: #8a97a8;
  --faint: #a9b4c2;

  /* brand */
  --blue: #229ed9;
  --blue-deep: #1d93d2;
  --blue-wash: #eaf5fc;
  --blue-line: #cfe7f7;
  --red: #e11d26;
  --red-deep: #c6181f;
  --red-wash: #fdeced;

  /* dark blocks */
  --dark: #0b1220;
  --dark-card: #131c2e;
  --dark-line: #1e2a40;
  --dark-body: #94a3b8;
  --dark-muted: #7c8ca5;
  --dark-faint: #64748b;

  /* type */
  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  /* shape */
  --r-card: 16px;
  --r-btn: 10px;
  --r-shot: 20px;
  --r-pill: 999px;

  /* rhythm */
  --gutter: 24px;
  --content: 1200px;
  --section-y: 88px;
  --header-h: 72px;

  /* elevation */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -12px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.14);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

::selection { background: var(--blue-wash); color: var(--ink); }

/* --- 03 typography ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
  font-weight: 800;
}

h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); }
h2 { font-size: clamp(1.85rem, 3.1vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); font-weight: 700; }
h4 { font-size: 1.075rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; }
p + p { margin-top: 0.85em; }

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.19rem);
  line-height: 1.62;
  color: var(--body);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--blue);
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.855em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.42em;
  color: var(--ink);
  /* Must NOT be nowrap: the verification commands are longer than a phone
     viewport and would stretch the whole page sideways. */
  overflow-wrap: anywhere;
}

/* --- 04 layout ----------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--content) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: 64px; }
.section--flush-top { padding-top: 0; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--lg { gap: 24px; }
.stack--sm { gap: 10px; }
.center { text-align: center; }
.head { max-width: 800px; margin-inline: auto; text-align: center; }
.head .lead { margin-top: 14px; }
.head .eyebrow { display: inline-block; margin-bottom: 14px; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Cards that end in an illustration: keep the pictures aligned to the bottom
   edge so a row of cards with different copy lengths still reads as a grid. */
.grid--2 > .card { display: flex; flex-direction: column; }
.grid--2 > .card > img { margin-top: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--r-btn) 0;
}
.skip-link:focus { left: 0; }

/* --- 05 header / nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  flex: none;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 32px; height: 32px; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-inline: auto;
}
.nav a {
  color: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }

.header__cta { flex: none; }

/* Pages without the download CTA (everything except the home page) push the
   nav to the right edge instead of centring it. */
.site-header--plain .nav { margin-inline: auto 0; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 8px;
  cursor: pointer;
  line-height: 0;
}

/* --- 06 buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, transform 0.16s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-deep); color: #fff; }

.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-deep); color: #fff; }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--muted); color: var(--ink); }

.btn--on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}
.btn--on-dark:hover { border-color: rgba(255, 255, 255, 0.45); color: #fff; }

.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--block { width: 100%; }

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

/* --- 07 chips / badges --------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--blue-wash);
  border: 1px solid var(--blue-line);
  color: var(--blue-deep);
  font-size: 0.8125rem;
  font-weight: 600;
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--body);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  white-space: nowrap;
}
.chip b { color: var(--ink); font-weight: 700; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--body);
}
.tag--stable {
  background: var(--blue-wash);
  border-color: var(--blue-line);
  color: var(--blue-deep);
}
.tag--red {
  background: var(--red-wash);
  border-color: #f7ccd0;
  color: var(--red-deep);
}

/* --- 08 cards ------------------------------------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px;
}
.card--pad-lg { padding: 32px; }
.card--flat { background: var(--bg-alt); }
.card__icon,
.feature__icon {
  width: 24px;
  height: 24px;
  color: var(--blue);
  flex: none;
}
.card__icon--red { color: var(--red); }
.card h4 { margin-bottom: 8px; }
.card p { font-size: 0.9rem; line-height: 1.6; }

/* --- 09 hero ------------------------------------------------------------- */
.hero { padding-block: 84px 64px; text-align: center; }
.hero h1 { margin-block: 22px 20px; }
.hero .lead { max-width: 840px; margin-inline: auto; }
.hero .btn-row { margin-top: 32px; }
.hero__trust {
  margin-top: 18px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.hero__shot { margin-top: 56px; }

.shot-frame {
  border: 1px solid var(--line);
  border-radius: var(--r-shot);
  background: var(--bg-alt);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.shot-frame img,
.shot-frame svg { width: 100%; height: auto; }

.shot-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 200px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
  padding: 18px;
}
.shot-slot span { color: var(--muted); font-size: 0.68rem; }

/* --- 10 features --------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.feature + .feature { margin-top: 72px; }
.feature--flip .feature__copy { order: 2; }
.feature--flip .feature__media { order: 1; }
.feature__num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.08em;
}
.feature__copy h3 { margin-block: 10px 14px; }
.feature__media { min-width: 0; }

.checks {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.checks li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  color: var(--ink);
  font-weight: 500;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-wash);
  border: 1px solid var(--blue-line);
}
.checks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.63em;
  width: 6px;
  height: 3px;
  border-left: 1.7px solid var(--blue-deep);
  border-bottom: 1.7px solid var(--blue-deep);
  transform: rotate(-45deg);
}
.checks--red li::before {
  background: var(--red-wash);
  border-color: #f7ccd0;
}
.checks--red li::after {
  border-color: var(--red-deep);
}

/* --- 11 compare ---------------------------------------------------------- */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.compare__card {
  border-radius: 18px;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.compare__card--accent {
  background: var(--blue-wash);
  border-color: var(--blue-line);
}
.compare__card h3 { font-size: 1.25rem; margin-bottom: 18px; }

.plist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.plist li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.plist li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.plist li.yes::before { content: "+"; color: var(--blue-deep); font-weight: 700; }
.plist li.no::before { content: "–"; color: var(--faint); font-weight: 700; }
.compare__card--accent .plist li { font-weight: 500; color: var(--ink); }
.compare__note {
  margin-top: 22px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

/* --- 12 download --------------------------------------------------------- */
.dark-block {
  background: var(--dark);
  color: var(--dark-body);
}
.dark-block h2,
.dark-block h3,
.dark-block h4 { color: #fff; }
.dark-block .lead { color: var(--dark-body); }
.dark-block .eyebrow { color: #38b0e3; }

.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  text-align: left;
}

.dl-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-line);
  border-radius: 18px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dl-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dl-card__icon { width: 28px; height: 28px; color: #38b0e3; flex: none; }
.dl-card__name { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }
.dl-card__ver {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #8fa0b8;
  margin-top: 3px;
  display: block;
}
.dl-card__meta { font-size: 0.8125rem; color: #8fa0b8; }

.hashbox {
  border: 1px solid var(--dark-line);
  background: var(--dark);
  border-radius: 12px;
  padding: 12px 14px;
}
.hashbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.hashbox__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--dark-faint);
}
.hashbox__value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: #94a3b8;
  overflow-wrap: anywhere;
  margin: 0;
}
.hashbox__value.is-missing { color: #8496ad; font-style: italic; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1b2740;
  border: 1px solid var(--dark-line);
  color: #b8c6da;
  border-radius: 7px;
  padding: 4px 9px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex: none;
}
.copy-btn:hover { background: #24314e; color: #fff; }
.copy-btn svg { width: 12px; height: 12px; }
.copy-btn.is-done { color: #6ee7a8; border-color: #1f4d38; }

.dl-note {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--dark-muted);
  text-align: center;
}
.dl-note code {
  background: #131c2e;
  border-color: var(--dark-line);
  color: #b8c6da;
}

/* --- 13 steps ------------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.step {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--blue);
}
.step h3 { font-size: 1.22rem; }
.step p { font-size: 0.9rem; line-height: 1.6; }
.step .shot-frame { margin-top: auto; }
.step .shot-slot { margin-top: auto; min-height: 176px; }

/* --- 14 legend ----------------------------------------------------------- */
.legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.legend__card {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg-alt);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.legend__card--on { border-color: #f0c3c7; }
.legend__icon { width: 26px; height: 26px; flex: none; }
.legend__card h4 { font-size: 1.05rem; }

/* --- 15 faq -------------------------------------------------------------- */
.faq { max-width: 940px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}
.faq .faq__a {
  padding: 0 24px 24px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--body);
  max-width: 76ch;
}
.faq .faq__a p + p { margin-top: 0.7em; }
.faq--alt details { background: #fff; }

/* --- 16 footer ----------------------------------------------------------- */
.site-footer { background: var(--dark); color: var(--dark-body); }

.footer__cta {
  padding-block: 76px;
  text-align: center;
  border-bottom: 1px solid var(--dark-line);
}
.footer__cta h2 { color: #fff; }
.footer__cta .lead { max-width: 640px; margin: 16px auto 0; color: var(--dark-body); }
.footer__cta .btn { margin-top: 28px; }

.footer__cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: 56px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}
.footer__brand img { width: 28px; height: 28px; }
.footer__tagline {
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--dark-muted);
  max-width: 34ch;
}
.footer__col h4 {
  font-size: 0.875rem;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 700;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__col a {
  color: var(--dark-body);
  font-size: 0.875rem;
  text-decoration: none;
}
.footer__col a:hover { color: #fff; text-decoration: none; }

.footer__bottom {
  border-top: 1px solid var(--dark-line);
  padding-block: 26px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer__copy { font-size: 0.8125rem; color: var(--dark-faint); }
.footer__legal {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--dark-faint);
  max-width: 620px;
}
.footer__legal strong { color: var(--dark-body); font-weight: 600; }

/* --- 17 utilities -------------------------------------------------------- */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.9375rem;
}
.link-arrow svg { width: 15px; height: 15px; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover svg { transform: translateX(2px); }
.link-arrow svg { transition: transform 0.16s ease; }

.note {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}

.divider-list > * + * {
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

/* prose (privacy / terms / long-form pages) */
.prose { max-width: 76ch; }
.prose h2 { font-size: clamp(1.4rem, 2vw, 1.75rem); margin-top: 44px; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 1.075rem; margin-top: 30px; }
.prose p,
.prose li { font-size: 0.9375rem; line-height: 1.75; color: var(--body); }
.prose p + p { margin-top: 0.9em; }
.prose ul { margin: 14px 0 0; padding-left: 20px; }
.prose li + li { margin-top: 8px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.page-hero { padding-block: 72px 40px; text-align: center; }
.page-hero h1 { margin-block: 16px 16px; }
.page-hero .lead { max-width: 720px; margin-inline: auto; }

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.tabs button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tabs button[aria-selected="true"] {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.pane[hidden] { display: none; }

/* --- guide figures (real client captures) -------------------------------- */
.gfig { margin: 0; }
.gfig img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
}
.gfig figcaption {
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
}
.gfig--phone { max-width: 430px; margin-inline: auto; }
.gfig--phone img { border-radius: 16px; }

/* Full-width figures must not be upscaled far past their capture width or the
   text in them goes soft. The desktop captures are ~530px wide, so cap those
   at 720px; the Android captures are 1080px and can run full width.
   Left-aligned with the copy above, so the page keeps one vertical rhythm. */
.gstep__figures > .gfig:not(.gfig--phone),
.gstep__figures > .note {
  max-width: 720px;
}

.gfig-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.gstep {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.gstep + .gstep { margin-top: 72px; }
.gstep__head { max-width: 720px; }
.gstep__num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.gstep__head h3 { margin-block: 10px 12px; }
.gstep__head p { font-size: 1rem; line-height: 1.7; }
.gstep__figures { min-width: 0; }

.callout {
  border-left: 3px solid var(--blue);
  background: var(--blue-wash);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink);
}
.callout--red {
  border-left-color: var(--red);
  background: var(--red-wash);
}
.callout p + p { margin-top: 0.6em; }

@media (max-width: 760px) {
  .gfig-row { grid-template-columns: minmax(0, 1fr); }
  .gstep + .gstep { margin-top: 52px; }
}

.release {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-alt);
  padding: 28px;
}
.release--current { border: 2px solid var(--blue-line); }
.release__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
}
.release__ver {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.release__date { font-size: 0.875rem; color: var(--muted); }
.release__notes {
  margin: 16px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.release__notes li { font-size: 0.9375rem; line-height: 1.6; }
.release__hash {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.release__hash span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.release__hash p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--body);
  word-break: break-all;
  margin: 0;
}

.timeline { display: flex; flex-direction: column; gap: 20px; max-width: 940px; margin-inline: auto; }

.error-page { padding-block: 120px; text-align: center; }
.error-page__code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  color: var(--line-strong);
  line-height: 1;
  letter-spacing: -0.04em;
}

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

/* --- 18 responsive ------------------------------------------------------- */
@media (max-width: 1080px) {
  :root { --section-y: 72px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { gap: 44px; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --section-y: 56px; --gutter: 20px; --header-h: 64px; }

  /* With the download CTA present the three header items no longer fit the
     narrow gutter at 24px, so the right edge gets clipped. Tighten it. */
  .site-header__inner { gap: 14px; }

  .hero { padding-block: 56px 44px; }
  .hero .btn-row .btn { width: 100%; }

  .grid--2, .grid--3, .grid--4,
  .steps, .legend, .compare, .dl-grid { grid-template-columns: minmax(0, 1fr); }

  .feature { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature--flip .feature__copy { order: 1; }
  .feature--flip .feature__media { order: 2; }
  .feature + .feature { margin-top: 52px; }

  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .footer__bottom { flex-direction: column; }

  .page-hero { padding-block: 48px 28px; }
}

@media (max-width: 460px) {
  .footer__cols { grid-template-columns: minmax(0, 1fr); }
  .card, .card--pad-lg, .dl-card, .step, .legend__card, .release { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* mobile nav (JS toggled) */
.nav.is-open {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px 20px 16px;
  margin: 0;
}
.nav.is-open a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.nav.is-open a:last-child { border-bottom: 0; }

@media print {
  .site-header, .footer__cta, .btn, .copy-btn { display: none !important; }
  .dark-block, .site-footer { background: #fff !important; color: #000 !important; }
}
