@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

/* ── Light (default) ── */
:root,
[data-theme="light"] {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface2: #eef1f5;
  --border: #d8dee6;
  --border-strong: #c2cad6;
  --text: #0c1524;
  --text-soft: #2a3548;
  --muted: #5a6578;
  --accent: #0f2d4a;
  --accent-hover: #1a4268;
  --accent2: #a67c00;
  --accent2-hover: #8a6600;
  --gold: #b8941f;
  --link: #1a4268;
  --link-hover: #0f2d4a;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --shadow-sm: 0 1px 3px rgba(12, 21, 36, 0.06);
  --shadow-md: 0 8px 30px rgba(12, 21, 36, 0.08);
  --shadow-lg: 0 20px 50px rgba(12, 21, 36, 0.1);
  --hero-bg: linear-gradient(180deg, #eef1f5 0%, #f6f7f9 55%);
  --callout-bg: rgba(15, 45, 74, 0.05);
  --callout-border: rgba(15, 45, 74, 0.15);
  --callout-strong: #0f2d4a;
  --callout-green-bg: rgba(166, 124, 0, 0.06);
  --callout-green-border: rgba(166, 124, 0, 0.22);
  --btn-primary-bg: #0f2d4a;
  --btn-primary-hover: #1a4268;
  --btn-primary-shadow: 0 4px 14px rgba(15, 45, 74, 0.25);
  --badge-bg: rgba(15, 45, 74, 0.06);
  --badge-border: rgba(15, 45, 74, 0.18);
  --badge-text: #0f2d4a;
  --card-hover-border: rgba(15, 45, 74, 0.35);
  --nav-active-bg: rgba(15, 45, 74, 0.07);
  --max: 920px;
  --wide: 1140px;
  --radius: 6px;
  --radius-lg: 10px;
}

[data-theme="dark"] {
  --bg: #080c12;
  --surface: #0f1520;
  --surface2: #161e2c;
  --border: #243044;
  --border-strong: #334058;
  --text: #eef2f7;
  --text-soft: #c8d0dc;
  --muted: #8a96a8;
  --accent: #5a8ec4;
  --accent-hover: #6fa3d9;
  --accent2: #d4b04a;
  --accent2-hover: #e8c45e;
  --gold: #d4b04a;
  --link: #7eb3e8;
  --link-hover: #a8cef5;
  --nav-bg: rgba(8, 12, 18, 0.96);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --hero-bg: linear-gradient(180deg, #0c121c 0%, #080c12 55%);
  --callout-bg: rgba(90, 142, 196, 0.08);
  --callout-border: rgba(90, 142, 196, 0.22);
  --callout-strong: #a8cef5;
  --callout-green-bg: rgba(212, 176, 74, 0.08);
  --callout-green-border: rgba(212, 176, 74, 0.25);
  --btn-primary-bg: #2a5080;
  --btn-primary-hover: #3a6498;
  --btn-primary-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  --badge-bg: rgba(90, 142, 196, 0.1);
  --badge-border: rgba(90, 142, 196, 0.28);
  --badge-text: #a8cef5;
  --card-hover-border: rgba(90, 142, 196, 0.45);
  --nav-active-bg: rgba(90, 142, 196, 0.12);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--hero-bg);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  transition: background-color 0.35s ease, color 0.35s ease;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--link-hover); }

/* ── Navigation ── */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem 1.75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-left: max(1.75rem, env(safe-area-inset-left));
  padding-right: max(1.75rem, env(safe-area-inset-right));
  transition: background 0.35s, border-color 0.35s;
}

.site-nav .brand {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--text);
  text-transform: uppercase;
  -webkit-text-fill-color: unset;
  background: none;
}

.site-nav .brand:hover {
  color: var(--accent2);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--nav-active-bg);
}

.nav-cta {
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius) !important;
  background: var(--btn-primary-bg) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.02em;
  box-shadow: var(--btn-primary-shadow);
}

.nav-cta:hover {
  background: var(--btn-primary-hover) !important;
  color: #fff !important;
}

.nav-arcade {
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--radius) !important;
  background: var(--gold) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

.nav-arcade:hover,
.nav-arcade.active {
  background: var(--accent2-hover) !important;
  color: #fff !important;
}

#arcade {
  scroll-margin-top: 5rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--accent2);
  border-color: var(--border-strong);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) { opacity: 0; }

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.nav-menu-open { overflow: hidden; }

/* ── Layout ── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.75rem 4rem;
}

main.wide { max-width: var(--wide); }

.section-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 600;
  margin: 2.75rem 0 0.4rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  max-width: 52ch;
}

.section-sub.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-header .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ── Hero ── */
.hero,
.welcome-hero {
  text-align: center;
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.welcome-hero {
  animation: welcomeIn 0.8s ease-out both;
}

@keyframes welcomeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero .badge,
.welcome-hero .badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--badge-border);
  background: var(--badge-bg);
  color: var(--badge-text);
  margin-bottom: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.welcome-hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-accent {
  width: 3rem;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.hero .lead,
.welcome-hero .lead {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 38rem;
  margin: 0 auto 1.25rem;
  line-height: 1.75;
  font-weight: 400;
}

.welcome-hero .sub-lead {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 34rem;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

/* ── Buttons ── */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cta-row--start { justify-content: flex-start; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  border: 1px solid transparent;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--btn-primary-bg);
  color: #fff;
  box-shadow: var(--btn-primary-shadow);
}

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

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface2);
}

.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-gold:hover {
  background: var(--accent2-hover);
  color: #fff;
}

/* ── Cards & grids ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover::before { opacity: 1; }

.card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.card .card-cta,
.card > .btn {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.card .link {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent2);
  letter-spacing: 0.02em;
}

.card .link:hover { color: var(--accent2-hover); }

a.btn {
  text-decoration: none;
  cursor: pointer;
}

a.btn-primary,
a.btn-primary:hover {
  color: #fff;
}

.expertise-pill-link {
  text-decoration: none;
}

.expertise-pill-link:hover .expertise-pill {
  border-color: var(--accent2);
  color: var(--text);
  background: var(--surface2);
}

.callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.build-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1rem;
}

.card .build-actions {
  margin-top: auto;
  width: 100%;
}

.card .build-actions .btn {
  flex: 1;
  min-width: 7rem;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3rem;
}

.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
}

a.path-card {
  cursor: pointer;
}

a.path-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.path-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.path-card .icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.9;
}

.path-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.path-card p {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.path-card .btn,
.path-card-cta {
  width: 100%;
  margin-top: auto;
  text-align: center;
}

.path-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.86rem;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}

a.path-card:hover .path-card-cta {
  border-color: var(--accent);
  background: var(--surface2);
}

.expertise-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto 2.5rem;
  max-width: 760px;
  padding: 0 0.25rem;
}

.expertise-pill {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  letter-spacing: 0.03em;
}

.partner-section,
.build-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.partner-section::before,
.build-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.partner-section h2,
.build-section h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin: 0 0 0.85rem;
  font-size: 1.65rem;
  font-weight: 600;
}

.partner-section p,
.build-section p {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 1.35rem;
  font-size: 0.94rem;
  line-height: 1.7;
}

.partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  margin-top: 1.5rem;
  font-size: 0.84rem;
}

.quick-links a {
  color: var(--muted);
  text-decoration: none;
}

.quick-links a:hover { color: var(--accent2); }

/* ── Articles & guides ── */
article h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 600;
  margin-top: 0;
  letter-spacing: -0.02em;
}

article h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2.25rem;
  color: var(--text);
}

article h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
}

article p,
article li {
  color: var(--text-soft);
}

article ul,
article ol { padding-left: 1.25rem; }

article code {
  background: var(--surface2);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.86em;
  color: var(--accent2);
  border: 1px solid var(--border);
}

article pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}

article pre code {
  background: none;
  padding: 0;
  color: var(--text);
  border: none;
}

.callout {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0;
  border-left: 3px solid var(--accent);
}

.callout strong { color: var(--callout-strong); }

.callout-green {
  background: var(--callout-green-bg);
  border-color: var(--callout-green-border);
  border-left-color: var(--gold);
}

.flow {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.flow-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.flow-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: var(--btn-primary-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.flow-step h4 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.flow-step p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 0;
  min-width: 32rem;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
}

.compare-table th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compare-table td { color: var(--muted); }

.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.guide-list a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
}

.guide-list a:hover { color: var(--accent2); }

.guide-list span {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.25rem;
}

.app-card .app-meta {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.app-card .price {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.card-intro {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  font-weight: 500;
}

.perk-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.84rem;
}

.perk-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.45;
}

.perk-list li:last-child { border-bottom: none; }

.perk-list strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Footer ── */
footer.site-footer {
  text-align: center;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem 1.75rem max(3rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  background: var(--surface);
}

footer a { color: var(--muted); }
footer a:hover { color: var(--accent2); }

.connect-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.connect-row a {
  font-size: 0.82rem;
  text-decoration: none;
}

/* ── Touch ── */
.btn,
.nav-toggle,
.nav-links a,
.theme-toggle,
.ht-intro-skip {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .site-nav .brand {
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: calc(3.5rem + env(safe-area-inset-top));
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - 5rem - env(safe-area-inset-top));
    overflow-y: auto;
  }

  .nav-links.nav-open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    min-height: 44px;
  }

  main, main.wide {
    padding: 1.5rem max(1rem, env(safe-area-inset-left)) 3rem max(1rem, env(safe-area-inset-right));
  }

  .hero, .welcome-hero { padding: 2rem 0 2.5rem; }

  .hero .badge, .welcome-hero .badge {
    font-size: 0.62rem;
    white-space: normal;
    line-height: 1.45;
  }

  .hero h1, .welcome-hero h1 {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
    padding: 0 0.25rem;
  }

  .hero .lead, .welcome-hero .lead {
    font-size: 0.96rem;
    padding: 0 0.25rem;
  }

  .welcome-hero .sub-lead {
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row .btn,
  .partner-actions .btn,
  .path-card .btn {
    width: 100%;
    min-height: 48px;
  }

  .partner-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 22rem;
    margin: 0 auto;
  }

  .grid, .path-grid { grid-template-columns: 1fr; }

  .partner-section, .build-section {
    padding: 1.75rem 1.15rem;
    margin: 2rem 0;
  }

  .section-title { font-size: 1.35rem; margin-top: 2rem; }

  .connect-row {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
  }

  .connect-row a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  article h1 { font-size: 1.55rem; }

  .flow-step { flex-direction: column; gap: 0.65rem; }

  .card:hover, .path-card:hover { transform: none; }
}

@media (max-width: 380px) {
  .site-nav .brand { font-size: 0.7rem; }
  .hero h1, .welcome-hero h1 { font-size: 1.65rem; }
}

@media (hover: none) {
  .btn:hover, .card:hover, .path-card:hover { transform: none; }
}
