/* ============================================================
   zakuptap.kz design system
   bg #000000 · text #ffffff · primary #10b981 · secondary #2d2d2d
   accent #f59e0b · font: IBM Plex Mono (see fonts.css)
   ============================================================ */

:root {
  --bg: #000000;
  --bg-raised: #0a0a0a;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.64);
  --text-faint: rgba(255, 255, 255, 0.4);
  --primary: #10b981;
  --primary-soft: rgba(16, 185, 129, 0.12);
  --secondary: #2d2d2d;
  --accent: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
  --container: 1120px;
  --header-h: 72px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary); color: #000; }

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

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

h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; margin: 0 0 0.6em; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--secondary);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand .tld { color: var(--primary); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  min-width: 0;
}

.main-nav a {
  color: var(--text-dim);
  font-size: 14px;
  white-space: nowrap;
}

/* many links (marketing + app tools) — tighten before collapsing to burger */
@media (max-width: 1440px) {
  .main-nav { gap: 14px; }
  .main-nav a { font-size: 13px; }
}
@media (max-width: 1280px) {
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 12.5px; }
  .logout-form button { font-size: 12.5px; }
}
.main-nav a:hover { color: var(--text); text-decoration: none; }
.main-nav a.active { color: var(--primary); }

.lang-switch {
  display: flex;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  overflow: hidden;
}
.lang-switch a {
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.lang-switch a:hover { text-decoration: none; color: var(--text); }
.lang-switch a.active {
  background: var(--primary);
  color: #000;
  font-weight: 600;
}

.nav-toggle { display: none; }

/* tools dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: inherit;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.nav-dropdown-toggle:hover, .nav-dropdown.open .nav-dropdown-toggle {
  border-color: var(--primary);
  color: var(--primary);
}
.nav-dropdown .caret { font-size: 10px; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: #0a0a0a;
  border: 1px solid var(--secondary);
  border-radius: 12px;
  padding: 8px;
  z-index: 70;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
/* JS-free fallback: the menu also opens on hover / keyboard focus */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
/* bridge the 8px gap so the menu doesn't close while moving the cursor */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 0;
  right: 0;
  height: 9px;
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  text-decoration: none;
}

.logout-form { display: inline; }
.logout-form button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 14px;
  cursor: pointer;
}
.logout-form button:hover { color: var(--text); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--primary);
  color: #000;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.35);
}
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border-color: var(--secondary);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary); box-shadow: none; }

.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { box-shadow: 0 8px 28px rgba(239, 68, 68, 0.35); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero::before {
  /* faint engineering grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--secondary) 1px, transparent 1px),
    linear-gradient(90deg, var(--secondary) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}

.hero::after {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 780px;
  height: 480px;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.22), transparent);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero .lead {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 0 32px;
  max-width: 34em;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-faint);
}

/* terminal mock */

.terminal {
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(16, 185, 129, 0.08);
  overflow: hidden;
  font-size: 13px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--secondary);
}
.terminal-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--secondary);
}
.terminal-bar i:first-child { background: var(--danger); opacity: 0.85; }
.terminal-bar i:nth-child(2) { background: var(--accent); opacity: 0.85; }
.terminal-bar i:nth-child(3) { background: var(--primary); opacity: 0.85; }
.terminal-bar span {
  margin-left: 8px;
  color: var(--text-faint);
  font-size: 11px;
}

.terminal-body { padding: 18px 18px 22px; }
.terminal-body .line { white-space: pre-wrap; margin: 0 0 6px; }
.terminal-body .prompt { color: var(--primary); }
.terminal-body .dim { color: var(--text-dim); }
.terminal-body .hl { color: var(--accent); }
.terminal-body .ok { color: var(--primary); }

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--primary);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- sections ---------- */

.section { padding: 84px 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head .kicker {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.01em; }
.section-head p { color: var(--text-dim); margin: 0; }

/* feature cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: 14px;
  padding: 26px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--primary); transform: translateY(-3px); }

.card .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 16px; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 13.5px; margin: 0; }

.card .num {
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 10px;
}

/* steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  counter-reset: step;
}
.step {
  border-left: 2px solid var(--secondary);
  padding: 4px 0 4px 22px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  color: var(--primary);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 10px;
}
.step h3 { font-size: 15px; }
.step p { color: var(--text-dim); font-size: 13.5px; margin: 0; }

/* ---------- pricing ---------- */

.price-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 36px 34px;
  position: relative;
  box-shadow: 0 0 60px rgba(16, 185, 129, 0.12);
}

.price-card .plan-name {
  display: inline-block;
  background: var(--primary);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.billing-toggle {
  display: flex;
  margin: 26px 0 8px;
  border: 1px solid var(--secondary);
  border-radius: 10px;
  overflow: hidden;
}
.billing-toggle button {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}
.billing-toggle button.active {
  background: var(--primary);
  color: #000;
  font-weight: 600;
}
.billing-toggle button .tag {
  display: block;
  font-size: 10.5px;
  color: inherit;
  opacity: 0.75;
}

.price-amount {
  font-size: 42px;
  font-weight: 700;
  margin: 18px 0 2px;
}
.price-amount .per { font-size: 15px; color: var(--text-dim); font-weight: 400; }
.price-sub { color: var(--text-faint); font-size: 12.5px; min-height: 20px; }

.price-features {
  list-style: none;
  padding: 0;
  margin: 26px 0 30px;
}
.price-features li {
  padding: 8px 0 8px 28px;
  border-bottom: 1px dashed var(--secondary);
  font-size: 13.5px;
  color: var(--text-dim);
  position: relative;
}
.price-features li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--primary);
  font-weight: 700;
}

.price-card .btn { width: 100%; text-align: center; }

.price-legal {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.6;
}

/* ---------- CTA band ---------- */

.cta-band {
  border-top: 1px solid var(--secondary);
  border-bottom: 1px solid var(--secondary);
  background:
    radial-gradient(ellipse 60% 120% at 50% 100%, rgba(16, 185, 129, 0.14), transparent);
  text-align: center;
  padding: 72px 0;
}
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); }
.cta-band p { color: var(--text-dim); margin: 0 auto 28px; max-width: 36em; }

/* ---------- content / legal pages ---------- */

.page {
  padding: 64px 0 90px;
  max-width: 820px;
  margin: 0 auto;
}
.page h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 28px; }
.page h2 {
  font-size: 17px;
  color: var(--primary);
  margin: 36px 0 14px;
}
.page p { color: var(--text-dim); font-size: 14px; }
.page-meta { color: var(--text-faint); font-size: 12px; margin-bottom: 34px; }

/* ---------- data tables & search ---------- */

.page-wide { max-width: none; }

.search-bar {
  display: flex;
  gap: 10px;
  margin: 8px 0 26px;
  flex-wrap: wrap;
}
.search-bar input[type="search"] {
  flex: 1;
  min-width: 220px;
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
}
.search-bar input[type="search"]:focus { border-color: var(--primary); }
.search-bar select {
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 0 12px;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--secondary); border-radius: 12px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 12px 14px;
  border-bottom: 1px solid var(--secondary);
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(45, 45, 45, 0.55);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: rgba(16, 185, 129, 0.04); }
.mono-strong { font-weight: 600; white-space: nowrap; }
.dim-cell { color: var(--text-dim); }

.star {
  background: none;
  border: 0;
  color: var(--secondary);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}
.star:hover { color: var(--accent); transform: scale(1.2); }
.star.on { color: var(--accent); }

.pagination {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 13px;
}

/* how-to-use blocks on tool pages */
.howto {
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: 12px;
  margin: 4px 0 22px;
}
.howto summary {
  cursor: pointer;
  padding: 12px 18px;
  color: var(--primary);
  font-size: 13.5px;
  list-style: none;
}
.howto summary::before { content: "ℹ "; }
.howto summary::-webkit-details-marker { display: none; }
.howto[open] summary { border-bottom: 1px solid var(--secondary); }
.howto .howto-body {
  padding: 14px 20px 18px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.75;
}
.howto .howto-body ol { padding-left: 20px; margin: 6px 0; }
.howto .howto-body li { margin: 4px 0; }
.howto .howto-body strong { color: var(--text); }

/* feature cards are links to the tools */
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; }
a.card h3 { transition: color 0.15s ease; }
a.card:hover h3 { color: var(--primary); }

/* ---------- pre-bid risk card & histogram ---------- */

.risk-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-left-width: 4px;
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0 34px;
}
.risk-card.risk-red { border-left-color: var(--danger); }
.risk-card.risk-yellow { border-left-color: var(--accent); }
.risk-card.risk-green { border-left-color: var(--primary); }

.risk-light { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.risk-light .dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--secondary);
}
.risk-light .dot.on { background: var(--c); box-shadow: 0 0 14px var(--c); }

.risk-title { font-size: 17px; margin-bottom: 10px; }
.risk-red .risk-title { color: var(--danger); }
.risk-yellow .risk-title { color: var(--accent); }
.risk-green .risk-title { color: var(--primary); }
.risk-signals { list-style: none; padding: 0; margin: 0; color: var(--text-dim); font-size: 13.5px; }
.risk-signals li { padding: 4px 0 4px 18px; position: relative; }
.risk-signals li::before { content: "·"; position: absolute; left: 4px; }
.risk-signals li.flag { color: var(--danger); }
.risk-signals li.flag::before { content: "⚠"; left: 0; font-size: 11px; top: 6px; }

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 6px 0 30px;
}
@media (max-width: 900px) { .analysis-grid { grid-template-columns: 1fr; } }
.analysis-card {
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: 14px;
  padding: 20px 22px;
}
.analysis-card h2 { font-size: 15px; margin-bottom: 14px; color: var(--primary); }
.stat-row { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 10px; }
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat .v { font-size: 22px; font-weight: 700; color: var(--text); }
.stat .v.bad { color: var(--danger); }
.stat .k { font-size: 11.5px; color: var(--text-faint); }
.chart-box-sm { padding: 10px; margin-top: 8px; }

.chart-box {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: 12px;
  padding: 16px;
}
.chart-box svg { width: 100%; height: auto; display: block; }
.hbar { transition: fill 0.12s ease; cursor: default; }
.hbar:hover { fill: #34d399; }
.chart-tooltip {
  position: absolute;
  background: #000;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  padding: 5px 9px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

/* ---------- embedded dashboards ---------- */

.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.badge-on, .badge-off {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--secondary);
}
.badge-on { color: var(--accent); border-color: var(--accent); }
.badge-off { color: var(--text-dim); }

.dashboard-embed {
  height: 78vh;
  min-height: 560px;
  border: 1px solid var(--secondary);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-raised);
}

/* ---------- forms (base for later steps) ---------- */

.form-card {
  max-width: 440px;
  margin: 64px auto 90px;
  background: var(--bg-raised);
  border: 1px solid var(--secondary);
  border-radius: 16px;
  padding: 34px 32px;
}
.form-card h1 { font-size: 22px; margin-bottom: 24px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: #000;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
}
.field .errors { color: var(--danger); font-size: 12px; margin-top: 5px; }
.field .help { color: var(--text-faint); font-size: 12px; margin-top: 5px; }

/* Some browsers paint password/autofilled inputs with their own light
   background (Chrome/Safari autofill yellow-white, some mobile keyboards'
   "strong password" bar) which the site's CSS can't override with a plain
   background rule — force it back to the input's real colors. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #000 inset;
  box-shadow: 0 0 0 1000px #000 inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

.password-field { position: relative; }
.password-field input { padding-right: 84px; }
/* Edge/IE and some mobile browsers draw their own reveal-password icon
   inside the field — hide it so it can't overlap or fight with ours. */
.password-field input::-ms-reveal,
.password-field input::-ms-clear { display: none; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  /* an opaque chip, not a transparent overlay: stays legible no matter
     what the browser paints behind it (autofill, native reveal icons) */
  background: #000;
  border: 1px solid var(--secondary);
  border-radius: 6px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
  text-transform: uppercase;
  -webkit-appearance: none;
  appearance: none;
}
.password-toggle:hover { color: var(--text-dim); border-color: var(--text-faint); }
.password-toggle.on { color: var(--primary); border-color: var(--primary); }
.field.checks { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: auto; margin-top: 3px; accent-color: var(--primary); }
.checks-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px 18px;
  margin-top: 8px;
}
.amount-range { display: flex; align-items: center; gap: 10px; }
.amount-range input { max-width: 180px; }
.amount-range span { color: var(--text-faint); }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 16px; }

/* messages */

.messages { max-width: var(--container); margin: 18px auto 0; padding: 0 24px; }
.message {
  border: 1px solid var(--secondary);
  border-left: 3px solid var(--primary);
  background: var(--bg-raised);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13.5px;
  margin-bottom: 10px;
}
.message.error { border-left-color: var(--danger); }
.message.warning { border-left-color: var(--accent); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--secondary);
  padding: 56px 0 40px;
  margin-top: 40px;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p { color: var(--text-faint); font-size: 12px; margin: 14px 0 0; max-width: 30em; }

.site-footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--primary); text-decoration: none; }

.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--secondary);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 12px;
}

/* ---------- reveal animation ---------- */

/* hidden state only applies when JS is running (html.js set in base.html),
   so content is never lost for users without JavaScript */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  .btn, .card { transition: none; }
}

/* ---------- responsive ---------- */

/* nav collapses early: with all marketing + app links it overflows below ~1200px */
@media (max-width: 1199px) {
  .nav-toggle {
    display: block;
    margin-left: auto;
    background: none;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 18px;
    line-height: 1;
    padding: 7px 12px;
    cursor: pointer;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: #000;
    border-bottom: 1px solid var(--secondary);
    padding: 20px 24px 26px;
    gap: 18px;
    z-index: 60;
  }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: 14px; }

  /* in the burger menu the tools list renders inline, always visible */
  .nav-dropdown-toggle { display: none; }
  .nav-dropdown-menu {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }
  .nav-dropdown-menu a { padding: 6px 0; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
