:root {
  /* Palette matched to app/lib/theme/app_theme.dart */
  --primary: #0F766E;
  --primary-hover: #0D645D;
  --accent-light: #E6F4F1;
  --ink: #0F172A;
  --ink-muted: #64748B;
  --paper: #F8FAFC;
  --surface: #FFFFFF;
  --surface-subtle: #F1F5F9;
  --border: #E2E8F0;
  --income: #15803D;
  --income-bg: #DCFCE7;
  --expense: #B91C1C;
  --expense-bg: #FEE2E2;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-subtle);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-xs {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  border-radius: 8px;
  border: 1px solid var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 999px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s var(--ease-out), box-shadow 0.16s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 7px 12px;
}

.btn-lg {
  font-size: 0.95rem;
  padding: 12px 18px;
}

.btn-block {
  width: 100%;
  padding: 13px 18px;
  font-size: 0.95rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px -6px rgba(15, 118, 110, 0.45);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-subtle);
}

.btn-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  opacity: 0.86;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

/* Hero — sized to fit cleanly above the fold */
.hero {
  padding: 24px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.8vw, 2.95rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 22px;
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 520px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.spec-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.spec-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

/* Interactive Phone Mockup */
.hero-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-header {
  width: 100%;
  max-width: 340px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.demo-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.demo-reset {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.74rem;
  font-family: var(--font-sans);
  color: var(--ink-muted);
  cursor: pointer;
}

.demo-reset:hover {
  color: var(--ink);
  background: var(--surface);
}

.phone-frame {
  width: 100%;
  max-width: 332px;
  background: var(--ink);
  border-radius: 32px;
  padding: 9px;
  box-shadow: 0 22px 44px -18px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
  position: relative;
}

.phone-notch {
  width: 88px;
  height: 14px;
  background: var(--ink);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.phone-screen {
  background: var(--paper);
  border-radius: 23px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 458px;
  margin-top: -7px;
  position: relative;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.appbar-icon-btn {
  background: none;
  border: none;
  padding: 4px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.appbar-icon-btn:hover {
  background: var(--surface-subtle);
}

.app-topbar {
  background: var(--surface);
  padding: 13px 14px 9px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.96rem;
}

.currency-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--accent-light);
  border: 1px solid rgba(15, 118, 110, 0.2);
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.currency-chip:active {
  transform: scale(0.96);
}

.cloud-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--accent-light);
  border: 1px solid rgba(15, 118, 110, 0.2);
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.cloud-badge.is-offline {
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border-color: var(--border);
}

.cloud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.cloud-badge.is-offline .cloud-dot {
  background: var(--ink-muted);
}

.quick-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.quick-chip:hover {
  background: var(--surface-subtle);
  border-color: #CBD5E1;
}

.quick-chip:active {
  transform: scale(0.95);
}

.phone-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.tab-panel {
  display: none;
  animation: fadeSlide 0.2s var(--ease-out);
}

.tab-panel.active {
  display: block;
}

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

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-bottom: 8px;
}

.summary-kicker {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 7px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.metric-col {
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.64rem;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.metric-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.target-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  margin-bottom: 5px;
}

.target-label {
  color: var(--ink-muted);
  font-weight: 600;
}

.target-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--income);
}

.breakdown-row {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 8px;
}

.breakdown-cell {
  flex: 1;
  text-align: center;
}

.breakdown-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
}

.breakdown-label {
  display: block;
  font-size: 0.64rem;
  color: var(--ink-muted);
}

.breakdown-val {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
}

.mini-section-title {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 2px 0 6px;
}

.cat-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
}

.cat-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cat-pill-name {
  color: var(--ink-muted);
  font-weight: 500;
}

.cat-pill-val {
  color: var(--ink);
  font-weight: 700;
  font-family: var(--font-mono);
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cal-pill {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(15, 118, 110, 0.08);
  padding: 2px 7px;
  border-radius: 6px;
}

.filter-strip {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.goals-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.goals-subtab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 7px 0;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.goals-subtab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-count-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 999px;
}

.tab-count-badge.muted {
  background: var(--surface-subtle);
  color: var(--ink-muted);
}

.quick-goal-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.quick-goal-input {
  flex: 1;
  min-width: 0;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--ink);
  outline: none;
}

.quick-goal-input:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.quick-goal-add {
  width: 34px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.goal-done-btn {
  background: var(--accent-light);
  color: var(--primary);
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.16);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.profile-sub {
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.settings-section-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.settings-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.settings-tile-btn {
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  cursor: pointer;
  gap: 10px;
}

.settings-tile-icon {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.settings-tile-left {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.settings-chevron {
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.settings-field {
  margin-bottom: 8px;
}

.settings-field label {
  display: block;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.settings-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  gap: 5px;
}

.settings-prefix {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.settings-input-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.settings-save-btn {
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.settings-logout-btn {
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--expense);
  border-radius: 9px;
  background: transparent;
  color: var(--expense);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.app-fab {
  position: absolute;
  right: 12px;
  bottom: 58px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.35);
  cursor: pointer;
  z-index: 5;
}

.app-fab:active {
  transform: scale(0.96);
}

.quick-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 58px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  z-index: 6;
}

.quick-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.quick-sheet-close {
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.quick-sheet-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-bottom: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.settings-sub {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.settings-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
}

.section-mini-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 4px 2px 8px;
}

.tx-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tx-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.tx-item.is-new {
  animation: txPop 0.28s var(--ease-out);
}

@keyframes txPop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    border-color: var(--primary);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: var(--border);
  }
}

.tx-title {
  font-weight: 600;
  color: var(--ink);
}

.tx-sub {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.tx-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
}

.income-text {
  color: var(--income);
}

.expense-text {
  color: var(--expense);
}

/* Goals inside phone */
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px;
  margin-bottom: 10px;
}

.goal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.goal-name {
  font-weight: 700;
  font-size: 0.88rem;
}

.goal-sub {
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.goal-pct {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--accent-light);
  padding: 2px 7px;
  border-radius: 999px;
}

.progress-track {
  height: 8px;
  background: var(--surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.35s var(--ease-out);
}

.goal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.goal-boost-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.goal-boost-btn:active {
  transform: scale(0.95);
}

.goal-tag {
  font-size: 0.72rem;
  color: var(--income);
  font-weight: 600;
}

.history-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.history-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.history-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.history-stat-val {
  font-weight: 700;
  font-size: 0.86rem;
}

.phone-bottom-nav {
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 4px 8px;
}

.nav-tab {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.nav-tab.active {
  color: var(--primary);
  font-weight: 700;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-tinted {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 620px;
  margin-bottom: 36px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.bento-card:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

.bento-wide {
  grid-column: span 2;
}

.bento-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.bento-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.bento-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.bento-tags span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--ink);
}

/* Download Shell */
.download-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}

.download-left h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.025em;
}

.download-left p {
  margin: 0 0 22px;
  color: var(--ink-muted);
}

.abi-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.abi-pill {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.1s ease;
}

.abi-pill:hover {
  border-color: #CBD5E1;
}

.abi-pill:active {
  transform: scale(0.98);
}

.abi-pill.active {
  background: var(--accent-light);
  border-color: var(--primary);
}

.abi-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.abi-desc {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.text-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.text-link:hover {
  text-decoration: underline;
}

.abi-help-box {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.abi-guide-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-copy {
  font-weight: 400;
  color: var(--ink-muted);
  font-size: 0.82rem;
  margin-left: 6px;
}

.connect-link {
  color: var(--primary);
  font-weight: 600;
}

.dl-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.dl-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.dl-card-row:last-of-type {
  margin-bottom: 18px;
}

.dl-label {
  color: var(--ink-muted);
}

.dl-val {
  font-weight: 600;
  color: var(--ink);
}

.dl-all-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.dl-all-link:hover {
  color: var(--primary);
}

/* Changelog */
.changelog-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.release-tabs {
  background: var(--paper);
  border-right: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.release-tab-btn {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.release-tab-btn:hover {
  background: var(--surface);
}

.release-tab-btn.active {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.rel-tab-tag {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
}

.rel-tab-date {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.release-detail {
  padding: 24px 28px;
}

.release-detail h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.release-meta-line {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.release-notes-list {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.release-notes-list li {
  margin-bottom: 6px;
}

/* Source / Clone Card */
.source-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.source-copy h2 {
  margin: 0 0 10px;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.source-copy p {
  margin: 0 0 20px;
  color: var(--ink-muted);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.clone-box {
  background: var(--ink);
  color: #E2E8F0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #1E293B;
}

.clone-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #1E293B;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #94A3B8;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.clone-box pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
}

.clone-box pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* Footer */
.footer {
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

.footer-left img {
  border-radius: 5px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-right a:hover {
  color: var(--primary);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .download-shell,
  .source-card,
  .changelog-shell {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-wide {
    grid-column: span 1;
  }

  .release-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 36px 0 56px;
  }

  .hero-specs,
  .abi-selector {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

