/* Shared styles for the teacher open-enrollment pages.
   Extracted verbatim from the approved teachers.html design. */
    :root {
      --red: #e52528;
      --red-dark: #b70f16;
      --black: #08080a;
      --soft-black: #18191f;
      --gray: #666b76;
      --light-gray: #f4f5f7;
      --border: #e6e8ee;
      --white: #ffffff;
      --cream: #fffafa;
      --shadow: 0 24px 70px rgba(0,0,0,.12);
      --radius: 26px;
      --max: 1180px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Arial, Helvetica, sans-serif;
      color: var(--black);
      background:
        radial-gradient(circle at 15% 8%, rgba(229,37,40,.10), transparent 28%),
        radial-gradient(circle at 85% 0%, rgba(0,0,0,.07), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #f7f7f9 100%);
      /* Cap the two glow layers to a fixed-size region anchored at the top so
         they stay concentrated behind the hero (the original look) instead of
         scaling with page height. The linear wash still fills the full page. */
      background-repeat: no-repeat, no-repeat, repeat;
      background-size: 100% 900px, 100% 900px, 100% 100%;
      background-position: left top, right top, center;
      line-height: 1.45;
    }

    a { color: inherit; }

    .page {
      overflow: hidden;
    }

    .container {
      width: min(var(--max), calc(100% - 40px));
      margin: 0 auto;
    }

    .nav {
      padding: 22px 0;
    }

    .nav-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
      font-size: 13px;
      line-height: 1.05;
    }

    .brand-mark {
      width: 50px;
      height: 50px;
      border: 3px solid var(--red);
      border-radius: 15px;
      display: grid;
      place-items: center;
      color: var(--red);
      font-size: 26px;
      font-weight: 900;
    }

    .nav-cta {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      padding: 0 18px;
      border-radius: 999px;
      background: var(--black);
      color: var(--white);
      text-decoration: none;
      font-weight: 900;
      font-size: 14px;
      box-shadow: 0 8px 24px rgba(0,0,0,.18);
      white-space: nowrap;
    }

    /* ── Top urgency bar: live open-enrollment countdown ── */
    .countdown-bar {
      background: var(--black);
      color: #fff;
      padding: 9px 0;
      font-size: 13px;
      line-height: 1.3;
    }

    .countdown-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 8px 12px;
      text-align: center;
    }

    .cd-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--red);
      flex: 0 0 auto;
      animation: cd-pulse 1.8s ease-out infinite;
    }

    @keyframes cd-pulse {
      0%   { box-shadow: 0 0 0 0 rgba(229, 37, 40, .55); }
      70%  { box-shadow: 0 0 0 7px rgba(229, 37, 40, 0); }
      100% { box-shadow: 0 0 0 0 rgba(229, 37, 40, 0); }
    }

    .cd-label {
      font-weight: 800;
      letter-spacing: .01em;
    }

    .cd-timer {
      display: inline-flex;
      gap: 6px;
    }

    .cd-seg {
      display: inline-flex;
      align-items: baseline;
      gap: 2px;
      background: rgba(255, 255, 255, .10);
      border-radius: 7px;
      padding: 3px 8px;
      font-variant-numeric: tabular-nums;
    }

    .cd-seg b {
      font-weight: 900;
      font-size: 14px;
      min-width: 1.1em;
      text-align: center;
    }

    .cd-seg i {
      font-style: normal;
      font-size: 11px;
      color: rgba(255, 255, 255, .55);
    }

    .cd-tail {
      color: rgba(255, 255, 255, .7);
      font-weight: 700;
    }

    @media (prefers-reduced-motion: reduce) {
      .cd-dot { animation: none; }
    }

    @media (max-width: 620px) {
      .countdown-bar { font-size: 12px; }
      .cd-tail { flex-basis: 100%; }
    }

    .hero {
      padding: 8px 0 10px;
    }

    .hero-card {
      background-color: var(--white);
      background-image:
        linear-gradient(to right,
          #ffffff 0%,
          #ffffff 22%,
          rgba(255,255,255,.96) 36%,
          rgba(255,255,255,.75) 50%,
          rgba(255,255,255,.30) 65%,
          rgba(255,255,255,.0)  80%
        ),
        url('teacher-hero.jpg');
      background-size: cover, 52% auto;
      background-position: center, right top;
      background-repeat: no-repeat;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: clamp(28px, 5vw, 62px);
      position: relative;
      overflow: hidden;
    }

    .hero-main {
      position: relative;
      z-index: 1;
    }

    /* Desktop shows the teacher via the hero-card background image;
       this inline <img> is the mobile-only top banner, cropped to her
       face/shoulders so the headline sits cleanly beneath it. */
    .hero-photo { display: none; }

    /* Both pages keep the side-photo hero on every device — no mobile
       banner swap, so the teacher background stays visible at all widths.
       The .hero-photo banner <img> stays hidden via its base rule above. */

    .hero-logo {
      height: clamp(56px, 7vw, 90px);
      width: auto;
      display: block;
      margin: 0 0 24px;
    }

    /* ── Stat card (right column) ── */
    .stat-card {
      background: var(--black);
      color: #fff;
      border-radius: 22px;
      padding: clamp(24px, 2.8vw, 36px);
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .stat-eyebrow {
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(255,255,255,.5);
      margin: 0;
    }

    .stat-row {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      font-size: clamp(14px, 1.4vw, 16px);
      color: rgba(255,255,255,.75);
      gap: 12px;
    }

    .stat-old { font-weight: 900; color: rgba(255,255,255,.4); text-decoration: line-through; }
    .stat-new { font-weight: 900; color: #fff; }
    .stat-old small, .stat-new small { font-size: .65em; font-weight: 700; }

    .stat-divider {
      height: 1px;
      background: rgba(255,255,255,.12);
      margin: 2px 0;
    }

    .stat-save {
      font-size: clamp(36px, 4.2vw, 54px);
      font-weight: 900;
      line-height: 1;
      letter-spacing: -0.04em;
    }

    .stat-save span { color: var(--red); }
    .stat-save small { font-size: .45em; font-weight: 700; color: rgba(255,255,255,.6); }

    .stat-note {
      font-size: clamp(13px, 1.3vw, 15px);
      color: rgba(255,255,255,.65);
      line-height: 1.4;
      margin: 0;
    }

    .stat-cta { width: 100%; justify-content: center; margin-top: 4px; }

    @media (max-width: 900px) {
      .hero-grid { grid-template-columns: 1fr; }
    }

    .hero-card:before {
      content: "";
      position: absolute;
      top: 0;
      left: 32px;
      right: 32px;
      height: 6px;
      background: var(--red);
      border-radius: 0 0 10px 10px;
    }

    .eyebrow {
      color: var(--red);
      text-transform: uppercase;
      font-weight: 900;
      letter-spacing: .18em;
      font-size: 14px;
      margin: 0 0 16px;
    }


    .revolt-rally {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--black);
      color: var(--white);
      border-radius: 16px;
      padding: 12px 18px;
      margin: 0 0 22px;
      font-weight: 900;
      font-size: clamp(24px, 3.1vw, 40px);
      line-height: .95;
      letter-spacing: -0.04em;
      box-shadow: 0 16px 36px rgba(0,0,0,.18);
    }

    h1 {
      font-size: clamp(46px, 6.6vw, 86px);
      line-height: .94;
      letter-spacing: -0.075em;
      margin: 0 0 24px;
      max-width: 1050px;
      text-shadow:
        0 0 18px #fff,
        0 0 36px #fff,
        2px  2px 10px rgba(255,255,255,.95),
        -2px -2px 10px rgba(255,255,255,.95);
    }

    /* Brand-red hero heading (refer page). */
    h1.h1-red { color: var(--red); }

    /* Refer page: the intro paragraph was removed, so hold the hero-card
       at roughly its previous height (desktop only) — otherwise the card
       shrinks and the teacher background photo crops above her necklace.
       Biased slightly tall so the photo is never cut off; the spare space
       reads as the existing white gradient. Skipped at <=900px, where the
       photo is a separate inline banner and a tall card would just be a
       gap. */
    @media (min-width: 901px) {
      /* Center the logo + message as one block so the spare height splits
         evenly above and below it (balanced) rather than pooling in one
         gap. Height trimmed so that breathing room stays small. */
      .hero-card--refer {
        min-height: 480px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Nudge the photo down just slightly from the top so her full head
           keeps its headroom while a bit more of her neck shows. Scoped
           here so index.html's hero crop is untouched. */
        background-position: center, right 5%;
      }
      .hero-card--refer .hero-msg h1 { margin-bottom: 0; }
    }

    .hero-copy {
      font-size: clamp(16px, 1.7vw, 20px);
      line-height: 1.32;
      color: var(--soft-black);
      max-width: 980px;
      margin: 0 0 30px;
      font-weight: 700;
      text-shadow:
        0 0 12px #fff,
        0 0 24px rgba(255,255,255,.9),
        1px  1px 6px rgba(255,255,255,.9),
        -1px -1px 6px rgba(255,255,255,.9);
    }

    .hero-copy span {
      color: var(--red);
    }

    .cta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      align-items: center;
      margin-top: 28px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 56px;
      padding: 0 26px;
      border-radius: 12px;
      text-decoration: none;
      border: 2px solid transparent;
      font-weight: 900;
      letter-spacing: .01em;
      cursor: pointer;
      transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    }

    .btn:hover { transform: translateY(-2px); }

    .btn-primary {
      color: var(--white);
      background: var(--red);
      box-shadow: 0 14px 30px rgba(229,37,40,.28);
    }

    .btn-primary:hover { background: var(--red-dark); }

    .btn-secondary {
      color: var(--black);
      background: var(--white);
      border-color: var(--black);
    }

    .trust-strip {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1px;
      margin-top: 34px;
      background: var(--border);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
    }

    .trust-item {
      background: #fff;
      padding: 16px 14px;
      display: flex;
      gap: 10px;
      align-items: center;
      font-weight: 900;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .trust-icon {
      width: 32px;
      height: 32px;
      border: 2px solid var(--red);
      color: var(--red);
      display: grid;
      place-items: center;
      border-radius: 8px;
      flex: 0 0 auto;
      font-weight: 900;
    }

    /* ── Stat band: full-bleed dark credibility numbers ── */
    .stat-band {
      background-color: var(--black);
      /* Faint diagonal hatch, matching the approved mock's texture. */
      background-image: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, .025) 0,
        rgba(255, 255, 255, .025) 1px,
        transparent 1px,
        transparent 10px
      );
      padding: clamp(30px, 4.4vw, 48px) 0;
    }

    .stat-band-inner {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
      text-align: center;
    }

    .stat-metric-num {
      font-size: clamp(38px, 5vw, 60px);
      font-weight: 900;
      line-height: 1;
      letter-spacing: -0.04em;
      color: #fff;
    }

    .stat-metric-num.is-accent { color: #34d99a; }

    .stat-metric-label {
      margin-top: 12px;
      font-size: clamp(11px, 1.05vw, 13px);
      font-weight: 900;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .52);
    }

    @media (max-width: 620px) {
      .stat-band-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 16px;
      }
    }

    /* At-cost prescription widget (ScriptCo) — branded frame */
    .rx-box {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: clamp(26px, 3.4vw, 46px);
    }
    .rx-head { max-width: 760px; }
    .rx-head .section-title { margin-bottom: 14px; }
    .rx-head .section-lead { margin: 0; }
    .rx-widget {
      margin-top: 22px;
      min-height: 120px;
    }
    .rx-widget div-scriptco-widget { display: block; width: 100%; }
    /* The page's global `input, select, textarea` rule (border/min-height/padding/
       bg) bleeds into the widget's Material inputs and inflates field height
       (~80px vs ScriptCo's default 56px). Reset those props inside the widget so
       the fields render exactly as ScriptCo intends. */
    .rx-widget input,
    .rx-widget select,
    .rx-widget textarea {
      border: 0;
      border-radius: 0;
      min-height: 0;
      padding: 0;
      background: transparent;
    }
    /* Flatten the ScriptCo widget's own white card into our outer card */
    .rx-widget .widget-form {
      background: transparent !important;
      box-shadow: none !important;
    }
    .rx-widget .inner-wrapper { padding: 0 !important; }
    /* NOTE: button + "+" icon are recolored to brand red via JS (scriptco-brand.js).
       Angular Material's cascade here beats stylesheet !important, so inline styles
       are the only reliable override — see that file. */
    .rx-note {
      margin: 16px 0 0;
      font-size: 13px;
      color: var(--gray);
    }

    .section {
      padding: 38px 0;
    }

    .section-title {
      font-size: clamp(32px, 4.2vw, 54px);
      line-height: .98;
      letter-spacing: -0.055em;
      margin: 0 0 18px;
    }

    .section-lead {
      font-size: 19px;
      color: var(--gray);
      max-width: 820px;
      margin: 0 0 30px;
    }

    .split {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 28px;
      align-items: stretch;
    }

    .panel {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: clamp(24px, 3.8vw, 42px);
      box-shadow: 0 14px 42px rgba(0,0,0,.07);
    }

    .panel.dark {
      background: var(--black);
      color: var(--white);
      border-color: var(--black);
    }

    .panel.red {
      background: var(--red);
      color: var(--white);
      border-color: var(--red);
    }


    .angle-head {
      display: grid;
      gap: 18px;
      margin-bottom: 22px !important;
    }

    .angle-head span {
      display: block;
    }

    .white-check {
      display: inline-grid !important;
      place-items: center;
      width: 34px;
      height: 34px;
      margin-right: 10px;
      border: 2px solid #fff;
      border-radius: 9px;
      color: #fff;
      font-size: 22px;
      line-height: 1;
      vertical-align: middle;
    }

    .panel h2, .panel h3 {
      margin: 0 0 14px;
      font-size: clamp(28px, 3vw, 42px);
      line-height: 1;
      letter-spacing: -0.045em;
    }



    .strategy-lines {
      margin: 32px 0 26px;
      display: grid;
      gap: 16px;
      font-weight: 900;
      font-size: clamp(24px, 2.35vw, 34px);
      line-height: 1.08;
      letter-spacing: -0.03em;
    }

    .panel p.spaced-line {
      margin-top: 28px;
    }

    .panel p {
      margin: 0 0 18px;
      color: inherit;
      font-size: 17px;
    }

    .muted { color: var(--gray); }

    .pain-list {
      display: grid;
      gap: 14px;
      margin-top: 22px;
    }

    .pain-item {
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 16px;
      background: #fff;
      display: grid;
      grid-template-columns: 38px 1fr;
      gap: 12px;
      align-items: start;
    }

    .bullet {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      background: rgba(229,37,40,.1);
      color: var(--red);
      display: grid;
      place-items: center;
      font-weight: 900;
      font-size: 18px;
    }

    .pain-item strong {
      display: block;
      margin-bottom: 3px;
    }

    .strategy-steps {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 18px;
      margin-top: 26px;
    }

    .step {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 24px;
      min-height: 188px;
    }

    .step-num {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      background: var(--red);
      color: #fff;
      border-radius: 14px;
      font-weight: 900;
      margin-bottom: 16px;
    }

    .step h3 {
      margin: 0 0 10px;
      font-size: 24px;
      letter-spacing: -0.035em;
      line-height: 1;
    }

    .step p {
      color: var(--gray);
      margin: 0;
    }

    .benefits-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-top: 28px;
    }

    .benefit {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px;
      min-height: 136px;
    }

    .benefit .check {
      color: var(--red);
      font-weight: 900;
      margin-bottom: 12px;
      font-size: 22px;
    }

    .benefit strong {
      display: block;
      font-size: 17px;
      line-height: 1.08;
      margin-bottom: 8px;
    }

    .benefit small {
      color: var(--gray);
      font-size: 13px;
      line-height: 1.25;
      display: block;
    }

    .quote-box {
      background: var(--white);
      border: 2px solid var(--red);
      border-radius: 24px;
      overflow: hidden;
      box-shadow: var(--shadow);
    }

    .quote-head {
      background: var(--red);
      color: var(--white);
      padding: 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
    }

    .quote-head h2 {
      margin: 0;
      font-size: clamp(28px, 4vw, 48px);
      line-height: 1;
      letter-spacing: -0.05em;
    }

    .timer {
      background: #fff;
      color: var(--red);
      padding: 10px 14px;
      border-radius: 999px;
      font-weight: 900;
      white-space: nowrap;
    }

    .story {
      padding: clamp(24px, 4vw, 42px);
      display: grid;
      grid-template-columns: .95fr 1.05fr;
      gap: 30px;
      align-items: center;
    }

    .savings-card {
      border: 1px solid var(--border);
      border-radius: 20px;
      overflow: hidden;
      background: #fff;
    }

    .savings-row {
      display: flex;
      justify-content: space-between;
      gap: 20px;
      border-bottom: 1px solid var(--border);
      padding: 14px 18px;
      font-weight: 900;
    }

    .savings-row:last-child {
      border-bottom: none;
      background: #fff4f4;
      color: var(--red);
      font-size: 20px;
    }

    .form-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 26px;
      padding: clamp(24px, 4vw, 44px);
      box-shadow: var(--shadow);
    }

    .form-card .topline {
      height: 5px;
      background: var(--red);
      border-radius: 999px;
      margin-bottom: 24px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    label {
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .04em;
      display: block;
      margin-bottom: 8px;
    }

    input, select, textarea {
      width: 100%;
      border: 1px solid #d8dbe3;
      border-radius: 10px;
      min-height: 48px;
      padding: 12px 13px;
      font: inherit;
      background: #fff;
    }

    textarea {
      min-height: 120px;
      resize: vertical;
    }

    .full { grid-column: 1 / -1; }

    .helper {
      color: var(--gray);
      font-size: 13px;
      margin-top: 8px;
    }

    .referral-preview {
      background: var(--light-gray);
      border-radius: 16px;
      padding: 18px;
      color: #3f4654;
      margin: 18px 0;
      font-size: 15px;
    }

    .copy-row {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
      margin-bottom: 20px;
    }

    .copy-note {
      color: var(--gray);
      font-size: 13px;
    }

    .faq {
      display: grid;
      gap: 12px;
      margin-top: 24px;
    }

    details {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px 20px;
    }

    summary {
      cursor: pointer;
      font-weight: 900;
      font-size: 18px;
    }

    details p {
      color: var(--gray);
      margin: 12px 0 0;
    }

    .final {
      text-align: center;
      background: var(--black);
      color: var(--white);
      padding: clamp(42px, 7vw, 76px) 20px;
      border-radius: 30px;
      margin-bottom: 60px;
    }

    .final h2 {
      font-size: clamp(34px, 5vw, 62px);
      letter-spacing: -0.06em;
      line-height: .96;
      margin: 0 auto 18px;
      max-width: 850px;
    }

    .final p {
      margin: 0 auto 28px;
      max-width: 740px;
      color: #d6d6d6;
      font-size: 19px;
    }

    .disclaimer {
      color: #767b86;
      font-size: 12px;
      line-height: 1.5;
      margin-top: 22px;
    }

    .sticky-mobile {
      display: none;
    }

    @media (max-width: 900px) {
      .split, .story {
        grid-template-columns: 1fr;
      }

      .trust-strip, .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .strategy-steps {
        grid-template-columns: 1fr;
      }

      .quote-head {
        align-items: flex-start;
        flex-direction: column;
      }

      h1 {
        font-size: clamp(52px, 16vw, 90px);
      }
    }

    @media (max-width: 620px) {
      .container {
        width: min(100% - 24px, var(--max));
      }

      .nav-inner {
        align-items: flex-start;
      }

      .brand {
        font-size: 11px;
      }

      .brand-mark {
        width: 42px;
        height: 42px;
      }

      .nav-cta {
        display: none;
      }

      .hero-card {
        padding: 30px 18px;
        border-radius: 22px;
      }

      .hero-card:before {
        left: 18px;
        right: 18px;
      }

      h1 {
        letter-spacing: -0.08em;
      }

      .btn {
        width: 100%;
      }

      .trust-strip, .benefits-grid, .form-grid {
        grid-template-columns: 1fr;
      }

      .full { grid-column: auto; }

      .section {
        padding: 30px 0;
      }

      .sticky-mobile {
        display: block;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 20;
      }

      .sticky-mobile .btn {
        box-shadow: 0 10px 30px rgba(0,0,0,.25);
      }

      body {
        padding-bottom: 84px;
      }
    }
  

/* ── Form interaction helpers (teacher landing) ───────────────────── */
/* Honeypot: visually + AT hidden, but present in the DOM so naive bots
   fill it and trip the backend's check. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.is-hidden { display: none !important; }
.form-status {
  margin-top: 16px;
  font-weight: 700;
  font-size: 15px;
}
.form-status.error { color: var(--red-dark); }
.form-status.ok { color: #0a7d33; }
.thanks-card {
  text-align: center;
  padding: 8px 0 4px;
}
.thanks-card .check-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(10,125,51,.12);
  color: #0a7d33;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 900;
}
button[disabled] { opacity: .6; cursor: progress; }

/* ── Inline field validation (mirrors the RHA application) ─────────── */
.field-error {
  margin-top: 6px;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
input.input-invalid,
select.input-invalid,
textarea.input-invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(229, 37, 40, .12);
}

/* ── Smooth in-page navigation ────────────────────────────────────── */
/* All anchor CTAs ("Review — Before You Renew", "Show Me Better
   Options", the sticky mobile bar, etc.) glide to their target instead
   of jumping. Accessibility: honour prefers-reduced-motion. */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
/* Breathing room so an anchored section's heading lands a touch below
   the viewport top, not flush against it. */
#quote,
#strategy,
#referral {
  scroll-margin-top: 28px;
}

/* Refer page only: tighten the referral form section's vertical padding
   (base .section is 38px). Scoped to #referral so index.html's sections
   keep their spacing. */
#referral { padding: 10px 0; }

/* ── Hero h1 scaled for 2-column layout ── */
.hero-main h1 {
  font-size: clamp(34px, 4.2vw, 62px);
}

/* ── Interactive savings calculator ── */
.calc-box {
  background: var(--black);
  border-radius: 26px;
  padding: clamp(28px, 4vw, 52px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}
@media (max-width: 820px) { .calc-box { grid-template-columns: 1fr; } }

.calc-title {
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: .97;
  letter-spacing: -0.05em;
  color: #fff;
  margin: 12px 0 14px;
}
.calc-lead {
  color: rgba(255,255,255,.6);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 28px;
}
.slider-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 8px;
}
.slider-val {
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 10px;
}
.slider-val .slider-unit { font-size: .42em; font-weight: 700; color: rgba(255,255,255,.5); }

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  outline: none;
  cursor: pointer;
  min-height: auto;
  padding: 0;
  border: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  border: 4px solid #fff;
  cursor: pointer;
}

.calc-result {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: clamp(20px, 2.5vw, 30px);
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(255,255,255,.14);
  font-size: 15px;
  color: rgba(255,255,255,.7);
  gap: 12px;
}
.calc-row b { font-weight: 900; color: #fff; }
.calc-row .c-new { color: #3ee08f; }

.calc-result-big {
  text-align: center;
  padding: 18px 0 10px;
}
.calc-result-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #3ee08f;
  margin-bottom: 6px;
}
.calc-result-amt {
  font-size: clamp(42px, 6vw, 62px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #fff;
}
.calc-result-sub {
  color: rgba(255,255,255,.45);
  font-size: 13px;
  margin-top: 6px;
}
.calc-note {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  line-height: 1.5;
  margin: 14px 0 0;
}

/* ── Multi-step form ── */
.form-progress {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.form-progress-bar {
  height: 100%;
  background: var(--red);
  border-radius: 999px;
  transition: width .4s ease;
}
.form-step-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
}
.form-step-label span:first-child { font-weight: 900; }
.step-pct { color: var(--gray); }

.form-step { display: none; }
.form-step.active { display: block; }

.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.step-nav .btn-primary { flex: 1; }
.btn-back {
  background: var(--light-gray);
  color: var(--black);
  border: 1px solid var(--border);
  min-height: 56px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-back:hover { background: var(--border); }

/* ── FAQ accordion ── */
.faq-list {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.faq-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  font-weight: 900;
  font-size: 17px;
  padding: 20px 22px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--black);
}
.faq-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--light-gray);
  color: var(--red);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 400;
  transition: transform .25s, background .25s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: rgba(229,37,40,.1);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 22px;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.65;
}
.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 22px 20px;
}

/* ── Referral motivation card ── */
.refer-reason {
  display: grid;
  gap: 16px;
}
.refer-item {
  display: flex;
  gap: 12px;
  align-items: center;
}
.refer-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: rgba(229,37,40,.18);
  color: var(--red);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
}
.refer-item strong {
  display: block;
  color: #fff;
  font-size: 15px;
  margin-bottom: 3px;
}
.refer-item span {
  color: rgba(255,255,255,.55);
  font-size: 13px;
  line-height: 1.45;
}

/* ── Refer page: inverted brand-red referral card ──────────────────────
   The referral form-card flips to solid brand red with white content — a
   deliberate contrast to the white quote card on the main page. Scoped to
   this modifier so the main page's .form-card is untouched. Covers the
   form, the success state, and the error/validation states so every piece
   stays legible on red (red-on-red text would otherwise disappear). */
.form-card--red {
  background: var(--red);
  border-color: var(--red-dark);
}
.form-card--red .topline { background: #fff; }

/* Headings + labels invert to white; supporting copy a touch softer. */
.form-card--red .eyebrow,
.form-card--red .section-title,
.form-card--red label { color: #fff; }
.form-card--red .helper,
.form-card--red .section-lead { color: rgba(255, 255, 255, .85); }

/* Black submit button reads as the primary action against the red. */
.form-card--red .btn-secondary {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}
.form-card--red .btn-secondary:hover { background: #222; }

/* Success ("Referral sent — thank you!") state. */
.form-card--red .thanks-card .check-badge {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
/* "Refer Another Teacher" — white inverse CTA on the red success card
   (a red button would vanish on the red card). Reuses .btn for shape. */
.form-card--red #refer-again {
  background: #fff;
  color: var(--red);
  margin-top: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.form-card--red #refer-again:hover { background: #f1f1f1; }

/* Error + inline validation: red-on-red would vanish, so go light. The
   invalid field keeps a dark border (visible on the white input) plus a
   white ring (visible on the red card). */
.form-card--red .form-status.error,
.form-card--red .field-error { color: #fff; }
.form-card--red input.input-invalid,
.form-card--red select.input-invalid,
.form-card--red textarea.input-invalid {
  border-color: var(--black) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .45);
}
