/* "Will this work as a wrap?" — free calculator.
   Dark, to match the site. Amber is the brand accent (--theme-color #f59e0b). */

.wrapcalc { padding: 4rem 1.25rem 5rem; color: #e8e6e3; }
.wrapcalc__inner { max-width: 68rem; margin: 0 auto; }

.wrapcalc__head { max-width: 44rem; margin-bottom: 2.5rem; }
.wrapcalc__eyebrow {
  margin: 0 0 .6rem; font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: #f59e0b;
}
.wrapcalc__title { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }
.wrapcalc__lede { margin: 0 0 1rem; font-size: 1.12rem; line-height: 1.65; color: #c9c6c1; }
.wrapcalc__privacy { margin: 0; font-size: .92rem; color: #8f8b85; }

/* Mobile-first: one column, becomes two only when there is room. */
.wrapcalc__cols { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 780px) { .wrapcalc__cols { grid-template-columns: 1fr 1fr; } }

.wrapcalc__group {
  border: 1px solid rgba(255,255,255,.10); border-radius: 14px;
  padding: 1.5rem; margin: 0; background: rgba(255,255,255,.02);
}
.wrapcalc__group legend {
  padding: 0 .5rem; font-size: .85rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: #f59e0b;
}
.wrapcalc__group label {
  display: block; margin: 1.1rem 0 .35rem; font-size: .95rem; color: #c9c6c1;
}
.wrapcalc__group label:first-of-type { margin-top: .4rem; }

.wrapcalc__money, .wrapcalc__pct { display: flex; align-items: stretch; }
.wrapcalc__money span, .wrapcalc__pct span {
  display: flex; align-items: center; padding: 0 .8rem;
  background: rgba(255,255,255,.06); color: #8f8b85; font-weight: 600;
}
.wrapcalc__money span { border-radius: 9px 0 0 9px; }
.wrapcalc__pct span { border-radius: 0 9px 9px 0; }
.wrapcalc__money input, .wrapcalc__pct input {
  flex: 1 1 auto; min-width: 0; padding: .75rem .9rem;
  font-size: 1.05rem; font-variant-numeric: tabular-nums;
  color: #fff; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
}
.wrapcalc__money input { border-left: 0; border-radius: 0 9px 9px 0; }
.wrapcalc__pct input { border-right: 0; border-radius: 9px 0 0 9px; }
.wrapcalc__money input:focus-visible, .wrapcalc__pct input:focus-visible {
  outline: 2px solid #f59e0b; outline-offset: 2px;
}
.wrapcalc__hint { margin: .9rem 0 0; font-size: .85rem; line-height: 1.5; color: #8f8b85; }

.wrapcalc__out { margin-top: 2.25rem; }
.wrapcalc__numbers {
  display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.75rem;
}
/* auto-fit, not a fixed count: there are five tiles now and a hard
   four-column rule stranded the fifth alone on its own row. */
@media (min-width: 620px) {
  .wrapcalc__numbers { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}

.wrapcalc__stat {
  padding: 1.15rem 1.25rem; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.02);
}
.wrapcalc__stat--hero { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.07); }
.wrapcalc__statlab {
  display: block; font-size: .8rem; letter-spacing: .05em;
  text-transform: uppercase; color: #8f8b85; margin-bottom: .4rem;
}
.wrapcalc__statval {
  display: block; font-size: 1.85rem; font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.wrapcalc__stat--hero .wrapcalc__statval { color: #f59e0b; }
.wrapcalc__statnote { display: block; margin-top: .35rem; font-size: .85rem; color: #8f8b85; }

.wrapcalc__flags { display: grid; gap: .75rem; }
.wrapcalc__flag {
  padding: 1rem 1.15rem; border-radius: 12px; border-left: 4px solid;
  background: rgba(255,255,255,.03);
}
.wrapcalc__flag strong { display: block; margin-bottom: .3rem; font-size: 1rem; }
.wrapcalc__flag span { font-size: .95rem; line-height: 1.6; color: #c9c6c1; }
.wrapcalc__flag--ok   { border-color: #4ade80; }
.wrapcalc__flag--warn { border-color: #f59e0b; }
.wrapcalc__flag--bad  { border-color: #f87171; }
.wrapcalc__flag--info { border-color: rgba(255,255,255,.22); }

.wrapcalc__legal {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.10);
}
.wrapcalc__legal h2 {
  margin: 0 0 .6rem; font-size: .85rem; letter-spacing: .06em;
  text-transform: uppercase; color: #8f8b85;
}
.wrapcalc__legal p { margin: 0 0 .8rem; font-size: .9rem; line-height: 1.65; color: #8f8b85; }

@media (prefers-reduced-motion: reduce) {
  .wrapcalc * { transition: none; animation: none; }
}

/* ---------------------------------------------------------------------------
   v2 — the investor's calculator: marks, table, actions, print
   --------------------------------------------------------------------------- */

.wrapcalc__h2 {
  margin: 2.75rem 0 .5rem; font-size: 1.35rem; color: #fff;
}
.wrapcalc__h2note { margin: 0 0 1.1rem; font-size: .95rem; line-height: 1.6; color: #8f8b85; }
.wrapcalc__opt {
  font-size: .78rem; font-weight: 400; color: #6f6b65; text-transform: none;
}
.wrapcalc__date {
  width: 100%; padding: .75rem .9rem; font-size: 1rem; color: #fff;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  border-radius: 9px; color-scheme: dark;
}
.wrapcalc__date:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }
.wrapcalc__check {
  display: flex; align-items: flex-start; gap: .6rem; margin: .9rem 0 0;
  font-size: .9rem; line-height: 1.45; color: #c9c6c1; cursor: pointer;
}
.wrapcalc__check input { margin-top: .2rem; accent-color: #f59e0b; flex-shrink: 0; }

/* The marked dates — the four an investor actually reads. */
.wrapcalc__marks { display: grid; grid-template-columns: 1fr; gap: .85rem; }
@media (min-width: 640px) { .wrapcalc__marks { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .wrapcalc__marks { grid-template-columns: repeat(4, 1fr); } }
.wrapcalc__mark {
  padding: 1.1rem 1.2rem; border-radius: 14px;
  border: 1px solid rgba(245,158,11,.35); background: rgba(245,158,11,.06);
}
.wrapcalc__marklab {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: #f59e0b;
}
.wrapcalc__markdate { display: block; margin-top: .15rem; font-size: .82rem; color: #8f8b85; }
.wrapcalc__markval {
  display: block; margin-top: .5rem; font-size: 1.6rem; font-weight: 800;
  font-variant-numeric: tabular-nums; color: #fff;
}
.wrapcalc__marknote { display: block; margin-top: .3rem; font-size: .85rem; color: #c9c6c1; }
.wrapcalc__markbits { display: block; margin-top: .45rem; font-size: .78rem; color: #8f8b85; }

.wrapcalc__actions {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem;
}
.wrapcalc__btn {
  padding: .65rem 1.05rem; font-size: .92rem; font-weight: 600; cursor: pointer;
  color: #0e0d0c; background: #f59e0b; border: 0; border-radius: 9px;
}
.wrapcalc__btn:hover { background: #fbbf24; }
.wrapcalc__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.wrapcalc__btn--quiet { background: rgba(255,255,255,.10); color: #e8e6e3; }
.wrapcalc__btn--quiet:hover { background: rgba(255,255,255,.16); }
.wrapcalc__select {
  /* The site's base stylesheet puts `width: 100%` on every select, which in a
     flex-wrap row makes this one claim a whole line to itself and read as an
     empty input rather than a picker sitting beside three buttons. */
  width: auto; flex: 0 0 auto;
  padding: .65rem .9rem; font-size: .92rem; color: #e8e6e3;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
}
.wrapcalc__status:empty { display: none; }
.wrapcalc__status { margin: 0 0 1rem; font-size: .9rem; font-weight: 600; color: #4ade80; }
.wrapcalc__status[data-state="error"] { color: #f87171; }

/* The table scrolls in its own box — the page never scrolls sideways. */
/* The table scrolls in BOTH directions inside its own box.
   `overflow-x: auto` alone makes this element a scroll container, which means
   the sticky <th> anchors to it rather than to the viewport — so the headings
   never moved and twelve unlabelled money columns scrolled past underneath a
   header that was technically "sticky". Giving the box a height puts the
   scrolling where the sticky can answer it. Print undoes both. */
.wrapcalc__tablewrap {
  overflow: auto; max-height: 78vh;
  overscroll-behavior: contain;
  border: 1px solid rgba(255,255,255,.10); border-radius: 12px;
}
.wrapcalc__table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.wrapcalc__table th, .wrapcalc__table td {
  padding: .55rem .7rem; text-align: right; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wrapcalc__table th:nth-child(-n+2), .wrapcalc__table td:nth-child(-n+2) { text-align: left; }
.wrapcalc__table thead th {
  /* Anchored to the scroll BOX's own top, not the viewport's — which is what
     makes the headings hold while 360 rows go past underneath them. */
  position: sticky; top: 0; z-index: 1;
  background: #14161a; color: #8f8b85; font-weight: 600; font-size: .78rem;
  letter-spacing: .03em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.wrapcalc__table tbody tr { border-bottom: 1px solid rgba(255,255,255,.05); }
.wrapcalc__table tbody tr.is-mark { background: rgba(245,158,11,.10); }
.wrapcalc__table tbody tr.is-mark td { font-weight: 700; color: #fff; }
.wrapcalc__table td.is-profit { color: #4ade80; font-weight: 600; }
.wrapcalc__tag {
  display: inline-block; margin-left: .35rem; padding: 0 .35rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #0e0d0c; background: #f59e0b; border-radius: 4px;
}
.wrapcalc__tablenote { margin: .7rem 0 0; font-size: .85rem; color: #8f8b85; }

/* Print: white paper, black ink, every row, no chrome. */
.wrapcalc__printhead { display: none; }

@media print {
  .wrapcalc { padding: 0; color: #000; }
  .wrapcalc__printhead {
    display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 1.5rem;
    margin: 0 0 1.2rem; padding: .8rem 0; font-size: 9pt; color: #000;
    border-top: 1px solid #999; border-bottom: 1px solid #999;
    break-inside: avoid;
  }
  .wrapcalc__printhead h3 {
    grid-column: 1 / -1; margin: .5rem 0 .2rem; font-size: 9.5pt;
    text-transform: uppercase; letter-spacing: .06em;
  }
  .wrapcalc__printhead h3:first-child { margin-top: 0; }
  .wrapcalc__printhead .k { color: #444; }
  .wrapcalc__printhead .v { font-weight: 700; text-align: right; }
  .wrapcalc__actions, .wrapcalc__status, .wrapcalc__form,
  .wrapcalc__gate { display: none; }
  .wrapcalc__title, .wrapcalc__h2 { color: #000; }
  .wrapcalc__lede, .wrapcalc__h2note, .wrapcalc__marknote,
  .wrapcalc__markbits, .wrapcalc__tablenote, .wrapcalc__legal p { color: #333; }
  .wrapcalc__stat, .wrapcalc__mark, .wrapcalc__flag {
    border: 1px solid #999; background: transparent; break-inside: avoid;
  }
  .wrapcalc__statval, .wrapcalc__markval { color: #000; }
  .wrapcalc__tablewrap { overflow: visible; max-height: none; border-color: #999; }
  .wrapcalc__table { font-size: 8pt; }
  .wrapcalc__table thead th { position: static; top: auto; background: #eee; color: #000; }
  .wrapcalc__table tbody tr.is-mark { background: #f4e3c0; }
  .wrapcalc__table tbody tr.is-mark td, .wrapcalc__table td.is-profit { color: #000; }
  .wrapcalc__table thead { display: table-header-group; }
  .wrapcalc__table tr { break-inside: avoid; }
}

/* Anchored jumps land under the fixed header without this. */
.wrapcalc__h2, .wrapcalc__marks, .wrapcalc__tablewrap { scroll-margin-top: 6rem; }

/* The unlock. Inline rather than a modal — it appears where the button they
   just pressed is, and never covers the numbers they are reading. */
.wrapcalc__gate {
  max-width: 30rem; margin: 0 0 1.25rem; padding: 1.2rem 1.3rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(245,158,11,.35); border-radius: 14px;
}
.wrapcalc__gatelede { margin: 0 0 .9rem; font-size: .95rem; color: #c9c6c1; }
.wrapcalc__gate label { display: block; margin-bottom: .35rem; font-size: .85rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #8f8b85; }
.wrapcalc__gate input[type="email"] {
  width: 100%; padding: .75rem .9rem; font-size: 1rem; color: #fff;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
}
.wrapcalc__gate input[type="email"]:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }
/* The consent tick, and it has to win the specificity fight above it.
   `.wrapcalc__gate label` is (0,2,0) and `.wrapcalc__check` is (0,1,0), so the
   gate's field-label rule was overriding the tick's own layout: `display:
   block` beat `display: flex`, which stacked the box above its sentence and
   dropped the .6rem gap, and `margin-bottom: .35rem` collapsed it against the
   fine print. This rule is also (0,2,0) and later in the file, so it wins —
   but only for the properties it DECLARES, which is why it has to restate the
   layout and not just the typography. Every property `.wrapcalc__gate label`
   sets and this tick must not inherit belongs here.

   Not cosmetic. This is the control the entire follow-up sequence hangs on:
   an unticked box means the lead is stored with a NULL consent, kept off the
   mailing list and dropped from the nine-touch sequence — silently. A tick
   that renders misaligned and jammed into its own label is one fewer person
   on the list. */
.wrapcalc__gate .wrapcalc__check {
  display: flex; align-items: flex-start; gap: .6rem;
  margin: .9rem 0 0; margin-bottom: 0;
  text-transform: none; letter-spacing: 0; font-weight: 400; color: #c9c6c1;
  font-size: .9rem; line-height: 1.45;
}
.wrapcalc__gatefine { margin: .7rem 0 0; font-size: .82rem; line-height: 1.5; color: #8f8b85; }
.wrapcalc__gatebtns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.wrapcalc__gateerr:empty { display: none; }
.wrapcalc__gateerr { margin: .7rem 0 0; font-size: .88rem; font-weight: 600; color: #f87171; }

/* The lesson. This is the page's actual argument, so it gets weight — the
   distinction between cash flow and profit is the thing an investor is here
   to learn, and burying it under the table would be the same mistake every
   other wrap calculator makes. */
.wrapcalc__lesson {
  margin: 2.5rem 0 0; padding: 1.5rem 1.6rem;
  background: rgba(245,158,11,.05);
  border: 1px solid rgba(245,158,11,.30); border-radius: 16px;
}
.wrapcalc__lesson h2 { margin: 0 0 .8rem; font-size: 1.4rem; color: #f59e0b; }
.wrapcalc__lesson p { margin: 0 0 .9rem; font-size: 1rem; line-height: 1.7; color: #c9c6c1; }
.wrapcalc__lesson p:last-child { margin-bottom: 0; }
.wrapcalc__lesson strong { color: #fff; font-weight: 700; }
.wrapcalc__lesson em { color: #fff; font-style: italic; }
.wrapcalc__identity {
  padding: .8rem 1rem; margin: 0 0 .9rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .95rem !important; color: #fff !important; text-align: center;
  background: rgba(0,0,0,.30); border-radius: 10px;
  overflow-x: auto;
}
.wrapcalc__statbits {
  display: block; margin-top: .4rem; font-size: .8rem; color: #f59e0b;
  font-variant-numeric: tabular-nums;
}

@media print {
  .wrapcalc__lesson { border: 1px solid #999; background: transparent; break-inside: avoid; }
  .wrapcalc__lesson h2 { color: #000; }
  .wrapcalc__lesson p { color: #333; }
  .wrapcalc__lesson strong, .wrapcalc__lesson em { color: #000; }
  .wrapcalc__identity { background: #f2f2f2; color: #000 !important; }
  .wrapcalc__statbits { color: #333; }
}

/* The explainer. Linked twice on purpose — once above the form for somebody
   who has not scrolled, once inside the lesson for somebody who has read it
   and wants it said out loud. */
.wrapcalc__videocta {
  margin: 0 0 2rem; padding: .9rem 1.1rem; font-size: .95rem; line-height: 1.6;
  color: #c9c6c1; background: rgba(245,158,11,.07);
  border-left: 3px solid #f59e0b; border-radius: 0 10px 10px 0;
}
.wrapcalc__videocta a, .wrapcalc__watch a { color: #f59e0b; font-weight: 700; }
.wrapcalc__watch {
  margin: 0 0 1.1rem !important; padding: .8rem 1rem;
  background: rgba(0,0,0,.25); border-radius: 10px;
}
.wrapcalc__watch a { display: block; font-size: 1.05rem; text-decoration: none; }
.wrapcalc__watch a:hover { text-decoration: underline; }
.wrapcalc__watch span { display: block; margin-top: .2rem; font-size: .85rem; color: #8f8b85; }

@media print { .wrapcalc__videocta, .wrapcalc__watch { display: none; } }

/* ---------------------------------------------------------------------------
   The docked walkthrough.

   Small and pinned top-right by default, so it sits in the empty column beside
   the hero and the form and somebody can work through their own deal with it
   running. "Make it bigger" centres it at a real watching size.

   Below 1100px it stops being fixed and becomes an ordinary block at the top of
   the page: a floating panel on a phone covers the very inputs it is
   explaining, which is worse than no video at all.
   --------------------------------------------------------------------------- */
.wrapcalc__dock {
  margin: 0 0 2rem;
  background: #14161a;
  border: 1px solid rgba(245,158,11,.35);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.wrapcalc__dockbar {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .5rem .5rem .85rem;
  background: rgba(245,158,11,.10);
  border-bottom: 1px solid rgba(245,158,11,.25);
}
.wrapcalc__docktitle {
  flex: 1 1 auto; min-width: 0;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #f59e0b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wrapcalc__dockbtn {
  flex: 0 0 auto; padding: .32rem .6rem; font-size: .78rem; font-weight: 700;
  color: #0e0d0c; background: #f59e0b; border: 0; border-radius: 6px;
  cursor: pointer; white-space: nowrap;
}
.wrapcalc__dockbtn:hover { background: #fbbf24; }
.wrapcalc__dockbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.wrapcalc__dockbtn--x {
  padding: .32rem .55rem; font-size: 1rem; line-height: 1;
  color: #e8e6e3; background: rgba(255,255,255,.10);
}
.wrapcalc__dockbtn--x:hover { background: rgba(255,255,255,.20); }

.wrapcalc__dockframe { position: relative; padding-top: 56.25%; background: #000; }
.wrapcalc__dockframe iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

.wrapcalc__dockopen {
  display: block; margin: 0 0 1.5rem;
  padding: .7rem 1.1rem; font-size: .95rem; font-weight: 700; cursor: pointer;
  color: #f59e0b; background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.35); border-radius: 10px;
}
.wrapcalc__dockopen:hover { background: rgba(245,158,11,.16); }
.wrapcalc__dockopen:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }

@media (min-width: 1100px) {
  .wrapcalc__dock {
    position: fixed; z-index: 60;
    /* Clear of the site's 65px fixed nav. */
    top: 84px; right: 24px; width: 360px; margin: 0;
  }
  .wrapcalc__dock[data-state="big"] {
    top: 50%; right: 50%;
    transform: translate(50%, -50%);
    width: min(1000px, 88vw);
  }
  .wrapcalc__dockopen {
    position: fixed; z-index: 60; top: 84px; right: 24px; margin: 0; width: auto;
  }
  /* The backdrop only exists at the big size, and only on a screen wide enough
     for the dock to be floating in the first place. */
  .wrapcalc__dockveil {
    position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.72);
  }
}

@media print {
  .wrapcalc__dock, .wrapcalc__dockopen, .wrapcalc__dockveil { display: none !important; }
}

/* Input problems. Loud, specific, and attached to the field that caused them. */
.wrapcalc__problems:empty { display: none; }
.wrapcalc__problems {
  margin: 0 0 1.75rem; padding: 1.1rem 1.3rem;
  color: #fecaca; background: rgba(248,113,113,.10);
  border: 1px solid rgba(248,113,113,.45); border-radius: 12px;
}
.wrapcalc__problems strong { display: block; margin-bottom: .5rem; color: #fca5a5; }
.wrapcalc__problems ul { margin: 0; padding-left: 1.2rem; }
.wrapcalc__problems li { margin: .25rem 0; line-height: 1.5; }

.wrapcalc__form input.is-bad {
  border-color: #f87171 !important;
  background: rgba(248,113,113,.08) !important;
}
.wrapcalc__form input.is-bad:focus-visible { outline-color: #f87171; }

/* The output stays on the page but is visibly not an answer. */
.wrapcalc__out.is-blocked { opacity: .28; filter: grayscale(1); pointer-events: none; }

@media print { .wrapcalc__problems { display: none; } }

/* The primary action in the row. Slightly larger and brighter than its
   siblings, because it is the one that is worth something to both sides. */
.wrapcalc__btn--hero {
  padding: .72rem 1.25rem; font-size: 1rem;
  box-shadow: 0 4px 16px rgba(245,158,11,.28);
}
