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

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0f0f11;
  --surface:     #1a1a2e;
  --surface2:    #14142a;
  --border:      #2a2a3e;
  --accent:      #00d4aa;
  --accent-hover:#00b894;
  --accent-dim:  rgba(0, 212, 170, 0.12);
  --text:        #e8e8f0;
  --muted:       #8888a8;
  --input-bg:    #12121f;
  --danger:      #ff6b6b;
  --success:     #00d4aa;
  --warning:     #f0a500;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── Ad Banner (top) ── */
.ad-banner-wrap {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  min-height: 60px;
}
.ad-banner {
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
@media (max-width: 768px) { .ad-banner-wrap { display: none; } }

/* ── Navigation ── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  list-style: none;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); background: var(--accent-dim); }
.nav-links a.active { color: var(--accent); }

@media (max-width: 768px) {
  .nav-inner { gap: 12px; height: auto; padding: 12px 16px; flex-wrap: wrap; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 0.75rem; padding: 5px 8px; }
}

/* ── Page Layout ── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto;
  gap: 32px;
  align-items: start;
}
.page-wrap.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 760px;
}
.main-col { min-width: 0; }
.sidebar-col { display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 900px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar-col { display: none; }
  .page-wrap { padding: 24px 16px; }
}

/* ── Hero ── */
.hero {
  margin-bottom: 32px;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
}

/* ── Calculator Card ── */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

@media (max-width: 600px) {
  .calc-card { padding: 20px 16px; }
}

/* ── Form Elements ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.form-grid.single { grid-template-columns: 1fr; }

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

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field input,
.field select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  appearance: none;
}
.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}
.field .hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.input-prefix-wrap {
  position: relative;
}
.input-prefix-wrap .prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}
.input-prefix-wrap input { padding-left: 28px; }
.input-suffix-wrap { position: relative; }
.input-suffix-wrap .suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}
.input-suffix-wrap input { padding-right: 32px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #0f0f11;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(0, 212, 170, 0.3);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-sm { font-size: 0.85rem; padding: 8px 16px; }
.btn-full { width: 100%; }

/* ── Results Panel ── */
.results {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: none;
}
.results.visible { display: block; }

.result-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 1.05rem;
}
.result-status.success {
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.3);
  color: var(--success);
}
.result-status.warning {
  background: rgba(240, 165, 0, 0.1);
  border: 1px solid rgba(240, 165, 0, 0.3);
  color: var(--warning);
}
.result-status.danger {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--danger);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.result-item {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.result-item .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.result-item .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.result-item .value.accent { color: var(--accent); }
.result-item .value.danger { color: var(--danger); }
.result-item .sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.92rem;
}
.compare-table th {
  background: var(--input-bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th.accent { color: var(--accent); }
.compare-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td.highlight { color: var(--accent); font-weight: 600; }
.compare-table td.label-col { color: var(--muted); font-size: 0.85rem; }

/* Breakdown list */
.breakdown-list { list-style: none; margin-bottom: 24px; }
.breakdown-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.breakdown-list li:last-child { border-bottom: none; }
.breakdown-list li .bl-label { color: var(--muted); }
.breakdown-list li .bl-value { font-weight: 600; }
.breakdown-list li.total .bl-label,
.breakdown-list li.total .bl-value { color: var(--accent); font-size: 1.05rem; }

/* Email CTA */
.email-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Affiliate CTA Block ── */
.affiliate-cta {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.affiliate-cta .cta-text { font-size: 0.92rem; color: var(--muted); }
.affiliate-cta .cta-text strong { color: var(--text); display: block; margin-bottom: 4px; }
.affiliate-cta .btn { flex-shrink: 0; }

/* ── Sidebar Ad ── */
.ad-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 300px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  position: sticky;
  top: 80px;
}

/* ── FAQ Section ── */
.faq-section {
  margin-top: 48px;
}
.faq-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  background: var(--surface);
  transition: background 0.15s;
}
.faq-item summary:hover { background: var(--surface2); }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-body {
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  background: var(--input-bg);
  border-top: 1px solid var(--border);
}

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.footer-logo span { color: var(--accent); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  list-style: none;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Homepage Cards ── */
.home-hero {
  text-align: center;
  padding: 64px 24px 48px;
  max-width: 700px;
  margin: 0 auto;
}
.home-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.home-hero h1 span { color: var(--accent); }
.home-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
}
@media (max-width: 600px) { .home-hero h1 { font-size: 1.75rem; } }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.calc-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.calc-preview-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.15);
  transform: translateY(-3px);
  color: inherit;
}
.card-icon { font-size: 2rem; line-height: 1; }
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

/* ── Subscription Rows ── */
.sub-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.sub-row {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: 10px;
  align-items: center;
}
.sub-row input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.sub-row input:focus { border-color: var(--accent); }
.sub-row .remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.sub-row .remove-btn:hover { color: var(--danger); background: rgba(255,107,107,0.1); }
.add-sub-btn {
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 10px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  margin-bottom: 20px;
}
.add-sub-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 500px) {
  .sub-row { grid-template-columns: 1fr auto; }
  .sub-row .cost-input { display: none; }
}

/* ── Utility ── */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── Inline Disclaimer Box (results panel) ── */
.calc-disclaimer {
  background: rgba(255, 107, 107, 0.06);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 20px;
}
.calc-disclaimer strong { color: var(--text); }
.calc-disclaimer a { color: var(--accent); }

/* ── Save PDF button row ── */
.save-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.save-cta .save-note {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Site-wide disclaimer bar (above footer) ── */
.disclaimer-bar {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}
.disclaimer-bar a { color: var(--accent); }

/* ── Legal page (disclaimer + privacy) ── */
.legal-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.legal-wrap h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.legal-wrap .last-updated {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 36px;
}
.legal-wrap h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 10px;
}
.legal-wrap p, .legal-wrap li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 10px;
}
.legal-wrap ul { padding-left: 20px; }
.legal-wrap li { margin-bottom: 6px; }
.legal-wrap .highlight-box {
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}
.legal-wrap .warning-box {
  background: rgba(255, 107, 107, 0.07);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}
