/* =========================================================
   Auto Kira — UI v5 (light & minimal)
   Drop-in: keeps every ID / class used by calc.js, app.js,
   live-calc.js and live.js.
   ========================================================= */
:root{
  --bg:#f6f7f9;
  --surface:#fff;
  --ink:#111827;
  --ink-2:#374151;
  --muted:#6b7280;
  --faint:#9ca3af;
  --line:#e5e7eb;
  --line-2:#d1d5db;
  --accent:#16803c;
  --accent-ink:#14532d;
  --accent-soft:#ecfdf3;
  --accent-line:#bbf7d0;
  --warn:#b45309;--warn-soft:#fffbeb;
  --bad:#b91c1c;--bad-soft:#fef2f2;
  --radius:14px;--radius-sm:10px;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 1px 3px rgba(16,24,40,.06);
  --shadow-lg:0 10px 30px -12px rgba(16,24,40,.18);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,"Helvetica Neue",Arial,sans-serif;
  --nav-h:0px;
}
*{box-sizing:border-box}
html{scroll-padding-top:84px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 var(--font);-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
button,a,input,select,summary{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
:focus-visible{outline:3px solid #86efac;outline-offset:2px}
h1,h2,h3,p{margin-top:0}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
[hidden]{display:none!important}
.eyebrow{font-size:12px;font-weight:600;letter-spacing:.02em;color:var(--accent);margin:0 0 4px}
code{font-size:.9em;background:#f3f4f6;border:1px solid var(--line);padding:1px 6px;border-radius:6px}

/* ---------- Top bar ---------- */
.topbar{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.92);backdrop-filter:saturate(180%) blur(12px);-webkit-backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--line)}
.topbar-inner{max-width:1240px;margin:auto;padding:0 32px;height:68px;display:flex;align-items:center;gap:28px}
.auto-kira-brand{display:block;position:relative;width:104px;height:62px;overflow:hidden;flex-shrink:0;mix-blend-mode:multiply}
.auto-kira-brand img{display:block;position:absolute;left:0;top:-11px;width:104px;height:104px;max-width:none;object-fit:contain}
.tabs{display:flex;gap:4px;margin-left:auto;background:#f3f4f6;padding:4px;border-radius:12px}
.tab{display:flex;align-items:center;gap:8px;border:0;background:none;padding:8px 14px;border-radius:9px;color:var(--muted);font-weight:600;font-size:14px;white-space:nowrap;transition:background .15s,color .15s}
.tab:hover{color:var(--ink)}
.tab.active{background:#fff;color:var(--accent-ink);box-shadow:var(--shadow)}
.tab.active svg{color:var(--accent)}

/* ---------- Layout ---------- */
main{max-width:1240px;margin:auto;padding:28px 32px 0}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:22px}
.page-head h1{font-size:28px;line-height:1.2;letter-spacing:-.02em;margin:0 0 6px;font-weight:700}
.page-sub{color:var(--muted);margin:0;font-size:15px;max-width:620px}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-bottom:16px;box-shadow:var(--shadow)}
.card-head{display:flex;align-items:center;gap:10px;margin-bottom:18px}
.card-head h2{font-size:17px;font-weight:650;letter-spacing:-.01em;margin:0}
.step{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--accent-soft);color:var(--accent-ink);font-size:13px;font-weight:700;border:1px solid var(--accent-line)}
.unit,.req-key{margin-left:auto;font-size:12px;color:var(--muted)}
.req-key b{color:var(--bad)}
.card-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.card-foot .field-hint{margin:0}

/* ---------- Forms ---------- */
.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px 14px;align-items:end}
.fields>.field-hint{align-self:start;margin-top:-6px}
.field{min-width:0}
.field.wide,.fields>.wide{grid-column:1/-1}
label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--ink-2)}
label small{font-weight:400;color:var(--faint)}
#calculator .field:has(:required) label::after{content:" *";color:var(--bad)}
.input-wrap{position:relative}
.input-wrap>span{position:absolute;left:13px;top:50%;transform:translateY(-50%);font-size:14px;color:var(--faint);pointer-events:none;font-weight:500}
.input-wrap.suffix>span{left:auto;right:13px}
.search-wrap>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--faint)}
.search-wrap input{padding-left:40px}
input,select{display:block;width:100%;height:46px;padding:10px 13px;background:#fff;border:1px solid var(--line-2);border-radius:var(--radius-sm);font-size:16px;color:var(--ink);outline:none;transition:border-color .15s,box-shadow .15s;font-variant-numeric:tabular-nums}
input.money{padding-left:44px}
.input-wrap.suffix input{padding-right:34px}
select{appearance:none;-webkit-appearance:none;padding-right:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:18px;cursor:pointer}
select:disabled{background-color:#f9fafb;color:var(--faint);cursor:not-allowed}
input:hover,select:hover{border-color:#9ca3af}
input:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(22,128,60,.12)}
input::placeholder{color:#b0b6bf}
input[aria-invalid=true]{border-color:#f87171;background:#fffafa}
input[aria-invalid=true]:focus{box-shadow:0 0 0 4px rgba(220,38,38,.12)}
input[type=number]{-moz-appearance:textfield}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
input[type=search]::-webkit-search-cancel-button{cursor:pointer}
.field-hint{font-size:13px;color:var(--muted);margin:7px 0 0;line-height:1.5}
.error-text{font-size:14px;color:var(--bad);margin:14px 0 0}
.error-text:empty,.ok-text:empty{display:none}
.ok-text{font-size:14px;color:var(--accent);margin:10px 0 0;text-align:right}

/* chips (downpayment presets) */
.chips{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.chips button{border:1px solid var(--line-2);background:#fff;color:var(--ink-2);border-radius:999px;padding:7px 14px;font-size:14px;font-weight:500;transition:all .15s}
.chips button:hover{border-color:var(--accent);color:var(--accent-ink)}
.chips button.is-active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink);font-weight:600}

/* segmented control (built by ui.js from #live-years / #years) */
.segmented{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:#f3f4f6;border-radius:var(--radius-sm);padding:4px;height:46px;gap:4px}
.segmented button{border:0;white-space:nowrap;padding:0 4px;background:none;border-radius:7px;font-size:15px;font-weight:600;color:var(--muted);transition:all .15s}
.segmented button:hover{color:var(--ink)}
.segmented button[aria-pressed=true]{background:#fff;color:var(--accent-ink);box-shadow:var(--shadow)}
.segmented+select.segment-source{display:none}

/* buttons */
.primary{display:inline-flex;justify-content:center;align-items:center;gap:8px;background:var(--accent);color:#fff;border:1px solid var(--accent);border-radius:var(--radius-sm);padding:12px 18px;font-size:15px;font-weight:600;transition:background .15s}
.primary:hover{background:#13692f}
.primary:disabled{opacity:.4;cursor:not-allowed}
.btn-secondary,.focus-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line-2);background:#fff;color:var(--ink-2);border-radius:var(--radius-sm);padding:10px 16px;font-size:14px;font-weight:600;white-space:nowrap;transition:all .15s;box-shadow:var(--shadow)}
.btn-secondary:hover,.focus-button:hover{border-color:var(--accent);color:var(--accent-ink)}
.btn-secondary:disabled,.focus-button:disabled{opacity:.45;cursor:not-allowed}
.text-button{background:none;border:0;color:var(--muted);font-size:14px;font-weight:500;padding:6px 0;white-space:nowrap}
.text-button:hover{color:var(--accent-ink)}

/* =========================================================
   01 · LIVE
   ========================================================= */
.live-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:24px;align-items:start}
.live-output{position:sticky;top:88px;min-width:0}
.live-stage{background:#fff;border:1px solid var(--line);border-radius:18px;padding:26px 28px;box-shadow:var(--shadow-lg);position:relative;overflow:hidden}
.live-stage::before{content:"";position:absolute;inset:0 0 auto;height:4px;background:var(--accent)}
.stage-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.on-air{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--accent-ink)}
.on-air i{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px #dcfce7;animation:pulse 2s infinite}
@keyframes pulse{50%{box-shadow:0 0 0 7px #dcfce700}}
#stage-region{font-size:12px;font-weight:600;color:#1d4ed8;background:#eff6ff;border:1px solid #bfdbfe;padding:3px 10px;border-radius:999px}
.stage-brand{font-size:13px;font-weight:700;letter-spacing:.14em;color:var(--muted);margin:0 0 2px}
.live-stage h2{font-size:30px;line-height:1.15;letter-spacing:-.02em;font-weight:750;margin:0 0 20px;overflow-wrap:anywhere}
.stage-payment{background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:14px;padding:20px 22px}
.stage-payment>p{font-size:14px;font-weight:600;color:var(--accent-ink);margin:0}
.stage-payment>div:first-of-type{display:flex;align-items:baseline;gap:8px}
.stage-payment>div:first-of-type>span{font-size:24px;font-weight:600;color:var(--accent-ink)}
#stage-monthly{font-size:clamp(48px,6vw,72px);font-weight:800;letter-spacing:-.035em;line-height:1.1;color:var(--accent-ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;min-width:0}
.stage-payment>small{display:block;font-size:14px;color:#15803d;margin-top:-2px}
.stage-terms{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.stage-terms>span{background:#fff;border:1px solid var(--accent-line);border-radius:999px;padding:4px 12px;font-size:13px;color:var(--ink-2)}
.stage-terms b{font-weight:700;color:var(--ink)}
.stage-summary{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:18px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.stage-summary>div{padding:12px 16px;min-width:0;border-bottom:1px solid var(--line)}
.stage-summary>div:nth-child(odd){border-right:1px solid var(--line)}
.stage-summary>div:nth-last-child(-n+2){border-bottom:0}
.stage-summary span{display:block;font-size:13px;color:var(--muted);margin-bottom:2px}
.stage-summary strong{display:block;font-size:17px;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#stage-price-note{display:block;font-size:11px;line-height:1.4;color:var(--faint);margin-top:4px}
.stage-salary{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding:12px 16px;background:#f9fafb;border-radius:12px;font-size:14px;color:var(--ink-2)}
.stage-salary strong{font-size:16px;white-space:nowrap}
.stage-contact{display:flex;justify-content:space-between;gap:12px;margin-top:14px;padding:12px 16px;border:1px dashed var(--line-2);border-radius:12px;font-size:15px;overflow-wrap:anywhere}
.stage-contact span{font-weight:700;color:var(--accent-ink)}
.stage-disclaimer{font-size:12px;color:var(--faint);margin:14px 0 0;line-height:1.5}
.live-breakdown{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;margin-top:16px}
.live-breakdown>div{background:#fff;padding:14px 16px;min-width:0}
.live-breakdown span{display:block;font-size:13px;color:var(--muted)}
.live-breakdown strong{font-size:16px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.copy-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:14px}
.copy-row p{font-size:13px;color:var(--muted);margin:0}
.live-personalize{padding:0}
.live-personalize summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 22px;font-size:15px;font-weight:600;color:var(--ink-2)}
.live-personalize summary::-webkit-details-marker{display:none}
.live-personalize summary b{font-weight:400;color:var(--muted);transition:transform .2s}
.live-personalize[open] summary b{transform:rotate(45deg)}
.live-personalize .fields{padding:0 22px 22px}

/* Mode LIVE (body.live-focus) — big, camera-friendly */
.live-focus .topbar,.live-focus footer,.live-focus .page-sub,.live-focus .live-personalize,.live-focus .live-breakdown,.live-focus .copy-row,.live-focus .quick-bar{display:none!important}
.live-focus main{max-width:1600px;padding:18px 24px}
.live-focus .page-head{margin-bottom:14px}
.live-focus .page-head h1{font-size:20px}
.live-focus .live-layout{grid-template-columns:minmax(300px,.7fr) minmax(0,1.3fr)}
.live-focus .live-output{top:18px}
.live-focus .live-stage{padding:34px 40px}
.live-focus .live-stage h2{font-size:clamp(34px,4vw,52px)}
.live-focus .stage-brand{font-size:16px}
.live-focus #stage-monthly{font-size:clamp(72px,9vw,128px)}
.live-focus .stage-payment{padding:26px 30px}
.live-focus .stage-summary strong{font-size:22px}
.live-focus .stage-contact{font-size:20px}
.live-focus .card{margin-bottom:12px}

/* =========================================================
   02 · LOAN ELIGIBILITY
   ========================================================= */
.workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,1fr);gap:24px;align-items:start}
aside{position:sticky;top:88px}
.summary-row{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding:14px 16px;background:#f9fafb;border-radius:var(--radius-sm);font-size:14px;color:var(--ink-2)}
.summary-row strong{font-size:18px;color:var(--ink);font-variant-numeric:tabular-nums}
.auto-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
.auto-row>div{padding:12px 16px;background:#f9fafb;border-radius:var(--radius-sm)}
.auto-row span{display:block;font-size:13px;color:var(--muted)}
.auto-row strong{font-size:16px}
.form-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--muted);font-size:13px;padding:0 4px 8px}
.result-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:24px;box-shadow:var(--shadow-lg)}
.chance-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.chance-row h2{font-size:19px;font-weight:700;margin:0}
.badge{font-size:13px;font-weight:700;border-radius:999px;padding:5px 12px;background:#f3f4f6;color:var(--muted);white-space:nowrap;border:1px solid var(--line)}
.badge.good{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent-line)}
.badge.medium{background:var(--warn-soft);color:var(--warn);border-color:#fde68a}
.badge.low{background:var(--bad-soft);color:var(--bad);border-color:#fecaca}
.hero-number{background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:14px;padding:18px 20px}
.hero-number p{font-size:14px;font-weight:600;color:var(--accent-ink);margin:0 0 2px}
.hero-number>div{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.hero-number strong{font-size:38px;font-weight:800;letter-spacing:-.03em;color:var(--accent-ink);line-height:1.2;font-variant-numeric:tabular-nums}
.hero-number span{font-size:14px;color:#15803d}
.price-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.price-grid>div{padding:12px 14px;border:1px solid var(--line);border-radius:12px}
.price-grid span{display:block;font-size:13px;color:var(--muted)}
.price-grid strong{font-size:18px;font-variant-numeric:tabular-nums}
.dsr{margin-top:18px}
.dsr>div:first-child{display:flex;justify-content:space-between;font-size:14px;color:var(--ink-2)}
.track{height:10px;background:#f3f4f6;border-radius:99px;margin:10px 0 6px;position:relative;overflow:visible}
.track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#22c55e,#16a34a);border-radius:99px;transition:width .25s}
.track b{position:absolute;left:60%;top:-4px;width:2px;height:18px;background:var(--ink-2);border-radius:2px}
.scale{display:flex;justify-content:space-between;font-size:12px;color:var(--faint)}
.detail-list{margin-top:12px;border-top:1px solid var(--line)}
.detail-list>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #f3f4f6;font-size:14px;color:var(--muted)}
.detail-list strong{color:var(--ink);font-variant-numeric:tabular-nums}
.detail-list small{font-size:12px;color:var(--faint)}
.recommendation{margin-top:16px;padding:14px 16px;background:#f9fafb;border-left:3px solid var(--accent);border-radius:8px}
.recommendation strong{font-size:13px;color:var(--ink-2)}
.recommendation p{font-size:14px;color:var(--ink-2);margin:4px 0 0;line-height:1.55}
#view-report{width:100%;margin-top:16px}
.small-note{font-size:12px;color:var(--faint);text-align:center;margin:10px 0 0}

/* =========================================================
   03 · REPORT
   ========================================================= */
#report-paper{max-width:820px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:44px 48px;box-shadow:var(--shadow-lg)}
.paper-header{display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:2px solid var(--accent);padding-bottom:20px}
.paper-header h1{font-size:26px;margin:0;letter-spacing:-.02em}
.report-stamp{font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--accent-ink);border:1px solid var(--accent-line);background:var(--accent-soft);padding:6px 10px;border-radius:6px;white-space:nowrap}
.report-date{font-size:14px;color:var(--muted);margin:14px 0 18px}
#report-paper h3{font-size:14px;font-weight:700;color:var(--accent-ink);background:var(--accent-soft);padding:10px 14px;border-radius:8px;margin:22px 0 6px}
dl{margin:0}
dl>div{display:flex;justify-content:space-between;gap:20px;padding:10px 14px;border-bottom:1px solid #f3f4f6;font-size:15px}
dt{color:var(--muted)}
dd{margin:0;font-weight:600;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#report-recommendation{padding:6px 14px;font-size:15px}
.disclaimer{border-top:1px solid var(--line);margin-top:28px;padding-top:16px;font-size:13px;color:var(--muted)}
.disclaimer p{margin:4px 0 0}
.empty-state{max-width:460px;margin:30px auto;text-align:center;background:#fff;border:1px dashed var(--line-2);border-radius:var(--radius);padding:40px 28px}
.empty-state>svg{width:40px;height:40px;color:var(--faint);margin-bottom:10px}
.empty-state strong{display:block;font-size:18px}
.empty-state p{color:var(--muted);margin:6px 0 18px}

/* =========================================================
   04 · GUIDE
   ========================================================= */
.guide-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px}
.guide-item{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow);transition:border-color .15s,transform .15s}
.guide-item:hover{border-color:var(--accent);transform:translateY(-2px)}
.gi-num{display:inline-block;font-size:12px;font-weight:700;color:var(--accent-ink);background:var(--accent-soft);padding:2px 8px;border-radius:6px;margin-bottom:10px}
.guide-item strong{display:block;font-size:16px;margin-bottom:6px}
.guide-item p{font-size:14px;color:var(--muted);margin:0;line-height:1.5}
.guide-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:28px 32px;box-shadow:var(--shadow)}
.guide-card h3{font-size:17px;margin:22px 0 6px}
.guide-card h3:first-child{margin-top:0}
.guide-card p{color:var(--ink-2);margin:0 0 8px}
.callout{margin:16px 0;padding:14px 16px;border-radius:10px;border:1px solid}
.callout.warn{background:var(--warn-soft);border-color:#fde68a}
.callout strong{font-size:14px;color:var(--warn)}
.callout p{font-size:14px;margin:4px 0 0}
.built-for{margin-top:22px;padding-top:16px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}

footer{display:flex;justify-content:space-between;gap:16px;margin-top:40px;padding:22px 0 30px;border-top:1px solid var(--line);font-size:13px;color:var(--faint)}

/* quick bar (mobile only) */
.quick-bar{display:none}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width:1080px){
  .tab-long{display:none}
  .live-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
  .workspace{grid-template-columns:minmax(0,1fr) minmax(320px,.95fr);gap:18px}
  .live-stage{padding:22px}
  .live-focus .live-layout{grid-template-columns:320px minmax(0,1fr)}
}

@media (max-width:760px){
  :root{--nav-h:64px}
  html{scroll-padding-top:16px}
  body{padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom))}
  .topbar{position:static;background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none}
  .segmented button{font-size:14px}
  .topbar-inner{height:56px;padding:0 16px}
  .auto-kira-brand{width:88px;height:52px}
  .auto-kira-brand img{width:88px;height:88px;top:-9px}

  /* tabs become a bottom app bar */
  .tabs{position:fixed;left:0;right:0;bottom:0;z-index:40;margin:0;border-radius:0;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--line);padding:6px 6px calc(6px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,1fr);gap:2px}
  .tab{flex-direction:column;gap:3px;padding:6px 2px;font-size:11px;font-weight:600;border-radius:10px;min-height:50px;justify-content:center}
  .tab svg{width:22px;height:22px}
  .tab.active{background:var(--accent-soft);box-shadow:none}

  main{padding:18px 16px 0}
  .page-head{align-items:flex-start;margin-bottom:16px}
  .page-head h1{font-size:23px}
  .page-sub{font-size:14px}
  .live-toolbar .focus-button{padding:9px 12px;font-size:13px}
  .card{padding:18px 16px;border-radius:12px}
  .live-personalize{padding:0}
  .live-personalize summary{padding:15px 16px}
  .live-personalize .fields{padding:0 16px 18px}
  .card-head{margin-bottom:14px}
  .fields{gap:14px 10px}
  .card-foot{flex-direction:column;align-items:flex-start}

  .live-layout,.workspace{display:flex;flex-direction:column;gap:0}
  .live-controls,.live-output,form,aside{width:100%}
  .live-output,aside{position:static}
  .live-stage{padding:20px 18px;border-radius:16px}
  .live-stage h2{font-size:25px}
  #stage-monthly{font-size:56px}
  .stage-payment{padding:16px 18px}
  .stage-summary strong{font-size:15px}
  .stage-summary>div{padding:10px 12px}
  .live-breakdown{grid-template-columns:1fr}
  .live-breakdown>div{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:11px 14px}
  .copy-row{flex-direction:column;align-items:stretch}
  .copy-row .btn-secondary{width:100%;padding:13px}
  .result-card{padding:18px 16px}
  .hero-number strong{font-size:34px}
  .report-toolbar{flex-direction:column;align-items:stretch}
  .report-toolbar .primary{width:100%}
  #report-paper{padding:22px 16px;border-radius:12px}
  .paper-header{flex-direction:column;align-items:flex-start;gap:10px}
  .paper-header h1{font-size:21px}
  dl>div{font-size:14px;padding:9px 10px}
  .guide-grid{grid-template-columns:1fr}
  .guide-card{padding:20px 16px}
  footer{flex-direction:column;gap:4px;margin-top:28px;padding-bottom:20px}

  /* sticky result bar above bottom nav */
  .quick-bar{position:fixed;left:10px;right:10px;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);z-index:35;display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--accent-ink);color:#fff;border:0;border-radius:14px;box-shadow:0 10px 30px -8px rgba(20,83,45,.55);text-align:left;transition:transform .2s,opacity .2s}
  .quick-bar[hidden]{display:flex!important;opacity:0;transform:translateY(16px);pointer-events:none}
  .qb-label{font-size:12px;opacity:.8;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .qb-value{white-space:nowrap}
  .qb-value strong{font-size:20px;font-variant-numeric:tabular-nums}
  .qb-value small{font-size:12px;opacity:.85}
  .qb-cta{font-size:12px;font-weight:600;background:rgba(255,255,255,.16);padding:5px 9px;border-radius:8px;white-space:nowrap}

  /* Mode LIVE on phone: result on top */
  .live-focus main{padding:12px}
  .live-focus .live-layout{display:flex;flex-direction:column}
  .live-focus .live-output{order:-1;margin-bottom:14px}
  .live-focus .tabs{display:none}
  .live-focus{padding-bottom:0}
  .live-focus .live-stage{padding:22px 18px}
  .live-focus #stage-monthly{font-size:66px}
  .live-focus .live-stage h2{font-size:28px}
  .live-focus .stage-summary strong{font-size:16px}
}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* =========================================================
   Print — report only
   ========================================================= */
@media print{
  body{background:#fff;color:#000;padding:0}
  .topbar,.page-head,footer,.quick-bar,#live,#carloan,#guide,#report-empty,#calculator>.workspace,.report-head,#share-status,.tabs{display:none!important}
  #calculator{display:block!important}
  main{max-width:none;padding:0}
  #report{display:block!important}
  #report-paper{max-width:none;border:0;box-shadow:none;padding:0;border-radius:0}
  #report-paper h3,.report-stamp{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  dl>div,.disclaimer{break-inside:avoid}
  @page{size:A4;margin:15mm}
}

/* Stage card: label already says "OTR tanpa insurans"; keep the long source note under the input only */
#stage-price-note{display:none!important}

/* Insurance suggestion (placeholder only, not auto-filled) */
.insurance-hint{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.insurance-hint .field-hint{margin-top:7px}
.insurance-hint b{font-weight:600;color:var(--ink-2)}
.insurance-hint .text-button{margin-top:4px;font-size:13px;color:var(--accent);font-weight:600}
.insurance-hint .text-button:disabled{color:var(--faint);cursor:default}
#live-insurance::placeholder{color:#b0b6bf}
.stage-insurance{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;padding:12px 16px;border:1px solid var(--line);border-radius:12px;font-size:14px;color:var(--ink-2)}
.stage-insurance strong{font-size:16px;white-space:nowrap;font-variant-numeric:tabular-nums}
.live-focus .stage-insurance{font-size:16px}.live-focus .stage-insurance strong{font-size:20px}

/* NCD */
.fields>.insurance-hint{margin-top:-8px}
.ncd-result{background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:var(--radius-sm);padding:12px 14px}
.ncd-result>div{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:14px;color:var(--accent-ink);font-weight:600}
.ncd-result strong{font-size:17px;font-variant-numeric:tabular-nums}
.ncd-result p{margin:4px 0 0;font-size:12.5px;color:var(--ink-2);font-variant-numeric:tabular-nums}

/* Rebate suggestion */
.rebate-hint{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
.rebate-hint .text-button{padding:0;font-size:13px;color:var(--accent);font-weight:600}
.rebate-hint .text-button:disabled{display:none}
#live-rebate::placeholder{color:#b0b6bf}

/* OTR + Rebate pair: hints sit under their own input, top-aligned */
.fields>.field.pair{align-self:start}
.field.pair label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rebate-hint{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.rebate-hint .text-button{padding:0}
@media (max-width:760px){.field.pair label{white-space:normal;min-height:2.6em;display:flex;flex-wrap:wrap;align-items:flex-end;column-gap:4px}}

/* Insurance hint: same tidy layout as rebate (text, then button below, left-aligned) */
.insurance-hint{flex-direction:column;align-items:flex-start;gap:2px}
.insurance-hint .text-button{margin-top:0;padding:0}

/* Profile photo (stored locally) */
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.photo-row{display:flex;gap:16px;align-items:center}
.photo-preview{flex:0 0 88px;width:88px;height:88px;border-radius:14px;overflow:hidden;background:#f3f4f6;border:1px solid var(--line);display:grid;place-items:center}
.photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.photo-preview svg{width:40px;height:40px;color:var(--faint)}
.photo-actions{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.photo-actions .btn-secondary{cursor:pointer;margin:0}
.photo-actions .text-button{padding:0;color:var(--bad);font-size:13px}
.photo-actions .field-hint{margin:2px 0 0}
#photo-input:focus-visible+#photo-pick,#photo-pick:focus-within{outline:3px solid #86efac}
/* Report: prepared by */
.report-advisor{display:flex;align-items:center;gap:14px;margin:0 0 6px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;max-width:420px}
.report-advisor img{width:64px;height:64px;border-radius:10px;object-fit:cover;flex:0 0 64px}
.report-advisor div{display:flex;flex-direction:column;line-height:1.35}
.report-advisor span{font-size:12px;color:var(--muted)}
.report-advisor strong{font-size:16px}
.report-advisor em{font-style:normal;font-size:14px;color:var(--ink-2)}
@media print{.report-advisor img{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* Photo on LIVE card contact strip */
.stage-contact{align-items:center}
.stage-contact strong{flex:1;min-width:0}
.stage-photo{width:48px;height:48px;border-radius:10px;object-fit:cover;flex:0 0 48px;border:1px solid var(--line)}
.live-focus .stage-photo{width:72px;height:72px;flex-basis:72px;border-radius:14px}

/* Bigger profile photo on LIVE card */
.stage-photo{width:96px;height:96px;flex-basis:96px;border-radius:14px}
.live-focus .stage-photo{width:140px;height:140px;flex-basis:140px;border-radius:18px}
@media (max-width:760px){.stage-photo{width:80px;height:80px;flex-basis:80px}.live-focus .stage-photo{width:96px;height:96px;flex-basis:96px}}

/* Namecard */
.namecard-preview{flex:0 0 140px;width:140px;height:84px;border-radius:10px;overflow:hidden;background:#f3f4f6;border:1px solid var(--line);display:grid;place-items:center}
.namecard-preview img{width:100%;height:100%;object-fit:contain;display:block;background:#fff}
.namecard-preview svg{width:40px;height:40px;color:var(--faint)}
.stage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.stage-title{min-width:0;flex:1}
.stage-namecard{flex:0 0 auto;width:230px;max-width:45%;max-height:140px;object-fit:contain;border-radius:10px;border:1px solid var(--line);box-shadow:var(--shadow);background:#fff;margin-bottom:16px}
.live-focus .stage-namecard{width:320px;max-height:200px}
@media (max-width:760px){.stage-namecard{width:140px;max-height:90px}.namecard-preview{flex-basis:120px;width:120px;height:72px}}

/* Namecard layout v2: header = [label + brand + model] | [namecard], vertically centred */
.stage-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.stage-head .stage-top{justify-content:flex-start;margin-bottom:14px}
.stage-head h2{margin:0}
.stage-namecard-wrap{flex:0 0 auto;padding:6px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 18px -8px rgba(16,24,40,.25);line-height:0}
.stage-namecard{display:block;width:auto;height:118px;max-width:260px;max-height:none;object-fit:contain;border:0;border-radius:9px;box-shadow:none;margin:0}
.live-focus .stage-namecard{height:170px;max-width:360px;width:auto}
@media (max-width:1080px){.stage-namecard{height:96px;max-width:200px}}
@media (max-width:760px){
  .stage-head{flex-direction:column;align-items:stretch;gap:14px}
  .stage-namecard-wrap{align-self:stretch;display:flex;justify-content:center}
  .stage-namecard{height:auto;width:100%;max-width:320px;max-height:none}
  .live-focus .stage-namecard{height:auto;width:100%;max-width:340px}
}

/* Keep big monthly figure on one line on phones (e.g. 1,189.94 in LIVE mode) */
#stage-monthly{white-space:nowrap}
@media (max-width:760px){#stage-monthly{font-size:min(56px,12.5vw)}.live-focus #stage-monthly{font-size:min(66px,14vw)}}

/* =========================================================
   v30 · Report share · Scanner · Running Plate
   ========================================================= */
.report-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.btn-wa{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#fff;color:#128c4a;border:1px solid #25d366;border-radius:var(--radius-sm);padding:12px 18px;font-size:15px;font-weight:600;box-shadow:var(--shadow);transition:background .15s}
.btn-wa:hover{background:#ecfdf3}
.btn-wa:disabled{opacity:.4;cursor:not-allowed}
.btn-wa svg{color:#25d366}
.share-status{text-align:right;margin:-8px 0 12px}
.btn-danger{display:inline-flex;align-items:center;justify-content:center;border:1px solid #fecaca;background:#fff;color:var(--bad);border-radius:var(--radius-sm);padding:10px 16px;font-size:14px;font-weight:600}
.btn-danger:hover,.btn-danger.armed{background:var(--bad);color:#fff;border-color:var(--bad)}
.text-button.danger{color:var(--bad)}

/* Scanner */
.scan-privacy{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid var(--accent-line);border-left:4px solid var(--accent);border-radius:12px;padding:12px 16px;margin-bottom:16px}
.scan-privacy svg{color:var(--accent);margin-top:2px}
.scan-privacy p{margin:0;font-size:14px;color:var(--ink-2)}
.scan-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:24px;align-items:start}
.doc-types{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.doc-types button{border:1px solid var(--line-2);background:#fff;border-radius:10px;padding:10px 6px;font-size:14px;font-weight:600;color:var(--ink-2)}
.doc-types button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink)}
.scan-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.scan-buttons .scan-pick{cursor:pointer;margin:0;font-size:15px}
.scan-stage{position:relative;display:flex;justify-content:center;background:#111827;border-radius:12px;padding:10px;touch-action:none;user-select:none}
.scan-stage canvas{display:block;border-radius:4px}
.scan-quad{position:absolute;top:10px;left:50%;transform:translateX(-50%);overflow:visible}
.scan-quad .q-area{fill:rgba(34,197,94,.14);stroke:#22c55e;stroke-width:2.5}
.scan-quad .q-handle{fill:#fff;stroke:#16a34a;stroke-width:4;cursor:grab;touch-action:none}
.scan-tip{margin:-6px 0 10px}
.scan-tools{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;align-items:center}
.scan-tools .segmented{flex:1 1 220px}
.scan-result{margin-top:12px}
.scan-result img{display:block;max-width:100%;max-height:420px;margin:0 auto;border:1px solid var(--line);border-radius:8px;background:#fff}
.scan-save-row{display:flex;gap:10px}
.scan-pages{display:grid;gap:10px}
.scan-page{display:grid;grid-template-columns:92px 1fr auto;gap:12px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:12px}
.scan-page img{width:92px;height:62px;object-fit:cover;border-radius:6px;background:#f3f4f6}
.scan-page-meta{min-width:0;display:flex;flex-direction:column}
.scan-page-meta strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scan-page-meta span{font-size:12px;color:var(--muted)}
.scan-page-btns{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.scan-page-btns .text-button{padding:2px 0;font-size:13px}
.scan-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-top:16px}
.scan-actions .btn-danger{grid-column:1/-1}

/* Running Plate */
.plates-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.plates-meta div{display:flex;flex-direction:column;gap:2px}
.plates-meta span{font-size:13px;color:var(--muted)}
.plates-meta strong{font-size:16px}
.plates-filter{margin:0 0 16px}
.plates-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.plates-group .card-head{margin-bottom:12px}
.plates-grid{display:flex;flex-direction:column}
.plate-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid #f3f4f6}
.plate-item:last-child{border-bottom:0}
.plate-place{font-size:14px;color:var(--ink-2);font-weight:500}
.plate-badge{font:700 16px/1 "Segoe UI",Inter,Arial,sans-serif;letter-spacing:.08em;background:#111;color:#fff;border-radius:6px;padding:7px 10px;border:2px solid #111;box-shadow:inset 0 0 0 1px #555;white-space:nowrap}
.plate-item.is-stale .plate-badge{background:#f3f4f6;color:var(--faint);border-color:var(--line-2);box-shadow:none;text-decoration:line-through}
.plate-note{font-size:12px;font-weight:600;color:var(--warn);background:var(--warn-soft);border:1px solid #fde68a;border-radius:999px;padding:2px 8px;white-space:nowrap}
.plate-right{display:flex;align-items:center;gap:8px}
.plates-note{font-size:13px;color:var(--muted);margin-top:16px}

@media (max-width:1080px){.plates-groups{grid-template-columns:1fr 1fr}.scan-layout{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){
  .tabs{grid-template-columns:repeat(6,1fr)}
  .tab{font-size:10px;padding:6px 0}
  .report-actions{width:100%;flex-direction:column}
  .report-actions>button{width:100%}
  .share-status{text-align:left}
  .plates-groups{grid-template-columns:1fr}
  .plates-meta{grid-template-columns:1fr;gap:8px}
  .scan-actions{grid-template-columns:1fr}
  .doc-types{grid-template-columns:1fr 1fr}
  .scan-buttons{grid-template-columns:1fr}
}
@media print{#scanner,#plates{display:none!important}}

.scan-layout>*{min-width:0}
.scan-stage canvas{max-width:100%}
@media (max-width:760px){.scan-save-row{width:100%}.scan-save-row>button{flex:1}.scan-tools .segmented{flex-basis:100%}}
/* v31 scanner: generic scan-to-PDF */
.scan-name{margin-top:16px}
.scan-actions{grid-template-columns:1fr 1fr}
.scan-actions .btn-wa{grid-column:1/-1;justify-content:center}
.scan-page{grid-template-columns:28px 72px 1fr auto}
.scan-page img{width:72px;height:72px;object-fit:contain;background:#f3f4f6}
.scan-page-no{font-weight:700;color:var(--muted);text-align:center;font-size:14px}
.scan-page-btns{flex-direction:row;align-items:center;gap:4px}
.scan-page-btns button{width:36px;height:36px;border:1px solid var(--line-2);background:#fff;border-radius:8px;font-size:16px;line-height:1;color:var(--ink-2);padding:0}
.scan-page-btns button:disabled{opacity:.35}
.scan-page-btns button.danger{color:#b91c1c}
.scan-controls{display:grid;gap:16px}
@media (max-width:760px){.scan-actions{grid-template-columns:1fr 1fr}.scan-save-row{flex-wrap:wrap}}
.scan-actions .btn-wa{background:#25d366;color:#fff;border-color:#1fb457;font-size:16px;padding:14px 18px}.scan-actions .btn-wa:hover{background:#1fb457}
/* v31 live card share */
.live-share-row{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.btn-wa-solid{background:#25d366;color:#fff;border-color:#1fb457;min-width:140px}
.btn-wa-solid:hover{background:#1fb457}
.btn-wa svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:760px){.live-share-row{width:100%}.live-share-row>button{flex:1}}
/* v33: Share = same look as Copy summary, green icon */
.live-share-row{flex-wrap:nowrap}
.live-share-row>button{flex:1 1 0;min-width:150px}
#live-share svg{color:#16a34a;stroke-width:2}
@media (max-width:760px){.live-share-row>button{min-width:0}}
/* v33: smoother corner editor */
.scan-stage{padding:22px;overflow:hidden;-webkit-user-select:none;-webkit-touch-callout:none}
.scan-quad{top:0;left:50%;transform:translateX(-50%);overflow:visible;touch-action:none}
.scan-quad .q-shade{fill:rgba(17,24,39,.45);pointer-events:none}
.scan-quad .q-area{fill:rgba(34,197,94,.08);stroke:#22c55e;stroke-width:2;pointer-events:none}
.scan-quad .q-hit{fill:transparent;stroke:none;cursor:grab}
.scan-quad .q-ring{fill:rgba(255,255,255,.18);stroke:#fff;stroke-width:3;pointer-events:none;transition:r .12s ease}
.scan-quad .q-dot{fill:#22c55e;pointer-events:none}
.scan-quad .q-pill{fill:#fff;stroke:#16a34a;stroke-width:1.5;pointer-events:none}
.scan-quad .q-corner.active .q-ring{r:17px;fill:rgba(34,197,94,.25);stroke:#22c55e}
.scan-quad .q-mid.active .q-pill{fill:#22c55e;stroke:#fff}
.scan-quad .active .q-hit{cursor:grabbing}
.scan-stage .scan-loupe{position:absolute;top:10px;left:10px;border-radius:50%;border:3px solid #fff;box-shadow:0 6px 18px rgba(0,0,0,.35);pointer-events:none;z-index:2}
.scan-stage .scan-loupe.right{left:auto;right:10px}
/* v38: running plate share */
.plates-actions{display:flex;gap:10px;flex-wrap:wrap}
#plates-share svg{color:#16a34a;stroke-width:2}
#plates-share-status:empty{display:none}
@media (max-width:760px){.plates-actions{width:100%}.plates-actions>button{flex:1}}
@media (max-width:760px){#plates .page-head{flex-wrap:wrap}#plates .page-head>div:first-child{flex:1 1 100%}.plates-actions{flex-direction:row}}
/* v40: Car Loan Calculator tab */
.cl-wrap{max-width:820px;margin:0 auto;display:grid;gap:18px}
.cl-down-row{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:10px;align-items:center}
.cl-unit{height:46px}
.cl-outcome .hero-number>div{align-items:baseline}
.cl-outcome .hero-number .cl-rm{font-size:20px;font-weight:600;color:var(--accent-ink)}
.cl-outcome .hero-number strong{font-size:44px}
.cl-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:22px;align-items:center;margin-top:8px}
.cl-chart{display:grid;justify-items:center;position:relative}
.cl-donut{width:210px;height:210px;transform:rotate(-90deg)}
.cl-donut circle{fill:none;stroke-width:16}
.cl-track{stroke:#f3f4f6}
.cl-seg-loan{stroke:var(--accent);transition:stroke-dasharray .35s ease}
.cl-seg-int{stroke:#86efac;transition:stroke-dasharray .35s ease,stroke-dashoffset .35s ease}
.cl-center{position:absolute;top:0;height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.cl-center span{font-size:12px;color:var(--muted)}
.cl-center strong{font-size:16px;font-variant-numeric:tabular-nums}
.cl-legend{display:grid;gap:6px;margin-top:12px;width:100%;max-width:260px}
.cl-legend div{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.cl-legend span{flex:1}
.cl-legend b{color:var(--ink);font-variant-numeric:tabular-nums}
.cl-legend i{width:12px;height:12px;border-radius:3px}
.l-loan{background:var(--accent)} .l-int{background:#86efac}
.cl-outcome .small-note{margin-top:14px}
@media (max-width:640px){.cl-grid{grid-template-columns:1fr}.cl-outcome .hero-number strong{font-size:38px}.cl-down-row{grid-template-columns:minmax(0,1fr) 100px}}
/* v40: customer report under Loan Eligibility */
.report-block{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.report-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.report-head h2{font-size:22px;margin:2px 0 4px}
.report-head .page-sub{margin:0}
#cl-form .fields{align-items:start}

/* v42: two share buttons side by side */
.scan-actions{grid-template-columns:1fr 1fr}
.scan-actions .btn-wa{grid-column:auto;font-size:15px;padding:14px 10px}
@media (max-width:420px){.scan-actions .btn-wa{font-size:14px;padding:13px 6px}}
/* v43: share buttons use the same green as Take photo */
.scan-actions .btn-wa{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.scan-actions .btn-wa:hover{background:#13692f}
.step.step-icon svg{width:14px;height:14px;stroke-width:2.2}
/* v45: share rows, insurance & road tax */
.share-row{display:flex;justify-content:flex-end;margin-top:14px}
.share-row .share-btn{min-width:150px}
.share-btn svg{color:#16a34a;stroke-width:2}
.share-row+.ok-text:empty{display:none}
.detail-list .total-row strong{color:var(--accent-ink);font-size:16px}
.rt-rows>div:last-child strong{color:var(--accent-ink);font-size:16px}
.rt-group{margin-top:16px}
.rt-legend{margin-top:18px;padding-top:14px;border-top:1px solid var(--line);display:grid;gap:6px;font-size:13px;color:var(--muted)}
.rt-legend b{color:var(--accent-ink)}
#in-price-field.is-muted{opacity:.45}
#insurance .detail-list,#roadtax .detail-list{margin-top:14px}
@media (max-width:640px){.share-row .share-btn{flex:1}}
@media (max-width:760px){
  .tabs{display:flex;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
  .tabs::-webkit-scrollbar{display:none}
  .tab{flex:0 0 64px;scroll-snap-align:start}
}
@media (max-width:640px){.fields>.m-wide{grid-column:1/-1}}
@media (min-width:761px) and (max-width:1280px){.tab-long{display:none}.tab{padding:8px 11px}.topbar-inner{gap:16px}}
@media (min-width:761px) and (max-width:1080px){.tab svg{display:none}.tabs{overflow-x:auto;scrollbar-width:none;min-width:0}.tabs::-webkit-scrollbar{display:none}.topbar-inner{padding:0 20px}}
/* ===== Proton Aapico edition: showroom hero on Live tab ===== */
.px-hidden-card{display:none}
.px-hero{margin-bottom:22px;display:grid;gap:14px}
.px-banner{position:relative;border-radius:18px;overflow:hidden;min-height:170px;display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:22px 24px;
  background:linear-gradient(90deg,rgba(8,26,61,.92) 0%,rgba(8,26,61,.55) 45%,rgba(8,26,61,.15) 100%),url(assets/aapico-showroom.jpg) center/cover;box-shadow:0 10px 30px rgba(8,26,61,.25)}
.px-banner-text span{display:block;color:#cfe0ff;font-size:13px;font-weight:600;letter-spacing:.04em}
.px-banner-text h2{margin:4px 0 0;color:#fff;font-size:40px;font-weight:900;letter-spacing:.02em;line-height:1;text-shadow:0 2px 0 rgba(0,0,0,.25)}
.px-region{display:flex;background:rgba(255,255,255,.14);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.25);border-radius:12px;padding:4px;gap:4px}
.px-region button{border:0;background:none;color:#e6eeff;font-weight:700;font-size:13px;padding:8px 12px;border-radius:9px;white-space:nowrap}
.px-region button[aria-pressed=true]{background:#fff;color:#0b2a5b}
.px-models{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;padding:2px}
.px-models::-webkit-scrollbar{display:none}
.px-models button{flex:1 0 128px;display:flex;flex-direction:column;align-items:center;gap:2px;background:#0b2a5b;border:2px solid #0b2a5b;border-radius:14px;padding:8px 8px 10px;color:#fff;font-weight:900;letter-spacing:.06em;font-size:15px;transition:transform .15s,background .15s}
.px-models button img{width:100%;max-width:130px;height:56px;object-fit:contain}
.px-models button img.crop{object-fit:cover;object-position:50% 100%}
.px-models button[aria-selected=true]{background:linear-gradient(180deg,#1e88e5,#0b5cc0);border-color:#7cc0ff;transform:translateY(-2px);box-shadow:0 8px 18px rgba(11,92,192,.35)}
.px-show{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:14px}
.px-stage{position:relative;border-radius:18px;overflow:hidden;min-height:300px;background:
  radial-gradient(120% 70% at 50% 100%,rgba(255,255,255,.95) 0%,rgba(226,234,246,.9) 35%,rgba(226,234,246,0) 60%),
  linear-gradient(180deg,rgba(11,42,91,.75),rgba(11,42,91,.35) 55%,rgba(240,244,250,.2)),url(assets/aapico-showroom.jpg) center 30%/cover;border:2px solid #0b2a5b}
.px-stage-text{position:absolute;left:22px;top:18px;z-index:2}
.px-stage-text h3{margin:0;color:#fff;font-size:46px;font-weight:900;font-style:italic;letter-spacing:.02em;line-height:1;text-shadow:0 3px 10px rgba(0,0,0,.35)}
.px-stage-text p{margin:4px 0 0;color:#dbe7ff;font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.12em}
.px-car{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);width:86%;max-height:72%;object-fit:contain;z-index:2;filter:drop-shadow(0 18px 18px rgba(8,26,61,.35))}
.px-car.crop{object-fit:cover;object-position:50% 100%;aspect-ratio:360/140;height:auto}
.px-floor{position:absolute;left:8%;right:8%;bottom:10px;height:26px;border-radius:50%;background:radial-gradient(closest-side,rgba(8,26,61,.35),transparent);z-index:1}
.px-panel{background:#fff;border:2px solid #0b2a5b;border-radius:18px;overflow:hidden;display:flex;flex-direction:column}
.px-ph{display:flex;align-items:center;gap:8px;background:#0b2a5b;color:#fff;font-weight:900;letter-spacing:.08em;padding:12px 16px;font-size:15px}
.px-ph svg{width:18px;height:18px;stroke:#fff}
.px-variants{display:flex;flex-wrap:wrap;gap:8px;padding:14px 14px 4px}
.px-variants button{border:1.5px solid #c9d6ea;background:#f4f7fc;color:#0b2a5b;font-weight:800;font-size:13px;padding:9px 12px;border-radius:10px;text-transform:uppercase}
.px-variants button[aria-pressed=true]{background:linear-gradient(180deg,#1e88e5,#0b5cc0);border-color:#0b5cc0;color:#fff}
.px-prices{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 14px 14px;margin-top:auto}
.px-prices>div{border:1.5px solid #dbe4f2;border-radius:12px;padding:10px 12px;background:#fff}
.px-prices span{display:block;font-size:12px;font-weight:700;color:#5b6b85}
.px-prices strong{display:block;font-size:20px;font-weight:900;color:#0b2a5b;font-variant-numeric:tabular-nums;margin-top:2px}
.px-prices .px-otr{grid-column:1/-1;background:#f0f6ff;border-color:#9cc3f5}
.px-prices .px-otr strong{font-size:30px}
@media (max-width:900px){.px-show{grid-template-columns:minmax(0,1fr)}.px-stage{min-height:240px}}
@media (max-width:640px){
  .px-banner{min-height:140px;padding:16px;flex-direction:column;align-items:flex-start;justify-content:flex-end}
  .px-banner-text h2{font-size:30px}
  .px-models button{flex-basis:104px;font-size:13px}
  .px-models button img{height:44px}
  .px-stage{min-height:210px}
  .px-stage-text h3{font-size:34px}
  .px-prices strong{font-size:17px}
  .px-prices .px-otr strong{font-size:26px}
}
.live-focus .px-hero{display:none}
#live>.page-head>div:first-child{visibility:hidden;height:0;overflow:hidden}
#live>.page-head{margin-bottom:10px;justify-content:flex-end}
@media (max-width:640px){
  .px-models{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;overflow:visible}
  .px-models button{padding:6px 4px 8px;font-size:12px;border-radius:12px}
  .px-models button img{height:34px}
}
