/* InsureBuddy design system (brand from pos.ibconnect.co): primary #036c4b, accent #3acc8a, yellow #f7d454. */
:root {
  --primary: #036c4b;
  --primary-600: #025c40;
  --primary-700: #024a34;
  --primary-50: #ecf7f2;
  --primary-100: #d5eee3;
  --accent: #3acc8a;
  --secondary: #f7d454;
  --heading: #16201b;
  --paragraph: #4a524e;
  --muted: #7a837e;
  --line: #e4e8e6;
  --line-soft: #eef1ef;
  --bg: #f4f6f5;
  --card: #fff;
  --danger: #c4372b;
  --warn: #a8700f;
  --radius: 14px;
  --shadow-xs: 0 1px 2px rgba(16, 32, 27, .05);
  --shadow-sm: 0 1px 2px rgba(16, 32, 27, .04), 0 2px 8px rgba(16, 32, 27, .04);
  --shadow-md: 0 4px 12px rgba(16, 32, 27, .06), 0 12px 32px rgba(16, 32, 27, .06);
  --shadow-lg: 0 12px 24px rgba(16, 32, 27, .08), 0 32px 64px rgba(16, 32, 27, .10);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif; color: var(--heading); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(58, 204, 138, .10), transparent 60%), var(--bg);
  min-height: 100vh;
}
h1, h2, h3, .font-heading { font-family: "Urbanist", sans-serif; letter-spacing: -.01em; }
::selection { background: var(--primary-100); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(228, 232, 230, .8); transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.site-header { padding-top: env(safe-area-inset-top); }  /* installed app: keep clear of the notch */
.logo-link img { transition: transform .4s var(--spring); }
.logo-link:hover img { transform: scale(1.03); }
.site-footer .social-btn { display: inline-grid; place-items: center; border-radius: 6px; transition: transform .25s var(--spring), filter .2s; }
.site-footer .social-btn:hover { transform: translateY(-3px); filter: brightness(1.15); }
.site-footer .foot-link { color: rgba(255, 255, 255, .92); transition: color .2s; }
.site-footer .foot-link:hover { color: var(--accent); }

.nav-tab { position: relative; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14.5px;
  color: var(--paragraph); display: inline-flex; align-items: center; gap: 8px; transition: color .2s, background .2s; }
.nav-tab:hover { color: var(--primary); background: var(--primary-50); }
.nav-tab.active { color: var(--primary); background: var(--primary-50); }
.logo-mark { transition: transform .5s var(--spring); }
a:hover > .logo-mark { transform: rotate(-8deg) scale(1.06); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #036c4b 0%, #02573d 55%, #013f2c 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent); }
.blob { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; pointer-events: none; }
.blob-1 { width: 360px; height: 360px; background: #3acc8a; right: -80px; top: -140px; animation: float 14s ease-in-out infinite; }
.blob-2 { width: 260px; height: 260px; background: #f7d454; right: 22%; bottom: -170px; opacity: .28; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 24px) scale(1.08); } }
.gradient-text { background: linear-gradient(90deg, #3acc8a, #b6f0d3 60%, #f7d454); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.chip-glass { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .16); font-size: 13px; font-weight: 500;
  backdrop-filter: blur(6px); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #3acc8a; position: relative; }
.pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #3acc8a;
  animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

/* ------------------------------------------------------------------ surfaces */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line-soft); }
.card-lift { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
.card-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-100); }
.section-label { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.step-num { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 11.5px;
  background: var(--primary-50); color: var(--primary); letter-spacing: 0; transition: all .3s var(--ease); }
.step.done .step-num { background: var(--primary); color: #fff; }

/* ------------------------------------------------------------------ buttons */
.btn-primary { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, #058159, var(--primary)); color: #fff; font-weight: 600; border-radius: 10px;
  padding: 11px 18px; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px -6px rgba(3, 108, 75, .55);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 10px 22px -8px rgba(3, 108, 75, .6); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary .arrow { transition: transform .25s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-primary::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%); }
.btn-primary:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff;
  color: var(--heading); font-weight: 500; border-radius: 10px; padding: 8px 14px; transition: all .2s var(--ease); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-ghost:disabled { opacity: .45; pointer-events: none; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { color: #fff !important; background: var(--danger) !important; border-color: var(--danger) !important; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--muted);
  transition: all .2s var(--ease); }
.icon-btn:hover { background: var(--line-soft); color: var(--heading); transform: rotate(90deg); }

/* ------------------------------------------------------------------ form */
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--paragraph); margin-bottom: 6px; }
.control { position: relative; }
.control > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none;
  transition: color .2s; }
.control:focus-within > svg { color: var(--primary); }
.field input, .field select, .input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 500;
  color: var(--heading); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.control > svg ~ input, .control > svg ~ select { padding-left: 38px; }
.field input:hover, .field select:hover, .input:hover { border-color: #cfd6d2; }
.field input:focus, .field select:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(3, 108, 75, .10); }
.field select, select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a837e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; min-height: 18px; }
.field-enter { animation: fieldIn .35s var(--ease) both; }
@keyframes fieldIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.ac-list { position: absolute; left: 0; right: 0; top: 68px; z-index: 30; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto; padding: 6px;
  animation: fieldIn .2s var(--ease) both; }
.ac-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.ac-item:hover, .ac-item.on { background: var(--primary-50); }
.ac-item .t { font-size: 13.5px; font-weight: 600; color: var(--heading); }
.ac-item .t mark { background: none; color: var(--primary); }
.ac-item .m { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.ac-item .m span { background: #f3f5f4; border-radius: 6px; padding: 0 6px; }
.ac-empty { padding: 12px; font-size: 13px; color: var(--muted); }
.veh-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: var(--primary-50);
  color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 4px 3px 10px; animation: pop .35s var(--spring) both;
  max-width: 100%; }
.veh-chip svg { flex: none; }
.veh-chip .veh-txt { min-width: 0; line-height: 1.35; }  /* name and specs wrap together as one line of text */
.veh-chip button { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.veh-chip button:hover { background: var(--primary-100); }

.rto-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; font-size: 12px;
  background: var(--primary-50); color: var(--primary); font-weight: 600; animation: pop .35s var(--spring) both; }
.rto-chip b { background: var(--primary); color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; }

/* product tabs: one compact row, icon over a short name; details of the chosen one in .pinfo below */
.ptabs { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 6px; padding: 4px;
  background: var(--line-soft); border-radius: 14px; }
.ptile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 4px 8px; border-radius: 10px; border: 0; background: transparent; color: var(--paragraph); text-align: center;
  min-width: 0; transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease); }
.ptile:hover:not(.active) { background: rgba(255, 255, 255, .7); color: var(--heading); }
.ptile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ptile .pico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: inherit;
  transition: background .25s var(--ease), color .25s var(--ease), transform .3s var(--spring); }
.ptile .pname { font-weight: 600; font-size: 12.5px; line-height: 1.15; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .tiny { display: none; }
.ptile.active { background: #fff; color: var(--primary); box-shadow: 0 1px 2px rgba(16, 40, 30, .08), 0 4px 14px rgba(3, 108, 75, .12); }
.ptile.active .pico { background: var(--primary); color: #fff; transform: scale(1.04); }
.ptile.active .pname { font-weight: 700; }
.ptabs-text .ptile { padding: 15px 6px; }

.ptabs-text .ptile .pname { font-size: 13px; }
.pinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
.pinfo b { color: var(--heading); font-weight: 600; }
.pinfo span::before { content: "·"; margin-right: 10px; color: #cfd6d2; }
#policyInfo span::before { content: none; }  /* its one detail can wrap to a new line; no leading dot there */
.soon-tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a6d00; background: #fff4c7;
  border-radius: 999px; padding: 1px 7px; }

/* segmented control with sliding thumb */
.seg { position: relative; display: flex; padding: 3px; background: var(--line-soft); border-radius: 10px; }
.seg button { position: relative; z-index: 1; flex: 1; padding: 12px 10px;  /* same tap height as the policy tabs */ font-size: 13px; font-weight: 600; color: var(--muted);
  border-radius: 8px; transition: color .25s; white-space: nowrap; }
.seg button.on { color: var(--primary); }
.seg .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 8px; background: #fff; box-shadow: var(--shadow-xs), 0 0 0 1px var(--line);
  transition: transform .35s var(--spring), width .35s var(--spring); }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge-ok { background: var(--primary-50); color: var(--primary); }
.badge-declined { background: #fdeceb; color: var(--danger); }
.badge-misp { background: #fff4c7; color: #8a6d00; }
.badge-none { background: #f0f2f1; color: var(--muted); }
.badge-soon { background: #eaf1fb; color: #2c5c9c; }
.badge-base { background: #eef1fe; color: #3a4bb3; }
.badge-revision { background: #fff4c7; color: #8a6d00; }
.badge-enabler { background: var(--primary-50); color: var(--primary); }
.badge-draft { background: #f0f2f1; color: var(--muted); }
.badge-published { background: var(--primary-50); color: var(--primary); }
.badge-archived { background: #f4f4f4; color: #9a9a9a; }
.badge-best { background: linear-gradient(90deg, #f7d454, #ffe58a); color: #4b3b00; box-shadow: 0 4px 12px -4px rgba(247, 212, 84, .8); }
.badge-best::before { display: none; }

/* ------------------------------------------------------------------ results */
.result-card { position: relative; overflow: hidden; }
.result-card .stripe { position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--line); }
.result-card.ok .stripe { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.result-card.declined .stripe { background: var(--danger); }
.result-card.misp .stripe { background: var(--secondary); }
.result-card.soon .stripe { background: #9cb8dd; }
.result-card.best { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.result-card.best::before { content: ""; position: absolute; inset: -40%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(58, 204, 138, .16) 80%, transparent 90%); animation: sweep 5s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.ins-mark { display: grid; place-items: center; font-family: "Urbanist"; font-weight: 800;
  font-size: 14px; color: #fff; flex: none; box-shadow: 0 6px 14px -6px currentColor; }
.payout { font-family: "Urbanist", sans-serif; font-weight: 800; font-size: 52px; line-height: .95; letter-spacing: -.03em;
  background: linear-gradient(180deg, #058159, #024a34); -webkit-background-clip: text; background-clip: text; color: transparent; }
.payout small { font-size: 26px; letter-spacing: 0; }
.payout.dim { background: none; color: #c8cecb; }
.why summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--primary); }
.why summary::-webkit-details-marker { display: none; }
.why summary svg { transition: transform .3s var(--ease); }
.why[open] summary svg { transform: rotate(90deg); }
.why[open] dl { animation: fieldIn .35s var(--ease) both; }

.basis { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 11px; font-size: 13px;
  font-weight: 500; border: 1px solid transparent; font-family: "Inter", sans-serif; letter-spacing: 0; }
.basis b { font-weight: 700; }
.basis-od { background: #eef1fe; color: #3a4bb3; border-color: #dfe4fc; }
.basis-net { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }
.basis-tp { background: #fff4c7; color: #7a5d00; border-color: #fbe7a1; }
.basis-other { background: #f0f2f1; color: var(--paragraph); }

.bar-track { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.1s var(--ease); }
.bar-fill.best { background: linear-gradient(90deg, #e7b928, var(--secondary)); }

.skeleton { position: relative; overflow: hidden; background: #edf0ee; border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ------------------------------------------------------------------ motion utilities */
.reveal { animation: reveal .6s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn .4s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ------------------------------------------------------------------ tables, nav, overlays */
table.tbl { width: 100%; font-size: 13px; border-collapse: separate; border-spacing: 0; }
table.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); background: #fafbfa; padding: 10px 12px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; transition: background .15s; }
table.tbl tbody tr { animation: fadeIn .35s var(--ease) both; }
table.tbl tbody tr:hover td { background: #f7fbf9; }
table.tbl tbody tr:last-child td { border-bottom: 0; }

.side-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: 14.5px;
  color: var(--paragraph); position: relative; transition: all .2s var(--ease); white-space: nowrap; }
.side-link svg { color: var(--muted); transition: color .2s, transform .3s var(--spring); }
.side-link:hover { background: var(--primary-50); color: var(--primary); }
.side-link:hover svg { color: var(--primary); transform: scale(1.12); }
.side-link.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 8px 18px -10px rgba(3, 108, 75, .8); }
.side-link.active svg { color: #fff; }
.side-link .count { margin-left: auto; font-size: 11.5px; color: var(--muted); background: var(--line-soft); padding: 1px 8px; border-radius: 999px; }
.side-link.active .count { background: rgba(255, 255, 255, .2); color: #fff; }

.stat { position: relative; overflow: hidden; }
.stat .sico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.stat::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 204, 138, .12), transparent 70%); transition: transform .5s var(--ease); }
.stat:hover::after { transform: scale(1.5); }

.dropzone { position: relative; border: 2px dashed #bfe0d0; border-radius: 16px; background: linear-gradient(180deg, #fbfefc, #f1f9f5);
  transition: all .3s var(--ease); }
.dropzone:hover { border-color: var(--accent); }
.dropzone.drag { border-color: var(--primary); background: var(--primary-50); transform: scale(1.01); box-shadow: 0 0 0 6px rgba(3, 108, 75, .08); }
.dropzone .dz-icon { transition: transform .4s var(--spring); }
.dropzone:hover .dz-icon, .dropzone.drag .dz-icon { transform: translateY(-6px) scale(1.06); }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: currentColor; border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block; }
.spinner.dark { border-color: var(--primary-100); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; background: #16201b; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px;
  box-shadow: var(--shadow-lg); animation: toastIn .45s var(--spring) both; max-width: 420px; }
.toast.error { background: var(--danger); }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

.backdrop { position: fixed; inset: 0; background: rgba(13, 26, 21, .38); backdrop-filter: blur(3px); z-index: 50; animation: fadeIn .3s var(--ease); }
.modal-wrap { position: fixed; inset: 0; z-index: 51; display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: modalIn .4s var(--spring) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(940px, 100vw); background: #fff; z-index: 51; overflow-y: auto;
  overflow-x: hidden;
  box-shadow: -16px 0 48px rgba(13, 26, 21, .16); animation: drawerIn .5s var(--ease) both; }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
.closing .drawer { animation: drawerOut .3s var(--ease) both; }
.closing .backdrop, .closing .modal-wrap { animation: fadeOut .25s var(--ease) both; }
@keyframes drawerOut { to { transform: translateX(100%); } }
@keyframes fadeOut { to { opacity: 0; } }

.page-enter { animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }


/* ================================================================== luxury hero */
.hero-lux .aurora { position: absolute; inset: -40%; opacity: .55; pointer-events: none;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(58, 204, 138, .35) 60deg, transparent 120deg,
    rgba(247, 212, 84, .18) 200deg, transparent 260deg, rgba(58, 204, 138, .25) 320deg, transparent 360deg);
  filter: blur(60px); animation: aurora 26s linear infinite; }
@keyframes aurora { to { transform: rotate(360deg); } }

/* ================================================================== wizard shell */
.wizard { position: relative; background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%); border-radius: 26px; border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 80px -30px rgba(3, 74, 52, .45), 0 10px 30px -15px rgba(16, 32, 27, .2);
  padding: 26px 28px 22px; z-index: 2; }  /* above the info panel, so an open suggestion list is never covered */
@media (max-width: 640px) { .wizard { padding: 20px 16px 16px; border-radius: 20px; } }

/* stepper with animated rail */
.stepper { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 2px 0 26px; list-style: none; padding: 0; }
.stepper li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: default; }
.stepper li.can { cursor: pointer; }
.stepper .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff;
  border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: 14px; transition: all .45s var(--spring); }
.stepper .dot svg { display: none; }
.stepper .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); transition: color .3s; }
.stepper li.active .dot { border-color: var(--primary); color: var(--primary); transform: scale(1.12);
  box-shadow: 0 0 0 6px rgba(3, 108, 75, .10); }
.stepper li.active .lbl { color: var(--primary); }
.stepper li.done .dot { background: linear-gradient(135deg, #058159, var(--primary)); border-color: transparent; color: #fff; }
.stepper li.done .dot b { display: none; }
.stepper li.done .dot svg { display: block; animation: pop .4s var(--spring); }
.stepper li.done .lbl { color: var(--heading); }
.stepper li.can:hover .dot { transform: scale(1.08); }
.stepper .rail { position: absolute; top: 18px; left: 16.667%; right: 16.667%; height: 3px; border-radius: 3px; background: var(--line-soft); z-index: 0; }
.stepper .rail-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .7s var(--ease); overflow: hidden; }
.stepper .rail-fill::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent); animation: shimmer 2.2s infinite; }
@media (max-width: 520px) { .stepper .lbl { font-size: 11px; } .stepper .dot { width: 32px; height: 32px; } .stepper .rail { top: 15px; } }

/* panels */
.wz-stage { position: relative; transition: height .45s var(--ease); }
.wz-panel { display: none; }
.wz-panel.show { display: block; }
.wz-panel.in-next { animation: wzNext .5s var(--ease) both; }
.wz-panel.in-prev { animation: wzPrev .5s var(--ease) both; }
@keyframes wzNext { from { opacity: 0; transform: translateX(46px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wzPrev { from { opacity: 0; transform: translateX(-46px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.wz-head { margin-bottom: 18px; }
.wz-head h2 { font-size: 26px; font-weight: 800; line-height: 1.15; margin-top: 4px; }
.wz-head p { color: var(--paragraph); font-size: 14.5px; margin-top: 4px; }
.wz-kicker { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-50); border-radius: 999px; padding: 3px 10px; }
.sub-label { font-size: 12.5px; font-weight: 600; color: var(--paragraph); margin-bottom: 8px; }
.control-lg input, .control-lg select { padding-top: 13px !important; padding-bottom: 13px !important; font-size: 15.5px !important;
  border-radius: 12px !important; }

.wz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--line-soft); }
.wz-count { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.btn-lg { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
#back:disabled { visibility: hidden; }

/* policy cards */
.pcard { position: relative; text-align: left; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 12px; background: #fff;
  transition: all .25s var(--ease); }
.pcard .t { font-weight: 700; font-size: 13.5px; color: var(--heading); }
.pcard .d { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.pcard:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pcard.on { border-color: var(--primary); background: linear-gradient(180deg, #fff, var(--primary-50)); box-shadow: 0 0 0 4px rgba(3, 108, 75, .08); }
.pcard.on::after { content: ""; position: absolute; top: 9px; right: 9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center no-repeat;
  animation: pop .35s var(--spring); }
.pcard .tag { display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.tag-od { background: #eef1fe; color: #3a4bb3; }
.tag-net { background: var(--primary-50); color: var(--primary); }

#rtoHint:empty, #claimHint:empty { display: none; }
.field.tucked { display: none; }  /* filled from the vehicle master; shown when the make is picked by hand */
.veh-chip .veh-spec { font-weight: 500; opacity: .75; margin-left: 6px; white-space: nowrap; }
.veh-chip .veh-spec::before { content: "·"; margin-right: 6px; }  /* no gap between the RTO box and the popular codes until there is a hint */
.rto-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.rto-quick button { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-weight: 600; color: var(--paragraph);
  background: #fff; transition: all .2s var(--ease); }
.rto-quick button:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

/* review / summary blocks */
.sum-block { border: 1px solid var(--line-soft); border-radius: 16px; padding: 14px 16px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.sum-block:hover { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sum-head .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.sum-head .ttl { font-weight: 700; font-size: 14px; flex: 1; }
.sum-edit { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--primary);
  border-radius: 8px; padding: 4px 9px; transition: background .2s; }
.sum-edit:hover { background: var(--primary-50); }
.sum-rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.sum-rows dt { color: var(--muted); }
.sum-rows dd { font-weight: 600; color: var(--heading); text-align: right; word-break: break-word; }

/* ================================================================== results */
.view-in { animation: viewIn .6s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.view-out { animation: viewOut .28s var(--ease) both; }
@keyframes viewOut { to { opacity: 0; transform: translateY(-10px) scale(.985); } }

.winner { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; color: #fff;
  background: linear-gradient(135deg, #036c4b 0%, #024a34 60%, #013a29 100%); box-shadow: 0 24px 60px -24px rgba(3, 74, 52, .65); }
.winner::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 60%, #f7d454 75%, #3acc8a 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinBorder 4s linear infinite; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spinBorder { to { --ang: 360deg; } }
.winner .glow { position: absolute; width: 320px; height: 320px; right: -80px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 204, 138, .45), transparent 65%); animation: float 9s ease-in-out infinite; }
.winner .big { font-family: "Urbanist"; font-weight: 800; font-size: 60px; line-height: .9; letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff, #c9f5df); -webkit-background-clip: text; background-clip: text; color: transparent; }
.winner .big small { font-size: 28px; }
.winner .spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #f7d454; opacity: 0;
  animation: spark 3s ease-in-out infinite; }
@keyframes spark { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
.winner .logo-box { background: #fff; border-radius: 14px; padding: 6px 8px; display: inline-grid; place-items: center; }

.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 18px; }
.results-head h2 { font-size: 26px; font-weight: 800; }

#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

/* ================================================================== mobile: type scale + app feel */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, .ptile, .pcard, .seg button, input, select { touch-action: manipulation; }
.m-actions { display: none; }

@media (max-width: 640px) {
  /* type scale: 15px body, 12.5px smallest caption, 16px form text (stops iOS zoom-on-focus) */
  body { font-size: 15px; }
  .field input, .field select, .input, .control-lg input, .control-lg select { font-size: 16px !important; }
  /* date pickers: full width and a taller tap target so the whole date shows (dd-mm-yyyy) */
  [data-f="age"] { grid-column: 1 / -1; }
  input[type="date"] { min-height: 52px; padding-top: 14px !important; padding-bottom: 14px !important; }
  .field label, .sub-label { font-size: 13.5px; }
  .field .hint { font-size: 13px; }
  .site-header > div { height: 58px; }
  .logo-link img { height: 30px; }

  .hero-lux > div.relative { padding-top: 22px; padding-bottom: 92px; }
  .hero-lux h1 { font-size: 28px; line-height: 1.12; }
  .hero-lux p { display: none; }  /* phones: the wizard explains itself; get the form on screen sooner */
  .hero-lux .chip-glass:first-child { display: none; }
  .hero-lux .reveal.flex { margin-bottom: 12px; }
  .hero-lux .chip-glass { font-size: 12.5px; padding: 6px 11px; }
  main.relative { margin-top: -70px; }

  .wizard { padding: 18px 16px 0; border-radius: 22px; }
  .stepper { margin-bottom: 18px; }
  .stepper .lbl { font-size: 12.5px; }
  .wz-kicker { font-size: 12px; padding: 3px 10px; }
  .wz-head { margin-bottom: 14px; }
  .wz-head h2 { font-size: 22px; }
  .wz-head p { font-size: 14px; }
  .ptabs { gap: 4px; padding: 4px; }
  /* products on two rows (3 + 2, the second row centred) so full names fit */
  #products { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #products .ptile { grid-column: span 2; gap: 4px; padding: 8px 2px 7px; }
  #products .ptile:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
  .ptile .pico { width: 26px; height: 26px; flex: none; }
  .ptile .pico svg { width: 16px; height: 16px; }
  .ptile .pname { font-size: 12px; }
  .ptabs-text .ptile { padding: 15px 2px; }
  .ptabs-text .ptile .pname { font-size: 11.5px; letter-spacing: -.01em; }
  .pcard { padding: 12px; }
  .pcard .t { font-size: 14.5px; }
  .pcard .d { font-size: 12.5px; }
  .seg button { font-size: 14px; padding: 12px 6px; }
  .soon-tag { font-size: 11px; }
  #soonRow { font-size: 13px; }
  .rto-quick { font-size: 13px; }
  .rto-quick button { font-size: 13px; padding: 6px 12px; }
  .rto-chip, .veh-chip { font-size: 13px; }
  .ac-item .t { font-size: 14.5px; }
  .ac-item .m { font-size: 12.5px; }
  .badge { font-size: 12.5px; }

  /* wizard actions: a native-style bottom bar that stays under the thumb */
  .wz-nav { position: sticky; bottom: 0; z-index: 20; margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-soft); border-radius: 0 0 22px 22px; box-shadow: 0 -10px 24px -18px rgba(16, 32, 27, .35); }
  .wz-nav .btn-lg { flex: 1; justify-content: center; padding: 14px 18px; font-size: 16px; }
  .wz-nav .btn-lg { white-space: nowrap; }
  body.typing .wz-nav { display: none; }  /* keyboard open on the vehicle search: give the suggestions the room */
  .wz-nav .btn-lg .arrow { display: none; }
  .wz-nav #back { padding: 14px 14px; }
  .wz-nav #back:disabled { display: none; }
  .wz-count { display: none; }

  /* results */
  .results-head { padding: 14px 16px; }
  .results-head h2 { font-size: 22px; }
  .results-head #editTop { display: none; }
  .winner { padding: 18px; border-radius: 20px; }
  .winner .big { font-size: 54px; }
  .payout { font-size: 48px; }
  .sum-rows { font-size: 14px; }
  .sum-head .ttl { font-size: 15px; }
  .why summary, .why dl { font-size: 13.5px; }
  .basis { font-size: 13.5px; }
  .m-actions { display: flex; gap: 10px; position: sticky; bottom: 0; z-index: 20; margin: 16px -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line-soft);
    box-shadow: 0 -10px 24px -18px rgba(16, 32, 27, .35); }
  .m-actions > * { flex: 1; justify-content: center; padding: 13px 14px; font-size: 15px; }

  .site-footer .rounded-xl { font-size: 12.5px; }
  .site-footer .rounded-xl span { font-size: 12px; }
  .toast-wrap { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }
}

/* very small phones (iPhone SE / 320-360px) */
@media (max-width: 360px) {
  .hero-lux h1 { font-size: 24px; }
  .wz-head h2 { font-size: 20px; }
  .wz-nav .btn-lg { font-size: 15px; padding: 13px 12px; }
  .wz-nav .btn-lg svg { display: none; }
  .wz-nav #back { padding: 13px 12px; }
  .seg button { font-size: 13px; padding: 9px 4px; }
  .winner .big { font-size: 46px; }
  .payout { font-size: 42px; }
}

/* press feedback on touch, like a native app */
@media (pointer: coarse) {
  .ptile:active, .pcard:active, .btn-primary:active, .btn-ghost:active, .sum-edit:active, .rto-quick button:active, .ac-item:active {
    transform: scale(.97); transition: transform .08s; }
}

/* touch screens: comfortable tap targets for small text buttons, chips and links */
@media (pointer: coarse) {
  .rto-quick button, .sum-edit, #vehManual, #vehBack, #nav a, .pcard, .seg button, .btn-ghost, .btn-primary,
  #rf a, [data-set], [data-un], .icon-btn { min-height: 40px; }
  .rto-quick button, #rf a { display: inline-flex; align-items: center; }
  #vehManual, #vehBack, [data-set], [data-un] { padding: 6px 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================================================================== results (ranked) */
body.has-results .hero-lux h1, body.has-results .hero-lux p { display: none; }
body.has-results .hero-lux .relative { padding-top: 22px; padding-bottom: 104px; }

.res-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 20px 24px 24px; color: #fff; margin-bottom: 22px;
  background: radial-gradient(120% 140% at 100% 0%, #0b8a60 0%, #036c4b 38%, #02452f 100%);
  box-shadow: 0 30px 70px -30px rgba(3, 74, 52, .7), 0 1px 0 rgba(255, 255, 255, .12) inset; isolation: isolate; }
.res-hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 62%, #f7d454 76%, #3acc8a 86%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinBorder 5s linear infinite; }
.res-hero .glow { position: absolute; z-index: -1; width: 380px; height: 380px; right: -110px; top: -170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 204, 138, .5), transparent 65%); animation: float 9s ease-in-out infinite; }
.res-hero .spark { position: absolute; z-index: -1; width: 5px; height: 5px; border-radius: 50%; background: #f7d454; opacity: 0;
  animation: spark 3.2s ease-in-out infinite; }
.res-case { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .14); }
.res-kicker { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7); }
.res-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.res-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px;
  font-weight: 600; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(6px); }
.res-chips span svg { opacity: .75; }
.res-edit { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 700;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); transition: background .2s; }
.res-edit:hover { background: rgba(255, 255, 255, .22); }
.res-best { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-top: 18px; flex-wrap: wrap; }
.res-best .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.res-best .orb { flex: none; padding: 6px; border-radius: 18px; background: rgba(255, 255, 255, .95);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45), 0 0 0 6px rgba(255, 255, 255, .08); }
.res-best .orb .ins-logo { border: 0; }
.res-best .lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #f7d454; }
.res-best .name { font-family: "Urbanist", sans-serif; font-size: 28px; font-weight: 800; line-height: 1.05; margin-top: 2px; }
.res-best .sub { font-size: 13px; color: rgba(255, 255, 255, .72); margin-top: 3px; }
.res-best .pct { text-align: right; }
.res-best .big { font-family: "Urbanist", sans-serif; font-weight: 800; font-size: 76px; line-height: .85; letter-spacing: -.04em;
  background: linear-gradient(180deg, #ffffff 30%, #bff2d9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.res-best .big small { font-size: 34px; letter-spacing: 0; }
.res-best .of { font-size: 13px; color: rgba(255, 255, 255, .78); margin-top: 6px; }
.res-best .of b { color: #fff; }
.res-hero.none { background: linear-gradient(135deg, #3b4440, #232a27); }
.res-none { display: flex; gap: 12px; padding-top: 18px; color: #fff; }
.res-none .t { font-family: "Urbanist", sans-serif; font-size: 20px; font-weight: 800; }
.res-none p { font-size: 13.5px; color: rgba(255, 255, 255, .75); margin-top: 2px; }

.rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 10px; flex-wrap: wrap; }
.rank-head h2 { font-size: 18px; font-weight: 800; }
.rank-head span { font-size: 12.5px; color: var(--muted); }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank { position: relative; background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s; overflow: hidden; }
.rank:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.rank::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.rank.ok::before { background: linear-gradient(180deg, var(--primary), var(--accent)); }
.rank.is-best { border-color: transparent; box-shadow: 0 0 0 2px #f2cd4d, 0 18px 40px -22px rgba(181, 140, 0, .55); }
.rank.is-best::before { background: linear-gradient(180deg, #f7d454, #e7a923); }
.rank.declined::before { background: var(--danger); }
.rank.council::before, .rank.misp::before { background: var(--secondary); }
.rank.soon::before { background: #9cb8dd; }
.rank-main { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 18px 16px 20px; }
.rank-no { font-family: "Urbanist", sans-serif; font-weight: 800; font-size: 18px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rank.is-best .rank-no { color: #b58c00; }
.rank-info { min-width: 0; display: grid; gap: 8px; }
.rank-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: "Urbanist", sans-serif; font-size: 17px; font-weight: 800;
  color: var(--heading); line-height: 1.15; }
.rank-name .badge { font-size: 10.5px; padding: 2px 8px; }
.rank .bar-track { height: 8px; }
.rank-reason { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--paragraph); line-height: 1.4; }
.rank-reason .badge { flex: none; }
.rank-pct { text-align: right; display: grid; justify-items: end; gap: 4px; }
.rank-pct .num { font-family: "Urbanist", sans-serif; font-weight: 800; font-size: 34px; line-height: .95; letter-spacing: -.03em; color: var(--primary);
  font-variant-numeric: tabular-nums; }
.rank-pct .num small { font-size: 17px; letter-spacing: 0; }
.rank.is-best .rank-pct .num { color: #8a6a00; }
.rank-pct .num.dim { color: #c8cecb; font-size: 26px; }
.rank-extra { display: grid; gap: 6px; padding: 0 18px 14px 56px; }
.rank-extra .parts { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-extra .parts span { font-size: 12.5px; border-radius: 8px; padding: 4px 10px; background: #f4f6f5; color: var(--muted); }
.rank-extra .parts span.on { background: var(--primary-50); color: var(--primary); }
.xnote { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--muted); }
.xnote.warn { color: #6e5400; background: #fff8e1; border-radius: 8px; padding: 6px 10px; }
.xnote svg { flex: none; margin-top: 1px; }
.rank .why { border-top: 1px solid var(--line-soft); padding: 10px 18px 12px 56px; font-size: 12.5px; color: var(--paragraph); }
.rank .why dl { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 10px; margin-top: 10px; }
.rank .why dt { color: var(--muted); }
.rank .why dd.strong { font-weight: 600; color: var(--heading); }
.rank .why .faint { color: #a3aaa6; }
.res-basis { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 14px 4px 0; line-height: 1.5; }

.sum-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.sum-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; }
.sum-top p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sum-top .sum-edit { flex: none; white-space: nowrap; }
.sum-card .sum-block { border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; padding: 14px 18px; box-shadow: none; }
.sum-card .sum-block:hover { box-shadow: none; background: #fbfcfb; }

@media (max-width: 640px) {
  body.has-results .hero-lux .relative { padding-top: 14px; padding-bottom: 96px; }
  .res-hero { padding: 16px 16px 20px; border-radius: 22px; margin-bottom: 18px; }
  .res-case { padding-bottom: 14px; }
  .res-chips span { font-size: 12px; padding: 3px 9px; }
  .res-edit span { display: none; }
  .res-edit { padding: 8px 10px; }
  .res-best { padding-top: 16px; gap: 10px; flex-wrap: nowrap; align-items: center; }
  .res-best .who { flex: 1; gap: 10px; }
  .res-best .orb { padding: 3px; border-radius: 12px; }
  .res-best .orb .ins-logo { width: 58px !important; height: 32px !important; }
  .res-best .lbl { font-size: 10px; letter-spacing: .1em; }
  .res-best .name { font-size: 19px; }
  .res-best .sub { font-size: 12px; }
  .res-best .big { font-size: 52px; }
  .res-best .big small { font-size: 24px; }
  .res-best .of { font-size: 12px; }
  .res-chips span { max-width: 100%; }
  .rank-main { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 14px 14px 14px 16px; }
  .rank-no { display: none; }
  .rank-main .ins-logo { width: 64px !important; height: 34px !important; }
  .rank-name { font-size: 15.5px; }
  .rank-pct .num { font-size: 28px; }
  .rank-reason { flex-direction: column; gap: 5px; }
  .rank:not(.ok) .rank-pct { display: none; }
  .rank:not(.ok) .rank-main { grid-template-columns: auto minmax(0, 1fr); }
  .rank-extra { padding: 0 14px 12px 16px; }
  .rank .why { padding: 10px 14px 12px 16px; }
}
