/* Motorly — application styles. Brand tokens live in brand.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand-green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-green-600); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--brand-green-900); line-height: 1.18; margin: 0 0 var(--sp-3); font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--sp-4); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--sp-4); top: var(--sp-4); z-index: 200; background: var(--surface); padding: var(--sp-3) var(--sp-4); border-radius: var(--r); box-shadow: var(--shadow); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-5); }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 var(--sp-5); }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.strong { font-weight: 650; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--sp-2); } .mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); } .mb-5 { margin-bottom: var(--sp-5); }
.hide { display: none !important; }

/* ---------- Header ---------- */
.masthead { position: sticky; top: 0; z-index: 60; background: rgba(250,247,240,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.masthead .bar { display: flex; align-items: center; gap: var(--sp-5); min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-green); flex: none; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: .06em; color: var(--brand-green); }
.logo-word em { font-style: normal; color: var(--brand-lime-600); }
.mainnav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.mainnav a { padding: 9px 12px; border-radius: var(--r-pill); text-decoration: none; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 550; }
.mainnav a:hover { background: var(--brand-green-050); color: var(--brand-green); }
.mainnav a[aria-current="page"] { background: var(--brand-green); color: #fff; }
/* Account controls live in the header on desktop and in the menu on mobile. */
.mainnav .nav-account { display: none; }
.header-cta { display: flex; gap: var(--sp-2); align-items: center; flex: none; }
.navtoggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: var(--fs-sm); line-height: 1;
  padding: 12px 18px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  background: var(--brand-green); color: #fff; cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  min-height: 44px;
}
.btn:hover { background: var(--brand-green-600); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-lime { background: var(--brand-lime); color: var(--brand-green-900); }
.btn-lime:hover { background: var(--brand-lime-600); color: var(--brand-green-900); }
.btn-ghost { background: transparent; color: var(--brand-green); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--brand-green-050); color: var(--brand-green); border-color: var(--brand-green); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; padding: 8px 12px; }
.btn-quiet:hover { background: var(--paper-2); color: var(--ink); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #8b1a1a; }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: var(--fs-xs); }
.btn-lg { padding: 15px 26px; font-size: var(--fs-md); min-height: 52px; }
.btn-block { width: 100%; }
.btnrow { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
label, .label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.hint { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time],
input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: var(--fs-base); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); min-height: 48px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 38px; }
input:hover, select:hover, textarea:hover { border-color: var(--brand-green-500); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.field { margin-bottom: var(--sp-4); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--brand-green); }
.err { color: var(--bad); font-size: var(--fs-sm); font-weight: 600; margin-top: 6px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-bg); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-5); }
legend { padding: 0; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 650; color: var(--brand-green-900); margin-bottom: var(--sp-3); }

/* UK number plate input */
.plate { display: flex; border-radius: var(--r-sm); overflow: hidden; border: 1.5px solid var(--ink); background: #fbd60a; max-width: 340px; }
.plate .gb { background: #0b3ea8; color: #fff; width: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 6px 0; }
.plate .gb .stars { font-size: 9px; line-height: 1.1; color: #fbd60a; }
.plate input { border: 0; border-radius: 0; background: #fbd60a; font-family: "Segoe UI Semibold", system-ui, sans-serif;
  font-size: 1.4rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: center; color: #111; min-height: 54px; }
.plate input:focus-visible { box-shadow: none; }
.plate:focus-within { box-shadow: var(--focus); }

/* ---------- Cards & surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-sm); }
.card-flat { box-shadow: none; }
.card-pad-sm { padding: var(--sp-4); }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4); }
.section { padding: var(--sp-8) 0; }
.section-tight { padding: var(--sp-7) 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-green { background: var(--brand-green); color: #e8f1ec; }
.section-green h1, .section-green h2, .section-green h3, .section-green h4 { color: #fff; }
.section-green a { color: var(--brand-lime); }
.eyebrow { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-green-500); margin-bottom: var(--sp-3); }
.section-green .eyebrow { color: var(--brand-lime); }
.lede { font-size: var(--fs-md); color: var(--ink-2); max-width: 62ch; }
.section-green .lede { color: #cfe0d8; }
.rule { height: 1px; background: var(--line); border: 0; margin: var(--sp-5) 0; }

/* ---------- Badges & pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 650; padding: 4px 10px; border-radius: var(--r-pill); background: var(--brand-green-050); color: var(--brand-green); border: 1px solid var(--brand-green-100); }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe0cd; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #ecd8a8; }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: #eec3bf; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: #bcd8e2; }
.badge-neutral { background: var(--paper-2); color: var(--ink-2); border-color: var(--line-2); }
.badge-lime { background: var(--brand-lime-100); color: #4c6104; border-color: #d5ec92; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
table.data th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--brand-green-050); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- App shell (signed-in areas) ---------- */
.appshell { display: grid; grid-template-columns: 250px 1fr; gap: 0; min-height: calc(100vh - 72px); align-items: start; }
.sidebar { background: var(--brand-green); color: #cfe0d8; padding: var(--sp-5) var(--sp-4); position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 72px); overflow-y: auto; }
.sidebar .who { border-bottom: 1px solid rgba(255,255,255,.14); padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); }
.sidebar .who .nm { color: #fff; font-weight: 650; font-family: var(--font-display); }
.sidebar .who .rl { font-size: var(--fs-xs); color: var(--brand-lime); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); color: #cfe0d8; text-decoration: none; font-size: var(--fs-sm); font-weight: 550; }
.sidenav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidenav a[aria-current="page"] { background: var(--brand-lime); color: var(--brand-green-900); font-weight: 650; }
.sidenav .count { background: rgba(255,255,255,.16); color: #fff; border-radius: var(--r-pill); padding: 1px 8px; font-size: var(--fs-xs); font-weight: 700; }
.sidenav a[aria-current="page"] .count { background: var(--brand-green); color: #fff; }
.sidenav .grouphead { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .09em; color: #8fae9f; font-weight: 700; margin: var(--sp-4) 0 var(--sp-2); padding: 0 12px; }
.appmain { padding: var(--sp-5) var(--sp-6) var(--sp-8); min-width: 0; }
.pagehead { display: flex; gap: var(--sp-4); align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--sp-5); }
.pagehead h1 { font-size: var(--fs-2xl); margin-bottom: 4px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4); }
.stat .k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; margin-bottom: 6px; }
.stat .v { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; color: var(--brand-green-900); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .s { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; }
.meter { height: 7px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--brand-green-500); border-radius: var(--r-pill); }
.meter i.lime { background: var(--brand-lime-600); }
.meter i.warn { background: var(--warn); }
.meter i.bad { background: var(--bad); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--sp-4) var(--sp-6); }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--line-2); z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 11px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--brand-green); border-color: var(--brand-green); }
.timeline li.done::after { background: var(--brand-green-100); }
.timeline li.now::before { background: var(--brand-lime); border-color: var(--brand-green); box-shadow: 0 0 0 4px var(--brand-lime-100); }
.timeline li.now .tl-t { color: var(--brand-green-900); font-weight: 700; }
.timeline li.pending .tl-t { color: var(--ink-3); font-weight: 500; }
.tl-t { font-weight: 600; font-size: var(--fs-sm); }
.tl-m { font-size: var(--fs-xs); color: var(--ink-3); }

/* ---------- Messages ---------- */
.thread { display: flex; flex-direction: column; gap: var(--sp-3); max-height: 460px; overflow-y: auto; padding: var(--sp-2); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: var(--r-lg); font-size: var(--fs-sm); border: 1px solid var(--line); background: var(--surface); }
.msg .meta { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 3px; }
.msg.mine { align-self: flex-end; background: var(--brand-green); color: #fff; border-color: var(--brand-green); }
.msg.mine .meta { color: #bcd4c8; }
.msg.internal { align-self: stretch; max-width: 100%; background: var(--warn-bg); border-color: #ecd8a8; }
.msg.internal .meta { color: var(--warn); font-weight: 700; }

/* ---------- Media placeholders ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
.media-item { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.media-item .ph { aspect-ratio: 4/3; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand-green-050), var(--paper-2)); color: var(--brand-green-500); font-size: var(--fs-xs); font-weight: 600; }
.media-item .cap { padding: 8px 10px; font-size: var(--fs-xs); color: var(--ink-2); border-top: 1px solid var(--line); background: var(--surface); }

/* ---------- Quote journey ---------- */
.steps { display: flex; gap: var(--sp-2); list-style: none; padding: 0; margin: 0 0 var(--sp-5); flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-3); padding: 7px 13px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.steps li .n { width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink-2); display: grid; place-items: center; font-size: 12px; }
.steps li.done { color: var(--brand-green); border-color: var(--brand-green-100); background: var(--brand-green-050); }
.steps li.done .n { background: var(--brand-green); color: #fff; }
.steps li.active { color: #fff; background: var(--brand-green); border-color: var(--brand-green); }
.steps li.active .n { background: var(--brand-lime); color: var(--brand-green-900); }
.choice { border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--sp-5); background: var(--surface); display: flex; flex-direction: column; }
.choice.featured { border-color: var(--brand-green); box-shadow: var(--shadow); }
.choice .tag { align-self: flex-start; margin-bottom: var(--sp-3); }
.choice .price { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--brand-green-900); font-weight: 700; line-height: 1; }
.choice ul { list-style: none; padding: 0; margin: var(--sp-4) 0; display: flex; flex-direction: column; gap: 9px; font-size: var(--fs-sm); }
.choice ul li { display: flex; gap: 9px; align-items: flex-start; }
.choice ul li svg { flex: none; margin-top: 3px; color: var(--brand-green-500); }
.choice .foot { margin-top: auto; padding-top: var(--sp-4); }
.optgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: var(--sp-4); align-items: stretch; }
.pickcard { border: 1.5px solid var(--line-2); border-radius: var(--r); padding: var(--sp-4); background: var(--surface); cursor: pointer; display: block; }
.pickcard:hover { border-color: var(--brand-green-500); background: var(--brand-green-050); }
.pickcard.sel { border-color: var(--brand-green); background: var(--brand-green-050); box-shadow: inset 0 0 0 1px var(--brand-green); }
.pickcard .t { font-weight: 650; color: var(--brand-green-900); display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pickcard .d { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: var(--sp-3); }

/* ---------- Money summary ---------- */
.money { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.money td { padding: 7px 0; }
.money td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.money tr.sub td { border-top: 1px solid var(--line); }
.money tr.total td { border-top: 2px solid var(--brand-green); font-weight: 700; font-size: var(--fs-md); color: var(--brand-green-900); padding-top: 12px; font-family: var(--font-display); }

/* ---------- Toast, modal, tabs ---------- */
.toasts { position: fixed; right: var(--sp-5); bottom: var(--sp-5); z-index: 300; display: flex; flex-direction: column; gap: var(--sp-2); max-width: 380px; }
.toast { background: var(--brand-green-900); color: #fff; padding: 13px 17px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); display: flex; gap: 10px; align-items: flex-start; animation: pop .2s ease; }
.toast.good { background: var(--ok); } .toast.bad { background: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(6,37,27,.55); z-index: 250; display: grid; place-items: center; padding: var(--sp-4); overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: min(690px, 100%); max-height: 92vh; overflow-y: auto; }
.modal.wide { width: min(940px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; z-index: 2; }
.modal header h3 { margin: 0; }
.modal .body { padding: var(--sp-5); }
.modal .foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); display: flex; gap: var(--sp-3); justify-content: flex-end; flex-wrap: wrap; background: var(--paper-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-5); overflow-x: auto; }
.tabs button { font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 11px 14px; cursor: pointer; white-space: nowrap; min-height: 44px; }
.tabs button:hover { color: var(--brand-green); }
.tabs button[aria-selected="true"] { color: var(--brand-green-900); border-bottom-color: var(--brand-lime); }

/* ---------- Accordion ---------- */
details.acc { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: var(--sp-3); }
details.acc > summary { cursor: pointer; padding: var(--sp-4); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-4); align-items: center; color: var(--brand-green-900); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "+"; font-size: 1.35rem; color: var(--brand-green-500); line-height: 1; }
details.acc[open] > summary::after { content: "\2013"; }
details.acc .accbody { padding: 0 var(--sp-4) var(--sp-4); color: var(--ink-2); font-size: var(--fs-sm); }

/* ---------- Hero ---------- */
.hero { background: var(--brand-green); color: #dce9e2; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -180px; top: -120px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(182,230,34,.15), transparent 62%); pointer-events: none; }
.hero .inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-7); align-items: center; padding: var(--sp-8) 0; position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: var(--fs-4xl); letter-spacing: -0.025em; }
.hero .sub { font-size: var(--fs-md); color: #cadfd4; max-width: 46ch; }
.hero .promises { list-style: none; padding: 0; margin: var(--sp-5) 0 0; display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); font-size: var(--fs-sm); }
.hero .promises li { display: flex; gap: 8px; align-items: center; color: #dce9e2; }
.hero .promises svg { color: var(--brand-lime); flex: none; }
.quotebox { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-lg); color: var(--ink); }
.quotebox h2 { font-size: var(--fs-lg); }

/* ---------- Steps / trust / reviews ---------- */
.howgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.how { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.how .n { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-lime); color: var(--brand-green-900); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; margin-bottom: var(--sp-3); }
.trustgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: var(--sp-5); }
.trust { display: flex; gap: var(--sp-3); align-items: flex-start; }
.trust .ico { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--brand-green-050); color: var(--brand-green); display: grid; place-items: center; flex: none; }
.section-green .trust .ico { background: rgba(255,255,255,.1); color: var(--brand-lime); }
.trust h4 { margin-bottom: 2px; }
.section-green .trust p { color: #cfe0d8; }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.stars { color: #b8860b; letter-spacing: 2px; font-size: var(--fs-sm); }
.review .who { display: flex; gap: 10px; align-items: center; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-green-100); color: var(--brand-green); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); flex: none; }
.avatar.lg { width: 46px; height: 46px; font-size: var(--fs-base); }

/* ---------- Footer ---------- */
.foot { background: var(--brand-green-900); color: #9fb8ab; padding: var(--sp-7) 0 var(--sp-5); font-size: var(--fs-sm); }
.foot h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-3); }
.foot a { color: #c6d8ce; text-decoration: none; display: block; padding: 4px 0; }
.foot a:hover { color: var(--brand-lime); text-decoration: underline; }
.footgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); }
.footbase { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--sp-6); padding-top: var(--sp-4); display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-xs); }

/* ---------- Misc ---------- */
.demo-note { background: var(--warn-bg); border: 1px dashed #d9b45e; color: #6a4405; border-radius: var(--r); padding: 10px 14px; font-size: var(--fs-xs); display: flex; gap: 8px; align-items: flex-start; }
.demo-ribbon { background: var(--brand-green-900); color: var(--brand-lime); font-size: var(--fs-xs); text-align: center; padding: 7px var(--sp-4); font-weight: 600; }
.demo-ribbon a { color: #fff; }
.empty { text-align: center; padding: var(--sp-7) var(--sp-4); color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface); }
.kv { display: grid; grid-template-columns: minmax(120px, 36%) 1fr; gap: 8px var(--sp-4); font-size: var(--fs-sm); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 550; }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-5); align-items: start; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }
/* Grid and flex children default to min-width:auto, so one wide descendant
   (a table, a long reference) can push a whole column past the viewport. */
.split > *, .split-even > *, .grid2 > *, .grid3 > *, .grid4 > *, .stats > *, .stack > *, .optgrid > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-3); }
.inline { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.between { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.joblist { display: flex; flex-direction: column; gap: var(--sp-3); }
.jobrow { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: var(--sp-4); }
.jobrow:hover { border-color: var(--brand-green-500); }
.jobrow .top { display: flex; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; align-items: flex-start; }
.reg { font-family: "Segoe UI Semibold", system-ui, sans-serif; font-weight: 700; letter-spacing: .05em; background: #fbd60a; color: #111; border: 1px solid var(--ink); border-radius: 4px; padding: 1px 7px; font-size: var(--fs-xs); display: inline-block; }
.sev { border-left: 4px solid var(--line-2); padding-left: var(--sp-4); }
.sev.critical { border-left-color: var(--bad); }
.sev.soon { border-left-color: var(--warn); }
.sev.monitor { border-left-color: var(--info); }
.filters { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: flex-end; margin-bottom: var(--sp-4); }
.filters .field { margin: 0; min-width: 165px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: inherit; color: var(--brand-green); text-decoration: underline; cursor: pointer; }
.cover-map { background: var(--brand-green-050); border: 1px solid var(--brand-green-100); border-radius: var(--r-lg); padding: var(--sp-5); }
.pin { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--brand-green-100); }
.pin:last-child { border-bottom: 0; }
.pin .p { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-green); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.audit { list-style: none; margin: 0; padding: 0; font-size: var(--fs-xs); }
.audit li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; gap: var(--sp-3); }
.audit li:last-child { border-bottom: 0; }
.audit .ts { color: var(--ink-3); flex: none; width: 128px; font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero .inner { grid-template-columns: 1fr; gap: var(--sp-6); padding: var(--sp-7) 0; }
  .hero h1 { font-size: var(--fs-3xl); }
  .howgrid, .reviews { grid-template-columns: 1fr; }
  .footgrid { grid-template-columns: 1fr 1fr; }
  .split, .split-even { grid-template-columns: 1fr; }
  .appshell { grid-template-columns: 210px 1fr; }
  .appmain { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .navtoggle { display: inline-flex; margin-left: auto; }
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; padding: var(--sp-3); gap: 2px; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 13px; border-radius: var(--r-sm); }
  .mainnav .nav-account { display: block; border-top: 1px solid var(--line); margin-top: var(--sp-2); padding-top: var(--sp-3); font-weight: 650; color: var(--brand-green); }
  .masthead .bar { position: relative; gap: var(--sp-3); min-height: 64px; }
  .btn-hide-sm { display: none !important; }
  .appshell { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; padding: var(--sp-3) var(--sp-4); }
  .sidebar .who { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; padding-bottom: var(--sp-3); margin-bottom: var(--sp-3); }
  .sidenav { flex-direction: row; overflow-x: auto; gap: var(--sp-2); padding-bottom: 4px; }
  .sidenav a { white-space: nowrap; }
  .sidenav .grouphead { display: none; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  h1 { font-size: var(--fs-2xl); }
  .hero h1 { font-size: 2.1rem; }
  .section, .section-tight { padding: var(--sp-6) 0; }
  .msg { max-width: 92%; }
  .modal .foot { flex-direction: column-reverse; }
  .modal .foot .btn { width: 100%; }
  .toasts { left: var(--sp-4); right: var(--sp-4); max-width: none; }
  .audit li { flex-direction: column; gap: 2px; }
  .audit .ts { width: auto; }
}
@media (max-width: 560px) {
  .footgrid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .wrap, .wrap-narrow { padding: 0 var(--sp-4); }
  .card { padding: var(--sp-4); }
  .kv { grid-template-columns: 1fr; gap: 2px var(--sp-4); }
  .kv dd { margin-bottom: 8px; }
  .btnrow .btn { flex: 1 1 auto; }
  .pagehead h1 { font-size: var(--fs-xl); }
}
@media print { .masthead, .sidebar, .foot, .btnrow, .demo-ribbon { display: none !important; } .appshell { grid-template-columns: 1fr; } }
