:root {
  --bg: #0f172a; --card: #1e293b; --card2: #334155; --text: #f1f5f9; --muted: #94a3b8;
  --accent: #38bdf8; --accent2: #22c55e; --warn: #fbbf24; --w2: #60a5fa; --c1099: #a78bfa;
  --border: #475569; --danger: #f87171; --radius: 14px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); min-height: 100vh; line-height: 1.5;
  background: radial-gradient(1200px 600px at 10% -10%, #1e3a5f 0%, transparent 50%),
              radial-gradient(900px 500px at 100% 0%, #312e81 0%, transparent 45%), var(--bg);
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
header { text-align: center; margin-bottom: 28px; }
header h1 { font-size: clamp(1.6rem, 4vw, 2.35rem); margin: 0 0 8px; letter-spacing: -0.02em; }
header p { color: var(--muted); margin: 0 auto; max-width: 640px; }
.badge {
  display: inline-block; background: rgba(56,189,248,.15); color: var(--accent);
  border: 1px solid rgba(56,189,248,.35); padding: 4px 10px; border-radius: 999px;
  font-size: .8rem; margin-bottom: 12px;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.nav-links a { color: var(--accent); text-decoration: none; font-size: .9rem; }
.nav-links a:hover { text-decoration: underline; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, rgba(30,41,59,.95), rgba(15,23,42,.95));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 14px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.w2 { background: var(--w2); } .dot.c1099 { background: var(--c1099); }
label { display: block; font-size: .82rem; color: var(--muted); margin: 10px 0 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) { .row { grid-template-columns: 1fr; } }
input, select {
  width: 100%; background: #0b1220; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 1rem;
}
input:focus, select:focus { outline: 2px solid rgba(56,189,248,.45); border-color: var(--accent); }
.shared { margin: 16px 0; }
.headline {
  margin: 20px 0 16px; padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(56,189,248,.12));
  border: 1px solid rgba(34,197,94,.35); text-align: center;
}
.headline .big { font-size: clamp(1.35rem, 3.5vw, 1.85rem); font-weight: 700; margin: 6px 0; }
.headline .sub { color: var(--muted); font-size: .95rem; }
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 800px) { .results { grid-template-columns: 1fr; } }
.result-card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--muted); font-weight: 600; }
.money { font-size: 1.7rem; font-weight: 700; }
.money.w2 { color: var(--w2); } .money.c1099 { color: var(--c1099); }
.mini { color: var(--muted); font-size: .9rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(71,85,105,.6); }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.notes { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.notes ul { padding-left: 1.2rem; } .notes li { margin-bottom: 6px; }
.disclaimer {
  margin-top: 18px; padding: 14px; border-radius: 12px;
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25);
  color: #fde68a; font-size: .88rem;
}
footer { margin-top: 28px; text-align: center; color: var(--muted); font-size: .9rem; }
footer a { color: var(--accent); text-decoration: none; } footer a:hover { text-decoration: underline; }
.toggle {
  display: inline-flex; background: #0b1220; border: 1px solid var(--border);
  border-radius: 999px; padding: 3px; gap: 2px; margin-top: 4px;
}
.toggle button {
  border: 0; background: transparent; color: var(--muted); padding: 7px 12px;
  border-radius: 999px; cursor: pointer; font-size: .85rem;
}
.toggle button.active { background: var(--card2); color: var(--text); }
.hint { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0 4px; }
.btn {
  background: var(--accent); color: #0b1220; border: 0; border-radius: 10px;
  padding: 10px 16px; font-weight: 650; cursor: pointer; font-size: .95rem;
}
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tool-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #0b1220;
}
.tool-card .cat { font-size: .75rem; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tool-card h3 { margin: 6px 0; font-size: 1rem; }
.tool-card p { margin: 0 0 10px; color: var(--muted); font-size: .88rem; }
.tool-card a { color: var(--accent); font-size: .9rem; }
.ftc { font-size: .8rem; color: var(--muted); margin: 0 0 12px; line-height: 1.4; }
.email-box iframe { width: 100%; min-height: 220px; border: 0; border-radius: 12px; background: #fff; }
.guide-body { color: var(--text); max-width: 720px; margin: 0 auto; }
.guide-body h2 { margin-top: 1.6rem; }
.guide-body a { color: var(--accent); }
.guide-body a.btn,
.prose a.btn,
a.btn {
  color: #04101f !important;
  background: var(--accent);
  text-decoration: none;
  display: inline-block;
  font-weight: 700;
}
.guide-body a.btn:hover,
.prose a.btn:hover,
a.btn:hover { filter: brightness(1.06); text-decoration: none; }
@media (prefers-color-scheme: light) {
  .guide-body a.btn, .prose a.btn, a.btn { color: #ffffff !important; }
}
.prose p { color: #cbd5e1; }
.hidden { display: none !important; }
.ad-slot {
  display: none; min-height: 90px; border: 1px dashed var(--border); border-radius: 12px;
  margin: 16px 0; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem;
}
.ad-slot[data-enabled="true"] { display: flex; }
.state-note { font-size: .78rem; color: var(--warn); margin-top: 4px; min-height: 1.1em; }

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc; --card: #ffffff; --card2: #e2e8f0; --text: #0f172a; --muted: #64748b;
    --accent: #0284c7; --accent2: #16a34a; --warn: #b45309; --w2: #2563eb; --c1099: #7c3aed;
    --border: #cbd5e1; --danger: #dc2626; --shadow: 0 10px 30px rgba(15,23,42,.08);
  }
  body {
    background: radial-gradient(1200px 600px at 10% -10%, #dbeafe 0%, transparent 50%),
                radial-gradient(900px 500px at 100% 0%, #ede9fe 0%, transparent 45%), var(--bg);
  }
  .card {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
  }
  input, select, .toggle, .tool-card {
    background: #f1f5f9; color: var(--text);
  }
  .toggle button.active { background: #fff; color: var(--text); }
  .disclaimer {
    background: rgba(180,83,9,.08); border-color: rgba(180,83,9,.3); color: #92400e;
  }
  .headline {
    background: linear-gradient(135deg, rgba(22,163,74,.12), rgba(2,132,199,.08));
  }
  .ftc { color: #475569; }
  .prose p { color: #334155; }
  .email-box iframe { background: #fff; }
}


/* —— Site header (SaaS-style) —— */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.78);
  border-bottom: 1px solid rgba(71, 85, 105, 0.55);
}
.site-header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
  height: 58px; display: flex; align-items: center; gap: 16px;
}
.site-brand {
  font-weight: 750; font-size: 1.05rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; white-space: nowrap;
  margin-right: auto;
}
.site-brand span { color: var(--accent); font-weight: 800; }
.site-brand:hover { color: var(--text); }
.site-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.site-nav {
  display: flex; align-items: center; gap: 4px;
}
.site-nav-link {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 550;
  padding: 8px 12px; border-radius: 9px; display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; line-height: 1.2;
}
.site-nav-link:hover, .site-nav-link.is-active {
  color: var(--text); background: rgba(148, 163, 184, 0.12);
}
.site-nav-link:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.site-caret { opacity: .75; transition: transform .15s ease; }
.site-nav-dropbtn[aria-expanded="true"] .site-caret { transform: rotate(180deg); }

.site-nav-item { position: relative; }
.site-nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; z-index: 120;
}
.site-nav-dropdown a {
  display: block; padding: 10px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.site-nav-dropdown a:hover, .site-nav-dropdown a.is-active {
  background: rgba(56, 189, 248, 0.12); color: var(--accent);
}
.site-nav-dropdown a:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }

.site-nav-cta {
  margin-left: 6px; text-decoration: none; font-size: .88rem; font-weight: 700;
  color: #0b1220; background: var(--accent); padding: 8px 14px; border-radius: 999px;
  white-space: nowrap;
}
.site-nav-cta:hover { filter: brightness(1.08); color: #0b1220; }
.site-nav-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-nav-toggle {
  display: none; gap: 8px; min-height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(15,23,42,.55);
  color: var(--text); cursor: pointer; align-items: center; justify-content: center;
  padding: 8px 12px; font-family: inherit; font-size: .88rem; font-weight: 650;
}
.site-nav-toggle-label { line-height: 1; }
.site-nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-nav-toggle-bars,
.site-nav-toggle-bars::before,
.site-nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .15s ease, opacity .15s ease;
}
.site-nav-toggle-bars::before,
.site-nav-toggle-bars::after {
  content: ""; position: absolute; left: 0;
}
.site-nav-toggle-bars::before { top: -6px; }
.site-nav-toggle-bars::after { top: 6px; }
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars { background: transparent; }
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.page-hero { text-align: center; margin-bottom: 28px; padding-top: 8px; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.35rem); margin: 0 0 8px; letter-spacing: -0.02em; }
.page-hero p { color: var(--muted); margin: 0 auto; max-width: 640px; }

@media (max-width: 820px) {
  .site-nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 12px; right: 12px; top: 58px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 10px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-header { position: sticky; }
  .site-header-inner { position: relative; }
  .site-nav-item { width: 100%; }
  .site-nav-link, .site-nav-cta { width: 100%; justify-content: flex-start; }
  .site-nav-cta { margin-left: 0; margin-top: 4px; text-align: center; justify-content: center; display: inline-flex; }
  .site-nav-dropdown {
    position: static; min-width: 0; box-shadow: none; margin-top: 4px;
    background: rgba(15,23,42,.35); border-color: rgba(71,85,105,.5);
  }
  body.nav-open { overflow: hidden; }
}

@media (prefers-color-scheme: light) {
  .site-header {
    background: rgba(248, 250, 252, 0.86);
    border-bottom-color: rgba(203, 213, 225, 0.9);
  }
  .site-nav-toggle { background: #fff; color: #0f172a; border-color: #cbd5e1; }
  .site-nav-dropdown { background: #fff; }
  .site-nav-cta { color: #fff; }
  @media (max-width: 820px) {
    .site-nav { background: #fff; }
    .site-nav-dropdown { background: #f8fafc; }
  }
}


/* —— How it works (collapsible) —— */
.how-details {
  padding: 0;
  overflow: hidden;
}
.how-summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; font-size: 1.05rem; font-weight: 650;
}
.how-summary::-webkit-details-marker { display: none; }
.how-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.how-chevron { color: var(--muted); transition: transform .18s ease; flex-shrink: 0; }
.how-details[open] .how-chevron { transform: rotate(180deg); color: var(--accent); }
.how-body { padding: 0 18px 16px; }
.how-body ul { margin: 0; }
.disclaimer-compact {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25);
  color: #fde68a; font-size: .86rem; line-height: 1.45;
}
@media (prefers-color-scheme: light) {
  .disclaimer-compact {
    background: rgba(180,83,9,.08); border-color: rgba(180,83,9,.3); color: #92400e;
  }
}

@media print {
  body { background: #fff; color: #111; }
  .no-print, .site-header, .nav-links, .actions, .email-box, .ad-slot, footer .extra { display: none !important; }
  .card, .headline { box-shadow: none; border: 1px solid #ccc; background: #fff; color: #111; }
  .money, .headline .big { color: #111 !important; }
  a { color: #111; text-decoration: none; }
  .wrap { max-width: 100%; padding: 0; }
}
