/* ============================================================
   Lotus CFO - S Corp Reasonable Salary Calculator
   Current Lotus brand (taken from lotuscfo.com's live CSS, not the
   pre-rebrand brief): deep green, burnt gold CTA, light gold on dark,
   cream surfaces, Playfair Display headlines, DM Sans body.

   Layout follows the v4 preview (dark hero, instrument-style cards),
   without its motion: no pinned scroll, no marquee, no grain, no
   count-up, no stamp. One 250ms fade when a result appears.
   ============================================================ */

:root {
  --green: #123024;
  --green-2: #1a4030;
  --gold: #A35E00;
  --gold-hover: #8c5100;
  --gold-light: #E6D3AC;
  --cream: #F3EFE7;
  --cream-2: #faf8f4;
  --border: #ebe7e2;
  --ink: #242424;
  --muted: #5d5a55;
  --flag: #a4443a;
  --flag-light: #f0b3a6;
  --white: #fff;

  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
picture { display: contents; }
a { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.12; color: var(--ink); }
em { font-style: italic; }

.wrap { width: min(1140px, 92vw); margin-inline: auto; }
.narrow { width: min(780px, 92vw); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .9rem; color: var(--muted); }

.label {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light);
}
.label-dark { color: var(--gold); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--green); color: var(--cream); padding: .75rem 1rem; border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.hero :focus-visible, .verdict :focus-visible, .book :focus-visible, .site-foot :focus-visible, .creds :focus-visible { outline-color: var(--gold-light); }

/* ---------- buttons (same shape as lotuscfo.com) ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .95rem 2rem;
  font-family: var(--sans); font-size: .85rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  background: var(--gold); color: var(--cream);
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--gold-hover); }
.btn-sm { min-height: 44px; padding: .6rem 1.4rem; font-size: .8rem; letter-spacing: .04em; text-transform: none; font-weight: 500; }
.btn-dark { background: var(--green); }
.btn-dark:hover { background: var(--green-2); }
.btn-ghost { background: transparent; color: var(--gold-light); border-color: rgba(230,211,172,.4); }
.btn-ghost:hover { background: rgba(230,211,172,.06); }
@media (max-width: 560px) { .hero-ctas .btn, .card-foot .btn, .gate .btn, .refine .btn, .path .btn { width: 100%; } }

/* ---------- header ---------- */

.site-head { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.logo img { height: 4rem; width: auto; }
@media (max-width: 640px) { .head-row { height: 4.25rem; } .logo img { height: 3.2rem; } }

/* ---------- hero (static) ---------- */

.hero { position: relative; overflow: hidden; background: var(--green); color: var(--cream); }
.hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(18,48,36,.96) 0%, rgba(18,48,36,.82) 40%, rgba(18,48,36,.25) 72%, rgba(18,48,36,.05) 100%);
}
@media (max-width: 760px) { .hero::after { background: linear-gradient(180deg, rgba(18,48,36,.82), rgba(18,48,36,.95)); } }
.hero-inner { position: relative; z-index: 2; padding: clamp(3.5rem, 2rem + 7vw, 8rem) 0 clamp(3.5rem, 2rem + 6vw, 7rem); }
.hero h1 { color: var(--cream); font-size: clamp(2.1rem, 1.2rem + 4.2vw, 4.4rem); max-width: 15ch; margin-top: 1.1rem; }
.hero h1 .gold { color: var(--gold-light); }
.hero-q { font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2rem); color: var(--gold-light); margin-top: 1.1rem; }
.hero-q em { font-style: italic; }
.hero-sub { font-size: clamp(1.02rem, .95rem + .4vw, 1.25rem); color: rgba(243,239,231,.85); max-width: 44ch; margin-top: 1.1rem; }
.hero-note { font-size: .95rem; color: rgba(243,239,231,.7); margin-top: .7rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

/* one short entrance, nothing scroll-driven */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter .3s ease-out both; }
  .fade-in { animation: fadein .25s ease-out both; }
}
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.creds { background: var(--ink); color: var(--gold-light); text-align: center; padding: .9rem 0; }
.creds p { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.creds span { color: rgba(230,211,172,.45); padding: 0 .5rem; }

/* ---------- the calculator ---------- */

.instrument { padding: clamp(3rem, 2.4rem + 4vw, 6rem) 0; }
.sec-head { text-align: center; margin-bottom: 2.2rem; }
.sec-head h2 { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.7rem); margin-top: .7rem; }
.sec-head p { color: var(--muted); margin-top: .6rem; }
.noscript { margin-top: 1.5rem; color: var(--muted); }

.deck {
  background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--gold);
  border-radius: var(--radius); box-shadow: 0 24px 60px rgba(18,48,36,.10);
  padding: clamp(1.4rem, 1rem + 2.4vw, 3rem);
}
.deck-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.8rem; border-bottom: 1px solid var(--border); }
.pips { display: flex; gap: .4rem; }
.pips i { width: 2.2rem; height: 3px; border-radius: 2px; background: var(--border); }
.pips i.done { background: var(--gold); }
.pips i.now { background: var(--green); }
.deck-count { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.card { display: none; flex-direction: column; }
.card.is-on { display: flex; }
.card .q { font-size: clamp(1.45rem, 1.2rem + 1.4vw, 2.1rem); color: var(--green); max-width: 22ch; }
.hint { color: var(--muted); margin-top: .6rem; font-size: .98rem; max-width: 46ch; }

.money { display: flex; align-items: baseline; gap: .35rem; margin: 2rem 0 .3rem; border-bottom: 2px solid var(--border); padding-bottom: .4rem; }
.money:focus-within { border-bottom-color: var(--gold); }
.money .cur { font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); color: var(--gold); line-height: 1; }
.money input {
  flex: 1; min-width: 0; padding: 0; border: 0; outline: none; background: transparent;
  font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 1.4rem + 3.2vw, 3.6rem); line-height: 1.1;
  color: var(--green); font-variant-numeric: tabular-nums lining-nums;
}
.money input::placeholder { color: rgba(18,48,36,.2); }

.quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.quick button {
  min-height: 44px; padding: .5rem 1rem; font: 500 .9rem var(--sans);
  background: var(--cream-2); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
}
.quick button:hover { border-color: var(--gold); }

.err { min-height: 1.4rem; margin-top: .6rem; font-size: .92rem; color: var(--flag); }
.card-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.back { min-height: 44px; padding: 0 .4rem; background: none; border: 0; cursor: pointer; font: 600 .8rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.back:hover { color: var(--ink); }
@media (max-width: 560px) { .card-foot { flex-direction: column-reverse; align-items: stretch; } }

/* ---------- the result ---------- */

.result:focus { outline: none; }
.verdict {
  background: var(--green); color: var(--cream); border-radius: var(--radius);
  border-top: 3px solid var(--gold-light);
  padding: clamp(1.5rem, 1rem + 2.6vw, 3rem);
}
.verdict-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.edit { min-height: 44px; background: none; border: 0; cursor: pointer; color: var(--gold-light); font: 500 .9rem var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.range-big {
  font-family: var(--serif); font-weight: 700; color: var(--white);
  font-size: clamp(2.4rem, 1.4rem + 5vw, 4.8rem); line-height: 1.02; margin-top: .5rem;
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em;
}
.likely { margin-top: .6rem; color: var(--gold-light); font-size: 1.05rem; }
.likely strong { font-weight: 700; }
.status {
  display: inline-block; margin-top: 1.1rem; padding: .35rem .8rem;
  border: 1px solid var(--gold-light); border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light);
}
.status.is-flag { color: var(--flag-light); border-color: var(--flag-light); }
.verdict-say { font-family: var(--serif); font-weight: 600; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem); color: var(--white); margin-top: 1.1rem; line-height: 1.25; }
.verdict-sub { margin-top: .6rem; color: rgba(243,239,231,.85); max-width: 52ch; }
.inputs { margin-top: .8rem; font-size: .85rem; color: rgba(243,239,231,.6); }

.plot { display: block; width: 100%; height: auto; margin-top: 1.6rem; overflow: visible; }
.p-track { stroke: rgba(243,239,231,.25); stroke-width: 2; }
.p-band { fill: rgba(230,211,172,.28); stroke: var(--gold-light); stroke-width: 1.5; }
.p-focus { fill: var(--gold-light); }
.p-lab { fill: rgba(243,239,231,.8); font: 600 17px var(--sans); }
.p-you { fill: var(--white); font: 600 17px var(--sans); }
.p-mark { stroke: var(--white); stroke-width: 3; }
.p-mark.is-flag { stroke: var(--flag-light); }

.stats { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 1.4rem; border-radius: var(--radius); overflow: hidden; }
@media (min-width: 680px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats > div { background: var(--white); padding: 1.2rem 1.3rem; }
.stats .k { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; color: var(--green); font-variant-numeric: tabular-nums; text-transform: capitalize; }
.stats .k.is-flag { color: var(--flag); }
.stats .lab { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.45; margin-top: .3rem; }

.note { background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--gold); padding: 1rem 1.2rem; margin-top: 1rem; font-size: .96rem; border-radius: var(--radius); }

.panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.3rem, 1rem + 2vw, 2.4rem); margin-top: 1.4rem; }
.panel h3 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); color: var(--green); margin-top: .4rem; }
.panel > p, .panel summary p { color: var(--muted); margin-top: .5rem; }

.refine summary { list-style: none; cursor: pointer; position: relative; padding-right: 2.5rem; }
.refine summary::-webkit-details-marker { display: none; }
.refine summary::after { content: '+'; position: absolute; right: 0; top: .2rem; font: 400 1.8rem var(--sans); color: var(--gold); }
.refine[open] summary::after { content: '\2212'; }
.refine-form { margin-top: 1.4rem; }
.choice { border: 0; margin-top: 1.4rem; }
.choice legend { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.choice .hint { margin-top: .2rem; font-size: .92rem; }
.opts { display: grid; gap: .5rem; margin-top: .8rem; }
@media (min-width: 600px) { .opts { grid-template-columns: 1fr 1fr; } }
.opts label { display: flex; align-items: center; gap: .7rem; min-height: 48px; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--cream-2); }
.opts label:hover { border-color: var(--gold); }
.opts input { accent-color: var(--green); width: 1.1rem; height: 1.1rem; flex: none; }
.opts label:has(input:checked) { border-color: var(--green); background: #eef2ef; }

.fields { display: grid; gap: 1rem; margin-top: 1.4rem; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: .4rem; }
.field .opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: .7rem .9rem;
  font: 400 1rem var(--sans); color: var(--ink);
  background: var(--cream-2); border: 1px solid #d8d2c8; border-radius: var(--radius);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(163,94,0,.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gate form { position: relative; }
.privacy { font-size: .86rem; color: var(--muted); margin-top: .8rem; }

.report:focus { outline: none; }
.report .sent { color: var(--green); font-weight: 600; margin-top: .5rem; }
.link-btn { min-height: 44px; background: none; border: 0; padding: 0; cursor: pointer; font: 600 1rem var(--sans); color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.link-btn[disabled] { opacity: .5; cursor: default; }
.verdict:focus { outline: none; }
.card .q:focus { outline: none; }
.report section { margin-top: 1.6rem; }
.report h4 { font-size: 1.15rem; color: var(--ink); margin-bottom: .4rem; }
.report p + p { margin-top: .7rem; }
.report ul { padding-left: 1.3rem; }
.report li + li { margin-top: .4rem; }
.report .small { margin-top: 1.6rem; }

.book { background: var(--green); color: rgba(243,239,231,.86); border-radius: var(--radius); border-top: 3px solid var(--gold); padding: clamp(1.4rem, 1rem + 2vw, 2.6rem); margin-top: 1.4rem; }
.book h3 { color: var(--white); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.book > p { margin-top: .5rem; }
.paths { display: grid; gap: 1rem; margin-top: 1.4rem; }
@media (min-width: 720px) { .paths { grid-template-columns: 1fr 1fr; } }
.path { border: 1px solid rgba(230,211,172,.22); border-radius: var(--radius); padding: 1.3rem; display: flex; flex-direction: column; }
.path h4 { color: var(--white); font-size: 1.2rem; }
.path p { font-size: .95rem; margin: .5rem 0 1.2rem; }
.path .btn { margin-top: auto; }
.deadline { margin-top: 1.3rem; padding: .85rem 1rem; border: 1px solid rgba(230,211,172,.3); background: rgba(230,211,172,.08); border-radius: var(--radius); color: var(--gold-light); font-weight: 500; }

/* ---------- the argument ---------- */

.why { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: clamp(3rem, 2.4rem + 3vw, 5rem) 0; }
.why-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 2.6rem; } }
.why article { border-top: 2px solid var(--gold); padding-top: 1.2rem; }
.why-img { display: block; margin-bottom: 1.2rem; }
.why-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; background: var(--green); }
.why h3 { font-size: 1.35rem; color: var(--green); margin-top: .6rem; }
.why h3 em { color: var(--gold); }
.why p:not(.label) { color: var(--muted); margin-top: .7rem; }

/* ---------- long form ---------- */

.paper { padding: clamp(3rem, 2.4rem + 4vw, 6rem) 0; }
.block + .block { margin-top: 3.4rem; }
.block h2 { font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.3rem); color: var(--green); margin: .5rem 0 1rem; }
.block > p { margin-bottom: 1em; }
.bands-h { font-size: 1.25rem; color: var(--green); margin: 2rem 0 .8rem; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); min-width: 440px; }
.table th, .table td { border: 1px solid var(--border); padding: .7rem .9rem; text-align: left; vertical-align: top; }
.table thead th { background: var(--border); font-family: var(--serif); }
.assume th { font-weight: 500; color: var(--muted); width: 40%; }
.niches { display: grid; gap: 1.6rem; }
@media (min-width: 800px) { .niches { grid-template-columns: 1fr 1fr; gap: 2rem 2.6rem; } }
.niches h3 { font-size: 1.2rem; color: var(--green); margin-bottom: .5rem; }

.faq-item { border-top: 1px solid #d8d2c8; }
.faq-item:last-child { border-bottom: 1px solid #d8d2c8; }
.faq-item summary { list-style: none; cursor: pointer; position: relative; padding: 1.1rem 2.4rem 1.1rem 0; min-height: 56px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font: 400 1.5rem var(--sans); color: var(--gold); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-q { font-size: 1.12rem; color: var(--ink); }
.faq-item p { padding-bottom: 1.2rem; color: var(--muted); max-width: 46rem; }
.faq-item .faq-more { margin-top: -.6rem; }

/* ---------- closing band (static) ---------- */

.closing { position: relative; overflow: hidden; background: var(--green); color: var(--cream); }
.closing-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.closing::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(18,48,36,.96) 0%, rgba(18,48,36,.82) 40%, rgba(18,48,36,.25) 72%, rgba(18,48,36,.05) 100%);
}
@media (max-width: 760px) { .closing::after { background: linear-gradient(180deg, rgba(18,48,36,.82), rgba(18,48,36,.95)); } }
.closing-inner { position: relative; z-index: 2; padding: clamp(3.5rem, 2rem + 6vw, 7rem) 0; }
.closing h2 { color: var(--cream); font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); max-width: 20ch; margin-top: 1rem; }
.closing p:not(.label) { color: rgba(243,239,231,.85); max-width: 44ch; margin-top: 1rem; }

/* ---------- footer (same as lotuscfo.com) ---------- */

.site-foot { background: var(--ink); color: var(--cream); padding: 3.5rem 0 2.5rem; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr; } }
.foot-logo { height: 4rem; width: auto; filter: brightness(0) invert(1); }
.foot-creds { color: var(--gold-light); font-size: .8rem; font-style: italic; margin-top: .9rem; }
.localline { font-size: .9rem; color: rgba(243,239,231,.75); margin-top: .5rem; }
.foot-links { display: flex; flex-direction: column; gap: .1rem; }
.foot-links a { color: rgba(243,239,231,.8); text-decoration: none; font-size: .92rem; min-height: 40px; display: inline-flex; align-items: center; }
.foot-links a:hover { color: var(--gold-light); }
.foot-base { border-top: 1px solid rgba(243,239,231,.1); margin-top: 2.5rem; padding-top: 1.5rem; }
.disclaimer { font-size: .82rem; color: rgba(243,239,231,.6); max-width: 70ch; }
.stamp { font-size: .8rem; color: rgba(243,239,231,.5); margin-top: .8rem; }
.stamp a { color: inherit; }
