/* DAVZON – Get my cost breakdown (cost-breakdown.html)
   The estimator: inputs on a white card, the live total on an Ink card,
   then what every fee includes, the request form and FAQs. Brand tokens
   only (Sand, White, Paper, Saffron, Ink, Slate). */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hero ---------- */
.cb-hero { position: relative; padding: clamp(118px, calc(9 * var(--vw)), 168px) 0 clamp(28px, calc(2.6 * var(--vw)), 48px); }
.cb-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(42% 80% at 86% 0%, rgba(242, 169, 59, 0.22), transparent); pointer-events: none; }
.cb-hero .eor-wrap { position: relative; }
.cb-hero__title { max-width: 14em; }
.cb-hero__lede { max-width: 40em; }
.cb-hero__terms { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cb-hero__terms li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 12px; border-radius: var(--r-pill); background: var(--white); color: var(--ink); font-weight: 600; font-size: 15px; }
.cb-hero__terms svg { flex: none; color: var(--ink); padding: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--saffron); }

/* ---------- Estimator ---------- */
.cb-est { padding-bottom: clamp(56px, calc(5.5 * var(--vw)), 104px); }
.cb-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 16px;
  padding: 16px;
  border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--white) 45%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.cb-in { display: grid; gap: 0; padding: clamp(20px, calc(2.2 * var(--vw)), 40px); border-radius: var(--r-card); background: var(--white); }
.cb-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 24px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.cb-step:first-child { padding-top: 0; border-top: 0; }
.cb-step__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--saffron); font-weight: 800; font-size: 15px; }
.cb-step__body { display: grid; gap: 14px; }
.cb-row { grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.cb-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.cb-label output { font-weight: 800; font-size: clamp(22px, calc(1.7 * var(--vw)), 30px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cb-hint { color: var(--slate); font-size: 14px; line-height: 1.5; }
.cb-hint a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.cb-select { position: relative; }
.cb-select::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.cb select, .cb input[type="number"], .cb input[type="text"], .cb input[type="email"], .cb textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font: 600 17px/1.3 var(--font);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.cb select { appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer; }
.cb textarea { min-height: 0; padding: 14px 18px; resize: vertical; }
.cb select:hover, .cb input:hover, .cb textarea:hover { border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.cb select:focus-visible, .cb input:focus-visible, .cb textarea:focus-visible { outline: 3px solid var(--saffron); outline-offset: 1px; background: var(--white); box-shadow: none; }

/* Segmented choices (level, currency, PF basis) */
.cb .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: var(--r-pill); background: var(--paper); }
.cb .seg button { display: grid; place-content: center; gap: 1px; min-height: 48px; padding: 4px 10px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--slate); font: 700 15px/1.15 var(--font); cursor: pointer; transition: background-color 0.25s var(--ease), color 0.25s var(--ease); }
.cb .seg button small { font-weight: 600; font-size: 12px; opacity: 0.75; }
.cb .seg button:hover { color: var(--ink); }
.cb .seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.cb .seg button:focus-visible { outline-offset: -3px; }

/* Salary slider */
.cb input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 0; background: transparent; cursor: pointer; --p: 50%; }
.cb input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--ink) var(--p), var(--paper) var(--p)); }
.cb input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--paper); }
.cb input[type="range"]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--ink); }
.cb input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border: 5px solid var(--white); border-radius: 50%; background: var(--saffron); box-shadow: 0 4px 14px rgba(12, 27, 42, 0.3); transition: transform 0.2s var(--ease); }
.cb input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.cb input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 5px solid var(--white); border-radius: 50%; background: var(--saffron); box-shadow: 0 4px 14px rgba(12, 27, 42, 0.3); }
.cb input[type="range"]:focus-visible { outline: 3px solid var(--saffron); outline-offset: 4px; border-radius: 8px; box-shadow: none; }

.cb-exact { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--slate); font-weight: 600; font-size: 15px; }
.cb-exact__field { position: relative; flex: 0 1 220px; }
.cb-exact__field > span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--slate); font-weight: 700; pointer-events: none; }
.cb .cb-exact__field input { min-height: 48px; padding-left: 36px; font-variant-numeric: tabular-nums; }

/* Hires stepper */
.cb-stepper { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 4px; border-radius: var(--r-pill); background: var(--paper); }
.cb-stepper button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--white); color: var(--ink); font: 700 22px/1 var(--font); cursor: pointer; box-shadow: 0 4px 10px -6px rgba(12, 27, 42, 0.4); transition: transform 0.2s var(--ease); }
.cb-stepper button:hover { transform: scale(1.06); }
.cb-stepper button:disabled { opacity: 0.4; cursor: default; transform: none; }
.cb .cb-stepper input { width: 64px; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: center; font-weight: 800; font-size: 19px; -moz-appearance: textfield; }
.cb-stepper input::-webkit-outer-spin-button, .cb-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cb-seg--cur { margin-top: 10px !important; }

/* Fine-tune */
.cb-more { margin-top: 6px; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.cb-more summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding-top: 6px; color: var(--ink); font-weight: 700; cursor: pointer; list-style: none; }
.cb-more summary::-webkit-details-marker { display: none; }
.cb-more summary::after { content: "+"; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); font-weight: 600; font-size: 20px; transition: transform 0.3s var(--ease); }
.cb-more[open] summary::after { transform: rotate(45deg); }
.cb-more__body { display: grid; gap: 14px; padding: 6px 0 4px; }
.cb-label--row { align-items: center; margin-top: 8px; }
.cb-fx { display: inline-flex; align-items: center; gap: 8px; color: var(--slate); font-weight: 600; font-size: 15px; }
.cb-fx b { color: var(--ink); }
.cb .cb-fx input { width: 110px; min-height: 46px; }

/* Live total */
.cb-out {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, calc(2.4 * var(--vw)), 44px);
  border-radius: var(--r-card);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.cb-out::before { content: ""; position: absolute; inset: -40% -30% auto auto; z-index: -1; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(242, 169, 59, 0.22), transparent 70%); pointer-events: none; }
.cb-out__label { color: var(--ink-muted); font-weight: 600; font-size: 15px; }
.cb-out__total { margin-top: 8px; color: var(--saffron); font-weight: 800; font-size: clamp(44px, calc(4.2 * var(--vw)), 76px); line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.cb-out__sub { margin-top: 10px; color: var(--ink-muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.cb-out__rows { margin: 24px 0 0; }
.cb-out__rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 15px; }
.cb-out__rows dt { color: var(--ink-muted); }
.cb-out__rows dt small { margin-left: 4px; color: rgba(201, 211, 221, 0.6); font-size: 12px; }
.cb-out__rows dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.cb-out__rows .is-fee dt { color: var(--white); font-weight: 700; }
.cb-out__rows .is-fee dt small { color: var(--saffron); font-weight: 700; }
.cb-out__team { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; margin-top: 16px; padding: 16px 18px; border-radius: var(--r-tile); background: rgba(255, 255, 255, 0.07); }
.cb-out__team[hidden] { display: none; }
.cb-out__team span { color: var(--ink-muted); font-size: 15px; }
.cb-out__team span b { color: var(--white); }
.cb-out__team > b { color: var(--white); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cb-out__team small { grid-column: 1 / -1; color: var(--ink-muted); font-size: 13px; }
.cb-out__btn { margin-top: 24px; }
.cb-out__note { margin-top: 14px; color: rgba(201, 211, 221, 0.75); font-size: 13px; line-height: 1.5; }
.cb-out .js-total.is-tick { animation: cb-tick 0.35s var(--ease); }
@keyframes cb-tick { 0% { opacity: 0.55; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }

/* Phones and tablets: a sticky bar with the live total (cost.js shows it
   while the inputs are on screen and the breakdown card is not) */
.cb-bar { display: none; }
@media (max-width: 1020px) {
  .cb-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 12px 20px;
    border-radius: 22px;
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    box-shadow: 0 18px 40px -16px rgba(12, 27, 42, 0.6);
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
  }
  .cb-bar.is-on { transform: none; opacity: 1; pointer-events: auto; }
  .cb-bar > span:first-child { display: grid; }
  .cb-bar small { color: var(--ink-muted); font-size: 12px; }
  .cb-bar b { color: var(--saffron); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
  .cb-bar__go { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: var(--saffron); color: var(--ink); font-weight: 800; font-size: 14px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .cb-bar { transition: none; } }

/* ---------- What every fee includes ---------- */
.cb-inc { padding: clamp(56px, calc(5.5 * var(--vw)), 104px) 0; background: var(--white); border-radius: var(--r-panel); margin-inline: 16px; }
.cb-inc__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, calc(5 * var(--vw)), 96px); align-items: center; }
.cb-inc__lede { max-width: 30em; margin-top: 18px; color: var(--slate); font-size: clamp(17px, calc(1.2 * var(--vw)), 20px); line-height: 1.6; }
.cb-inc__link { display: inline-flex; margin-top: 22px; color: var(--ink); font-weight: 800; text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.cb-inc__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cb-inc__list li { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 18px 20px; border-radius: var(--r-tile); background: var(--paper); color: var(--ink); font-weight: 700; font-size: 17px; line-height: 1.3; }
.cb-inc__list svg { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--saffron); color: var(--ink); }

/* ---------- Request ---------- */
.cb-req { padding: clamp(72px, calc(7 * var(--vw)), 128px) 0; }
.cb-req__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, calc(5 * var(--vw)), 96px); align-items: start; }
.cb-req__steps { display: grid; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: cb; }
.cb-req__steps li { position: relative; display: grid; gap: 4px; padding-left: 56px; counter-increment: cb; }
.cb-req__steps li::before { content: counter(cb); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--white); color: var(--ink); font-weight: 800; }
.cb-req__steps b { color: var(--ink); font-size: 18px; }
.cb-req__steps span { color: var(--slate); line-height: 1.55; }
.cb-form { display: grid; gap: 16px; padding: clamp(22px, calc(2.6 * var(--vw)), 44px); border-radius: var(--r-card); background: var(--white); box-shadow: 0 40px 80px -50px rgba(12, 27, 42, 0.35); }
.cb-form__summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 18px 20px; border-radius: var(--r-tile); background: var(--ink); color: var(--white); }
.cb-form__summary small { grid-column: 1 / -1; color: var(--ink-muted); font-size: 13px; }
.cb-form__summary span { color: var(--ink-muted); font-size: 15px; }
.cb-form__summary b { color: var(--saffron); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.cb-form__summary a { grid-column: 1 / -1; justify-self: start; color: var(--white); font-weight: 700; font-size: 14px; text-decoration: underline; text-decoration-color: var(--saffron); text-underline-offset: 3px; }
.cb-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cb-field { display: grid; gap: 8px; color: var(--ink); font-weight: 700; font-size: 15px; }
.cb-field select { padding-right: 18px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.cb-field input[aria-invalid="true"] { border-color: #B4432E; background: #FFF6F3; }
.cb-form__error { color: #B4432E; font-weight: 700; font-size: 15px; }
.cb-form__submit { justify-self: start; }
.cb-form__fine { color: var(--slate); font-size: 14px; line-height: 1.5; }
.cb-form__fine a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--saffron); text-underline-offset: 3px; }
.cb-form__done { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-tile); background: color-mix(in srgb, var(--saffron) 22%, var(--white)); }
.cb-form__done[hidden] { display: none; }
.cb-form__done-ico svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--ink); color: var(--saffron); }
.cb-form__done p { color: var(--ink); line-height: 1.5; }
.cb-form__done a { font-weight: 700; }

/* ---------- FAQs ---------- */
.cb-faqs__more { max-width: 26em; margin-top: 18px; color: var(--slate); line-height: 1.6; }
.cb-faqs__more a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 1020px) {
  .cb-calc { grid-template-columns: minmax(0, 1fr); padding: 10px; border-radius: var(--r-card); }
  .cb-out { position: relative; top: auto; }
  .cb-inc__grid, .cb-req__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cb-hero__terms li { font-size: 14px; }
  .cb-step { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cb-step__n { width: 28px; height: 28px; font-size: 13px; }
  .cb-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cb-exact { flex-wrap: wrap; }
  .cb-exact__field { flex: 1 1 100%; }
  .cb-inc { margin-inline: 10px; border-radius: var(--r-card); }
  .cb-inc__list, .cb-form__row { grid-template-columns: minmax(0, 1fr); }
  .cb-inc__list li { min-height: 0; }
  .cb-form__submit { justify-self: stretch; }
  .cb .seg button { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cb-out .js-total.is-tick { animation: none; }
}
