:root {
  color-scheme: light;
  --ink: #17154a;
  --violet: #28206b;
  --violet-soft: #514985;
  --coral: #ee4d2d;
  --pink: #f7bfd1;
  --paper: #fff9f5;
  --rose: #fff6f9;
  --line: #f0d9e1;
  --white: #fff;
  --muted: #676481;
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input { font: inherit; }
a { color: inherit; }
.page-width, .site-header { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.site-header { height: 88px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50% 50% 50% 15%; background: var(--coral); color: var(--white); font-family: Georgia, serif; font-size: 17px; font-style: italic; font-weight: 700; letter-spacing: -2px; padding-right: 2px; }
.brand-name { font-size: 13px; font-weight: 800; letter-spacing: .01em; line-height: 1.2; }
.brand-name span { display: block; color: var(--violet-soft); font-family: Georgia, serif; font-size: 14px; font-style: italic; font-weight: 400; }
.header-link { color: var(--violet); font-size: 13px; font-weight: 800; text-decoration: none; }
.header-link span { color: var(--coral); margin-left: 4px; }

.hero { position: relative; min-height: 404px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; overflow: hidden; border-radius: 25px; padding: 48px 62px 48px 68px; background: linear-gradient(122deg, #17154a 0%, #28206b 100%); color: var(--white); box-shadow: 0 20px 52px rgba(23, 21, 74, .12); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 300px; height: 300px; top: -189px; right: 9%; background: rgba(255, 255, 255, .065); }
.hero::after { width: 195px; height: 195px; bottom: -130px; left: -100px; background: rgba(238, 77, 45, .15); }
.hero-copy { position: relative; z-index: 2; max-width: 560px; }
.eyebrow { margin: 0 0 15px; color: var(--pink); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.sparkle { color: var(--coral); font-size: 15px; margin-right: 5px; }
.hero h1 { max-width: 560px; margin: 0; font-size: clamp(38px, 5.1vw, 58px); letter-spacing: -.055em; line-height: 1.02; }
.hero h1 span { color: var(--pink); font-family: Georgia, serif; font-size: 1.04em; font-style: italic; font-weight: 400; letter-spacing: -.04em; }
.hero-description { max-width: 410px; margin: 19px 0 25px; color: #eeeaf9; font-size: 15px; }
.hero-cta { display: inline-flex; align-items: center; gap: 17px; padding: 12px 17px; border-radius: 9px; background: var(--coral); color: var(--white); font-size: 13px; font-weight: 900; text-decoration: none; box-shadow: 3px 4px 0 var(--pink); transition: transform .18s ease, box-shadow .18s ease; }
.hero-cta:hover { transform: translate(2px, 2px); box-shadow: 1px 2px 0 var(--pink); }
.hero-cta:focus-visible, .header-link:focus-visible, .brand:focus-visible, .reset-button:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }

.hero-art { position: relative; z-index: 1; min-height: 290px; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px dashed rgba(247, 191, 209, .44); border-radius: 50%; }
.orbit-one { width: 240px; height: 240px; transform: rotate(-18deg) scaleX(1.15); }
.orbit-two { width: 185px; height: 185px; border-color: rgba(238, 77, 45, .56); transform: rotate(34deg) scaleY(.8); }
.roas-sticker { position: relative; width: 170px; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 8px solid rgba(255, 255, 255, .12); border-radius: 50%; background: var(--pink); color: var(--ink); transform: rotate(7deg); box-shadow: 0 13px 34px rgba(7, 4, 37, .2); }
.roas-sticker::before { content: ""; position: absolute; inset: 9px; border: 1px dashed rgba(23, 21, 74, .34); border-radius: 50%; }
.roas-sticker span { font-size: 14px; font-weight: 950; letter-spacing: .16em; }
.roas-sticker strong { color: var(--coral); font-size: 59px; line-height: .94; }
.roas-sticker small { margin-top: 4px; font-size: 9px; font-weight: 700; }
.art-spark { position: absolute; color: var(--coral); font-size: 23px; }
.spark-one { top: 29px; right: 30px; }
.spark-two { bottom: 37px; left: 18px; color: var(--pink); font-size: 18px; }
.art-caption { position: absolute; right: 3px; bottom: 1px; display: flex; align-items: center; gap: 8px; color: #e9e4f5; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.art-caption span { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

.calculator { padding-top: 58px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 7px 22px; }
.eyebrow-light { margin-bottom: 8px; color: var(--coral); }
.section-heading h2, .how-it-works h2 { margin: 0; font-size: clamp(25px, 3vw, 32px); letter-spacing: -.04em; line-height: 1.15; }
.section-heading > div > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.calculator-badge { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--rose); color: var(--violet); font-size: 11px; font-weight: 800; }
.calculator-badge span { color: var(--coral); }

.calculator-card { display: grid; grid-template-columns: .94fr 1.06fr; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 12px 34px rgba(40, 32, 107, .07); }
.inputs-panel { padding: 30px 34px 26px; }
.panel-title { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.step-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--rose); color: var(--coral); font-size: 13px; font-weight: 900; }
.panel-title h3, .results-topline h3 { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: -.025em; }
.panel-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.field { display: block; margin: 0 0 16px; }
.field-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 900; }
.input-wrap { height: 46px; display: flex; align-items: center; overflow: hidden; border: 1px solid #e6dfeb; border-radius: 9px; background: #fff; transition: border .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(40, 32, 107, .1); }
.input-prefix, .input-suffix { flex: 0 0 auto; padding: 0 13px; color: var(--violet-soft); font-size: 13px; font-weight: 800; }
.input-suffix { padding-right: 15px; }
.input-wrap input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; font-weight: 800; }
.field-help { display: block; margin-top: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.field-error { display: block; margin-top: 4px; color: #a92f20; font-size: 11px; font-weight: 700; line-height: 1.4; }
.field-error:empty { display: none; }
.input-wrap:has(input[aria-invalid="true"]) { border-color: var(--coral); box-shadow: 0 0 0 2px rgba(238, 77, 45, .1); }
.reset-button { display: inline-flex; align-items: center; gap: 7px; margin-top: 1px; padding: 4px 0; border: 0; background: none; color: var(--violet-soft); cursor: pointer; font-size: 11px; font-weight: 800; }
.reset-button span { color: var(--coral); font-size: 16px; }
.reset-button:hover { color: var(--coral); }

.results-panel { padding: 30px 34px 25px; background: var(--violet); color: var(--white); }
.results-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.results-topline .eyebrow { margin-bottom: 5px; }
.results-topline h3 { font-size: 17px; }
.results-icon { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: var(--pink); font-size: 19px; }
.result-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-card { min-height: 135px; padding: 15px 15px 13px; border-radius: 12px; color: var(--ink); }
.result-min { background: var(--rose); }
.result-ideal { background: var(--pink); }
.result-label-row { display: flex; align-items: center; gap: 7px; }
.result-label-row h4 { margin: 0; font-size: 11px; font-weight: 900; }
.result-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--coral); }
.result-ideal .result-dot { background: var(--violet); }
.info-tip { width: 15px; height: 15px; display: grid; place-items: center; margin-left: auto; border: 1px solid rgba(23,21,74,.32); border-radius: 50%; color: var(--violet); cursor: help; font-family: Georgia, serif; font-size: 10px; font-weight: 700; }
.info-tip:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.result-value { margin: 10px 0 1px; font-size: clamp(32px, 4vw, 42px); font-weight: 950; letter-spacing: -.06em; line-height: 1; }
.result-value span { padding-left: 3px; color: var(--coral); font-size: .57em; letter-spacing: -.02em; }
.result-description { margin: 6px 0 0; color: #55516e; font-size: 10px; line-height: 1.35; }
.result-summary { display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 11px 13px; border: 1px solid rgba(247, 191, 209, .25); border-radius: 10px; background: rgba(255,255,255,.07); }
.summary-icon { color: var(--pink); font-size: 15px; line-height: 1.45; }
.result-summary p { margin: 0; color: #f0ecf8; font-size: 11px; line-height: 1.5; }
.result-summary strong { color: var(--white); }
.result-details { display: grid; gap: 8px; margin-top: 14px; }
.result-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.15); }
.result-details span { color: #d1cde5; font-size: 10px; }
.result-details strong { text-align: right; font-size: 11px; }
.result-details > div:nth-child(2) { align-items: flex-start; flex-direction: column; gap: 4px; margin-top: 3px; padding: 12px 14px; border: 0; border-radius: 10px; background: var(--pink); }
.result-details > div:nth-child(2) span { color: var(--violet); font-size: 10px; font-weight: 900; }
.result-details > div:nth-child(2) strong { color: var(--ink); font-size: 28px; font-weight: 950; letter-spacing: -.04em; line-height: 1.1; text-align: left; }
.result-details > div:first-child strong { color: var(--pink); font-size: 13px; }
.calculation-note { max-width: 910px; margin: 14px 8px 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.calculation-note span { padding-right: 4px; color: var(--coral); }
.formula-details { margin: 12px 8px 0; color: var(--muted); font-size: 11px; }
.formula-details summary { width: fit-content; color: var(--violet); cursor: pointer; font-weight: 800; }
.formula-details summary:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.formula-details p { max-width: 900px; margin: 7px 0 0; line-height: 1.5; }
.formula-details strong { color: var(--ink); }

.how-it-works { display: flex; align-items: flex-start; gap: 14px; margin-top: 31px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 246, 249, .78); }
.how-icon { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--pink); color: var(--violet); font-family: Georgia, serif; font-size: 16px; font-weight: 900; }
.how-it-works h2 { font-size: 15px; }
.how-it-works p { margin: 6px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.how-it-works strong { color: var(--violet); }

.site-footer { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; border-top: 1px solid var(--line); }
.footer-brand .brand-mark { width: 31px; height: 31px; font-size: 14px; }
.footer-brand .brand-name { font-size: 11px; }
.footer-brand .brand-name span { font-size: 12px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 10px; }
.site-footer p span { padding-left: 3px; color: var(--coral); font-size: 15px; }
.error .result-summary { border-color: rgba(238, 77, 45, .55); background: rgba(238, 77, 45, .12); }
.error .result-value { color: var(--pink); }

@media (max-width: 760px) {
  .page-width, .site-header { width: min(100% - 32px, 560px); }
  .site-header { height: 72px; }
  .hero { min-height: 0; grid-template-columns: 1fr; padding: 37px 30px 26px; border-radius: 19px; }
  .hero h1 { max-width: 460px; font-size: clamp(39px, 10vw, 54px); }
  .hero-description { max-width: 430px; font-size: 14px; }
  .hero-art { min-height: 210px; margin-top: 16px; }
  .orbit-one { width: 190px; height: 190px; }
  .orbit-two { width: 150px; height: 150px; }
  .roas-sticker { width: 138px; height: 138px; border-width: 6px; }
  .roas-sticker strong { font-size: 46px; }
  .roas-sticker span { font-size: 12px; }
  .roas-sticker small { font-size: 8px; }
  .art-caption { right: 0; bottom: 0; }
  .calculator { padding-top: 41px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-inline: 2px; }
  .calculator-card { grid-template-columns: 1fr; }
  .inputs-panel, .results-panel { padding: 25px 22px; }
  .results-panel { border-radius: 0 0 19px 19px; }
  .result-value { font-size: clamp(34px, 9vw, 42px); }
}

@media (max-width: 420px) {
  .page-width, .site-header { width: calc(100% - 24px); }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 11px; }
  .brand-name span { font-size: 12px; }
  .header-link { font-size: 10px; }
  .hero { padding: 32px 22px 24px; }
  .calculator-badge { font-size: 10px; }
  .result-cards { gap: 8px; }
  .result-card { min-height: 132px; padding: 12px 10px; }
  .result-label-row { gap: 5px; }
  .result-label-row h4 { font-size: 10px; }
  .result-description { font-size: 9px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 9px; padding-block: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
