/* ==========================================================================
   Salary Credit Line — page components

   Modelled on the reference product page: a cream hero card carrying a rate
   badge and a ribbon of four promises, a stat row, a two-column explainer
   with tick marks, a product carousel and a tabbed features panel.
   Scoped to .fx-page so none of it leaks into the rest of the site.
   ========================================================================== */

.fx-page {
  --cream: #F5F5F7;
  --cream-deep: #ECECEF;
  --band: var(--secondary);
}

/* ---------- breadcrumb ---------- */
.fx-crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 22px 0 16px;
  font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
.fx-crumb a { color: var(--ink-3); }
.fx-crumb a:hover { color: var(--primary); }
.fx-crumb [aria-current] { color: var(--ink); }
.fx-crumb .sep { color: var(--line-strong); }

/* ---------- hero card ---------- */
.fx-hero {
  position: relative;
  background: var(--cream);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: var(--sp-12);
}
.fx-hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: var(--sp-8); align-items: center;
  padding: var(--sp-14) var(--sp-12) 0;
}
.fx-title {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  letter-spacing: -.04em; font-weight: 600; color: var(--ink);
  margin-bottom: var(--sp-6);
}
.fx-lede { font-size: var(--text-lead); color: var(--ink-2); line-height: 1.5;
  margin-bottom: var(--sp-10); max-width: 38ch; }

.fx-apply {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: var(--r-pill);
  background: var(--primary); color: #fff;
  font-weight: 500; font-size: var(--text-body); line-height: 1;
  letter-spacing: -.01em;
  transition: background var(--dur) var(--ease);
}
.fx-apply:hover { background: var(--primary-600); text-decoration: none; }
.fx-apply .arr { transition: transform var(--dur) var(--ease); }
.fx-apply:hover .arr { transform: translateX(4px); }

/* the rate badge, sitting beside the art like a sticker */
.fx-hero-right { position: relative; display: grid; justify-items: center; gap: var(--sp-6); }
.fx-rate {
  background: var(--surface); border-radius: var(--r-xl);
  padding: 20px 32px; text-align: center;
  box-shadow: var(--sh-md);
}
.fx-rate span { display: block; font-size: var(--text-small); font-weight: 400; color: var(--ink-2); }
.fx-rate strong {
  display: block; font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 600;
  letter-spacing: -.04em; color: var(--ink); line-height: 1.1;
}
.fx-rate strong small { font-size: .46em; font-weight: 700; }
.fx-hero-art img { width: 100%; max-width: 330px; height: auto; }

/* ---------- ribbon of promises ---------- */
.fx-ribbon {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--band); color: #fff;
  padding: var(--sp-6) var(--sp-8);
  margin-top: var(--sp-10);
}
.fx-ribbon li {
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--sp-5);
  font-size: var(--text-small); font-weight: 400; line-height: 1.35;
}
.fx-ribbon li + li { border-left: 1px solid rgba(255, 255, 255, .16); }
.fx-ribbon .ic {
  flex-shrink: 0; display: grid; place-items: center;
  width: 28px; height: 28px; color: #fff;
}

/* ---------- stat row ---------- */
.fx-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-6); margin-top: var(--sp-10);
}
.fx-stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); overflow: hidden;
  padding: var(--sp-8) var(--sp-5) 0; text-align: center;
}
.fx-stat strong { display: block; font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600; letter-spacing: -.03em; }
.fx-stat span {
  display: block; margin: 6px 0 var(--sp-6);
  font-size: var(--text-caption); font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--ink-2);
}
.fx-stat i { display: block; height: 4px; }

/* ---------- two-column explainer ---------- */
.fx-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); align-items: center; }
.fx-split p { color: var(--ink-2); margin-bottom: var(--sp-6); }
.fx-ticks { display: grid; gap: var(--sp-5); }
.fx-ticks li { display: flex; align-items: flex-start; gap: 12px; font-size: .98rem; }
.fx-ticks .tick {
  flex-shrink: 0; display: grid; place-items: center;
  width: 20px; height: 20px; color: var(--primary);
}
.fx-art {
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--cream); display: grid; place-items: center;
  padding: var(--sp-10);
}
.fx-art img { width: 100%; max-width: 380px; height: auto; }

/* ---------- other products ---------- */
.fx-products {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6); margin-top: var(--sp-10);
}
.fx-product {
  display: flex; gap: var(--sp-5); align-items: flex-start;
  padding: var(--sp-7);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease);
}
.fx-product:hover { border-color: var(--line-strong); text-decoration: none; }
.fx-product .ic {
  flex-shrink: 0; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-alt); color: var(--primary);
}
.fx-product h3 { font-size: 1.02rem; margin-bottom: 6px; color: var(--ink); }
.fx-product p { font-size: .88rem; color: var(--ink-2); margin: 0; }

/* ---------- tabbed features ---------- */
.fx-tabs { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: var(--sp-8); align-items: start; }
.fx-tablist { display: grid; gap: var(--sp-3); }
.fx-tab {
  text-align: left; width: 100%;
  padding: 18px 20px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  font-size: var(--text-body); font-weight: 400; color: var(--ink-2);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.fx-tab:hover { border-color: var(--primary); color: var(--ink); }
.fx-tab[aria-selected="true"] {
  border-color: transparent; color: var(--ink);
  background: var(--surface-alt); font-weight: 500;
}
.fx-panel {
  padding: var(--sp-12);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl);
  min-height: 220px;
}
.fx-panel h3 { display: flex; align-items: center; gap: 12px; font-size: 1.12rem; margin-bottom: var(--sp-4); }
.fx-panel h3 .tick {
  flex-shrink: 0; display: grid; place-items: center;
  width: 22px; height: 22px; color: var(--primary);
}
.fx-panel p { color: var(--ink-2); font-size: .98rem; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .fx-hero-grid { grid-template-columns: 1fr; padding: var(--sp-10) var(--sp-8) 0; }
  .fx-hero-right { order: -1; }
  .fx-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
  .fx-ribbon li:nth-child(3) { border-left: 0; }
  .fx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-split, .fx-tabs { grid-template-columns: 1fr; gap: var(--sp-8); }
  .fx-products { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .fx-hero-grid { padding: var(--sp-8) var(--sp-6) 0; }
  .fx-ribbon { grid-template-columns: 1fr; padding: var(--sp-6); }
  .fx-ribbon li { padding: 0; }
  .fx-ribbon li + li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .28); padding-top: var(--sp-5); }
  .fx-stats { grid-template-columns: 1fr; }
  .fx-apply { width: 100%; justify-content: center; }
  .fx-panel { padding: var(--sp-7); }
}

@media (prefers-reduced-motion: reduce) {
  .fx-apply, .fx-apply .arr, .fx-product { transition: none; }
}

/* Worked example, in place of stock art in the explainer */
.fx-example { width: 100%; max-width: 380px; }
.fx-example-head { font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--sp-5); text-align: center; }
.fx-example-rows { display: grid; gap: 0; }
.fx-example-rows > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid rgba(15, 23, 42, .09);
}
.fx-example-rows > div:last-child { border-bottom: 0; }
.fx-example-rows dt { font-size: .92rem; color: var(--ink-2); }
.fx-example-rows dd { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.fx-example-rows .is-quiet dd { color: var(--ink-3); }
.fx-example-rows .is-good dt, .fx-example-rows .is-good dd { color: var(--primary); }
.fx-example-rows .is-good dd { font-size: 1.2rem; }
.fx-example-foot { margin-top: var(--sp-5); font-size: .84rem; color: var(--ink-2); text-align: center; }
