/* FreightVyper — Loadsure visual identity
   Palette and type follow the Loadsure portal (showcase.loadsure.net) and Brokerage Warden:
   near-black surfaces, mint #51f2b8 as the brand accent, Plus Jakarta Sans, pill buttons. */
:root {
  --bg: #13161a;              /* portal body */
  --sidebar: #0a0c0e;
  --panel: #1a1e23;           /* cards, drawer */
  --panel-2: #20252b;         /* table header, inputs, muted surfaces */
  --panel-teal: #06262d;      /* Loadsure insurance panel */
  --ink: #ffffff;
  --ink-2: #d6d9da;
  --muted: #adb1b2;           /* portal body text */
  --dim: #7d8284;
  --line: rgb(255 255 255 / 10%);
  --line-2: rgb(255 255 255 / 6%);
  --line-strong: rgb(255 255 255 / 18%);
  --mint: #51f2b8;            /* Loadsure green */
  --mint-soft: rgb(81 242 184 / 12%);
  --mint-line: rgb(81 242 184 / 35%);
  --blue: #5671e9;
  --blue-soft: rgb(86 113 233 / 16%);
  --warn: #e0b34d;
  --warn-soft: rgb(224 179 77 / 14%);
  --bad: #f2617a;
  --bad-soft: rgb(242 97 122 / 14%);
  --land: var(--mint); --land-soft: var(--mint-soft);
  --sea: #7d93ff; --sea-soft: var(--blue-soft);
  --air: var(--warn); --air-soft: var(--warn-soft);
  /* aliases used by inline styles in app.js */
  --ls: var(--mint); --ls-ink: var(--mint); --ls-soft: var(--mint-soft);
  --ok: var(--mint); --ok-soft: var(--mint-soft);
  --brand: var(--mint); --brand-soft: var(--mint-soft);
  --radius: 14px;
  --pill: 19px;
  --shadow: 0 16px 34px rgb(0 0 0 / 22%);
  --font: 'Plus Jakarta Sans', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg);
  display: grid; grid-template-columns: 240px 1fr; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mint-soft); color: var(--ink); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Sidebar */
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); color: var(--muted); display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 18px; padding: 2px 8px 28px; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; }
.brand b { color: var(--mint); font-weight: 600; }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-weight: 500; color: var(--muted); }
.nav-link:hover { background: var(--panel); color: var(--ink); }
.nav-link.active { background: var(--panel); color: var(--ink); box-shadow: inset 2px 0 0 var(--mint); }
.nav-link.active svg { color: var(--mint); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 0 6px; }
.powered { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.powered > span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.powered img { height: 18px; width: auto; align-self: flex-start; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.conn.live .dot { background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.conn.demo .dot { background: var(--warn); }
.user { display: flex; align-items: center; gap: 9px; font-size: 12.5px; min-width: 0; }
.user img { width: 26px; height: 26px; border-radius: 50%; }
.user div { min-width: 0; }
.user strong { display: block; color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--dim); font-size: 12px; text-align: left; padding: 0; }
.link-btn:hover { color: var(--ink); }
.foot-links { display: flex; gap: 14px; }

/* Main */
main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; background: rgb(19 22 26 / 88%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 22px; font-weight: 500; margin: 0; letter-spacing: -.015em; }
.topbar-actions { display: flex; gap: 10px; }
#view { padding: 24px 32px 48px; }

/* Buttons — portal style: pill, 15px/500; primary filled mint, secondary outlined mint */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--mint); background: transparent; color: var(--mint); padding: 8px 18px; border-radius: var(--pill); font-weight: 500; font-size: 14px; transition: background .12s, filter .12s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--mint-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary, .btn.ls { background: var(--mint); border-color: var(--mint); color: #000; }
.btn.primary:hover, .btn.ls:hover { filter: brightness(1.08); background: var(--mint); }
.btn.ghost { border-color: var(--line-strong); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--mint-line); background: transparent; color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .count { background: var(--mint); color: #000; border-radius: 99px; font-size: 11px; font-weight: 600; padding: 1px 7px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 16px; padding: 6px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.muted { color: var(--muted); }
.pad { padding: 16px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.kpi.ls { background: linear-gradient(180deg, var(--panel-teal), var(--panel)); border-color: var(--mint-line); }
.kpi.ls .value { color: var(--mint); }
.meter { height: 6px; background: var(--line); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--mint); border-radius: 99px; }

/* Toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--pill); padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: var(--pill); font-weight: 500; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--mint); color: #000; }
.seg .n { font-weight: 500; opacity: .65; font-size: 12px; }
.search { flex: 1; min-width: 200px; max-width: 360px; position: relative; }
.search input { width: 100%; padding: 8px 14px 8px 36px; border-radius: var(--pill); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 16px; height: 16px; }
input, select { font: inherit; border: 1px solid var(--line-strong); background: var(--panel-2); border-radius: 10px; padding: 8px 11px; color: var(--ink); outline: none; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
input::placeholder { color: var(--dim); }
select option { background: var(--panel-2); color: var(--ink); }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.6); }

/* Table */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card:has(> table) { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover { background: rgb(255 255 255 / 3%); }
tbody tr:last-child td { border-bottom: 0; }
tr.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%,30% { background: var(--mint-soft); } 100% { background: transparent; } }
.ref { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--ink); }
.route { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink); }
.route .arrow { color: var(--dim); }
.route small, .cell-sub { color: var(--dim); font-size: 12px; display: block; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.mode { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; }
.mode svg { width: 16px; height: 16px; }
.mode.land { background: var(--land-soft); color: var(--land); }
.mode.sea { background: var(--sea-soft); color: var(--sea); }
.mode.air { background: var(--air-soft); color: var(--air); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 99px; white-space: nowrap; background: var(--panel-2); color: var(--muted); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill[data-st="Booked"] { background: var(--panel-2); color: var(--muted); }
.pill[data-st="Dispatched"], .pill[data-st="At origin"] { background: var(--blue-soft); color: #9aaaff; }
.pill[data-st="In transit"] { background: var(--blue-soft); color: #9aaaff; }
.pill[data-st="Customs"] { background: var(--warn-soft); color: var(--warn); }
.pill[data-st="Delivered"] { background: var(--mint-soft); color: var(--mint); }
.ins { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.ins svg { width: 13px; height: 13px; }
.ins.yes { background: var(--mint-soft); color: var(--mint); }
.ins.no { background: transparent; color: var(--dim); border: 1px dashed var(--line-strong); }
.empty { padding: 48px; text-align: center; color: var(--muted); }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgb(0 0 0 / 55%); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 21; transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgb(0 0 0 / 40%); }
.drawer.open { transform: none; }
.drawer-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head h2 { margin: 6px 0 0; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.drawer-body { padding: 20px 24px 32px; overflow: auto; display: flex; flex-direction: column; gap: 18px; }
.route-big { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.route-big .place strong { display: block; font-size: 15px; font-weight: 600; }
.route-big .place span { color: var(--muted); font-size: 12.5px; }
.route-big .place.to { text-align: right; }
.route-big .mid { color: var(--dim); display: flex; flex-direction: column; align-items: center; font-size: 11.5px; gap: 2px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.kv div span { display: block; font-size: 12px; color: var(--dim); margin-bottom: 2px; }
.kv div strong { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 600; margin: 0 0 10px; }

/* Loadsure insurance panel */
.ls-panel { border: 1px solid var(--mint-line); background: linear-gradient(180deg, var(--panel-teal) 0%, var(--panel) 85%); border-radius: var(--radius); padding: 18px; }
.ls-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ls-badge { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; color: var(--ink); font-size: 13.5px; }
.ls-badge img { height: 16px; width: auto; }
.ls-badge .sep { width: 1px; height: 14px; background: var(--line-strong); }
.ls-tag { font-size: 11px; font-weight: 500; color: var(--mint); border: 1px solid var(--mint-line); padding: 2px 9px; border-radius: 99px; }
.ls-panel p { margin: 0 0 14px; color: var(--muted); line-height: 1.55; }
.quote { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; background: rgb(0 0 0 / 22%); overflow: hidden; margin-bottom: 14px; }
.quote > div { padding: 12px 14px; border-right: 1px solid var(--line); }
.quote > div:last-child { border-right: 0; }
.quote span { display: block; font-size: 11.5px; color: var(--dim); margin-bottom: 3px; }
.quote strong { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.quote .premium strong { font-size: 24px; color: var(--mint); letter-spacing: -.02em; }
.quote .premium em { font-style: normal; font-size: 11.5px; color: var(--dim); display: block; margin-top: 2px; }
.ls-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--mint); width: 16px; height: 16px; padding: 0; }
.check a { color: var(--mint); }
.cert { display: flex; align-items: center; gap: 12px; background: rgb(0 0 0 / 22%); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.cert .tick { width: 34px; height: 34px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; flex: none; }
.cert .tick svg { stroke: #000; }
.cert strong { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.ls-err { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; line-height: 1.45; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--mint); font-weight: 500; padding: 8px 0 14px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--mint-soft); border-top-color: var(--mint); animation: spin .7s linear infinite; }
.btn.primary .spinner, .btn.ls .spinner { border-color: rgb(0 0 0 / 20%) !important; border-top-color: #000 !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 66px; border-radius: 12px; background: linear-gradient(90deg, rgb(255 255 255 / 4%) 0%, rgb(255 255 255 / 9%) 50%, rgb(255 255 255 / 4%) 100%); background-size: 200% 100%; animation: shimmer 1.1s infinite; margin-bottom: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.choice-card { margin: 0 !important; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgb(0 0 0 / 18%); }
.choice-card.on { border-color: var(--mint); background: var(--mint-soft); }
.choice-card strong { color: var(--ink); font-weight: 600; }

/* Wizard */
.wizard { max-width: 940px; display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; grid-column: 1 / -1; }
.step { flex: 1; display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: var(--pill); background: var(--panel); border: 1px solid var(--line); font-weight: 500; font-size: 13px; color: var(--dim); }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--panel-2); color: var(--muted); flex: none; }
.step.on { color: var(--ink); border-color: var(--mint); }
.step.on .n { background: var(--mint); color: #000; }
.step.done { color: var(--muted); }
.step.done .n { background: var(--mint-soft); color: var(--mint); }
.form-card { padding: 22px 24px; }
.form-card h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }
.form-card > p { margin: 0 0 18px; color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field input, .field select { width: 100%; }
.field.full { grid-column: 1 / -1; }
.field .hint { font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.mode-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; grid-column: 1 / -1; }
.mode-pick button { border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--ink); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 12px; text-align: left; transition: border-color .12s, background .12s; }
.mode-pick button:hover { border-color: var(--mint-line); }
.mode-pick button.on { border-color: var(--mint); background: var(--mint-soft); }
.mode-pick strong { display: block; font-size: 14px; font-weight: 600; }
.mode-pick small { color: var(--muted); font-size: 12px; }
.wiz-foot { display: flex; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--panel-2); }
.summary { padding: 18px; position: sticky; top: 92px; }
.summary h4 { margin: 0 0 12px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 600; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 13px; }
.summary dt { color: var(--dim); }
.summary dd { margin: 0; text-align: right; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.summary .total { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; display: flex; justify-content: space-between; font-weight: 600; }
.summary .ls-line { color: var(--mint); }
.err-text { color: var(--bad); font-size: 13px; margin-top: 12px; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.review-row:last-child { border-bottom: 0; }
.review-row span { color: var(--dim); }
.review-row strong { font-weight: 500; text-align: right; }

/* API log */
.inspector { position: fixed; right: 0; top: 0; height: 100vh; width: min(560px, 100vw); background: #07090b; color: var(--ink-2); border-left: 1px solid var(--line); z-index: 30; transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgb(0 0 0 / 45%); }
.inspector.open { transform: none; }
.inspector-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.inspector-head strong { color: var(--ink); display: block; font-weight: 600; }
.inspector-head .muted { color: var(--dim); font-size: 12px; }
.inspector-body { overflow: auto; flex: 1; }
.call { border-bottom: 1px solid var(--line); }
.call summary { list-style: none; cursor: pointer; padding: 12px 18px; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.call summary::-webkit-details-marker { display: none; }
.call summary:hover { background: rgb(255 255 255 / 3%); }
.call .verb { font-family: var(--mono); font-size: 11px; font-weight: 600; background: var(--mint-soft); color: var(--mint); padding: 2px 6px; border-radius: 4px; }
.call .path { font-family: var(--mono); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call .code { font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.call .code.ok { color: var(--mint); } .call .code.bad { color: var(--bad); }
.call .ms { color: var(--dim); font-size: 11.5px; font-family: var(--mono); }
.call h5 { margin: 10px 18px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.call pre { margin: 0 18px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; overflow: auto; max-height: 340px; color: var(--ink-2); }
.call pre .k { color: #9aaaff; } .call pre .s { color: var(--mint); } .call pre .n { color: var(--warn); } .call pre .b { color: var(--bad); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--mint-line); color: var(--ink); padding: 11px 18px; border-radius: var(--pill); font-weight: 500; z-index: 40; box-shadow: 0 10px 30px rgb(0 0 0 / 40%); display: flex; gap: 10px; align-items: center; }
.toast svg { stroke: var(--mint); }

/* Login */
.login { grid-column: 1 / -1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; gap: 22px; }
.login .mark { width: 64px; height: 64px; }
.login h1 { font-size: 34px; font-weight: 400; margin: 0; letter-spacing: -.01em; }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login .card p { color: var(--muted); line-height: 1.55; margin: 0 0 20px; }
.login .btn { width: 100%; justify-content: center; padding: 10px 18px; font-size: 15px; }
.login .note { font-size: 12px; color: var(--dim); text-align: center; }
.login .powered { flex-direction: row; align-items: center; gap: 10px; border: 0; padding: 0; }
.login .alert { border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; line-height: 1.45; }
.login .alert.bad { background: var(--bad-soft); color: var(--bad); }
.login .alert.warn { background: var(--warn-soft); color: var(--warn); }

@media (max-width: 1480px) { .hide-md { display: none; } }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .wizard { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 760px) {
  body { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar, #view { padding-left: 16px; padding-right: 16px; }
  .grid, .mode-pick, .quote { grid-template-columns: 1fr; }
  .quote > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .hide-sm { display: none; }
  .steps .step span.lbl { display: none; }
  .card { overflow-x: auto; }
}

/* Loadsure product card (style guide: product description, price breakdown, exclusions, statement of fact) */
.ls-badge img { height: 20px; width: auto; margin: 4px; } /* margin keeps the logo's clear space */
.product { border: 1px solid var(--line); border-radius: 12px; background: rgb(0 0 0 / 22%); padding: 16px 18px; margin-bottom: 14px; }
.product-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.product-head .verified { width: 32px; height: 32px; border-radius: 50%; background: var(--mint-soft); color: var(--mint); display: grid; place-items: center; flex: none; }
.product-head .verified svg { width: 16px; height: 16px; }
.product-head strong { font-weight: 600; font-size: 15px; color: var(--ink); display: block; }
.product-head p { margin: 4px 0 0 !important; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.price-rows { display: grid; grid-template-columns: 1fr auto; gap: 7px 16px; margin: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.price-rows dt { color: var(--muted); }
.price-rows dd { margin: 0; text-align: right; color: var(--ink-2); }
.price-rows .sep { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 3px; }
.price-rows .price { font-weight: 600; color: var(--ink); font-size: 15px; }
.price-rows dd.price { color: var(--mint); font-size: 18px; }
.product .fine { margin: 12px 0 0 !important; font-size: 12px; color: var(--dim) !important; }
.product a, .sof a { color: var(--mint); }
.exclusions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.exclusions > span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin-bottom: 8px; font-weight: 600; }
.exclusions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; max-height: 220px; overflow-y: auto; }
.exclusions li { font-size: 12.5px; line-height: 1.45; padding-left: 14px; position: relative; }
.exclusions li::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--bad); opacity: .8; }
.exclusions li strong { color: var(--ink-2); font-weight: 600; }
.exclusions li small { display: block; color: var(--dim); font-size: 12px; }
.sof { font-size: 12px; line-height: 1.55; color: var(--muted); background: rgb(0 0 0 / 18%); border-left: 2px solid var(--mint-line); border-radius: 0 8px 8px 0; padding: 10px 12px; margin-bottom: 14px; }
.user span { display: block; color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-card.ls-panel { border-radius: 0; }
