/* efelle Website ROI Calculator v2 — design tokens from the Claude Design handoff */
:root {
  --bg: #FAF6F0; --ink: #16130F; --card-border: #EAE1D4; --hair: #EFE7DB; --input-border: #DDD2C2;
  --body: #5C544A; --cap: #8A8073; --faint: #B3A794; --dark-muted: #C9BFB2;
  --orange: #E4551C; --orange-hover: #C94812; --orange-deep: #B8430F; --orange-light: #F08A4B; --orange-pale: #F5A876;
  --tint: #FBE8DD; --tint-soft: #FBF3EA; --tint-border: #EFE0CC; --track: #E5DACA; --bar-gray: #D8CCBC; --on-dark: #FDF9F3;
  --serif: 'Source Serif 4', Georgia, serif; --sans: 'Public Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
a { color: var(--orange-deep); } a:hover { color: var(--orange); }
::selection { background: #FBD9C4; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
select option { background: #fff; color: var(--ink); }
details > summary { cursor: pointer; list-style: none; } details > summary::-webkit-details-marker { display: none; }

/* range */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--track); margin: 10px 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--track); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(22,19,15,.3); margin-top: -7px; cursor: pointer; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--track); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(22,19,15,.3); cursor: pointer; }

/* nav */
.nav { background: var(--ink); color: var(--on-dark); }
.nav-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--on-dark); text-decoration: none; }
.mark { width: 24px; height: 24px; border-radius: 50%; background: var(--orange); display: inline-grid; place-items: center; overflow: hidden; }
.mark img { width: 24px; height: 24px; display: block; }
.nav-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); white-space: nowrap; }
.spacer { flex: 1; }
.pill-ghost { background: transparent; border: 1px solid rgba(253,249,243,.35); color: var(--on-dark); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill-ghost:hover { background: rgba(253,249,243,.12); color: var(--on-dark); }
@media (max-width: 640px) { .nav-label, #guide-link { display: none; } }

/* layout */
.page { max-width: 1180px; margin: 0 auto; padding: 32px 20px 48px; }
.kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-deep); font-weight: 700; }
.kicker.sm { font-size: 10px; }
.kicker.light { color: var(--orange-light); }
.kicker.dark { color: var(--body); margin-bottom: 8px; }
.card { background: #fff; border: 1px solid var(--card-border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-title { font-size: 17px; font-weight: 600; font-family: var(--serif); }
.card-sub { font-size: 12px; line-height: 1.5; color: var(--cap); }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.row > * { flex: 1 1 380px; min-width: 0; }
.row.charts { margin-bottom: 28px; }
.link-btn { background: none; border: none; padding: 0; font: inherit; font-weight: 700; color: var(--orange-deep); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--orange); }
.btn-primary { background: var(--orange); border: 1px solid var(--orange); color: var(--on-dark); border-radius: 999px; padding: 11px 22px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; align-self: flex-start; }
.btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--on-dark); }
.btn-primary.block { width: 100%; font-size: 13px; font-weight: 700; padding: 11px 18px; align-self: stretch; text-align: center; }
.btn-primary.sm { padding: 9px 18px; font-size: 13px; }
.pill-outline { background: transparent; border: 1px solid #DDC9B2; color: var(--orange-deep); border-radius: 999px; padding: 8px 18px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; text-decoration: none; }
.pill-outline:hover { background: var(--tint); color: var(--orange-deep); }

/* hero */
.hero { display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; margin-bottom: 24px; }
.hero-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.01em; max-width: 20ch; text-wrap: pretty; }
.biz-inline { color: var(--orange); }
.intro { margin: 0; max-width: 52ch; font-size: 14.5px; line-height: 1.55; color: var(--body); }
.hero-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.text-input, .select-input { background: #fff; border: 1px solid var(--input-border); border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: inherit; color: var(--ink); }
.text-input { max-width: 220px; width: 100%; } .select-input { width: 160px; max-width: 190px; }
.step1 { flex: 1 1 380px; box-shadow: 0 4px 16px rgba(22,19,15,.06); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--body); }
.field-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.avg-pill { background: var(--tint-soft); border: 1px solid var(--tint-border); color: var(--orange-deep); font-size: 10px; font-family: inherit; font-weight: 700; cursor: pointer; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.avg-pill:hover { background: var(--tint); }
.input-wrap { position: relative; display: block; }
.input-wrap input { background: #fff; border: 1px solid var(--input-border); border-radius: 8px; padding: 8px 10px; font-size: 15px; font-weight: 600; font-family: inherit; color: var(--ink); width: 100%; }
.input-wrap input.pad-r58 { padding-right: 58px; } .input-wrap input.pad-r30 { padding-right: 30px; } .input-wrap input.pad-l24 { padding-left: 24px; }
.adorn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 400; color: var(--faint); pointer-events: none; }
.adorn.left { left: 10px; right: auto; }
.suffix .adorn { font-size: 10.5px; }
.summary-strip { background: var(--tint-soft); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.summary-text { font-size: 11.5px; line-height: 1.5; color: var(--body); flex: 1; min-width: 180px; }
.summary-strong { color: var(--orange-deep); font-weight: 700; }
.summary-stat { text-align: right; }
.summary-mo { display: block; font-size: 16px; font-weight: 600; font-family: var(--serif); color: var(--ink); line-height: 1.2; }
.summary-mo .unit { font-size: 11px; color: var(--cap); font-family: var(--sans); font-weight: 400; }
.summary-yr { display: block; font-size: 11px; color: var(--cap); }

/* market panel */
.market { border-radius: 16px; padding: 28px 32px; margin-bottom: 24px; background: var(--ink); color: var(--on-dark); box-shadow: 0 12px 32px rgba(22,19,15,.18); }
.market h2 { font-family: var(--serif); font-weight: 600; font-size: 23px; margin: 6px 0 18px; max-width: 34ch; }
.market-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.market-stats .v { font-size: 34px; font-weight: 600; font-family: var(--serif); color: var(--orange-light); }
.market-stats .k { font-size: 12px; line-height: 1.45; color: var(--dark-muted); }
.callout { margin-top: 20px; border-radius: 12px; background: rgba(228,85,28,.12); border: 1px solid rgba(240,138,75,.45); border-left: 4px solid var(--orange); padding: 16px 20px; }
.callout .kicker { margin-bottom: 6px; }
.callout-text { font-size: 14px; line-height: 1.6; color: var(--on-dark); max-width: 72ch; }
.callout-text b { color: var(--orange-light); font-weight: 700; }
.callout-foot { font-size: 10.5px; color: var(--dark-muted); margin-top: 8px; }

/* sticky HUD */
.hud { position: sticky; top: 0; z-index: 50; background: var(--bg); padding: 8px 0 12px; margin-bottom: 16px; display: flex; flex-direction: column; }
.dials { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dial { background: #fff; border: 1px solid var(--card-border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: 0 4px 14px rgba(22,19,15,.08); }
.gauge { position: relative; width: 104px; }
.gauge svg { width: 104px; display: block; }
.gauge .track { fill: none; stroke: #F0E7D9; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 209.44 314.16; }
.gauge .fill { fill: none; stroke: var(--orange); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .35s; }
.gauge-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding-top: 3px; }
.gauge-val { font-size: 21px; font-weight: 600; font-family: var(--serif); line-height: 1; }
.gauge-sub { font-size: 9px; color: var(--cap); max-width: 70px; text-align: center; }
.dial-foot { font-size: 11.5px; color: var(--body); }
.dial-foot .lift { color: var(--orange-deep); font-weight: 600; }
.bar { background: var(--ink); color: var(--on-dark); border-radius: 12px; box-shadow: 0 10px 28px rgba(22,19,15,.28); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 10px 20px; }
.bar-stat { display: flex; flex-direction: column; }
.bar-label { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dark-muted); }
.bar-hero { font-size: 22px; font-weight: 600; font-family: var(--serif); color: var(--orange-light); line-height: 1.1; }
.bar-val { font-size: 15px; font-weight: 600; }
.bar-val .arrow { color: var(--cap); } .bar-val .hi, .bar-val.hi { color: var(--orange-light); }
@media (max-width: 720px) { .hud { position: static; } .dials { grid-template-columns: repeat(3, 1fr); gap: 8px; } .dial { padding: 8px 4px; } .gauge, .gauge svg { width: 84px; } .gauge-val { font-size: 17px; } .bar { gap: 6px 16px; padding: 10px 14px; } .bar-hero { font-size: 18px; } }

/* step 2 */
.row.two { align-items: stretch; }
.step2 { flex: 1 1 320px; max-width: 460px; }
.revenue-col { flex: 2 1 420px; min-width: 0; display: flex; flex-direction: column; }
.seg { display: inline-flex; align-self: flex-start; border: 1px solid #E0D6C8; border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { padding: 8px 15px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: none; background: transparent; color: var(--ink); font-family: inherit; }
.seg button.active { background: var(--orange); color: var(--on-dark); }
.sliders { display: flex; flex-direction: column; gap: 12px; }
.sliders.divided { border-top: 1px solid var(--hair); padding-top: 10px; }
.slider-row { display: grid; grid-template-columns: minmax(90px, 125px) 1fr 58px; gap: 10px; align-items: center; }
.slider-label { font-size: 12px; font-weight: 600; line-height: 1.3; }
.slider-val { color: var(--orange-deep); font-size: 12.5px; font-weight: 600; text-align: right; }
.footnote { font-size: 10.5px; color: var(--cap); padding-top: 4px; }
.footnote .link-btn { font-size: 10.5px; }

/* revenue card */
.revenue-card { border-radius: 16px; padding: 24px 28px; background: linear-gradient(135deg, #FFFFFF, #FBE8DD); border: 1px solid #F0C8AC; box-shadow: 0 8px 24px rgba(228,85,28,.10); display: flex; flex-direction: column; justify-content: center; gap: 8px; flex: 1; }
.delta-yr { font-size: clamp(42px, 5vw, 56px); line-height: 1; font-weight: 600; font-family: var(--serif); letter-spacing: -.02em; color: var(--orange); }
.delta-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.delta-mo { font-size: 14px; color: var(--body); white-space: nowrap; }
.delta-line { font-size: 13px; line-height: 1.5; color: var(--body); max-width: 44ch; }
.hi { color: var(--orange-deep); font-weight: 600; }
.spark { margin-top: 6px; }
.spark-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--cap); font-weight: 700; margin-bottom: 4px; }
.spark svg { width: 100%; max-width: 560px; display: block; overflow: visible; }
.spark .grid { stroke: var(--hair); stroke-width: .7; } .spark .grid.base { stroke: var(--input-border); stroke-width: .8; }
.spark text { font-size: 7px; fill: var(--cap); font-family: var(--sans); }
.spark .area { fill: var(--orange); opacity: 0; transition: opacity .8s ease .9s; }
.spark .baseline { fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: 0; transition: opacity .6s ease .5s; }
.spark .line { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s ease-out; }
.spark .dot { fill: var(--orange); stroke: #fff; stroke-width: 1.5; opacity: 0; transition: opacity .4s ease 1.3s; }
.spark.built .area { opacity: .12; } .spark.built .baseline { opacity: 1; } .spark.built .line { stroke-dashoffset: 0; } .spark.built .dot { opacity: 1; }
.legend { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--cap); margin-top: 6px; }
.legend > span { display: flex; align-items: center; gap: 6px; }
.sw { width: 14px; flex: none; display: inline-block; }
.sw.dashed { height: 0; border-top: 2px dashed var(--faint); }
.sw.solid { height: 3px; border-radius: 2px; background: var(--orange); }
.muted-b { font-weight: 600; color: var(--body); }
.legend .hi { font-weight: 700; }

/* ROI */
.roi { margin-bottom: 16px; }
.roi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.roi-val { font-size: 24px; font-weight: 600; font-family: var(--serif); color: var(--orange-deep); }
.roi-cap { font-size: 11.5px; color: var(--cap); }

/* charts */
.chart-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.legend-inline { display: flex; gap: 12px; font-size: 11px; color: var(--cap); }
.legend-inline > span { display: inline-flex; align-items: center; gap: 5px; }
.sw.today { height: 5px; border-radius: 3px; background: var(--bar-gray); } .sw.proj { height: 5px; border-radius: 3px; background: var(--orange); }
.frow { display: grid; grid-template-columns: minmax(72px, 100px) minmax(0, 1fr) minmax(88px, auto); gap: 12px; align-items: center; padding: 6px 0; }
.frow .lbl { font-size: 12.5px; color: var(--body); font-weight: 600; }
.frow .bars { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.frow .b-today { height: 7px; border-radius: 4px; background: var(--bar-gray); transition: width .35s; }
.frow .b-proj { height: 7px; border-radius: 4px; background: linear-gradient(90deg, #F08A4B, #E4551C); transition: width .35s; }
.frow .nums { text-align: right; }
.frow .nums .n { font-size: 13px; font-weight: 600; } .frow .nums .arrow { color: var(--faint); } .frow .nums .p { color: var(--orange-deep); }
.frow .nums .chg { font-size: 11px; color: var(--cap); }
.lrow { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) minmax(80px, auto); gap: 12px; align-items: center; padding: 3px 0; }
.lrow .lbl { font-size: 12.5px; color: var(--body); font-weight: 600; }
.lrow .b { height: 14px; border-radius: 4px; background: linear-gradient(90deg, #F5A876, #E4551C); min-width: 2px; transition: width .35s; }
.lrow .amt { text-align: right; font-size: 13px; } .lrow .amt b { font-weight: 600; color: var(--orange-deep); } .lrow .amt span { font-size: 11px; color: var(--cap); }

/* benchmarks */
.bench { margin-bottom: 28px; }
.bench summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bench-title { font-size: 16px; font-weight: 600; font-family: var(--serif); }
.bench-sub { font-size: 12px; color: var(--cap); }
.bench .show { color: var(--orange-deep); font-size: 12px; font-weight: 700; }
.bench[open] .show { visibility: hidden; }
.bench-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; padding-top: 12px; }
.bench-grid .g-title { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-deep); font-weight: 700; margin-bottom: 8px; }
.brow { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--hair); }
.brow .src { font-size: 12.5px; font-weight: 600; } .brow .src a { color: inherit; text-decoration: none; } .brow .src a:hover { color: var(--orange-deep); text-decoration: underline; }
.brow .note { font-size: 11px; color: var(--cap); text-wrap: pretty; }
.brow .val { font-size: 14px; font-weight: 700; color: var(--orange-deep); white-space: nowrap; }
.bench-foot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--hair); margin-top: 14px; }

/* cta + math */
.cta { flex: 1 1 320px; background: var(--tint); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.cta h2 { font-family: var(--serif); font-weight: 600; font-size: 21px; margin: 0; max-width: 26ch; }
.cta p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--body); max-width: 46ch; }
.math { flex: 1 1 320px; padding: 18px; font-size: 12px; color: var(--cap); }
.math ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; line-height: 1.5; }
.foot { text-align: center; font-size: 11px; color: var(--faint); padding-top: 32px; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(22,19,15,.55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; padding: 22px 24px; max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(22,19,15,.35); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-close { background: transparent; border: 1px solid var(--input-border); border-radius: 50%; width: 32px; height: 32px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--body); font-family: inherit; flex: none; }
.modal-close:hover { background: var(--tint-soft); }
.modal-intro { font-size: 13px; line-height: 1.55; color: var(--body); margin: 10px 0 12px; }
.modal-intro strong { color: var(--ink); }
.mrow { border-top: 1px solid var(--hair); padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
.mrow .name { font-weight: 700; font-size: 13.5px; }
.mrow .amt { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--orange-deep); text-align: right; white-space: nowrap; }
.mrow .amt small { display: block; font-family: var(--sans); font-size: 11px; color: var(--cap); font-weight: 400; }
.mrow .det { grid-column: 1 / -1; font-size: 12px; color: var(--cap); line-height: 1.5; font-weight: 400; }
.mrow .det b { color: var(--ink); }
.mrow .det a { color: var(--orange-deep); }
.mrow.off .name { color: var(--cap); }
.modal-foot { border-top: 1px solid var(--hair); padding-top: 10px; font-size: 12px; color: var(--cap); line-height: 1.5; }
.modal-foot b { color: var(--ink); } .modal-foot a { color: var(--orange-deep); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--on-dark); padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 120; box-shadow: 0 10px 28px rgba(22,19,15,.28); }

@media (max-width: 480px) { .btn-primary, .pill-ghost, .seg button { min-height: 44px; } }
@media print { .nav .pill-ghost, .hud, .btn-primary, .modal-backdrop { display: none !important; } .bench[open] { break-inside: avoid; } }
