/* ============================================================================
   Thot — base styles
   Mobile-first. Breakpoints: 640px (large phone), 900px (tablet), 1100px.
   Everything is built from the tokens in tokens.css.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no CDN) ---------------------------------- */

@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrainsmono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset -------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img { height: auto; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

ul, ol { padding-left: 1.25em; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

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

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

/* ---------- Layout ------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 96px); }
.section-tight { padding-block: clamp(40px, 6vw, 64px); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-line);
}
.section-head.center .kicker { justify-content: center; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.section-sub {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.02rem;
}
.section-head.center .section-sub { margin-inline: auto; }

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  line-height: 1.7;
}

.mono { font-family: var(--font-mono); }
.m0 { margin: 0; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.money-in { color: var(--money-in); }
.money-out { color: var(--money-out); }

/* ---------- Icons -------------------------------------------------------- */

.ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: currentColor;
}
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }
.ico-xl { width: 30px; height: 30px; }

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}
.icon-badge.neutral {
  background: var(--elev);
  color: var(--muted);
  border-color: var(--border);
}

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--text);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition:
    transform var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--text);
  text-decoration: none;
}
.btn:active { transform: translateY(0); }

.btn .ico { width: 18px; height: 18px; }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--hover);
  border-color: var(--muted);
}

.btn-soft {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.btn-soft:hover { background: var(--accent-soft); border-color: var(--accent); }

.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 0.86rem; }
.btn-lg { min-height: 50px; padding: 13px 26px; font-size: 1rem; }

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-icon:hover { color: var(--text); background: var(--hover); }

.btn-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}
.text-link .ico { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
.text-link:hover { text-decoration: none; }
.text-link:hover .ico { transform: translateX(3px); }

/* ---------- Header ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color var(--t-mid) var(--ease), background var(--t-mid) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.nav-desktop { margin-left: auto; }
.nav-desktop ul,
.footer-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-desktop a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-desktop a:hover { color: var(--text); background: var(--hover); }
.nav-desktop a[aria-current="page"] {
  color: var(--text);
  background: var(--elev);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav-desktop + .header-actions { margin-left: 0; }

.lang-switch,
.theme-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
}
.lang-switch a,
.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
}
.lang-switch a:hover,
.theme-switch button:hover { color: var(--text); background: var(--hover); }
.lang-switch a[aria-current="page"],
.theme-switch button[aria-pressed="true"] {
  background: var(--elev);
  color: var(--text);
}
.theme-switch .ico { width: 15px; height: 15px; }

.nav-mobile { display: none; position: relative; }
.nav-mobile summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  list-style: none;
  cursor: pointer;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger,
.burger::before,
.burger::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-fast) var(--ease);
}
.burger { position: relative; }
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-mobile[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.mobile-menu ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] { background: var(--elev); }
.mobile-prefs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

/* ---------- Cards and surfaces ------------------------------------------ */

.card {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.card-hover {
  transition:
    transform var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    background var(--t-mid) var(--ease);
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--elev);
}

.card h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.chip .ico { width: 14px; height: 14px; }
.chip.accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.dot-ok { background: var(--money-in); box-shadow: 0 0 0 3px color-mix(in srgb, var(--money-in) 16%, transparent); }
.dot-warn { background: var(--cat-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-2) 16%, transparent); }
.dot-accent { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Prose -------------------------------------------------------- */

.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 1.8em;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.35;
}
.prose h3 {
  margin-top: 1.6em;
  font-size: 1.12rem;
  font-weight: 600;
}
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: 0.45em; }
.prose blockquote {
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--accent-soft);
  color: var(--text);
}
.prose code,
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--elev);
  color: var(--text);
  overflow-wrap: anywhere;
}
.prose pre {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow-x: auto;
}
.prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.86rem;
  line-height: 1.7;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.prose th { color: var(--muted); font-weight: 600; }

.callout {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}
.callout .ico { color: var(--accent); margin-top: 2px; }
.callout.warn { border-color: color-mix(in srgb, var(--cat-2) 40%, var(--border)); }
.callout.warn .ico { color: var(--cat-2); }
.callout strong { color: var(--text); }

.note-honest {
  max-width: 72ch;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.note-honest::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cat-2);
  vertical-align: 1px;
}

/* ---------- Screenshot frames ------------------------------------------- */

.shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.shot img {
  width: 100%;
  height: auto;
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--elev);
}
.shot-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}
.shot-bar i:first-child { background: var(--money-out); }
.shot-bar i:nth-child(2) { background: var(--cat-2); }
.shot-bar i:nth-child(3) { background: var(--money-in); }
.shot-bar span {
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.phone-frame {
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  background: var(--elev);
  box-shadow: var(--shadow-soft);
}
.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 23px;
}

.tablet-frame {
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--elev);
  box-shadow: var(--shadow-soft);
}
.tablet-frame img {
  width: 100%;
  height: auto;
  border-radius: 15px;
}

.desktop-frame {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--elev);
  box-shadow: var(--shadow-soft);
}
.desktop-frame .desktop-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.desktop-frame .desktop-top i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}
.desktop-frame img {
  width: 100%;
  height: auto;
}

/* ---------- FAQ / details ----------------------------------------------- */

.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.faq + .faq { margin-top: 10px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform var(--t-mid) var(--ease);
}
.faq[open] summary .ico { transform: rotate(180deg); }
.faq summary:hover { background: var(--hover); }
.faq-body {
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}
.faq-body > * + * { margin-top: 10px; }
.faq-body code { color: var(--text); }

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

.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-decoration: none;
}
.footer-brand:hover { text-decoration: none; }
.footer-brand .brand-logo { width: 30px; height: 30px; }
.footer-meta {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}
.footer-meta + .footer-meta { margin-top: 8px; }
.footer-meta code { font-size: 0.78rem; padding: 1px 5px; }
.footer-nav ul {
  flex-wrap: wrap;
  gap: 4px 18px;
}
.footer-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p { color: var(--muted); font-size: 0.82rem; }
.footer-signature {
  display: block;
  margin: 0;
  padding: 0 0 0.08em;
  color: var(--border-strong);
  font-family: var(--font-display);
  font-size: clamp(5rem, 19vw, 15rem);
  line-height: 0.85;
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0.5;
  user-select: none;
}

/* Cat toggle, the only control the cat adds to the page */
.cat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}
.cat-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.cat-toggle .cat-mini { width: 18px; height: 18px; }
.cat-toggle[aria-pressed="true"] { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 42%, var(--border)); }

/* ---------- Inner pages: head ------------------------------------------- */

.page-head {
  position: relative;
  padding-block: clamp(48px, 7vw, 76px) clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto 30%;
  height: 420px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.page-head h1 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.page-head .lead { position: relative; margin-top: 18px; }
.page-head .chips { position: relative; margin-top: 22px; }

/* ---------- Feature index (features page) ------------------------------- */

.feature-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.feature-index {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 2px;
}
.feature-index a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.feature-index a:hover { color: var(--text); background: var(--hover); }
.feature-index a.is-active { color: var(--accent); background: var(--accent-soft); }

.feature-block {
  scroll-margin-top: calc(var(--header-h) + 24px);
  padding-block: clamp(28px, 5vw, 48px);
  border-top: 1px solid var(--border);
}
.feature-block:first-child { border-top: 0; padding-top: 0; }
.feature-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  line-height: 1.35;
}
.feature-block .feature-copy {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.feature-block .feature-copy p { color: var(--muted); }
.feature-block ul { color: var(--muted); }
.feature-block li + li { margin-top: 8px; }
.feature-media { margin-top: 24px; }

/* ---------- Download page ----------------------------------------------- */

.platform-card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.platform-card + .platform-card { margin-top: 18px; }
.platform-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.platform-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.platform-title h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.platform-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}
.platform-state b { color: var(--text); font-weight: 600; }

.dl-meta {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.dl-meta b { color: var(--text); font-weight: 600; }
.dl-meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; }

.dl-pkgs { display: grid; gap: 10px; }
.pkg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--elev);
}
.pkg-main { min-width: 0; }
.pkg-name {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  overflow-wrap: anywhere;
  text-decoration: none;
}
a.pkg-name:hover { color: var(--accent); text-decoration: none; }
.pkg-info { margin-top: 4px; color: var(--muted); font-size: 0.78rem; }
.pkg-sha {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.pkg-sha code {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  font-size: 0.7rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.copy-btn,
.pkg-action {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}
.copy-btn:hover,
.pkg-action:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.is-copied { color: var(--money-in); border-color: var(--money-in); }
.pkg .btn-disabled { grid-column: 2; grid-row: 1; min-height: 36px; }
.pkg .btn-sm { grid-column: 2; grid-row: 1; min-height: 36px; }

.dl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
}
.dl-badge.neutral { background: var(--elev); color: var(--muted); }

.timeline {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: var(--border);
}
.timeline-item { position: relative; padding: 0 0 26px 8px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -24px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
}
.timeline-item.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-item h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 600;
}
.timeline-item .date { color: var(--muted); font-size: 0.8rem; }
.timeline-item ul { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }
.timeline-item li + li { margin-top: 6px; }

/* ---------- Privacy page flow ------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.flow-node {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.flow-node .icon-badge { width: 54px; height: 54px; }
.flow-node b { font-size: 0.92rem; }
.flow-node span { color: var(--muted); font-size: 0.78rem; }
.flow-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}
.flow-link .line {
  width: clamp(40px, 8vw, 90px);
  border-top: 1px dashed var(--accent-line);
}
.flow-link span {
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.vault-tree {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--elev);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
}
.vault-tree .dir { color: var(--text); }
.vault-tree .file { color: var(--muted); }
.vault-tree .hl { color: var(--accent); }

/* ---------- Utilities ---------------------------------------------------- */

.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.center { text-align: center; }
.between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 1099px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .header-actions { gap: 8px; }
  .feature-layout { grid-template-columns: 1fr; }
  .feature-index { display: none; }
}

@media (max-width: 899px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-link { flex-direction: row; }
  .flow-link .line { width: 40px; }
  .pkg { grid-template-columns: 1fr; }
  .pkg .btn-disabled,
  .pkg .btn-sm,
  .pkg-sha { grid-column: 1; grid-row: auto; }
}

@media (max-width: 639px) {
  :root { --header-h: 60px; }
  .header-inner { gap: 10px; }
  .brand-name { display: none; }
  .lang-switch,
  .theme-switch { border-radius: var(--radius-md); }
  .theme-switch button { min-width: 30px; padding: 0 6px; }
  .lang-switch a { min-width: 30px; padding: 0 6px; }
  .footer-signature { font-size: clamp(4rem, 26vw, 7rem); }
  .page-head h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .section-title { font-size: clamp(1.35rem, 6.5vw, 1.8rem); }
  .btn-lg { width: 100%; }
}

@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 .reveal { opacity: 1; transform: none; }
}

/* ---------- Language chooser (root) --------------------------------------- */

.lang-chooser {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
}
.chooser-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 12px 32px var(--glow));
}
.lang-chooser h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.lang-chooser .lead {
  color: var(--muted);
  margin-bottom: 28px;
}
.lang-chooser .row { justify-content: center; }

/* ---------- Error page ---------------------------------------------------- */

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
}
.error-page h1 {
  font-family: var(--font-display);
  font-size: 4rem;
  letter-spacing: 0.04em;
  margin: 16px 0 8px;
}
.error-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.error-page .row { justify-content: center; margin-top: 24px; }
