/* Mock calculator, styles. Same design and markup as the placeholder it was vendored
   from; the only change is that every rule is scoped to .mock-calc-root so it shares a
   document with the wrapper's own styles instead of an iframe of its own.

   Two-way scoping, both halves needed:
     - every selector below starts at .mock-calc-root, so nothing here reaches the status panel;
     - the reset block undoes the wrapper's bare input/label/h1 rules, which would otherwise
       reach in here.

   All colours, fonts and radii live on .mock-calc-root below - edit them there. */

/* ---- Fonts, self-hosted (Google Fonts: Hanken Grotesk + Newsreader) ---- */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/mock-calc/fonts/hanken-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/mock-calc/fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/mock-calc/fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/mock-calc/fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Design tokens (CalcScoutIQ palette), on the root instead of :root ---- */
.mock-calc-root {
  --bg: #F7F5F0;            /* header / soft panels */
  --ink: #1C1B19;           /* main text */
  --muted: #6B6862;         /* secondary text */
  --faint: #A49F95;         /* legal / footnotes */
  --line: #E4E0D8;          /* borders */
  --card: #FFFFFF;          /* modal background */
  --accent: #22251F;        /* buttons, active states */
  --accent-soft: #EDEBE5;   /* selected card, info box */
  --page: #CFC9BE;          /* page behind the modal */
  --radius-card: 20px;
  --radius-input: 12px;
  --radius-dense: 10px;
  --font-sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  /* What used to be the html/body rule of the standalone page. The panel is the
     viewport now, so the calculator scrolls inside it. */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.mock-calc-root *, .mock-calc-root *::before, .mock-calc-root *::after { box-sizing: border-box; }

/* ---- Reset: the wrapper styles bare input/label/h1 for its own access form ---- */
.mock-calc-root h1, .mock-calc-root h2, .mock-calc-root p, .mock-calc-root label {
  margin: 0;
  font: inherit;
  color: inherit;
}
.mock-calc-root input, .mock-calc-root select, .mock-calc-root button {
  margin: 0;
  padding: 0;
  width: auto;
  border: 0;
  border-radius: 0;
  font: inherit;
  color: inherit;
  background: none;
}

.mock-calc-root .stage {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 20px 16px 24px;
}

/* ---- Modal card ---- */
.mock-calc-root .modal {
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.35);
}

/* ---- Header ---- */
.mock-calc-root .modal-head { padding: 20px 30px 16px; background: var(--bg); }

.mock-calc-root .head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mock-calc-root .builder { display: flex; align-items: center; gap: 10px; }
.mock-calc-root .logo-slot {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #FFFFFF;
  border: 1px dashed #C9C2B6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 8px;
  color: var(--muted);
}
.mock-calc-root .builder-logo {
  max-height: 32px;
  max-width: 180px;
  width: auto;
  display: block;
}
.mock-calc-root .builder-name {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.mock-calc-root .close-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.mock-calc-root .intro h1 {
  font-family: var(--font-serif);
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.12;
}
.mock-calc-root .intro p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---- Step progress ---- */
.mock-calc-root .progress {
  padding: 12px 30px 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* justify-content and margin come from the wrapper's own .dots loading indicator. */
.mock-calc-root .dots { display: flex; align-items: center; gap: 7px; justify-content: flex-start; margin: 0; }
.mock-calc-root .dot {
  /* opacity and animation: the wrapper's `.dots span` loader rule reaches these spans. */
  opacity: 1;
  animation: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.mock-calc-root .dot.is-on { background: var(--accent); color: #FFFFFF; }
.mock-calc-root .dot-line { width: 22px; height: 2px; background: var(--line); }
.mock-calc-root .dot-line.is-on { background: var(--accent); }
.mock-calc-root .step-label { font-size: 12.5px; color: var(--ink); font-weight: 700; margin-left: 4px; }

/* ---- Steps ---- */
/* display and margin-bottom: the wrapper's status panel has a .steps of its own, a flex
   row of step dots, and its rule reaches this container too. */
.mock-calc-root .steps { padding: 12px 30px 4px; display: block; margin-bottom: 0; }

.mock-calc-root .step-intro { font-size: 11px; color: var(--muted); line-height: 1.35; margin-bottom: 10px; }
.mock-calc-root .step-intro--box {
  background: var(--accent-soft);
  border-radius: var(--radius-input);
  padding: 15px 17px;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 17px;
}

.mock-calc-root .step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 10px;
}
.mock-calc-root .step--dense .step-grid { gap: 10px; }
.mock-calc-root .field { min-width: 0; }
.mock-calc-root .field--full { grid-column: 1 / -1; }

/* ---- Labels, hints ---- */
.mock-calc-root .f-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.mock-calc-root .f-sublabel { color: var(--muted); font-weight: 500; }
.mock-calc-root .f-hint { font-size: 11.5px; color: var(--muted); margin-top: 7px; line-height: 1.45; }
.mock-calc-root .f-note { font-size: 11.5px; color: var(--muted); }
.mock-calc-root .step--dense .f-label { font-size: 12px; margin-bottom: 5px; }

/* ---- Inputs ---- */
.mock-calc-root input[type="text"], .mock-calc-root input[type="email"],
.mock-calc-root input[type="number"], .mock-calc-root select {
  width: 100%;
  max-width: 100%;
  padding: 14px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  font-size: 14px;
  color: var(--ink);
  background: #FFFFFF;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.mock-calc-root .step--dense input[type="text"], .mock-calc-root .step--dense input[type="email"],
.mock-calc-root .step--dense input[type="number"], .mock-calc-root .step--dense select {
  padding: 10px 12px;
  border-radius: var(--radius-dense);
  font-size: 13.5px;
}
.mock-calc-root select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B6862' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.mock-calc-root input:focus, .mock-calc-root select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 37, 31, 0.14);
}
.mock-calc-root input::placeholder { color: var(--faint); }

/* ---- Cards (finish & fitout) ---- */
.mock-calc-root .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.mock-calc-root .cards input { position: absolute; opacity: 0; width: 0; height: 0; padding: 0; }
.mock-calc-root .card-opt {
  display: block;
  padding: 13px 6px;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.mock-calc-root .card-main { display: block; }
.mock-calc-root .card-sub { display: block; font-size: 10.5px; font-weight: 500; }
.mock-calc-root .cards input:checked + .card-opt {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  background: var(--accent-soft);
  padding: 12.5px 5.5px; /* compensate the thicker border */
}
.mock-calc-root .cards input:checked + .card-opt .card-sub { font-weight: 600; }
.mock-calc-root .cards input:focus-visible + .card-opt { box-shadow: 0 0 0 3px rgba(34, 37, 31, 0.2); }

/* ---- Toggle (No / Yes) ---- */
.mock-calc-root .toggle {
  display: flex;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-dense);
  overflow: hidden;
}
.mock-calc-root .toggle input { position: absolute; opacity: 0; width: 0; height: 0; padding: 0; }
.mock-calc-root .toggle-opt {
  flex: 1 1 0;
  text-align: center;
  padding: 9px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.mock-calc-root .toggle input:checked + .toggle-opt {
  font-weight: 800;
  color: #FFFFFF;
  background: var(--accent);
}
.mock-calc-root .toggle input:focus-visible + .toggle-opt { box-shadow: inset 0 0 0 3px rgba(34, 37, 31, 0.35); }

/* ---- Counter (minus / plus) ---- */
.mock-calc-root .counter {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-dense);
  overflow: hidden;
}
.mock-calc-root .counter-btn {
  width: 38px;
  border: 0;
  padding: 9px 0;
  text-align: center;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg);
  font-family: inherit;
}
.mock-calc-root .counter-val {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  border: 0 !important;
  border-radius: 0 !important;
  padding: 9px 0 !important;
  -moz-appearance: textfield;
}
.mock-calc-root .counter-val::-webkit-outer-spin-button, .mock-calc-root .counter-val::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.mock-calc-root .counter-val:focus { box-shadow: none; }

/* ---- Form footer ---- */
.mock-calc-root .form-foot { padding: 12px 30px 14px; border-top: 1px solid var(--line); margin-top: 12px; }
.mock-calc-root .nav { display: flex; gap: 12px; align-items: center; }
.mock-calc-root .btn-back {
  padding: 12px 22px;
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  border-radius: var(--radius-input);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.mock-calc-root .btn-primary {
  flex: 1;
  padding: 13px 20px;
  border: none;
  background: var(--accent);
  border-radius: var(--radius-input);
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  cursor: pointer;
  font-family: inherit;
}
.mock-calc-root .btn-primary:focus-visible, .mock-calc-root .btn-back:focus-visible {
  outline: 3px solid rgba(34, 37, 31, 0.35);
  outline-offset: 2px;
}
.mock-calc-root .legal {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mock-calc-root .legal > span:first-child { font-size: 10.5px; color: var(--faint); }
.mock-calc-root .powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--faint);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.mock-calc-root .powered img { height: 15px; width: auto; display: block; opacity: 0.9; }

/* ---- Thank-you view ---- */
.mock-calc-root .thanks { text-align: center; padding: 20px 30px 4px; }
.mock-calc-root .thanks-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.mock-calc-root .thanks h2 {
  font-family: var(--font-serif);
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.mock-calc-root .thanks-lede { margin: 0 auto 8px; font-size: 12.5px; color: var(--muted); line-height: 1.45; max-width: 390px; }
.mock-calc-root .thanks-next { margin: 0 auto 12px; font-size: 12px; color: var(--muted); line-height: 1.4; max-width: 360px; }

.mock-calc-root .cta-stack { display: flex; flex-direction: column; gap: 8px; }
.mock-calc-root .cta-row { display: flex; gap: 8px; }
.mock-calc-root .cta-card {
  flex: 1;
  background: #FFFFFF;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 28px -14px rgba(34, 37, 31, 0.4), 0 2px 6px rgba(34, 37, 31, 0.06);
  cursor: pointer;
  text-align: left;
}
.mock-calc-root .cta-img { height: 44px; overflow: hidden; }
.mock-calc-root .cta-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mock-calc-root .cta-title {
  padding: 10px 12px 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.mock-calc-root .cta-arrow { color: var(--accent); font-size: 13px; }
.mock-calc-root .cta-sub { padding: 0 12px 12px; font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.mock-calc-root .cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-input);
  background: var(--accent);
  cursor: pointer;
}
.mock-calc-root .cta-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.mock-calc-root .cta-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mock-calc-root .cta-bar-text { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.mock-calc-root .cta-bar-title { font-size: 12.5px; font-weight: 800; color: #FFFFFF; line-height: 1.2; }
.mock-calc-root .cta-bar-sub { font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, 0.75); }
.mock-calc-root .cta-note { font-size: 10px; color: var(--faint); margin-top: 10px; }

.mock-calc-root .thanks-foot {
  padding: 12px 30px 16px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mock-calc-root .btn-link {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

/* ---- Responsive. Widths are the panel's, not the window's, so these are container
        queries rather than the media queries the standalone page used. ---- */
@container mock-calc (max-width: 560px) {
  .mock-calc-root .modal-head, .mock-calc-root .progress, .mock-calc-root .steps,
  .mock-calc-root .form-foot, .mock-calc-root .thanks, .mock-calc-root .thanks-foot {
    padding-left: 18px;
    padding-right: 18px;
  }
  .mock-calc-root .intro h1 { font-size: 20px; }
}
@container mock-calc (max-width: 420px) {
  .mock-calc-root .step-grid { grid-template-columns: minmax(0, 1fr); }
  .mock-calc-root .field--full { grid-column: auto; }
  .mock-calc-root .cards { grid-template-columns: minmax(0, 1fr); }
  .mock-calc-root .cta-row { flex-direction: column; }
}

.mock-calc-root [hidden] { display: none !important; }
