:root {
  --bg: #0b0e14;
  --surface: #11151d;
  --surface-2: #161c27;
  --border: #232b39;
  --text: #e7ebf2;
  --text-dim: #97a2b5;
  --text-dimmer: #616d80;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- dot-grid backdrop, same "patch panel" motif as the app's auth screens ---- */
.patch-panel {
  position: absolute;
  inset: 0;
  height: 640px;
  background-image: radial-gradient(var(--border) 1.1px, transparent 1.1px);
  background-size: 28px 28px;
  background-position: 12px 12px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
  mask-image: linear-gradient(to bottom, black, transparent);
  pointer-events: none;
}

header {
  position: relative;
  z-index: 1;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.05rem;
  color: var(--text);
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---- hero ---- */
.hero {
  position: relative;
  z-index: 1;
  padding: 88px 0 72px;
  text-align: center;
}

.hero img.icon {
  display: block;
  margin: 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(34, 211, 238, 0.25);
}

.lamp-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 18px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  flex: none;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 auto 20px;
  max-width: 760px;
}

h1 span { color: var(--accent); }

.sub {
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 1.08rem;
}

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

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 20px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dimmer);
  font-size: 0.92rem;
  cursor: not-allowed;
  user-select: none;
}

.store-btn .label-lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.store-btn .small { font-size: 0.68rem; color: var(--text-dimmer); }
.store-btn .big { font-size: 0.92rem; color: var(--text-dim); font-weight: 600; }
.store-btn svg { flex: none; opacity: 0.6; }

/* Live store button (a real link, not the dimmed "coming soon" state). */
.store-btn--live {
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.store-btn--live svg { opacity: 1; }
.store-btn--live .small { color: var(--text-dim); }
.store-btn--live .big { color: var(--text); }
.store-btn--live:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-1px); text-decoration: none; }

/* ---- section shell ---- */
section {
  position: relative;
  z-index: 1;
  padding: 56px 0;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 12px;
  font-weight: 800;
}

.section-head p { color: var(--text-dim); margin: 0; }

/* ---- feature grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  nav { flex-wrap: wrap; gap: 12px; }
  .nav-links { gap: 18px; font-size: 0.86rem; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.card .icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.card h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.card .tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 8px;
  border-radius: 6px;
}

/* ---- how it works ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  position: relative;
  padding: 28px 22px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.step .num {
  position: absolute;
  top: -14px;
  left: 22px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.step h3 { margin: 6px 0 8px; font-size: 1rem; font-weight: 700; }
.step p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

/* ---- security band ---- */
.security {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  padding: 40px 36px;
  display: flex;
  gap: 32px;
  align-items: center;
}

@media (max-width: 720px) {
  .security { flex-direction: column; align-items: flex-start; }
}

.security .badge {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.security h3 { margin: 0 0 8px; font-size: 1.15rem; }
.security p { margin: 0; color: var(--text-dim); }
.security code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.88em;
}

/* ---- final cta ---- */
.final-cta {
  text-align: center;
  padding: 72px 0 90px;
}
.final-cta h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 14px; font-weight: 800; }
.final-cta p { color: var(--text-dim); margin: 0 0 30px; }

.ad-slot {
  position: relative;
  z-index: 1;
  padding: 0 24px 40px;
}

/* ---- side-rail ads: desktop only, enough spare width beside the 1080px
   content column that they never overlap it ---- */
.side-ad {
  display: none;
}

@media (min-width: 1500px) {
  .side-ad {
    display: block;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    min-height: 600px;
    z-index: 5;
  }
  .side-ad-left { left: 24px; }
  .side-ad-right { right: 24px; }
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  position: relative;
  z-index: 1;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-dimmer);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-dim); }

/* ---- guides index ---- */
.guide-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 780px) {
  .guide-list { grid-template-columns: 1fr; }
}

.guide-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.guide-card .kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.guide-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.guide-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.guide-card .readtime {
  display: block;
  margin-top: 14px;
  color: var(--text-dimmer);
  font-size: 0.8rem;
}

/* ---- long-form article pages ---- */
.article {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 40px 24px 80px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--text-dim); }

.article h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.2;
  max-width: none;
  text-align: left;
  margin: 0 0 14px;
}

.article .meta {
  color: var(--text-dimmer);
  font-size: 0.88rem;
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article .lede {
  font-size: 1.12rem;
  color: var(--text);
  margin: 0 0 1.6em;
}

.article h2 {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 2.4em 0 0.7em;
}

.article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2em 0 0.6em;
}

.article p,
.article li {
  color: var(--text-dim);
  margin: 0 0 1.1em;
}

.article ul,
.article ol {
  padding-left: 1.3em;
  margin: 0 0 1.4em;
}
.article li { margin-bottom: 0.6em; }
.article li::marker { color: var(--text-dimmer); }

.article strong { color: var(--text); font-weight: 650; }

.article code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.88em;
}

/* Pull-out box for a rule of thumb or a warning worth breaking the column for. */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  padding: 20px 24px;
  margin: 0 0 1.6em;
}
.callout p:last-child { margin-bottom: 0; }
.callout .callout-title {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 0.92rem;
}
.article th,
.article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}
.article th {
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Wide tables scroll inside their own box rather than the whole page. */
.table-scroll { overflow-x: auto; margin: 0 0 1.6em; }
.table-scroll table { margin: 0; min-width: 460px; }

/* Jump links at the top of the FAQ. */
.faq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 2.4em;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.faq-nav a {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.86rem;
}
.faq-nav a:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}

/* Anchored FAQ headings shouldn't sit flush against the viewport edge. */
.article h2[id] { scroll-margin-top: 24px; }

.article-foot {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.article-foot h2 { font-size: 1.05rem; margin: 0 0 16px; }
.article-foot ul { list-style: none; padding: 0; margin: 0; }
.article-foot li { margin-bottom: 10px; }

/* ---- legal pages (privacy / terms) ---- */
.legal-page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 56px 24px 96px;
}

.legal-page h1 {
  font-size: 1.8rem;
  max-width: none;
  margin: 0 0 6px;
  text-align: left;
}

.legal-page .updated {
  color: var(--text-dimmer);
  font-size: 0.9rem;
  margin: 0 0 36px;
}

.legal-page h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2.2em 0 0.6em;
}

.legal-page p {
  color: var(--text-dim);
  margin: 0 0 1em;
}

.legal-page a { color: var(--accent); }
