@import url("colors_and_type.css");

/* ============================================================
   TAFS Finance Application Widget
   Apple-style, Mobile-first
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #f5f5f7; color: var(--fg1); font-family: var(--font-sans); }

/* ---- Stage ---- */
.stage {
  min-height: 0;
  height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  background: #fff;
  overflow: visible;
}
.stage.is-dark {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(85,162,224,0.20), transparent 60%),
    radial-gradient(800px 500px at 10% 100%, rgba(17,17,17,0.7), transparent 60%),
    #0a0a0b;
}

/* ---- Landing page (around widget) ---- */
.layout {
  display: flex;
  justify-content: center;
  width: 100%;
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
}
.landing-col { padding-top: 40px; }
.landing-col.right { text-align: left; }

.landing-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tafs-sky-500); margin-bottom: 14px; }
.landing-h { font-size: 52px; line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 18px; color: var(--fg1); text-wrap: balance; }
.is-dark .landing-h { color: #fff; }
.landing-accent { color: var(--tafs-sky-500); }
.landing-sub { font-size: 17px; line-height: 1.5; color: var(--fg3); max-width: 420px; margin: 0 0 28px; }
.is-dark .landing-sub { color: rgba(255,255,255,.65); }

.proof-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 400px; margin-top: 32px; }
.proof-row.three { grid-template-columns: repeat(3, 1fr); }
.proof-stat b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--fg1); }
.is-dark .proof-stat b { color: #fff; }
.proof-stat span { font-size: 12px; color: var(--fg4); }

.trust-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--fg2); margin-bottom: 22px; }
.is-dark .trust-pill { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }
.trust-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tafs-success); box-shadow: 0 0 0 3px rgba(47,158,107,0.18); }

.feature-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 14px; }
.feature-list li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; font-size: 14px; color: var(--fg2); }
.is-dark .feature-list li { color: rgba(255,255,255,.75); }
.feature-list .tick { width: 24px; height: 24px; border-radius: 50%; background: var(--tafs-sky-100); color: var(--tafs-sky-600); display: grid; place-items: center; margin-top: 2px; }
.is-dark .feature-list .tick { background: rgba(85,162,224,0.15); color: var(--tafs-sky-300); }
.feature-list b { color: var(--fg1); font-weight: 700; }
.is-dark .feature-list b { color: #fff; }

.lender-strip { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.is-dark .lender-strip { border-top-color: rgba(255,255,255,0.08); }
.lender-strip .cap { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg4); font-weight: 700; margin-bottom: 12px; }
.lender-strip .row { display: flex; flex-wrap: wrap; gap: 14px 24px; font-size: 13px; color: var(--fg3); font-weight: 600; }
.is-dark .lender-strip .row { color: rgba(255,255,255,.6); }

/* ---- Widget container (replaces iOS phone wrapper) ---- */
.phone-col { display: flex; justify-content: center; }
.widget-container {
  width: 100%;
  max-width: 800px;
  position: relative;
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
}
.is-dark .widget-container {
  background: #1a1a1a;
}

/* ---- Widget root (lives inside container) ---- */
.widget-root {
  display: flex;
  flex-direction: column;
  background: #fff;
  font-family: var(--font-sans);
  color: var(--fg1);
  position: relative;
  min-height: 600px;
  height: auto;
  overflow: visible;
  border-radius: 32px;
  overflow: hidden;
}
.widget-root.dark { background: #1a1a1a; color: #fff; }

/* ---- Top bar: logo + progress ---- */
.w-topbar {
  padding: 40px 32px 12px;
  position: relative;
  z-index: 4;
  background: inherit;
}
.w-topbar-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.w-logo { height: 30px; display: block; }
.dark .w-logo { filter: brightness(0) invert(1); }
.w-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(120,120,128,0.12); border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--fg3);
  transition: all var(--dur-fast) var(--ease-standard);
}
.dark .w-close { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.w-close:hover { background: rgba(120,120,128,0.22); }

/* ---- Progress (numbered + connector, user pick) ---- */
.w-progress {
  display: flex; align-items: center; justify-content: space-between;
  gap: 4px; padding: 4px 2px 10px;
}
.w-step-node {
  position: relative;
  min-width: 28px; height: 22px; border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--tafs-line);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px;
  font-size: 10px; font-weight: 700; color: var(--fg4);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
  cursor: pointer;
  transition: all var(--dur-med) var(--ease-standard);
}
.dark .w-step-node { background: #1a1a1d; border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.4); }
.w-step-node.done { background: var(--tafs-sky-500); border-color: var(--tafs-sky-500); color: #fff; }
.w-step-node.current { background: var(--tafs-sky-500); border-color: var(--tafs-sky-500); color: #fff; box-shadow: 0 0 0 4px rgba(85,162,224,0.2); transform: scale(1.08); }
.w-step-node svg { width: 11px; height: 11px; }
.w-step-line { flex: 1 1 auto; height: 1.5px; background: var(--tafs-line); border-radius: 2px; transition: background var(--dur-med) var(--ease-standard); }
.dark .w-step-line { background: rgba(255,255,255,0.15); }
.w-step-line.done { background: var(--tafs-sky-500); }

.w-step-label {
  font-size: 11px; font-weight: 600; color: var(--fg4);
  display: flex; justify-content: space-between; padding: 0 2px;
  margin-top: 2px;
}
.dark .w-step-label { color: rgba(255,255,255,0.5); }
.w-step-label b { color: var(--fg1); font-weight: 700; }
.dark .w-step-label b { color: #fff; }

/* ---- Phase frame ---- */
.w-body {
  flex: 1;
  padding: 24px 32px 16px;
  position: relative;
}

.w-phase-enter { animation: phaseIn .45s var(--ease-standard) both; }
.w-phase-exit { animation: phaseOut .3s var(--ease-standard) both; }

@keyframes phaseIn {
  from { opacity: 0; transform: translateY(14px) scale(0.99); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes phaseOut {
  from { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.99); filter: blur(6px); }
}

/* ---- Phase typography ---- */
.w-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--tafs-sky-500);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.w-eyebrow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--tafs-sky-300), transparent); }

.w-title {
  font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 8px; text-wrap: balance;
}
.dark .w-title { color: #fff; }
.w-title .accent { color: var(--tafs-sky-500); }

.w-sub {
  font-size: 14px; line-height: 1.5; color: var(--fg3);
  margin: 0 0 22px; max-width: 320px;
}
.dark .w-sub { color: rgba(255,255,255,0.6); }

/* ---- Inputs ---- */
.w-field { margin-bottom: 14px; }
.w-label { display: block; font-size: 12px; font-weight: 600; color: var(--fg3); margin-bottom: 6px; }
.dark .w-label { color: rgba(255,255,255,0.6); }

.w-input, .w-select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px; font-weight: 500;
  padding: 14px 16px;
  border: 1.5px solid var(--tafs-line);
  border-radius: 14px;
  background: #fff;
  color: var(--fg1);
  transition: all var(--dur-fast) var(--ease-standard);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.dark .w-input, .dark .w-select {
  background: #1c1c1e; border-color: rgba(255,255,255,0.12); color: #fff;
}
.w-input::placeholder { color: var(--fg4); font-weight: 400; }
.dark .w-input::placeholder { color: rgba(255,255,255,0.3); }
.w-input:focus, .w-select:focus {
  border-color: var(--tafs-sky-500);
  box-shadow: 0 0 0 4px rgba(85,162,224,0.15);
}

.w-input-lg {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em;
  padding: 20px 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}

.w-amount-input { position: relative; }
.w-amount-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 500; color: var(--ink, #111);
  pointer-events: none; line-height: 1; z-index: 1;
}
.w-amount-input .w-input-lg { padding-left: 24px !important; text-align: left; }

/* ---- Segmented control ---- */
.w-seg {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(120,120,128,0.12); border-radius: 12px;
  margin-bottom: 14px;
}
.dark .w-seg { background: rgba(255,255,255,0.08); }
.w-seg-btn {
  flex: 1; padding: 10px 12px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  border-radius: 8px; border: 0; background: transparent;
  color: var(--fg3); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
}
.dark .w-seg-btn { color: rgba(255,255,255,0.6); }
.w-seg-btn.is-active {
  background: #fff; color: var(--fg1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.dark .w-seg-btn.is-active { background: #2c2c2e; color: #fff; }

/* ---- Choice cards ---- */
.w-choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.w-choice {
  display: grid; grid-template-columns: 44px 1fr 22px; gap: 14px; align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--tafs-line);
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
  text-align: left;
  font-family: var(--font-sans);
  width: 100%;
}
.dark .w-choice { background: #1c1c1e; border-color: rgba(255,255,255,0.08); }
.w-choice:hover { border-color: var(--tafs-sky-300); transform: translateY(-1px); }
.w-choice.is-active { border-color: var(--tafs-sky-500); box-shadow: 0 0 0 3px rgba(85,162,224,0.12); background: rgba(85,162,224,0.03); }
.dark .w-choice.is-active { background: rgba(85,162,224,0.12); }
.w-choice-ico { width: 44px; height: 44px; border-radius: 12px; background: rgba(85,162,224,0.08); color: var(--tafs-sky-500); display: grid; place-items: center; }
.dark .w-choice-ico { background: rgba(85,162,224,0.15); color: var(--tafs-sky-300); }
.w-choice-body b { display: block; font-size: 15px; font-weight: 700; color: var(--fg1); margin-bottom: 2px; }
.dark .w-choice-body b { color: #fff; }
.w-choice-body span { display: block; font-size: 12px; color: var(--fg4); }
.w-choice-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--tafs-line); display: grid; place-items: center; }
.dark .w-choice-check { border-color: rgba(255,255,255,0.2); }
.w-choice.is-active .w-choice-check { background: var(--tafs-sky-500); border-color: var(--tafs-sky-500); color: #fff; }

/* ---- Chips (small pills) ---- */
.w-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.w-chip {
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(120,120,128,0.10); border: 0; color: var(--fg2);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-standard);
}
.dark .w-chip { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.w-chip.is-active { background: var(--tafs-sky-500); color: #fff; }

/* ---- Slider ---- */
.w-slider { margin: 8px 0 20px; }
.w-slider input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 3px;
  background: rgba(120,120,128,0.18);
  outline: none;
}
.dark .w-slider input[type=range] { background: rgba(255,255,255,0.1); }
.w-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--tafs-sky-500);
  box-shadow: 0 2px 8px rgba(85,162,224,0.35);
  cursor: pointer;
}
.w-slider-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg4); margin-top: 8px; }

/* ---- Balloon / Residual ---- */
.w-balloon-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-top: 14px;
}
.w-balloon-head-left { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.w-balloon-pill {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  background: var(--tafs-sky-100);
  color: var(--tafs-sky-700);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}
.w-balloon-input {
  width: 96px; height: 44px;
  border: 1px solid var(--tafs-gray-300);
  border-radius: 14px;
  background: #fff;
  text-align: right;
  font-size: 18px; font-weight: 800;
  color: var(--tafs-gray-800);
  padding: 0 18px;
  outline: none;
}
.w-balloon-input:focus { border-color: var(--tafs-sky-500); }
.w-balloon-final {
  font-size: 13px;
  color: var(--tafs-gray-500);
  margin-top: -12px;
  margin-bottom: 16px;
}

/* ---- Footer CTAs ---- */
.w-footer {
  padding: 10px 32px 28px;
  background: #fff;
  position: relative;
  z-index: 4;
}
.dark .w-footer { background: #1a1a1a; }

.w-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  font-family: var(--font-sans); font-weight: 700; font-size: 16px;
  padding: 18px 24px;
  background: var(--tafs-gradient-swoosh);
  color: #fff;
  border: 0; border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(85,162,224,0.4);
  transition: all var(--dur-fast) var(--ease-standard);
}
.w-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(85,162,224,0.5); }
.w-cta:active { transform: scale(0.98); }
.w-cta:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.w-cta.ghost { background: transparent; color: var(--fg3); box-shadow: none; font-size: 13px; padding: 10px; font-weight: 600; }
.dark .w-cta.ghost { color: rgba(255,255,255,0.6); }

.w-footnote { text-align: center; font-size: 11px; color: var(--fg4); margin-top: 10px; padding: 0 10px; line-height: 1.45; }
.dark .w-footnote { color: rgba(255,255,255,0.4); }

/* ---- ABN search dropdown ---- */
.w-combo { position: relative; margin-bottom: 8px; }
.w-combo-list {
  position: relative;
  margin-top: 6px;
  background: #fff; border: 1px solid var(--tafs-line);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  max-height: 320px; overflow-y: auto;
  animation: dropIn .2s var(--ease-standard);
}
.dark .w-combo-list { background: #1c1c1e; border-color: rgba(255,255,255,0.12); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.w-combo-item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px;
  padding: 12px 16px; cursor: pointer;
  border-bottom: 1px solid var(--tafs-line);
  transition: background var(--dur-fast);
}
.dark .w-combo-item { border-bottom-color: rgba(255,255,255,0.06); }
.w-combo-item:last-child { border-bottom: 0; }
.w-combo-item:hover { background: rgba(85,162,224,0.06); }
.w-combo-item b { font-size: 14px; font-weight: 700; color: var(--fg1); }
.dark .w-combo-item b { color: #fff; }
.w-combo-item small { font-size: 11px; color: var(--fg4); }
.w-combo-item .abn { font-variant-numeric: tabular-nums; font-size: 11px; color: var(--fg4); grid-column: 1/-1; }

.w-combo-state { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-size: 13px; color: var(--fg4); }
.dark .w-combo-state { color: rgba(255,255,255,0.5); }
.w-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(85,162,224,0.2); border-top-color: var(--tafs-sky-500); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Loading skeleton ---- */
.w-skeleton {
  background: linear-gradient(90deg, rgba(120,120,128,0.08) 25%, rgba(120,120,128,0.14) 50%, rgba(120,120,128,0.08) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 8px;
}
.dark .w-skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- Info row (summary) ---- */
.w-info {
  background: rgba(85,162,224,0.06);
  border: 1px solid rgba(85,162,224,0.18);
  border-radius: 14px; padding: 14px 16px;
  margin-bottom: 14px;
}
.dark .w-info { background: rgba(85,162,224,0.12); border-color: rgba(85,162,224,0.25); }
.w-info .k { font-size: 11px; color: var(--tafs-sky-600); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.dark .w-info .k { color: var(--tafs-sky-300); }
.w-info .v { font-size: 14px; color: var(--fg1); font-weight: 600; }
.dark .w-info .v { color: #fff; }
.w-info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- Upload box ---- */
.w-upload {
  border: 1.5px dashed var(--tafs-line);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  background: rgba(120,120,128,0.04);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
}
.dark .w-upload { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.02); }
.w-upload:hover { border-color: var(--tafs-sky-500); background: rgba(85,162,224,0.04); }
.w-upload-ico { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px; background: rgba(85,162,224,0.1); display: grid; place-items: center; color: var(--tafs-sky-500); }
.w-upload b { display: block; font-size: 14px; font-weight: 700; color: var(--fg1); margin-bottom: 4px; }
.dark .w-upload b { color: #fff; }
.w-upload span { font-size: 12px; color: var(--fg4); }

/* ---- Licence preview card ---- */
.w-licence-card {
  aspect-ratio: 1.58 / 1;
  border-radius: 18px;
  background: linear-gradient(135deg, #3A4052 0%, #1F2332 100%);
  position: relative; overflow: hidden;
  color: #fff; padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.w-licence-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% -20%, rgba(136,226,251,0.3), transparent 50%);
}
.w-licence-head { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.w-licence-flag { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; opacity: 0.8; }
.w-licence-title { font-size: 13px; font-weight: 700; opacity: 0.95; }
.w-licence-photo { position: absolute; bottom: 16px; left: 16px; width: 70px; height: 90px; border-radius: 10px; background: rgba(255,255,255,0.08); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 1; }
.w-licence-name { position: absolute; bottom: 52px; left: 100px; font-size: 16px; font-weight: 800; z-index: 1; }
.w-licence-num { position: absolute; bottom: 30px; left: 100px; font-size: 12px; opacity: 0.8; font-variant-numeric: tabular-nums; z-index: 1; }
.w-licence-exp { position: absolute; bottom: 14px; left: 100px; font-size: 10px; opacity: 0.6; z-index: 1; }
.w-licence-scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.w-licence-scan::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(136,226,251,0.4), transparent);
  animation: scan 2s ease-in-out infinite;
}
@keyframes scan { 0%,100% { top: -40%; } 50% { top: 100%; } }

/* ---- Map preview ---- */
.w-map {
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  background: #E9EEF2;
}
.dark .w-map { background: #1a1d24; }
.w-map-pin { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100%); width: 28px; height: 36px; }
.w-map-grid { position: absolute; inset: 0; opacity: 0.5; }

/* ---- Bank tiles ---- */
.w-banks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.w-bank {
  aspect-ratio: 1.3 / 1;
  background: #fff;
  border: 1.5px solid var(--tafs-line);
  border-radius: 14px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
  padding: 10px;
  font-family: var(--font-sans);
  font-weight: 800; font-size: 15px;
  letter-spacing: -0.01em;
}
.dark .w-bank { background: #1c1c1e; border-color: rgba(255,255,255,0.08); }
.w-bank:hover { border-color: var(--tafs-sky-500); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.w-bank.is-active { border-color: var(--tafs-sky-500); background: rgba(85,162,224,0.06); box-shadow: 0 0 0 3px rgba(85,162,224,0.15); }
.bank-cba { color: #D7242B; }
.bank-wbc { color: #DA1710; }
.bank-nab { color: #C8102E; }
.bank-anz { color: #0072CE; }
.bank-mac { color: #1C1C1E; }
.dark .bank-mac { color: #fff; }
.bank-ing { color: #FF6200; }

/* ---- Cross-phase row item ---- */
.w-item-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--tafs-line);
  border-radius: 14px;
  margin-bottom: 8px;
}
.dark .w-item-row { background: #1c1c1e; border-color: rgba(255,255,255,0.08); }
.w-item-row b { font-size: 14px; font-weight: 700; color: var(--fg1); }
.dark .w-item-row b { color: #fff; }
.w-item-row span { font-size: 12px; color: var(--fg4); display: block; }
.w-item-ico { width: 40px; height: 40px; border-radius: 10px; background: rgba(85,162,224,0.08); color: var(--tafs-sky-500); display: grid; place-items: center; }
.dark .w-item-ico { background: rgba(85,162,224,0.15); color: var(--tafs-sky-300); }
.w-item-val { font-size: 14px; font-weight: 700; color: var(--fg1); font-variant-numeric: tabular-nums; }
.dark .w-item-val { color: #fff; }
.w-item-remove { background: transparent; border: 0; color: var(--fg4); cursor: pointer; padding: 4px; }

.w-add-btn {
  width: 100%; padding: 12px; border: 1.5px dashed var(--tafs-line);
  border-radius: 14px; background: transparent;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--tafs-sky-600);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-standard);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.dark .w-add-btn { border-color: rgba(255,255,255,0.15); color: var(--tafs-sky-300); }
.w-add-btn:hover { border-color: var(--tafs-sky-500); background: rgba(85,162,224,0.04); }

/* ---- Resume banner ---- */
.w-resume-sheet {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .4s var(--ease-standard);
}
.dark .w-resume-sheet { background: rgba(0,0,0,0.65); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.w-resume-card {
  width: calc(100% - 40px);
  max-width: 420px;
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.16);
  animation: sheetIn .5s var(--ease-standard);
}
.dark .w-resume-card { background: #1c1c1e; }
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.w-resume-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--tafs-gradient-swoosh); color: #fff; display: grid; place-items: center; margin-bottom: 16px; box-shadow: 0 8px 20px rgba(85,162,224,0.4); }
.w-resume-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 6px; }
.dark .w-resume-card h3 { color: #fff; }
.w-resume-card p { font-size: 13px; color: var(--fg3); margin: 0 0 18px; }
.dark .w-resume-card p { color: rgba(255,255,255,0.6); }
.w-resume-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: rgba(120,120,128,0.08);
  border-radius: 12px; margin-bottom: 18px;
}
.dark .w-resume-meta { background: rgba(255,255,255,0.06); }
.w-resume-meta b { font-size: 13px; font-weight: 700; color: var(--fg1); }
.dark .w-resume-meta b { color: #fff; }
.w-resume-meta small { font-size: 11px; color: var(--fg4); }

/* ---- Success / Complete screen ---- */
.w-success {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 24px 8px;
}
.w-success-ring {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--tafs-gradient-swoosh);
  display: grid; place-items: center;
  margin-bottom: 22px;
  box-shadow: 0 12px 32px rgba(85,162,224,0.4);
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
.w-success-ring svg { width: 44px; height: 44px; color: #fff; }
.w-success h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; text-wrap: balance; }
.dark .w-success h2 { color: #fff; }
.w-success p { font-size: 14px; color: var(--fg3); max-width: 280px; margin: 0 0 20px; }
.dark .w-success p { color: rgba(255,255,255,0.6); }
.w-success .ref {
  padding: 10px 16px; background: rgba(120,120,128,0.08);
  border-radius: 10px; font-size: 12px; color: var(--fg3);
  font-family: var(--font-mono); margin-bottom: 28px;
}
.dark .w-success .ref { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); }
.w-success .ref b { color: var(--fg1); font-weight: 700; }
.dark .w-success .ref b { color: #fff; }

.w-next-steps {
  width: 100%; text-align: left;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 20px;
}
.w-next-step {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
}
.w-next-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(85,162,224,0.12); color: var(--tafs-sky-600);
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  margin-top: 2px;
}
.dark .w-next-num { background: rgba(85,162,224,0.2); color: var(--tafs-sky-300); }
.w-next-step b { font-size: 14px; font-weight: 700; color: var(--fg1); display: block; margin-bottom: 2px; }
.dark .w-next-step b { color: #fff; }
.w-next-step span { font-size: 12px; color: var(--fg4); }

/* ---- Tweaks panel ---- */
.tweaks-panel {
  position: fixed; bottom: 24px; right: 24px;
  width: 280px; background: #fff; border-radius: 18px;
  padding: 18px; box-shadow: 0 20px 48px rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  z-index: 100;
  font-family: var(--font-sans);
}
.tweaks-panel h4 { font-size: 14px; font-weight: 800; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.tweaks-panel h4::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tafs-sky-500); }
.tweak-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; color: var(--fg2); }
.tweak-row:last-child { margin-bottom: 0; }
.tweak-toggle { position: relative; width: 40px; height: 24px; border-radius: 999px; background: rgba(120,120,128,0.22); cursor: pointer; transition: background var(--dur-fast); border: 0; }
.tweak-toggle.on { background: var(--tafs-sky-500); }
.tweak-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--dur-fast); box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.tweak-toggle.on::after { transform: translateX(16px); }

/* ---- Small helpers ---- */
.flex-row { display: flex; gap: 8px; }
.flex-row > * { flex: 1; }
.mt-auto { margin-top: auto; }
.gap-row { display: flex; gap: 8px; align-items: center; }

/* ---- Progress pill (top right) ---- */
.w-progress-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; background: rgba(85,162,224,0.12);
  border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--tafs-sky-600);
}
.dark .w-progress-pill { background: rgba(85,162,224,0.2); color: var(--tafs-sky-300); }

/* ---- Responsive landing columns ---- */
@media (max-width: 1280px) {
  .landing-h { font-size: 42px; }
  .landing-sub { font-size: 15px; }
}
@media (max-width: 860px) {
  .landing-col { display: none; }
}
/* Allow HubSpot parent iframe to resize to full widget content height */
html,
body,
#root,
.stage,
.layout,
.phone-col {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.stage {
  min-height: 0 !important;
  align-items: flex-start !important;
}

.widget-container {
  height: auto !important;
  max-height: none !important;
}
.widget-root {
  border-radius: 32px !important;
  overflow: hidden !important;
  background: #fff !important;
}

.widget-root .w-topbar:empty {
  display: none;
}

/* Extra top clearance when progress bar is visible under sticky website nav */
.widget-root .w-topbar:not(:empty) {
  padding-top: 56px !important;
}
.w-back-btn {
  position: absolute;
  top: 56px;
  right: 32px;
  z-index: 10;

  background: transparent;
  border: 0;

  color: #111827;

  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;
}

.w-back-btn::before {
  content: "← ";
}

.w-back-btn:hover {
  color: var(--tafs-sky-600);
}

/* Privacy Disclosure PDF link under consent checkbox */
.w-consent-link {
  display: inline-block;
  margin: 4px 0 0 28px;
  font-size: 12px;
  color: var(--sky-500, #55A2E0);
  text-decoration: underline;
  line-height: 1.4;
}
.w-consent-link:hover {
  color: var(--sky-600, #3C86C6);
}

/* Default logo size for the widget topbar */
.w-topbar-head .w-logo {
  height: 28px;
  width: auto;
}

/* Two-column footer action buttons (Back | Continue) */
.w-footer-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.w-footer-actions .w-cta-back {
  flex: 0 0 35%;
  background: transparent;
  color: var(--ink-3, #333);
  border: 1px solid var(--line, #D4D4D4);
}
.w-footer-actions .w-cta-continue {
  flex: 1 1 auto;
}

/* Tighten topbar — minimal padding now that logo and step-label text are removed */
.w-topbar {
  padding-top: 8px !important;
  padding-bottom: 0px !important;
}

/* Also tighten the phase body so content starts immediately under the progress bar */
.w-body {
  padding-top: 12px !important;
}

/* Eyebrow ("STEP 0X · LABEL") — reduce its top margin since topbar is now compact */
.w-eyebrow {
  margin-top: 4px !important;
  margin-bottom: 6px !important;
}

/* Tighten the title spacing too */
.w-title {
  margin-bottom: 8px !important;
}

/* Asset type — 2-column grid with "Other" full-width on its own row */
.w-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.w-choices-grid .w-choice {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  min-height: 110px;
  min-width: 0;
  position: relative;
  text-align: left;
}
.w-choices-grid .w-choice:last-child {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
  min-height: 64px;
  padding: 14px 16px;
}
.w-choices-grid .w-choice .w-choice-ico {
  font-size: 56px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  order: 2;
  background: linear-gradient(135deg, #DCF0FB 0%, #B9DEF5 100%);
  border-radius: 14px;
  color: var(--sky-600, #2C84D2);
}
.w-choices-grid .w-choice:last-child .w-choice-ico {
  order: 0;
  font-size: 26px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #DCF0FB 0%, #B9DEF5 100%);
  border-radius: 10px;
}
.w-choices-grid .w-choice .w-choice-check {
  position: absolute;
  top: 10px;
  right: 10px;
}
.w-choices-grid .w-choice .w-choice-body {
  min-width: 0;
  order: 1;
  padding-right: 0;
}
.w-choices-grid .w-choice .w-choice-body b {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}
.w-choices-grid .w-choice .w-choice-ico svg,
.w-choices-grid .w-choice .w-choice-ico img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

/* Mobile — slightly tighter */
@media (max-width: 480px) {
  .w-choices-grid { gap: 6px; }
  .w-choices-grid .w-choice {
    padding: 12px 10px;
    min-height: 96px;
    gap: 8px;
  }
  .w-choices-grid .w-choice .w-choice-ico {
    font-size: 38px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }
  .w-choices-grid .w-choice .w-choice-body b {
    font-size: 12px;
    line-height: 1.2;
  }
}

@media (max-width: 360px) {
  .w-choices-grid .w-choice .w-choice-body b {
    font-size: 12px;
  }
}

/* Mobile progress bar — shrink nodes and lines so all 10 steps fit */
@media (max-width: 600px) {
  .w-progress {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 2px;
    padding: 0 4px;
  }
  .w-step-node {
    min-width: 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 11px;
    flex-shrink: 0;
  }
  .w-step-node svg {
    width: 10px;
    height: 10px;
  }
  .w-step-line {
    flex: 1 1 auto;
    min-width: 4px;
    height: 2px;
  }
  .w-step-label {
    font-size: 12px;
  }
}

/* Extra-narrow phones (≤360px): shrink further */
@media (max-width: 360px) {
  .w-step-node {
    min-width: 18px;
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .w-step-line {
    min-width: 2px;
  }
}

/* Standardise CTA button height across phases */
.w-cta {
  padding: 12px 18px !important;
  font-size: 15px !important;
  min-height: 44px !important;
}
.w-cta-back {
  padding: 10px 14px !important;
  font-size: 14px !important;
  min-height: 44px !important;
}

/* Compress choice tiles on non-asset pages (Residential status, Citizenship, etc.) */
.w-choices:not(.w-choices-grid) .w-choice {
  padding: 10px 14px !important;
  min-height: auto !important;
}
.w-choices:not(.w-choices-grid) .w-choice b {
  font-size: 14px;
}

/* Tighten footnote */
.w-footnote {
  font-size: 10px !important;
  margin-top: 6px !important;
  line-height: 1.35 !important;
}

/* Two-column field row for compact address layout */
.w-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.w-field-row .w-field {
  min-width: 0;
  margin-bottom: 0 !important;
}
.w-field-row .w-input {
  width: 100%;
}

/* Tighten field and label spacing globally */
.w-field {
  margin-bottom: 10px !important;
}
.w-label {
  font-size: 12px !important;
  margin-bottom: 4px !important;
  line-height: 1.3 !important;
}

/* Compress Residential status selector */
.w-seg {
  margin-bottom: 8px !important;
}
.w-seg-btn {
  padding: 8px 12px !important;
  font-size: 13px !important;
}

/* ============================================================
   FIXED FRAME — widget is statically sized across all phases
   No internal scrolling. Content is tuned to fit per page.
   ============================================================ */
.widget-root {
  height: 640px;
  max-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.w-topbar { flex-shrink: 0; }
.w-body {
  flex: 1 1 auto;
  overflow: hidden;
}
.w-footer { flex-shrink: 0; }

@media (min-width: 1024px) {
  .widget-root {
    height: 680px;
    max-height: 680px;
  }
}

/* Dynamic-height phases: Assets, Liabilities, Completion — see data-phase-key block at end of file */

/* Tighten input padding globally */
.w-input {
  padding: 10px 12px !important;
  font-size: 14px !important;
  height: auto !important;
  line-height: 1.4 !important;
}

/* Optional label suffix */
.w-optional {
  font-weight: 400;
  color: var(--ink-5, #737373);
  font-size: 11px;
}

/* Page 1 — keep consent block compact inside fixed frame */
.w-consent-link {
  font-size: 11px !important;
  margin-top: 2px !important;
}

/* Phase animation wrapper fills full body height so banking can push buttons down */
.w-body > .w-phase-enter,
.w-body > .w-phase-exit {
  height: 100%;
}

/* Banking idle state — flex column so action buttons sit at the bottom of the frame */
.w-banking-idle {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.w-banking-actions {
  margin-top: auto;
}

/* Application received — compressed completion screen */
.w-complete {
  text-align: center;
  padding: 0 4px;
}
.w-complete .w-success-ring {
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto 12px !important;
}
.w-complete .w-success-ring svg {
  width: 28px !important;
  height: 28px !important;
}
.w-complete h2 {
  font-size: 22px !important;
  line-height: 1.15 !important;
  margin-bottom: 8px !important;
}
.w-complete > p {
  font-size: 13px !important;
  line-height: 1.4 !important;
  margin-bottom: 12px !important;
}
.w-complete .ref {
  font-size: 12px !important;
  padding: 6px 12px !important;
  margin-bottom: 16px !important;
}
.w-complete .w-next-steps {
  text-align: left;
}
.w-complete .w-next-step {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.35;
}
.w-complete .w-next-step b {
  font-size: 14px;
}
.w-complete .w-next-step span {
  font-size: 12px !important;
  color: var(--ink-4, #525252);
  display: block;
  margin-top: 2px;
}
.w-complete .w-next-num {
  width: 24px !important;
  height: 24px !important;
  font-size: 12px !important;
  flex-shrink: 0;
}

/* ============================================================
   DYNAMIC FRAME — Steps 9 (Assets), 10 (Liabilities), and the
   completion screen are allowed to grow vertically. All other
   phases remain fixed at 640px.
   ============================================================ */
.widget-root[data-phase-key="intent"],
.widget-root[data-phase-key="identity"],
.widget-root[data-phase-key="banking"],
.widget-root[data-phase-key="assets"],
.widget-root[data-phase-key="liab"],
.widget-root[data-phase-key="complete"] {
  height: auto !important;
  max-height: none !important;
  min-height: 640px;
}

.widget-root[data-phase-key="intent"] .w-body,
.widget-root[data-phase-key="identity"] .w-body,
.widget-root[data-phase-key="banking"] .w-body,
.widget-root[data-phase-key="assets"] .w-body,
.widget-root[data-phase-key="liab"] .w-body,
.widget-root[data-phase-key="complete"] .w-body {
  flex: 0 0 auto !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

@media (min-width: 1024px) {
  .widget-root[data-phase-key="intent"],
  .widget-root[data-phase-key="identity"],
  .widget-root[data-phase-key="banking"],
  .widget-root[data-phase-key="assets"],
  .widget-root[data-phase-key="liab"],
  .widget-root[data-phase-key="complete"] {
    min-height: 680px;
  }
}

/* For dynamic phases, phase-enter/exit must NOT be height:100% (parent is auto — circular) */
.widget-root[data-phase-key="intent"] .w-phase-enter,
.widget-root[data-phase-key="intent"] .w-phase-exit,
.widget-root[data-phase-key="identity"] .w-phase-enter,
.widget-root[data-phase-key="identity"] .w-phase-exit,
.widget-root[data-phase-key="banking"] .w-phase-enter,
.widget-root[data-phase-key="banking"] .w-phase-exit,
.widget-root[data-phase-key="assets"] .w-phase-enter,
.widget-root[data-phase-key="assets"] .w-phase-exit,
.widget-root[data-phase-key="liab"] .w-phase-enter,
.widget-root[data-phase-key="liab"] .w-phase-exit,
.widget-root[data-phase-key="complete"] .w-phase-enter,
.widget-root[data-phase-key="complete"] .w-phase-exit {
  height: auto !important;
}

/* Illion embed — let the wrapper and iframe grow to natural height */
.w-illion-frame {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  height: auto !important;
  max-height: none !important;
}
.w-illion-frame iframe {
  height: auto !important;
  min-height: 700px;
  max-height: none !important;
}

/* Application received — content perfectly centered in frame */
.widget-root[data-phase-key="complete"] {
  min-height: 640px;
}
.widget-root[data-phase-key="complete"] .w-body {
  flex: 0 0 auto !important;
  overflow: visible !important;
  min-height: 600px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 0 !important;
}
.w-complete {
  width: 100%;
  text-align: center;
  padding: 0;
  margin: 0;
}
.w-complete .w-complete-icon,
.w-complete .success-icon {
  margin: 0 auto 16px !important;
}
@media (min-width: 1024px) {
  .widget-root[data-phase-key="complete"] .w-body {
    min-height: 640px;
  }
}

