/**
 * bond-app-v4-theme.css
 * Standardized visual layer for all Bond Connect online applications.
 * Load AFTER bond-form.css / bond-app-shared.css:
 *
 *   <link rel="stylesheet" href="bond-form.css">
 *   <link rel="stylesheet" href="bond-app-v4-theme.css">
 *
 * Nothing here touches behaviour. Per-product overrides go in a <style> block
 * on :root in the product's own page, not in this file.
 */

/* ---------------------------------------------------------------
   1. Tokens
   Only the values that changed from bond-form.css are redeclared.
   --------------------------------------------------------------- */
:root {
  --brand: #2974a3;
  --brand-deep: #315c82;
  --brand-hover: #246892;
  --brand-softer: #f0f7fb;
  --green: #00a806;
  --surface: #fff;
  --font-heading: "Poppins", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;
  --font-button: "Roboto", "Montserrat", system-ui, sans-serif;
  --btn-radius: 3px;

  /* Page is light grey so the application card reads as a sheet of paper */
  --bg: #f4f5f6;
  --page: #f4f5f6;

  /* Field and choice borders. Integer widths only: a 1.5px border rounds
     down to 1px at devicePixelRatio 1, which silently halves the emphasis. */
  --border: #8296ab;
  --border-width: 1px;
  --border-width-selected: 2px;
  --border-hairline: #e5e7e9;

  /* Grey ramp, re-based against #f4f5f6 rather than #fff.
     All of these clear 4.5:1 on both the page and the card. */
  --text: #4d4d4d;
  --text-secondary: #54595f;
  --text-muted: #6c7177;
  --text-helper: #6f7479;
  --text-faint: #9aa0a6;   /* dividers and non-text only */

  /* Card as paper: squarer corners, lifted shadow */
  --radius-lg: 4px;
  --radius: 8px;
  --shadow: 0 10px 30px rgba(30, 41, 51, 0.1), 0 2px 6px rgba(30, 41, 51, 0.06);

  --input-min-height: 52px;
  --required-mark: #c0392b;

  --footer-bg: #171717;
  --stepper-upcoming: #cdd4da;
  --stepper-upcoming-text: #6f767d;

  /* Decorative page flair is off in v4 */
  --bond-bg-flair-opacity: 0;
}

body { background: var(--page); }
body::after { display: none; }

/* ---------------------------------------------------------------
   2. Site header — logo left, phone + flag right, hairline under
   --------------------------------------------------------------- */
.bond-site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-hairline);
}
.bond-site-header__inner {
  max-width: 1370px;               /* wider than the content column */
  margin: 0 auto;
  padding: 14px clamp(14px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bond-site-header__logo { height: clamp(26px, 4vw, 34px); width: auto; display: block; }
.bond-site-header__contact { display: flex; align-items: center; gap: clamp(10px, 2vw, 20px); }
.bond-site-header__phone {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.bond-site-header__phone svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.bond-site-header__flag { height: 18px; width: auto; display: block; flex-shrink: 0; }

/* ---------------------------------------------------------------
   3. Hero band — eyebrow, product title, stepper.
   Replaces the old .card-header: one progress indicator, not two.
   --------------------------------------------------------------- */
.bond-hero { background: var(--page); }
.bond-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 5.5vw, 62px) clamp(14px, 4vw, 28px) clamp(28px, 4.5vw, 46px);
}
.bond-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-helper);
  margin-bottom: clamp(12px, 1.6vw, 16px);
}
.bond-hero__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--brand-deep);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Old header chrome is gone: the card starts at the step content */
.card-header { display: none; }
.progress-wrap { display: none; }

/* ---------------------------------------------------------------
   4. Stepper (now inside .bond-hero)
   Connector segments sit BETWEEN dots, never behind them.
   Labels are centred on their own dot; the row's left inset is set at
   runtime from the first label's width so it aligns with the title.
   --------------------------------------------------------------- */
.bond-hero .stepper {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  overflow-x: auto;
  margin: clamp(22px, 3vw, 32px) -46px 0;
  padding: 8px 46px 28px 59px;     /* left value overwritten by alignSteps() */
  border-top: none;
  justify-content: flex-start;
  gap: 0;
}
.bond-hero .stepper-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 auto;
  padding-right: 14px;
  text-align: left;
  cursor: pointer;
}
.bond-hero .stepper-item:last-child { padding-right: 0; }
.bond-hero .stepper-item__row { display: flex; align-items: center; }
.bond-hero .stepper-dot {
  width: 28px;
  height: 28px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--stepper-upcoming);
  background: #fff;
  color: var(--stepper-upcoming-text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.bond-hero .stepper-line {
  width: clamp(34px, 8vw, 104px);
  height: 2px;
  margin-left: 14px;
  border-radius: 1px;
  background: var(--stepper-upcoming);
}
.bond-hero .stepper-label {
  position: absolute;
  top: 37px;
  left: 14px;
  transform: translateX(-50%);
  font-size: clamp(10px, 1.6vw, 12.5px);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text-muted);
}
/* current */
.bond-hero .stepper-item.current .stepper-dot {
  border: 3px solid var(--brand-deep);
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 0 0 5px rgba(49, 92, 130, 0.14);
}
.bond-hero .stepper-item.current .stepper-label { color: var(--brand-deep); font-weight: 600; }
/* completed */
.bond-hero .stepper-item.done .stepper-dot {
  border: 3px solid var(--green);
  background: #fff;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  -webkit-text-stroke: 0.5px var(--green);
  box-shadow: none;
}
.bond-hero .stepper-item.done .stepper-line { background: var(--green); }
.bond-hero .stepper-item.done .stepper-label { color: #5c636a; }

/* ---------------------------------------------------------------
   5. Application card — the sheet of paper
   --------------------------------------------------------------- */
.app, .bond-app-panel { max-width: 1180px; margin: 0 auto; }
.bond-app-panel {
  background: var(--surface);
  border: 1px solid #e3e6e9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card, .bond-app-panel .card { border: none; box-shadow: none; border-radius: 0; }
.card-body { padding: clamp(26px, 4vw, 40px) clamp(20px, 4vw, 44px) clamp(28px, 4vw, 40px); }

.screen h2 {
  font-family: var(--font-heading);
  font-size: clamp(21px, 3.4vw, 27px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}
.lead { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 0 0 28px; max-width: 60ch; }

/* ---------------------------------------------------------------
   6. Two registers, and only two.
   Anything actionable: white + visible border.
   Anything informational: flat grey, no border, no accent bar, no shadow.
   --------------------------------------------------------------- */
.callout {
  background: #f6f7f8;
  border: none;
  border-left: none;
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}
.callout strong { color: var(--text-muted); }
.callout__label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b6b6b;
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------
   7. Inputs — the edge must be findable
   --------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
select, textarea {
  width: 100%;
  min-height: var(--input-min-height);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text);
  background: #fff;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(41, 116, 163, 0.14);
}
label { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
label .req { color: var(--required-mark); font-weight: 700; }
label .opt { font-weight: 400; color: var(--text-helper); }
.hint { font-size: 14px; color: var(--text-helper); margin: 0 0 8px; }
.form-grid { gap: 26px; }

/* ---------------------------------------------------------------
   8. Choice controls — selected border must be >= unselected
   --------------------------------------------------------------- */
.choice-btn, .term-card {
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
  transition: border-color 0.15s, background 0.15s;
}
.choice-btn:hover, .term-card:hover { border-color: var(--brand); background: var(--brand-softer); }
.choice-btn.selected, .term-card.selected, .term-card-savings.selected {
  border: var(--border-width-selected) solid var(--brand);
  background: var(--brand-softer);
  box-shadow: none;
}
.term-card-savings { background: #fff; border-color: var(--border); }
.term-card .amt { font-family: var(--font-heading); font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.term-card .meta { font-size: 15px; color: var(--text-muted); margin-top: 8px; }
.term-card .badge {
  background: none;
  border: none;
  padding: 0;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-helper);
}

/* Province / jurisdiction cards: name, rule, then the consequential facts */
.choice-btn--jurisdiction { position: relative; overflow: hidden; min-height: 138px; padding: 18px 22px; }
.choice-btn--jurisdiction .choice-title { font-weight: 600; font-size: 19px; color: #2b2b2b; }
.choice-btn--jurisdiction .choice-facts {
  margin-top: 11px;
  padding: 11px 44px 0 0;
  border-top: 1px solid rgba(49, 92, 130, 0.14);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.choice-btn--jurisdiction .choice-facts .amount { font-size: 14.5px; color: var(--text); }
.choice-btn--jurisdiction .choice-facts .amount strong { font-weight: 600; }
.choice-btn--jurisdiction .choice-facts .payee { font-size: 13.5px; color: var(--text-helper); }
.choice-btn__check {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--green);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Yes / No pairs */
.yesno-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 320px; }
.yesno-btn {
  min-height: 52px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}
.yesno-btn.selected {
  border: var(--border-width-selected) solid var(--brand);
  background: var(--brand-softer);
  font-weight: 600;
  color: var(--brand);
}

/* ---------------------------------------------------------------
   9. Review & submit
   --------------------------------------------------------------- */
.review-row {
  display: grid;
  grid-template-columns: minmax(120px, 30%) 1fr auto;
  align-items: baseline;
  gap: 4px 16px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f3f6;
}
.review-row__key { font-size: 14px; color: var(--text-helper); }
.review-row__val { font-size: 16px; color: #3a3a3a; word-break: break-word; }
.review-row__edit {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
}

/* ---------------------------------------------------------------
   10. Nav actions
   --------------------------------------------------------------- */
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid #e8eef3;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 12px 4px;
  font-family: var(--font-button);
  font-size: 16px;
  color: var(--brand);
  cursor: pointer;
}
.btn-back svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-next {
  min-height: 52px;
  padding: 14px clamp(24px, 5vw, 34px);
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--btn-radius);
  font-family: var(--font-button);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(41, 116, 163, 0.3);
}
.btn-next:hover { background: var(--brand-hover); }

/* ---------------------------------------------------------------
   11. Below the card — declaration, then legal links + SSL on one line
   --------------------------------------------------------------- */
.bond-support-footer { display: none; }   /* replaced by the line below + site footer */

.bond-legal-notice {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 28px) 52px;
}
.bond-declaration {
  width: 100%;
  margin: 24px 0 0;
  padding: 0 clamp(0px, 2vw, 24px);
  font-size: 12.5px;
  line-height: 1.8;
  color: #6c7177;
  text-align: center;
  text-wrap: pretty;
}
.bond-legal-line {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #6c7177;
}
.bond-legal-line a { color: #6c7177; text-decoration: none; }
.bond-legal-line .sep { color: var(--text-faint); font-weight: 400; }
.bond-legal-line .ssl { display: inline-flex; align-items: center; gap: 9px; }
.bond-legal-line .ssl svg { width: 16px; height: 16px; stroke: #00a806; fill: none; stroke-width: 1.8; }

/* ---------------------------------------------------------------
   12. Site footer
   --------------------------------------------------------------- */
.bond-site-footer { background: var(--footer-bg); color: rgba(255, 255, 255, 0.72); }
.bond-site-footer__cols {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(38px, 5vw, 54px) clamp(14px, 4vw, 28px) clamp(30px, 4vw, 42px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 32px 56px;
}
.bond-site-footer__logo { height: 28px; width: auto; display: block; margin-bottom: 16px; }
.bond-site-footer__blurb { margin: 0; max-width: 34ch; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.55); }
.bond-site-footer__heading {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 18px;
}
.bond-site-footer__list { display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; }
.bond-site-footer__list a { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.bond-site-footer__list svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.bond-site-footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.bond-site-footer__bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(14px, 4vw, 28px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}
.bond-office-address { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(255, 255, 255, 0.6); }
.bond-site-footer__copyright {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------------------------------------------------------------
   13. Print
   --------------------------------------------------------------- */
@media print {
  .bond-site-header, .bond-site-footer, .nav-actions, .bond-hero .stepper { display: none; }
  .bond-app-panel { box-shadow: none; border: none; }
  body { background: #fff; }
}
