/*
  Buffer landing page (/home, /home-mobile): sections, widgets and the
  Book-a-call modal. Shared tokens and components live in buffer-site.css.
*/

/* Tabular figures keep the calculator's numbers from jittering as they change.
   The design sets them on the landing page only (not the modal or legal pages). */
body { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- hero */

.top { position: relative; scroll-margin-top: 24px; }

.hero {
  position: relative;
  margin: 12px 12px 0;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #FBEADB 0%, #F8F3EE 55%, #FFFFFF 100%);
  padding: 172px 48px 184px;
}

/* The hero's two static glows, as in the approved design. They are also the
   fallback for hero-aurora.js (the moving "warm air" drawn on a canvas that the
   module inserts as the hero's first child): once its first frame is up, the
   module adds .is-aurora-live and the glows cross-fade out underneath it. If the
   module cannot run (no WebGL, software renderer, shader failure) they stay. */
.hero-glow { transition: opacity 1.2s cubic-bezier(.2, 0, 0, 1); }
.is-aurora-live .hero-glow { opacity: 0; }

.hero .hero-glow-copper {
  top: -240px;
  left: -200px;
  width: 760px;
  height: 760px;
  background: rgba(181, 104, 44, .34);
  filter: blur(40px);
}

.hero .hero-glow-navy {
  top: 20px;
  right: -240px;
  width: 820px;
  height: 820px;
  background: rgba(21, 32, 61, .11);
  filter: blur(50px);
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy-2);
  white-space: nowrap;
}

.badge-flag { display: block; width: 20px; height: 14px; border-radius: 2px; flex: none; }

.hero-title {
  font-size: 80px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--navy);
}

/* Four forced lines: at 80px the sentence cannot rewrap inside this column. */
.hero-title > span { display: block; white-space: nowrap; }
.hero-title .accent { letter-spacing: -.02em; }

.hero-lead { max-width: 540px; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 4px;
}

/* ------------------------------------------------------ approval card */

.approval {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 480px;
}

.approval-back {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-card);
  transform: translate(30px, 26px) rotate(2deg);
  transition: transform .3s var(--ease);
}

.approval-card {
  position: relative;
  container-type: inline-size;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: var(--shadow-float);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  transform: rotate(-3deg);
  transition: transform .3s var(--ease);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .approval:hover .approval-card { transform: rotate(0deg); }
  .approval:hover .approval-back { transform: translate(30px, 26px) rotate(1deg); }
}

.approval-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--text-3);
}

.approval-label span { color: var(--green); }

.approval-title {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--navy);
}

.approval-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--copper);
}

.approval-amount {
  border-radius: 16px;
  background: var(--navy);
  padding: 22px 24px 20px;
}

.approval-amount-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--copper-light);
}

.approval-amount-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
}

.approval-amount-value {
  font-size: 56px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--cream);
}

.approval-amount-cur {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--text-3);
}

.approval-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}

.approval-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.approval-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--peach);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--navy-2);
}

.approval-pill .i { color: var(--copper); }

/* A picture of the app's button, not a control. */
.approval-cta {
  align-self: flex-start;
  cursor: default;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

@container (max-width: 400px) {
  .approval-pills { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* ------------------------------------------------------------- pillars */

.pillars {
  position: relative;
  z-index: 2;
  width: min(1200px, 100% - 2 * var(--gutter));
  margin: -104px auto 0;
}

.pillars-tray {
  border-radius: 28px;
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  box-shadow: var(--shadow-card);
}

.pillar {
  border-radius: 20px;
  background: #FFFFFF;
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--peach);
  color: var(--copper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.pillar-stat {
  margin-top: 16px;
  font-size: 64px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--copper);
}

.card-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--navy);
}

.pillar .card-title { margin-top: 6px; }

/* ------------------------------------------------------------ sections */

.section {
  position: relative;
  width: min(1200px, 100% - 2 * var(--gutter));
  margin: 128px auto 0;
  scroll-margin-top: 96px;
}

/* Extra in-page anchors kept from the previous page (#pilot, #faq-loans…). */
.anchor-alias {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  scroll-margin-top: 96px;
  pointer-events: none;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 48px;
  align-items: end;
}

.section-head-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head-main .h2 { max-width: 620px; }
#how .section-head-main .h2 { max-width: 640px; }

.section-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

/* -------------------------------------------------------- how it works */

/* A panel a segmented control has just shown fades in (how it works, FAQ, calculator). */
.is-entering { animation: panel-in .15s ease-out; }

@keyframes panel-in { from { opacity: 0; } to { opacity: 1; } }

.steps {
  position: relative;
  margin-top: 56px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.step {
  position: relative;
  border-radius: 20px;
  background: #FFFFFF;
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.step-head {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Dotted connector from one step's number to the next card. */
.step-head::before,
.step-head::after {
  content: "";
  position: absolute;
  top: 21px;
  border-top: 2px dotted rgba(21, 32, 61, .2);
}

.step-head::before { left: -28px; width: 16px; }
.step-head::after { left: 48px; right: -48px; }
.step:first-child .step-head::before,
.step:last-child .step-head::after { display: none; }

.step-num,
.step-head .icon-tile { position: relative; z-index: 1; }

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--peach);
  color: var(--copper);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footnote {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}

.footnote--ok .i { color: var(--green); }
.footnote--info .i { color: var(--copper); }

/* ---------------------------------------------------------- calculator */

.calc-lead { margin-top: 8px; max-width: 620px; }

.facts { display: flex; flex-direction: column; }

/* The value reads first on screen; the label stays first for screen readers. */
.fact {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}

.fact:last-child { border-bottom: 1px solid var(--hairline); }

.fact dd {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--navy);
  white-space: nowrap;
}

.fact dt {
  font-size: 14px;
  color: var(--text-2);
  text-align: right;
}

.calc {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 24px;
  align-items: stretch;
}

.calc-input {
  border-radius: 28px;
  background: #FFFFFF;
  padding: 40px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.calc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.calc-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--navy);
}

.calc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.seg--grid { display: grid; }
.seg--grid .seg-opt { padding: 0; }
.seg--mode { margin-top: 24px; grid-template-columns: 1fr 1fr; }

.calc-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.calc-amount-row {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.calc-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.calc-amount-value {
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--navy);
}

.calc-cad {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--text-3);
}

/* The native range input is the real control; track, fill and thumb are drawn. */
.slider {
  --f: .2857143;
  position: relative;
  height: 28px;
  margin-top: 18px;
}

.slider-track,
.slider-fill {
  position: absolute;
  left: 0;
  top: 10px;
  height: 8px;
  border-radius: 999px;
}

.slider-track { right: 0; background: var(--surface-2); }
.slider-fill { width: calc(14px + var(--f) * (100% - 14px)); background: var(--copper); }

.slider-thumb {
  position: absolute;
  top: 0;
  left: calc(var(--f) * (100% - 28px));
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--copper);
  box-shadow: var(--shadow-thumb);
  pointer-events: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}

.slider-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

/* Size the native thumb like the drawn one so both travel the same distance. */
.slider-input::-webkit-slider-runnable-track { height: 28px; background: transparent; border: 0; }
.slider-input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; }
.slider-input::-moz-range-track { height: 28px; background: transparent; border: 0; }
.slider-input::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; }

.slider-input:focus-visible { outline: none; }
.slider-input:focus-visible ~ .slider-thumb { outline: 2px solid var(--copper); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
  .slider:hover .slider-thumb { transform: scale(calc(1 + .08 * var(--m))); }
}

.slider.is-dragging .slider-thumb {
  transform: scale(calc(1 + .15 * var(--m)));
  box-shadow: 0 0 0 6px rgba(181, 104, 44, .18), var(--shadow-thumb);
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
}

.calc-monthly { display: flex; flex-direction: column; }
.calc-term-label { margin-top: 32px; }

.seg--term { margin-top: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.seg--term .opt-short { display: none; }

.calc-apr-row {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.seg--apr { grid-template-columns: repeat(3, 64px); }
.seg--apr .seg-opt { height: 36px; }

.notice {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--peach);
}

.notice .i { margin-top: 2px; color: var(--copper); }

.notice p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--navy-2);
}

.notice strong { font-weight: 600; color: var(--navy); }

.calc-foot {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}

.calc-result {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  border-radius: 28px;
  background: var(--navy);
  padding: 40px;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: var(--shadow-float);
}

.calc-result-glow {
  position: absolute;
  top: -180px;
  right: -180px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 160, 106, .4), rgba(227, 160, 106, 0));
  filter: blur(30px);
  pointer-events: none;
}

.calc-result-top { position: relative; }

.calc-pay-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream-muted);
}

.calc-pay {
  margin-top: 14px;
  font-size: 72px;
  /* "$1,522.50" (the largest value) is 4.71em wide: shrink in narrow panels. */
  font-size: min(72px, 20.8cqi);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--cream);
  white-space: nowrap;
}

.calc-pay-sub {
  margin-top: 14px;
  font-size: 15px;
  color: var(--cream-muted);
}

.calc-rows {
  position: relative;
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
}

.calc-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline-dark);
  font-size: 15px;
}

.calc-rows dt { color: var(--cream-muted); }
.calc-rows dd { font-weight: 600; color: var(--cream); text-align: right; }
.calc-rows .calc-interest { color: var(--copper-light); }

.calc-math {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid var(--hairline-dark);
}

.calc-math-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
}

/* A 44px tap target that does not change the row's height. */
.calc-math-toggle::before { content: ""; position: absolute; inset: -14px -8px; }

.calc-math-toggle .i-info { color: var(--copper-light); }
.calc-chevron { transition: transform .2s; }
.calc-math-toggle[aria-expanded="true"] .calc-chevron { transform: rotate(90deg); }

.calc-math-note {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream-muted);
}

/* ------------------------------------------------------------------ why */

.why-lead { margin-bottom: 6px; }

.why-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.why-card {
  border-radius: 20px;
  background: #FFFFFF;
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.why-card .icon-tile { margin-bottom: 16px; }

/* ---------------------------------------------------------------- story */

.story {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.story-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  background: var(--surface-2);
  box-shadow: var(--shadow-float);
}

.story-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  min-width: 0;
}

/* All three lines share one grid cell, so the tallest one sets the height. */
.story-lines { display: grid; }

.story-line {
  grid-area: 1 / 1;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--navy);
  text-wrap: pretty;
  opacity: 0;
  /* Hidden lines are out of the way of selection, taps and find-in-page. */
  visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}

.story-line.is-active { opacity: 1; visibility: visible; transition: opacity .2s ease .2s, visibility 0s linear .2s; }
.story-line > span { color: var(--copper); }

.story-dots { display: flex; gap: 8px; align-items: center; }

.story-dot {
  display: flex;
  align-items: center;
  width: 40px;
  height: 26px;
  margin: -10px 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.story-dot::before {
  content: "";
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(21, 32, 61, .12);
  transition: background-color .2s;
}

.story-dot[aria-current="true"]::before { background: var(--copper); }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
  align-self: stretch;
}

.compare-card {
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-card--without { background: var(--surface-2); }
.compare-card--with { background: var(--navy); box-shadow: var(--shadow-float); }

.compare-tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-card--without .compare-tile { background: var(--red-light); color: var(--red); }
.compare-card--with .compare-tile { background: var(--green-light); color: var(--green); }

.compare-title { font-size: 16px; font-weight: 600; color: var(--navy); }
.compare-card--with .compare-title { color: var(--cream); }
.compare-card--with .body-copy { color: var(--cream-muted); }

@media (prefers-reduced-motion: reduce) {
  .story-line, .story-line.is-active { transition: none; }
}

/* ------------------------------------------------------- from the blog */

/* Rendered by the server (server/home-blog.js): a featured card, then up to
   two compact cards beside it. Each card is a single link. */
.blog-preview-side { gap: 20px; }
.blog-preview-side .link { align-self: flex-end; }

.blog-preview-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.blog-preview-more {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-preview-more .blog-card { flex: 1; }

.blog-card {
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--navy);
  text-decoration: none;
}

.blog-card--featured {
  display: grid;
  grid-template-columns: 46% minmax(0, 1fr);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.blog-card-cover { padding: 12px; }

/* At least 16:10, stretched to the card's height. */
.blog-card-frame {
  position: relative;
  width: 100%;
  min-height: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
}

.blog-card-frame img,
.blog-card-thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-frame img { transition: transform .24s var(--ease); }

.blog-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 26px 36px 26px 24px;
}

.blog-card-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--peach);
  color: var(--copper);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.blog-pill--new {
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--navy-2);
}

.blog-pill--sm { height: 24px; padding: 0 11px; }

/* Titles and excerpts end in an ellipsis, never mid-word. */
.blog-card-title,
.blog-card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.blog-card-title {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--navy);
  text-wrap: pretty;
}

.blog-card-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
}

.blog-stat {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface-2);
}

.blog-stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog-stat-value {
  flex: none;
  font-size: 40px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--copper);
}

.blog-stat-label { font-size: 14px; line-height: 1.45; color: var(--navy-2); }
.blog-stat-source { font-size: 12px; line-height: 1.5; color: var(--text-3); }

/* Meta and link settle at the bottom, with or without the stat. */
.blog-card-foot {
  margin-top: auto;
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.blog-card-meta { font-size: 13px; color: var(--text-3); }

.blog-card-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.blog-card-read .i { transition: transform .24s var(--ease); }

/* Desktop, 2–3 articles: the featured card (≈64%) beside the compact
   cards, which stretch to its height. */
@media (min-width: 1024px) {
  .blog-preview-grid--2,
  .blog-preview-grid--3 { grid-template-columns: minmax(0, 1.78fr) minmax(0, 1fr); }

  .blog-preview-grid--2 .blog-card-body,
  .blog-preview-grid--3 .blog-card-body { padding: 24px 26px 24px 20px; }

  .blog-preview-grid--2 .blog-stat,
  .blog-preview-grid--3 .blog-stat { padding: 14px 16px; }

  .blog-preview-grid--2 .blog-stat-row,
  .blog-preview-grid--3 .blog-stat-row { gap: 14px; }
}

/* Compact: no excerpt or stat, and no shadow until hovered. */
.blog-card--compact {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
}

.blog-card-thumb {
  position: relative;
  flex: none;
  width: 112px;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}

.blog-card-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding-top: 2px;
}

.blog-card--compact .blog-card-title {
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.01em;
}

[data-press="card"].is-pressed {
  transform: translateY(0) scale(calc(1 - .01 * var(--m))) !important;
  transition: transform .09s ease-out, box-shadow .09s ease-out !important;
}

@media (hover: hover) and (pointer: fine) {
  .blog-card:hover .blog-card-frame img { transform: scale(calc(1 + .03 * var(--m))); }
  .blog-card:hover .blog-card-read .i { transform: translateX(calc(3px * var(--m))); }
}

/* ------------------------------------------------------------------ faq */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.seg--faq { margin-top: 12px; }
.seg--faq .seg-opt { padding: 0 22px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: 20px;
  background: #FFFFFF;
  padding: 22px 28px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.faq-h { font: inherit; }

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.faq-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--surface-2);
  color: var(--navy);
  transition: transform .24s var(--ease), background-color .2s, color .2s;
}

.faq-item.is-open .faq-icon {
  background: var(--navy);
  color: var(--cream);
  transform: rotate(45deg);
}

/* Height + fade: the answer grid animates 0fr -> 1fr. */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows .32s var(--ease), opacity .32s var(--ease), visibility 0s linear .32s;
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows .32s var(--ease), opacity .32s var(--ease), visibility 0s;
}

/* Without JavaScript the accordion cannot open, so show every answer. */
.no-js .faq-a { grid-template-rows: 1fr; opacity: 1; visibility: visible; }

.faq-a-inner { min-height: 0; overflow: hidden; }

.faq-a-body {
  padding-top: 16px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: auto;
}

.faq-a-body p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
}

/* Draw the focus ring around the whole card rather than the question row. */
@supports selector(:has(*)) {
  .faq-q:focus-visible { outline: none; }
  .faq-item:has(.faq-q:focus-visible) { outline: 2px solid var(--copper); outline-offset: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-a, .faq-item.is-open .faq-a, .faq-icon { transition: none; }
}

/* ------------------------------------------------------------------ cta */

.cta-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px;
  background: var(--navy);
  padding: 80px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 64px;
  align-items: center;
  box-shadow: var(--shadow-float);
}

.cta-panel .glow-cta {
  --t: .6;
  bottom: -260px;
  left: -200px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle closest-side, rgba(181, 104, 44, .6) 0%, rgba(181, 104, 44, .3) 45%, rgba(181, 104, 44, 0) 100%);
  animation: driftA 23s var(--drift) -12s infinite;
}

.cta-title { position: relative; max-width: 560px; color: var(--cream); }

.cta-side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.cta-text {
  position: relative;
  font-size: 17px;
  line-height: 1.6;
  color: var(--cream-muted);
}

/* ------------------------------------------------- 1024–1199: same layout */

@media (max-width: 1199px) {
  .hero-title { font-size: 64px; }
  .hero-inner { grid-template-columns: minmax(min-content, 1fr) minmax(0, 480px); }

  .story { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 56px; }
  .story-line { font-size: 34px; }
}

/* ------------------------------------------------------- 768–1023: tablet */

@media (max-width: 1023px) {
  .section { margin-top: 104px; }

  .hero-inner { display: block; }
  .approval { margin: 72px auto 0; }

  .pillars-tray { grid-template-columns: minmax(0, 1fr); }

  .section-head { display: block; }
  .section-head-main { gap: 12px; }
  .section-head-side { margin-top: 16px; }
  .calc-lead { margin-top: 4px; }
  .facts { margin-top: 24px; }
  .why-lead { margin: 16px 0 0; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-head::before, .step-head::after { display: none; }

  .calc { grid-template-columns: minmax(0, 1fr); }

  .why-grid { grid-template-columns: minmax(0, 1fr); }

  .story { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
  .story-img { aspect-ratio: 4 / 3; object-position: 50% 30%; }
  .story-line { font-size: 36px; line-height: 1.12; }

  /* from the blog: the cover above the text, so it keeps its 16:10 crop */
  .blog-preview-side .link { align-self: flex-start; }
  .blog-preview-grid--3 .blog-preview-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-card--featured { display: flex; flex-direction: column; }
  .blog-card-cover { padding: 12px 12px 0; }
  .blog-card-frame { min-height: 0; }
  .blog-card-body { padding: 24px 28px 28px; }

  .faq { display: block; }
  .faq-intro { position: static; max-width: 620px; }
  .faq-lists { margin-top: 40px; }

  .cta-panel { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 64px 56px; }
}

/* ------------------------------------------------------------ < 768 */

@media (max-width: 767px) {
  .section { margin-top: 80px; }

  /* hero */
  .hero { margin: 8px 8px 0; border-radius: 24px; padding: 104px 16px 196px; }
  .hero .hero-glow-copper { top: -140px; left: -100px; width: 440px; height: 440px; }
  .hero .hero-glow-navy { top: 300px; right: -160px; width: 480px; height: 480px; }

  .hero-copy { gap: 22px; }

  .badge {
    height: 32px;
    padding: 0 12px 0 8px;
    font-size: 11px;
    letter-spacing: .1em;
    box-shadow: var(--shadow-card);
  }

  .badge-flag { width: 18px; height: 13px; }

  .hero-title { font-size: clamp(34px, 11.29vw, 44px); }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
  }

  .hero-actions .link { height: 44px; justify-content: center; }

  .approval { max-width: none; margin-top: 42px; }

  .approval-back {
    inset: auto 14px -10px 14px;
    height: 60px;
    border-radius: 20px;
    box-shadow: none;
    transform: none;
  }

  .approval-card {
    border-radius: 20px;
    padding: 22px;
    gap: 16px;
    transform: none;
  }

  .approval-label { font-size: 11px; }
  .approval-title { font-size: 28px; }
  .approval-amount { padding: 18px 20px 16px; }
  .approval-amount-label { font-size: 10px; }
  .approval-amount-row { gap: 10px; margin-top: 8px; }
  .approval-amount-value { font-size: 44px; }
  .approval-amount-cur { font-size: 11px; }
  .approval-text { font-size: 14px; }
  .approval-pills { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .approval-pill { padding: 11px 14px; }

  /* pillars */
  .pillars { margin-top: -140px; }
  .pillars-tray { border-radius: 24px; padding: 10px; gap: 10px; }
  .pillar { padding: 24px; gap: 10px; }
  .pillar-stat { margin-top: 10px; font-size: 56px; }
  .pillar .card-title { margin-top: 4px; }
  .card-title { font-size: 18px; }

  /* section heads */
  .seg--how { display: grid; grid-template-columns: 1fr 1fr; align-self: stretch; }
  .seg--how .seg-opt { padding: 0; }

  /* how it works */
  .steps,
  .steps--3 { margin-top: 24px; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .step { padding: 24px; gap: 18px; }
  .step-text { gap: 6px; }
  .footnote { margin-top: 20px; align-items: flex-start; }
  .footnote .i { margin-top: 2px; }

  /* calculator */
  .fact { padding: 12px 0; }
  .fact dd { font-size: 20px; }
  .calc { margin-top: 32px; gap: 16px; }
  .calc-input { border-radius: 24px; padding: 24px; }
  .calc-head { gap: 12px; }
  .calc-title { font-size: 17px; }
  .calc-tag { font-size: 10px; }
  .seg--mode { margin-top: 20px; }
  .seg--grid .seg-opt { height: 38px; font-size: 13px; }
  .calc-amount-row { margin-top: 28px; }
  .calc-amount { gap: 6px; }
  .calc-amount-value { font-size: 32px; }
  .calc-cad { font-size: 11px; }
  .slider { margin-top: 16px; }
  .calc-term-label { margin-top: 28px; }
  .seg--term .opt-long { display: none; }
  .seg--term .opt-short { display: inline; }
  .calc-apr-row { display: block; }
  .seg--apr { margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seg--apr .seg-opt { height: 38px; }
  .notice { margin-top: 28px; gap: 12px; padding: 16px 18px; }
  .notice p { font-size: 14px; }
  .calc-foot { margin-top: 24px; padding-top: 0; align-items: flex-start; }
  .calc-foot .i { margin-top: 2px; }

  .calc-result { border-radius: 24px; padding: 28px; }
  .calc-result-glow { top: -160px; right: -160px; width: 400px; height: 400px; }
  .calc-pay { margin-top: 12px; font-size: 52px; }
  .calc-pay-sub { margin-top: 12px; }
  .calc-rows { margin-top: 24px; padding-top: 0; }
  .calc-rows > div { padding: 12px 0; }
  .calc-math { padding-top: 18px; }

  /* why */
  .why-grid { margin-top: 32px; gap: 12px; }
  .why-card { padding: 24px; gap: 10px; }
  .why-card .icon-tile { margin-bottom: 10px; }

  /* story */
  .story { gap: 28px; }
  .story-img { border-radius: 24px; }
  .story-body { gap: 20px; }
  .story-line { font-size: 28px; line-height: 1.15; }
  .story-dot { width: 36px; }
  .compare { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .compare-card { padding: 22px; gap: 12px; }

  /* from the blog */
  .blog-preview-grid { margin-top: 24px; gap: 12px; }
  .blog-preview-more,
  .blog-preview-grid--3 .blog-preview-more { display: flex; flex-direction: column; gap: 12px; }
  .blog-card-body { padding: 20px; }
  .blog-card-title { font-size: 22px; }
  .blog-stat { padding: 14px 16px; }
  .blog-stat-row { gap: 14px; }
  .blog-card-foot { margin-top: 0; padding-top: 0; gap: 14px; }
  .blog-card--compact { gap: 14px; padding: 14px; }
  .blog-card-thumb { width: 88px; height: 88px; }
  .blog-card-text { gap: 8px; padding-top: 0; }

  /* faq */
  .faq-intro { display: block; }
  .faq-intro .h2 { margin-top: 12px; }
  .faq-intro .lead { margin-top: 16px; }
  .faq-intro .link { margin-top: 20px; }
  .seg--faq { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; }
  .seg--faq .seg-opt { padding: 0; }
  .faq-lists { margin-top: 20px; }
  .faq-list { gap: 10px; }
  .faq-item { padding: 18px 20px; }
  .faq-q { gap: 16px; font-size: 16px; line-height: 1.3; }
  .faq-icon { width: 32px; height: 32px; }
  .faq-icon .i { width: 16px; height: 16px; }
  .faq-a-body { padding-top: 14px; gap: 10px; }
  .faq-a-body p { font-size: 15px; }

  /* cta */
  .cta-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 40px 24px;
    border-radius: 24px;
  }

  .cta-panel .glow-cta { bottom: -200px; left: -160px; width: 460px; height: 460px; }
  .cta-side { display: contents; }
  .cta-text { font-size: 16px; }
  .cta-panel .btn { margin-top: 8px; }
}

/* Very narrow phones: keep the badge on one line inside the hero card. */
@media (max-width: 359px) {
  .badge { gap: 8px; padding: 0 10px 0 7px; font-size: 10px; letter-spacing: .05em; }
}

/* ---------------------------------------------------- Book-a-call modal */

.bc-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  font-family: var(--sans);
  font-variant-numeric: normal;
  color: var(--navy);
}

.bc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 32, 61, .4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: bc-fade-in .2s ease-out;
}

.bc-root[data-closing] .bc-backdrop { animation: bc-fade-out .2s ease-out forwards; }

.bc-guard { position: absolute; width: 1px; height: 1px; overflow: hidden; }

/* desktop dialog */
.bc-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.bc-dialog {
  position: relative;
  pointer-events: auto;
  width: 1040px;
  max-width: 100%;
  height: min(760px, 92vh);
  height: min(760px, 92dvh);
  border-radius: 28px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: var(--shadow-float);
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  animation: bc-dialog-in .32s var(--ease);
}

.bc-root[data-closing] .bc-dialog { animation: bc-dialog-out .2s var(--ease) forwards; }

.bc-side {
  position: relative;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  isolation: isolate;
  background: var(--navy);
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  color: var(--cream);
}

.bc-side::-webkit-scrollbar { display: none; }

.bc-glow {
  --t: .6;
  top: -200px;
  right: -220px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle closest-side, rgba(227, 160, 106, .4) 0%, rgba(227, 160, 106, .2) 45%, rgba(227, 160, 106, 0) 100%);
  animation: driftA 26s var(--drift) -7s infinite;
}

.bc-side-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bc-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper-light);
}

.bc-title {
  font-size: 36px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.035em;
  color: var(--cream);
}

.bc-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--copper-light);
}

.bc-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(247, 243, 235, .72);
}

.bc-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(247, 243, 235, .55);
}

.bc-cover {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.bc-cover li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cream);
}

.bc-cover .i { margin-top: 2px; color: var(--copper-light); stroke-width: 2; }

.bc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding: 0;
  list-style: none;
}

.bc-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(247, 243, 235, .08);
  border: 1px solid rgba(247, 243, 235, .12);
  font-size: 13px;
  font-weight: 600;
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.bc-side-foot {
  position: relative;
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bc-host { display: flex; align-items: center; gap: 12px; }

.bc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--copper);
  color: var(--cream);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.bc-host-text { display: flex; flex-direction: column; gap: 2px; }
.bc-host-name { font-size: 14px; font-weight: 600; color: var(--cream); }
.bc-host-role { font-size: 13px; color: var(--cream-muted); }

.bc-note {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(247, 243, 235, .55);
}

.bc-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.bc-head {
  padding: 28px 76px 14px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bc-head-title { font-size: 17px; font-weight: 600; color: var(--navy); }
.bc-head-sub { font-size: 13px; color: var(--text-2); }

.bc-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 320px;
}

.bc-mount { position: absolute; inset: 0; min-width: 320px; }
.bc-mount iframe { display: block; width: 100%; height: 100%; border: 0; }

/* The dialog was opened on a wide screen that has since narrowed (a phone
   rotated to portrait, split view): drop the navy panel so the calendar
   keeps the whole width. The dialog keeps its name from the hidden title. */
@media (max-width: 767px) {
  .bc-center { padding: 12px; }
  .bc-dialog { grid-template-columns: minmax(0, 1fr); }
  .bc-side { display: none; }
  .bc-dialog .bc-stage,
  .bc-dialog .bc-mount { min-width: 0; }
}

.bc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* loading skeleton */
.bc-skeleton {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 6px 32px 24px;
  background: #FFFFFF;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 28px;
  pointer-events: none;
  transition: opacity .2s ease-out;
}

.bc-skel-cal { display: flex; flex-direction: column; gap: 18px; }
.bc-skel-bar { display: flex; justify-content: space-between; align-items: center; }
.bc-skel-month { width: 160px; height: 20px; border-radius: 6px; }
.bc-skel-arrows { display: flex; gap: 8px; }
.bc-skel-arrows span { width: 28px; height: 28px; border-radius: 50%; }
.bc-skel-days { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 8px; }
.bc-skel-days span { display: flex; justify-content: center; }
.bc-skel-days i { display: block; width: 36px; height: 36px; border-radius: 50%; }
.bc-skel-times { display: flex; flex-direction: column; gap: 12px; padding-top: 40px; }
.bc-skel-times span { height: 46px; border-radius: 12px; }

/* Too narrow for the calendar and the times side by side (a tablet in
   portrait, a narrowed window): stack them, as the phone sheet does. */
.bc-stage { container-type: inline-size; }

@container (max-width: 579px) {
  .bc-skeleton { display: flex; flex-direction: column; gap: 18px; }
  .bc-skel-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 0; }
}

.bc-shimmer {
  background: linear-gradient(90deg, #F1EFEA 25%, #F7F6F3 50%, #F1EFEA 75%);
  background-size: 200% 100%;
  animation: bc-shimmer 1.4s linear infinite;
}

/* booked / fallback */
.bc-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.bc-state-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  max-width: 380px;
}

.bc-fallback .bc-state-inner { max-width: 400px; }

.bc-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bc-check .i {
  stroke-width: 2.25;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: bc-draw .5s var(--ease) .1s forwards;
}

/* Focused by script so screen readers announce the new state; not a control. */
.bc-state-title:focus { outline: none; animation: none; }

.bc-state-title {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--navy);
}

.bc-state-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--copper);
}

.bc-state-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
}

.bc-done { margin-top: 6px; padding: 0 28px; }

.bc-small {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}

.bc-warn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--amber-light);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bc-fallback .bc-state-title { font-size: 24px; line-height: 1.15; }
.bc-fallback .bc-state-text { font-size: 15px; }
.bc-fallback .btn { margin-top: 6px; gap: 8px; }

.bc-retry {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

/* The ghost underline sits under the text, not under the 44px hit area. */
.bc-retry[data-ghost]::after { bottom: 10px; }

/* which view is showing */
.bc-root:not([data-view="loading"]):not([data-view="loaded"]) .bc-mount,
.bc-root:not([data-view="loading"]):not([data-view="loaded"]) .bc-skeleton,
.bc-root[data-skeleton-done] .bc-skeleton,
.bc-root:not([data-view="booked"]) .bc-booked,
.bc-root:not([data-view="fallback"]) .bc-fallback { display: none; }

.bc-root[data-view="loaded"] .bc-skeleton { opacity: 0; }

/* mobile sheet */
.bc-sheet-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: max(12px, env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: bc-sheet-in .38s var(--sheet);
}

.bc-root[data-closing] .bc-sheet-wrap { animation: bc-sheet-out .2s var(--sheet) forwards; }

/* Closed by dragging: the sheet carries on from where the finger let go. */
.bc-root[data-drag-close] .bc-sheet-wrap { animation: none !important; }

.bc-sheet {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 24px 24px 0 0;
  background: #FFFFFF;
  box-shadow: 0 -20px 60px -30px rgba(21, 32, 61, .4);
  display: flex;
  flex-direction: column;
}

.bc-sheet-top {
  position: sticky;
  top: 0;
  z-index: 3;
  flex: none;
  background: #FFFFFF;
  border-radius: 24px 24px 0 0;
  touch-action: none;
}

.bc-grab {
  padding: 8px 0 4px;
  display: flex;
  justify-content: center;
  touch-action: none;
  cursor: grab;
}

.bc-grab span {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(21, 32, 61, .16);
}

.bc-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px 20px;
}

.bc-sheet-title { font-size: 17px; font-weight: 600; color: var(--navy); }
.bc-sheet .bc-close { position: static; }

.bc-card {
  position: relative;
  flex: none;
  overflow: hidden;
  isolation: isolate;
  margin: 8px 16px 0;
  border-radius: 20px;
  background: var(--navy);
  padding: 22px;
  color: var(--cream);
}

.bc-card .bc-glow { top: -180px; right: -180px; width: 420px; height: 420px; }

.bc-card-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bc-card .bc-eyebrow { font-size: 11px; }
.bc-card .bc-title { font-size: 28px; line-height: 1.1; }
.bc-intro { display: flex; flex-direction: column; gap: 14px; }
.bc-card .bc-text { line-height: 1.55; }
.bc-card .bc-chips { margin-top: 0; }
.bc-card .bc-chip { height: 28px; padding: 0 10px; font-size: 12px; }

.bc-disclosure {
  border-top: 1px solid rgba(247, 243, 235, .12);
  padding-top: 4px;
}

.bc-disclosure-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
}

.bc-disclosure-btn .i { color: var(--copper-light); transition: transform .24s var(--ease); }
.bc-disclosure-btn[aria-expanded="true"] .i { transform: rotate(180deg); }

.bc-card .bc-cover { gap: 10px; padding: 2px 0 8px; }
.bc-card .bc-cover li { gap: 10px; font-size: 14px; }

/* Booked and fallback collapse the navy card to its title. */
.bc-root[data-view="booked"] .bc-card .bc-eyebrow,
.bc-root[data-view="booked"] .bc-intro,
.bc-root[data-view="fallback"] .bc-card .bc-eyebrow,
.bc-root[data-view="fallback"] .bc-intro { display: none; }

.bc-sheet .bc-stage {
  flex: none;
  min-height: 0;
  min-width: 0;
  margin-top: 12px;
}

.bc-sheet .bc-mount {
  position: relative;
  inset: auto;
  width: 100%;
  height: 680px;
}

.bc-sheet .bc-skeleton {
  padding: 8px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bc-sheet .bc-skel-month { width: 150px; }
.bc-sheet .bc-skel-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 0; }

.bc-sheet .bc-state { position: static; display: block; padding: 40px 24px 24px; }
.bc-sheet .bc-state-inner { gap: 16px; max-width: none; }
.bc-sheet .bc-booked .bc-state-title { font-size: 30px; }
.bc-sheet .bc-state-text { font-size: 15px; }
.bc-sheet .bc-done,
.bc-sheet .bc-fallback .btn { margin-top: 4px; }

.bc-sheet-foot {
  margin-top: auto;
  flex: none;
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(21, 32, 61, .08);
}

.bc-sheet-foot .bc-host-name { color: var(--navy); }
.bc-sheet-foot .bc-host-role { color: var(--text-2); }
.bc-sheet-foot .bc-note { color: var(--text-3); }

@keyframes bc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bc-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes bc-dialog-in { from { opacity: 0; transform: scale(.96) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bc-dialog-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.96) translateY(12px); } }
@keyframes bc-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes bc-sheet-out { from { transform: none; } to { transform: translateY(100%); } }
@keyframes bc-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes bc-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .bc-dialog,
  .bc-sheet-wrap { animation: bc-fade-in .2s ease-out; }

  .bc-root[data-closing] .bc-dialog,
  .bc-root[data-closing] .bc-sheet-wrap { animation: bc-fade-out .2s ease-out forwards; }

  .bc-shimmer { animation: none; background: var(--surface-2); }
  .bc-check .i { animation: none; stroke-dashoffset: 0; }
  .bc-disclosure-btn .i { transition: none; }
}
