@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Dark first. A saved preference can opt into light mode. */
:root {
  --bg: #0f0f0f;
  --surface: #191919;
  --surface-raised: #202020;
  --text: #f5f5f5;
  --muted: #aaa;
  --border: #303030;
  --accent: #ff0000;
  --accent-text: #ff6262;
  --accent-soft: #ff000010;
  --accent-border: #ff000059;
  --button: #e00000;
  --input: #121212;
  --green: #77d3a4;
  --shadow: 0 8px 28px #00000018;
  --hero-glow: #ff00000b;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f7f7f7;
  --surface: #fff;
  --surface-raised: #f5f5f5;
  --text: #171717;
  --muted: #646464;
  --border: #e3e3e3;
  --accent-text: #c90000;
  --accent-soft: #fff1f1;
  --accent-border: #ff00004d;
  --input: #fafafa;
  --green: #22754e;
  --shadow: 0 8px 28px #00000004;
  --hero-glow: #ff000006;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  background: radial-gradient(ellipse 60% 520px at 65% 0, var(--hero-glow), transparent), var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; transition: background .18s, border-color .18s, box-shadow .18s; }
a { color: inherit; text-decoration: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
input, select { max-width: 100%; }
input::placeholder { color: var(--muted); opacity: .75; }
input:disabled { opacity: .5; }
input[type='number'] { font-variant-numeric: tabular-nums; }
.container { max-width: 1240px; margin: auto; padding: 0 36px; }

/* Navigation & intro */
.site-header {
  height: 80px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(36px, calc((100vw - 1168px) / 2));
  background: var(--bg);
}
.brand { display: flex; align-items: center; font-size: 23px; font-weight: 750; letter-spacing: -.9px; }
.brand-light { font-weight: 450; color: var(--muted); }
.brand-icon {
  width: 38px; height: 30px; border-radius: 9px; background: var(--accent);
  color: #fff; display: grid; place-items: center; margin-right: 12px;
  box-shadow: 0 4px 20px #ff000020;
}
.brand-icon svg { width: 26px; height: 26px; }
.header-right { display: flex; align-items: center; gap: 22px; }
.free-pill { font-size: 11px; border: 1px solid var(--border); border-radius: 30px; padding: 7px 12px; color: var(--muted); }
.free-pill span { color: var(--green); font-size: 8px; margin-right: 5px; }
.header-link { font-size: 12px; font-weight: 550; color: var(--muted); }
.header-link:hover { color: var(--text); }
.icon-button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 10px; height: 36px; width: 36px; display: grid; place-items: center;
}
.icon-button svg { width: 18px; height: 18px; }
.icon-button:hover { background: var(--surface-raised); }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 56px 0 38px; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.8px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.tiny-spark { color: var(--accent-text); font-size: 19px; }
h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.12; letter-spacing: -2.6px; font-weight: 750; margin: 20px 0; }
h1 > span { color: var(--accent-text); }
.hero p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.hero-note {
  width: 270px; flex-shrink: 0; padding: 22px; border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 75%), var(--surface);
  position: relative; overflow: hidden;
}
.hero-note::after {
  content: '↗'; position: absolute; right: 6px; top: 9px; font-size: 130px; line-height: 1;
  color: var(--accent); opacity: .07; pointer-events: none;
}
.hero-note-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 8px; letter-spacing: .7px; font-weight: 600; }
.creator-mark { color: var(--accent-text); font-size: 17px; }
.hero-note > strong { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.8px; line-height: 1.25; margin: 16px 0 22px; }
.hero-note-bottom { display: flex; align-items: center; gap: 13px; font-size: 10px; color: var(--muted); }
.hero-note-bottom b { color: var(--text); font-weight: 650; }
.hero-free { color: var(--accent-text); margin-left: auto; }
.platform-tabs {
  display: flex; align-items: center; gap: 5px; border: 1px solid var(--border); padding: 6px;
  border-radius: 12px; background: var(--surface); margin-bottom: 28px; width: fit-content; max-width: 100%;
}
.platform-tab {
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 8px;
  display: flex; align-items: center; gap: 9px; padding: 10px 16px;
  font-size: 12px; font-weight: 550; white-space: nowrap; min-height: 44px;
}
.platform-tab:hover { color: var(--text); background: var(--surface-raised); }
.platform-tab[aria-pressed='true'] { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-border); }
.platform-icon { height: 22px; width: 22px; display: grid; place-items: center; font-size: 17px; }
.platform-tab[data-platform='youtube'] .platform-icon { color: var(--accent-text); }

/* Form panels */
.workspace { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; scroll-margin-top: 20px; }
.input-column, .quote-column { display: grid; gap: 20px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 24px; }
.section-title > div { display: flex; align-items: center; gap: 10px; }
h2 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: -.4px; }
.step { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border); background: var(--surface-raised); border-radius: 8px; font-size: 10px; color: var(--muted); font-weight: 550; }
.small-note { font-size: 10px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 9px; font-size: 12px; color: var(--muted); font-weight: 500; min-width: 0; }
.input-shell { display: flex; align-items: center; background: var(--input); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.field input, .field select { width: 100%; border: 1px solid var(--border); border-radius: 9px; background: var(--input); color: var(--text); padding: 12px; font-size: 14px; min-width: 0; min-height: 46px; }
.input-shell input { border: 0; background: transparent; width: 100%; min-width: 0; color: var(--text); padding: 12px; font-weight: 600; }
.input-shell > span { font-size: 11px; color: var(--muted); padding-right: 12px; font-weight: 400; }
.input-shell:focus-within, .field > input:focus, .field select:focus { outline: none; border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-help { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 11px 0 0; }
.slider-field { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 27px; }
.slider-field label { font-size: 13px; font-weight: 500; }
.help { font-size: 9px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 3px; cursor: help; }
.slider-field output { font-size: 12px; color: var(--accent-text); font-weight: 650; background: var(--accent-soft); border-radius: 5px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
input[type='range'] { appearance: none; grid-column: 1 / -1; width: 100%; margin: 10px 0 6px; border-radius: 4px; cursor: pointer; height: 5px; }
input[type='range']::-webkit-slider-thumb { appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
input[type='range']::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.range-labels { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.audience-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.audience-scores > div { text-align: center; background: var(--input); border: 1px solid var(--border); border-radius: 9px; padding: 12px 4px; }
.audience-scores strong { display: block; font-size: 19px; letter-spacing: -.6px; font-weight: 650; }
.audience-scores span { display: block; font-size: 8px; letter-spacing: .45px; margin-top: 7px; color: var(--muted); }
.niche-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.niche-chip { font-size: 11px; padding: 11px 4px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--input); font-weight: 450; min-height: 40px; }
.niche-chip:hover { background: var(--surface-raised); color: var(--text); }
.niche-chip[aria-pressed='true'] { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.niche-details { margin-top: 22px; }
.unlocked { color: var(--green); font-size: 10px; }
.section-description { color: var(--muted); font-size: 12px; margin: -10px 0 20px; }
.addon-row { padding: 17px 0; border-top: 1px solid var(--border); }
.addon-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.addon-label { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 1; cursor: pointer; }
.addon-label strong { font-size: 13px; display: block; font-weight: 550; }
.addon-label small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.switch { appearance: none; width: 38px; height: 22px; background: #555; border-radius: 20px; position: relative; flex-shrink: 0; cursor: pointer; margin: 0; }
.switch::before { content: ''; position: absolute; top: 3px; left: 3px; height: 16px; width: 16px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::before { transform: translateX(16px); }
.addon-term { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 12px; }
.addon-term select { border: 1px solid var(--border); background: var(--input); color: var(--text); border-radius: 6px; padding: 7px 10px; }
.addon-term[hidden] { display: none; }

/* Live quote */
.quote-panel { border-top: 3px solid var(--accent); padding-top: 24px; background: linear-gradient(160deg, var(--accent-soft), transparent 25%), var(--surface); }
.quote-icon { font-size: 19px; color: var(--accent-text); line-height: 1; }
.live { display: flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: .6px; color: var(--green); font-weight: 550; }
.live i { height: 5px; width: 5px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px #77d3a425; }
.estimate-heading { font-size: 10px; letter-spacing: 1.3px; color: var(--muted); margin-top: 28px; }
.main-price { font-size: clamp(40px, 5vw, 62px); font-weight: 750; letter-spacing: -2.8px; line-height: 1.3; margin: 5px 0; color: var(--text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.price-range { font-size: 12px; color: var(--muted); }
.quote-divider { border-top: 1px solid var(--border); margin: 25px 0 20px; }
.placement-header { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .6px; color: var(--muted); margin-bottom: 12px; }
.placement { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--border); padding: 15px 13px; border-radius: 10px; margin-top: 9px; background: var(--input); }
.placement.selected { border-color: var(--accent-border); background: var(--accent-soft); }
.placement input[type='checkbox'] { height: 17px; width: 17px; accent-color: var(--button); margin: 0; }
.placement label { cursor: pointer; min-width: 0; }
.placement strong { display: block; font-size: 13px; font-weight: 550; }
.placement small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.placement-price { text-align: right; }
.placement-price > span { font-size: 17px; letter-spacing: -.5px; font-weight: 650; display: block; font-variant-numeric: tabular-nums; }
.quantity { width: 54px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; color: var(--text); font-size: 11px; padding: 4px; margin-top: 7px; }
.breakdown { margin: 20px 0 0; display: grid; gap: 10px; }
.breakdown-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.breakdown-row.total { color: var(--text); font-size: 13px; font-weight: 650; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.insight { display: flex; align-items: flex-start; gap: 10px; background: var(--input); padding: 14px; border: 1px solid var(--border); border-radius: 9px; margin: 22px 0; color: var(--muted); }
.insight > span { color: var(--accent-text); font-size: 17px; }
.insight p { margin: 0; font-size: 11px; line-height: 1.8; }
.currency-controls { margin-bottom: 20px; }
.primary { border: 1px solid transparent; background: var(--button); color: #fff; border-radius: 9px; padding: 13px 16px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; }
.primary:hover:not(:disabled) { background: #c90000; box-shadow: 0 4px 18px #ff000020; }
.full { width: 100%; }
.button-note { font-size: 10px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.count { background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-border); font-size: 10px; border-radius: 6px; padding: 3px 8px; }
.empty-state { text-align: center; font-size: 12px; color: var(--muted); line-height: 1.9; padding: 12px 0 22px; }
.discount-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; }
.discount-row .input-shell { width: 85px; }
.discount-row input { padding: 9px 10px; }
.package-total { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 13px; font-weight: 550; }
.package-total strong { font-size: 24px; letter-spacing: -.7px; }
.package-savings { font-size: 10px; color: var(--green); text-align: right; margin-top: 4px; }
.package-item { padding: 14px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.package-item strong { font-size: 13px; font-weight: 550; }
.package-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.package-item > div:last-child { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.remove-button { border: 0; background: transparent; color: var(--muted); padding: 6px; font-size: 18px; }
.remove-button:hover { color: var(--accent-text); }
.export-panel > .field { margin-bottom: 16px; }
.secondary { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 11px; font-weight: 500; min-height: 40px; }
.secondary:hover { background: var(--surface-raised); }
.export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 17px; }
.save-actions { display: flex; justify-content: center; gap: 16px; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 20px; }
.text-button { border: 0; background: transparent; color: var(--accent-text); padding: 6px 0; font-size: 11px; }
.text-button:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.privacy-note { text-align: center; color: var(--muted); font-size: 10px; margin: 13px 0 0; }
.methodology { padding: 20px 24px; scroll-margin-top: 24px; }
.methodology summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 550; display: flex; justify-content: space-between; gap: 10px; }
.methodology summary::-webkit-details-marker { display: none; }
.methodology summary span { color: var(--accent-text); }
.methodology p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.bottom-note { display: flex; align-items: center; gap: 18px; padding: 30px 0; margin: 34px 0 12px; border-top: 1px solid var(--border); }
.bottom-note > span:first-child { font-size: 38px; color: var(--accent-text); }
h3 { font-size: 14px; margin: 0 0 6px; font-weight: 600; }
.bottom-note p { font-size: 12px; color: var(--muted); margin: 0; max-width: 650px; }
.free-small { font-size: 9px; letter-spacing: 1px; white-space: nowrap; margin-left: auto; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); padding-top: 25px !important; padding-bottom: 28px !important; border-top: 1px solid var(--border); }
.footer-brand { font-weight: 650; color: var(--text); }
.footer-brand span { font-weight: 400; color: var(--muted); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 15px); border: 1px solid var(--border); background: var(--text); color: var(--surface); padding: 13px 20px; border-radius: 10px; font-size: 12px; opacity: 0; transition: .2s; pointer-events: none; z-index: 50; max-width: 90vw; box-shadow: var(--shadow); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.skip-link { position: fixed; top: -60px; left: 10px; background: var(--surface); padding: 10px; z-index: 100; }
.skip-link:focus { top: 10px; }

/* Keep exports white and ink-friendly, with the same red branding. */
dialog { border: 1px solid var(--border); border-radius: 14px; padding: 0; width: min(780px, 94vw); max-height: 90vh; background: var(--surface); color: var(--text); }
dialog::backdrop { background: #000a; backdrop-filter: blur(5px); }
.dialog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--border); font-size: 12px; }
.dialog-toolbar > div { display: flex; gap: 8px; }
#print-card-content { padding: 40px; background: white; color: #171717; color-scheme: light; }
.card-top { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #ff0000; padding-bottom: 24px; }
.card-top h2 { font-size: 28px; overflow-wrap: anywhere; }
.card-top p { font-size: 12px; color: #646464; overflow-wrap: anywhere; }
.card-kicker { font-size: 10px; letter-spacing: 2px; color: #c90000; }
.card-quote { font-size: 46px; font-weight: 700; letter-spacing: -2px; color: #c90000; margin: 25px 0 0; }
.card-meta { font-size: 12px; color: #646464; margin-bottom: 25px; }
.card-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.card-table td, .card-table th { padding: 12px 0; border-bottom: 1px solid #e3e3e3; text-align: left; }
.card-table td:last-child, .card-table th:last-child { text-align: right; white-space: nowrap; }
.card-section { font-size: 14px; margin: 24px 0 8px; }
.card-notes { font-size: 11px; color: #646464; line-height: 1.8; margin-top: 28px; }
.card-footer { font-size: 10px; color: #646464; border-top: 1px solid #e3e3e3; padding-top: 16px; margin-top: 30px; }

@media (max-width: 1000px) {
  .hero-note { width: 235px; }
  .hero-note-bottom { gap: 9px; }
  .hero-note-top { font-size: 7px; }
}
@media (max-width: 850px) {
  .container { padding: 0 24px; }
  .site-header { padding: 0 24px; }
  .panel { padding: 20px; }
  .hero-note { display: none; }
  .workspace { gap: 16px; grid-template-columns: 1fr 1fr; }
  .header-right { gap: 14px; }
  .small-note { font-size: 9px; }
  .two-col { gap: 10px; }
  .placement { padding: 12px 9px; gap: 8px; }
  .placement-price > span { font-size: 15px; }
  .platform-tab { padding: 10px 12px; }
  .unlocked { font-size: 9px; }
  .niche-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .site-header { height: 70px; padding: 0 20px; }
  .brand { font-size: 20px; }
  .brand-icon { width: 34px; height: 27px; }
  .header-link, .free-pill { display: none; }
  .container { padding: 0 18px; }
  .hero { padding: 36px 0 26px; }
  h1 { letter-spacing: -1.6px; font-size: clamp(30px, 8.5vw, 42px); }
  .hero p { font-size: 13px; }
  .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .platform-tabs { overflow-x: auto; scrollbar-width: thin; margin-bottom: 20px; width: 100%; }
  .platform-tab { padding: 9px 12px; font-size: 11px; }
  .workspace { grid-template-columns: 1fr; gap: 20px; }
  .panel { padding: 22px; }
  .niche-grid { grid-template-columns: repeat(3, 1fr); }
  .niche-chip { font-size: 10px; }
  .bottom-note { align-items: flex-start; }
  .free-small { display: none; }
  footer { flex-direction: column; gap: 7px; }
  .dialog-toolbar { flex-wrap: wrap; }
  #print-card-content { padding: 24px; }
  .card-top { flex-direction: column; }
  .main-price { font-size: 52px; }
  .desktop-break { display: none; }
}
@media (max-width: 360px) {
  .panel { padding: 17px; }
  .field { font-size: 11px; }
  .niche-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { gap: 6px; }
  .small-note { font-size: 8px; }
  .audience-scores strong { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: white; color: #171717; }
  body > *:not(#rate-dialog) { display: none !important; }
  #rate-dialog { position: static; display: block !important; width: 100%; max-width: none; max-height: none; overflow: visible; border: 0; border-radius: 0; margin: 0; padding: 0; background: white; }
  #rate-dialog::backdrop, .dialog-toolbar { display: none; }
  #print-card-content { padding: 0; }
  .card-table tr, .card-top { break-inside: avoid; }
  .card-section { break-after: avoid; }
  .card-quote { font-size: 42px; }
}
