/* ============================================
   MoneyStopwatch — Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg:        #0f0f0f;
  --bg2:       #141414;
  --bg3:       #1a1a1a;
  --border:    #2a2a2a;
  --accent:    #10b981;
  --accent2:   #059669;
  --accent-dim:#0d9268;
  --text:      #e5e7eb;
  --muted:     #9ca3af;
  --muted2:    #6b7280;
  --white:     #ffffff;
  --red:       #ef4444;
  --yellow:    #f59e0b;
  --radius:    10px;
  --radius-lg: 12px;
  --shadow:    0 4px 24px rgba(0,0,0,.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

/* ── Typography ─────────────────────────── */

h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; color: var(--white); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
h4 { font-size: 1.05rem; }
p  { color: var(--text); margin-bottom: .9rem; }
a  { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: #34d399; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }
strong { color: var(--white); font-weight: 600; }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Layout ─────────────────────────────── */

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 780px; }

.main-content {
  flex: 1;
  padding: 3rem 0 5rem;
}

/* ── Page Hero ──────────────────────────── */

.page-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.page-hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: .85rem auto 0;
  font-weight: 400;
  line-height: 1.6;
}

.hero-accent { color: var(--accent); }

.section { margin-bottom: 3rem; }

/* ── Section alternating backgrounds ───── */

.section-alt {
  background: var(--bg2);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* ── Header ─────────────────────────────── */

.site-header {
  background: rgba(15,15,15,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 1rem;
}

/* ── Logo ───────────────────────────────── */

.logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover { opacity: .85; }
.logo svg { flex-shrink: 0; display: block; }

/* ── Nav ────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: center;
  gap: .1rem;
}

/* plain nav links */
.site-nav > a {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .7rem;
  border-radius: 7px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.site-nav > a:hover,
.site-nav > a.active {
  color: var(--white);
  background: var(--bg3);
}

/* ── Dropdown nav ───────────────────────── */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .7rem;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background .15s;
  line-height: 1;
}

.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger {
  color: var(--white);
  background: var(--bg3);
}

.nav-arrow {
  font-size: .65rem;
  opacity: .7;
  transition: transform .2s ease;
  line-height: 1;
}

.nav-dropdown.open .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 230px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  /* padding-top creates the 12px visual gap; rest keeps original spacing */
  padding: 12px .45rem .45rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 300;
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
  pointer-events: none;
}

/* Invisible hover bridge fills the gap between trigger and menu */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: block;
  padding: .5rem .9rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 400;
  border-radius: 7px;
  transition: color .12s, background .12s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  color: var(--white);
  background: rgba(255,255,255,.07);
}

.nav-dropdown-menu a.active {
  color: var(--accent);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: .4rem .5rem;
}

.nav-dropdown-group-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted2);
  padding: .55rem .9rem .2rem;
}

/* ── Mobile hamburger ───────────────────── */

.nav-toggle {
  display: none;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: .4rem .65rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: .875rem;
  font-family: inherit;
  white-space: nowrap;
}

/* ── Cards ─────────────────────────────── */

.card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card + .card { margin-top: 1.25rem; }

.card--green-border { border-color: var(--accent); }

/* ── Forms ─────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

input[type="number"],
input[type="text"],
select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  padding: .7rem 1rem;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}

input::placeholder { color: var(--muted2); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

/* Checkbox toggle wrapper (legacy) */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: .65rem;
}

/* Segmented toggle control */
.toggle-group {
  width: 100%;
  background: #252525;
  border-radius: 10px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: .2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--muted);
  border-radius: 50%;
  transition: .2s;
}

.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: #fff; }

.toggle-label { font-size: .9rem; color: var(--text); cursor: pointer; }

.toggle-btn {
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: .9375rem;
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: inherit;
  font-weight: 500;
  text-align: center;
}

.toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

.toggle-btn:not(.active) {
  background: transparent;
  color: #888;
}

/* ── Buttons ─────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  padding: .7rem 1.5rem;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent2); color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(16,185,129,.06); }

.btn-ghost {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: #252525; color: var(--white); }

.btn-danger {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
}
.btn-danger:hover { background: #ef4444; color: #fff; }

.btn-lg { font-size: 1.05rem; padding: .9rem 2.2rem; border-radius: 12px; }
.btn-sm { font-size: .82rem; padding: .4rem .9rem; }

.btn-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Counter ─────────────────────────────── */

.counter-display {
  background: var(--bg3);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 0 60px rgba(16,185,129,.07);
}

.counter-value {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  word-break: break-all;
}

.counter-label {
  font-size: .82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-top: .5rem;
}

.counter-time {
  font-size: 1rem;
  color: var(--muted);
  margin-top: .75rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 20px;
  margin-top: .75rem;
}

.status-badge.running {
  background: rgba(16,185,129,.12);
  color: var(--accent);
  border: 1px solid rgba(16,185,129,.25);
}

.status-badge.paused {
  background: rgba(245,158,11,.1);
  color: var(--yellow);
  border: 1px solid rgba(245,158,11,.2);
}

.status-badge.idle {
  background: var(--bg2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.65); }
}

/* ── How It Works — Steps ───────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.step-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color .2s, transform .2s;
}

.step-card:hover {
  border-color: rgba(16,185,129,.35);
  transform: translateY(-3px);
}

.step-number {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .45rem;
}

.step-card p {
  font-size: .88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Results Table ─────────────────────── */

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.results-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.results-table td {
  padding: .7rem .5rem;
  font-size: .95rem;
}

.results-table td:first-child { color: var(--muted); }
.results-table td:last-child  { text-align: right; font-weight: 600; color: var(--white); }

.results-table tr.total td {
  color: var(--accent);
  font-size: 1.05rem;
  border-top: 1px solid rgba(16,185,129,.3);
  border-bottom: none !important;
  font-weight: 700;
  padding-top: 1rem;
}

.results-table tr.deduction td:last-child { color: var(--red); }

/* ── Result highlight ─────────────────── */

.result-highlight {
  background: rgba(16,185,129,.06);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.result-highlight .amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
}

.result-highlight .label {
  font-size: .82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}


/* ── Ad Slots ───────────────────────────── */

.ad-slot {
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  min-height: 90px;
  width: 100%;
  margin: 1.5rem 0;
}

.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--rectangle   { min-height: 250px; max-width: 336px; margin: 1.5rem auto; }

/* ── Feed ───────────────────────────────── */

/* Trending banner — v2 (feed index) */
.feed-trending-v2 {
  display: block;
  background: #0d1f16;
  border-left: 4px solid #10b981;
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 0;
  text-decoration: none;
  transition: background .15s;
}

.feed-trending-v2:hover { background: #0f2419; }

.feed-trending-v2-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #10b981;
  margin-bottom: .45rem;
}

.feed-trending-v2-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.feed-divider {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 1.5rem 0 1rem;
}

.feed-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 1rem;
}

/* Article grid — v2 (feed index) */
.feed-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .feed-grid-v2 { grid-template-columns: 1fr; }
}

.feed-card-v2 {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
  min-height: 160px;
}

.feed-card-v2:hover {
  border-color: #3a3a3a;
  transform: translateY(-2px);
  color: inherit;
}

.feed-card-v2-tag {
  display: block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #10b981;
  margin-bottom: .5rem;
}

.feed-card-v2-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: .45rem;
}

.feed-card-v2-excerpt {
  font-size: .875rem;
  color: #888;
  line-height: 1.5;
}

.feed-card-v2-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-card-v2-meta {
  font-size: .75rem;
  color: #666;
}

.feed-card-v2-arrow {
  font-size: .95rem;
  color: #444;
  transition: color .15s;
}

.feed-card-v2:hover .feed-card-v2-arrow { color: #10b981; }

/* Related cards (article pages) */
.feed-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: border-color .15s, transform .15s;
  text-decoration: none;
  color: inherit;
}

.feed-card:hover {
  border-color: rgba(16,185,129,.4);
  transform: translateY(-2px);
  color: inherit;
}

.feed-card-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
}

.feed-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.feed-card-summary {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.feed-card-meta {
  font-size: .75rem;
  color: var(--muted2);
  display: flex;
  gap: .75rem;
}

.feed-article-header {
  margin-bottom: 2rem;
}

.feed-article-header .feed-card-tag {
  display: inline-block;
  margin-bottom: .5rem;
}

.feed-article-body h2 {
  font-size: 1.2rem;
  margin: 2rem 0 .65rem;
}

.feed-article-body h3 {
  font-size: 1rem;
  margin: 1.5rem 0 .5rem;
}

.feed-article-body p {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1rem;
}

.feed-article-body ul,
.feed-article-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.feed-article-body li {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: .35rem;
}

.feed-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.feed-related h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted2);
  margin-bottom: 1rem;
}

.feed-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .feed-related-grid { grid-template-columns: 1fr; }
}

/* ── Footer ─────────────────────────────── */

.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.75rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  color: var(--muted);
  font-size: .875rem;
  margin-top: .65rem;
  max-width: 290px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted2);
  margin-bottom: .9rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li { margin-bottom: .45rem; }

.footer-col a {
  color: var(--muted);
  font-size: .875rem;
  transition: color .15s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.footer-bottom p {
  font-size: .8rem;
  color: var(--muted2);
  margin: 0;
}

/* ── Tools Grid (homepage) ──────────────── */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.tool-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color .18s, transform .18s;
  text-decoration: none;
  display: block;
}

.tool-card:hover {
  border-color: rgba(16,185,129,.4);
  transform: translateY(-3px);
  color: var(--text);
}

.tool-card-icon {
  font-size: 1.75rem;
  margin-bottom: .65rem;
  line-height: 1;
}

.tool-card h3 {
  font-size: 1rem;
  margin-bottom: .3rem;
  font-weight: 600;
}

.tool-card p {
  font-size: .82rem;
  color: var(--muted);
  margin: 0;
}

/* ── Article / Long-form ─────────────────── */

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: .85rem;
  font-size: 1.55rem;
}

.article-body h3 {
  margin-top: 1.75rem;
  margin-bottom: .65rem;
}

.article-body p { margin-bottom: 1.1rem; }

.article-body ul,
.article-body ol { margin-bottom: 1.1rem; }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: .9rem 1.3rem;
  background: rgba(16,185,129,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.article-body blockquote p { margin: 0; font-style: italic; color: var(--muted); }

.script-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  margin: 1.1rem 0;
  font-size: .9rem;
  color: var(--text);
  line-height: 1.75;
  font-style: italic;
}

/* ── Email Templates ─────────────────────── */

.email-template {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.email-template-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.email-template-header h3 { font-size: 1rem; margin: 0; }

.email-template-body {
  padding: 1.35rem 1.5rem;
  font-size: .9rem;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
}

/* ── CTA Box ─────────────────────────────── */

.cta-box {
  background: linear-gradient(135deg, rgba(16,185,129,.1), rgba(16,185,129,.03));
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
}

.cta-box h2 { margin-bottom: .65rem; }
.cta-box p { color: var(--muted); max-width: 520px; margin: 0 auto 1.75rem; }

.price-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  padding: .25rem .9rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

/* ── Elon counter ─────────────────────────── */

.musk-hero {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1000 100%);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.musk-counter {
  font-size: clamp(3rem, 12vw, 7rem);
  font-weight: 900;
  color: #f59e0b;
  letter-spacing: -3px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  word-break: break-all;
  text-align: center;
}

.compare-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  text-align: center;
}

.compare-item .value {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.compare-item .sublabel {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .2rem;
}

.compare-item.you .value  { color: var(--accent); }
.compare-item.musk .value { color: #f59e0b; }

/* ── Breakdown boxes ─────────────────────── */

.breakdown-section { margin-top: 1.5rem; }

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

.breakdown-row:last-child { border-bottom: none; }
.breakdown-row .row-label { color: var(--muted); }
.breakdown-row .row-value { font-weight: 600; }
.breakdown-row.deduction .row-value { color: var(--red); }
.breakdown-row.total { padding-top: .9rem; }
.breakdown-row.total .row-label { color: var(--white); font-weight: 700; }
.breakdown-row.total .row-value { color: var(--accent); font-size: 1.1rem; }

/* ── FAQ ──────────────────────────────────── */

.faq-list { margin-top: 1rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .65rem;
  overflow: hidden;
}

.faq-question {
  background: var(--bg2);
  padding: 1.05rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s;
}

.faq-question:hover { background: #1f1f1f; }

.faq-question .faq-icon {
  color: var(--accent);
  font-size: 1.2rem;
  transition: transform .2s;
  flex-shrink: 0;
}

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s, padding .3s;
  font-size: .92rem;
  color: var(--muted);
  background: var(--bg3);
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 1.1rem 1.25rem;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── Badges ─────────────────────────────── */

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-green { background: rgba(16,185,129,.12); color: var(--accent); }
.badge-blue  { background: rgba(59,130,246,.12);  color: #60a5fa; }
.badge-gray  { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); }

/* ── Universal Calculator Components ────── */

.calculator-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
}

/* Input group */
.input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.input-wrapper { position: relative; }

.input-label {
  font-size: .8125rem;
  color: #888;
  margin-bottom: 6px;
  display: block;
}

.input-field {
  background: #252525;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: .9375rem;
  width: 100%;
  font-family: inherit;
  transition: border-color .15s;
  appearance: none;
  -webkit-appearance: none;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}

.input-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  font-size: .9375rem;
}

/* Result display — primary single output */
.result-display {
  background: #141414;
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  margin-top: 20px;
}

.result-label {
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 12px;
}

.result-amount {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  line-height: 1;
}

.result-timer {
  font-size: .875rem;
  color: #666;
  margin-top: 8px;
}

/* Stats row — breakdown grid */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-label {
  font-size: .75rem;
  color: #888;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

/* Button row — grid action buttons */
.button-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.btn-secondary {
  background: #252525;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-size: .9375rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: background .15s, color .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: #2e2e2e;
  color: var(--white);
}

/* ── Utilities ───────────────────────────── */

.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-white  { color: var(--white); }
.text-sm     { font-size: .85rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ── Responsive ──────────────────────────── */

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

@media (max-width: 720px) {
  /* Hide desktop nav, show hamburger */
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: .75rem;
    gap: .2rem;
    z-index: 199;
  }

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

  /* flat links in mobile */
  .site-nav > a {
    padding: .6rem .9rem;
    font-size: .9rem;
    width: 100%;
  }

  /* dropdowns become expandable sections */
  .nav-dropdown { width: 100%; }

  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: .6rem .9rem;
    font-size: .9rem;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    border-radius: 0;
    background: transparent;
    padding: 0 0 0 .75rem;
    margin: .2rem 0 .2rem .9rem;
    display: none;
    pointer-events: auto;
  }

  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  .nav-toggle { display: flex; }

  .site-header { position: relative; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-bottom { flex-direction: column; text-align: center; }

  .compare-box { grid-template-columns: 1fr; }

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

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

  .page-hero h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); }
}

@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .stats-row { grid-template-columns: 1fr; }
  .input-group { grid-template-columns: 1fr; }
  .calculator-card { padding: 20px; }
  .result-amount { font-size: 2.5rem; }
}
