/* FBA Pricing v2 · Unicargo. Every brand value is a custom property, so the brand book can swap them here. */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/lato-400.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/lato-700.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url(fonts/lato-900.woff2) format("woff2"); }

/* ------------------------------------------------------------------ tokens: light (default) */
:root {
  color-scheme: light;
  --paper: #F4F7F7; --card: #FFFFFF; --raised: #FFFFFF; --well: #EEF2F3; --row-hover: #F2FBF8;
  --field: #FFFFFF; --field-border: #7D8D92;
  --line: rgba(20, 39, 44, .12); --line-strong: rgba(20, 39, 44, .24);
  --ink: #14272C; --ink-2: #3D5157; --ink-3: #5B6B70;
  --sea: #06CEA8; --sea-ink: #047A64; --sea-wash: #E6FAF5;
  --hull: #1D4650; --hull-hover: #163840; --on-hull: #FFFFFF; --link: #1D4650;
  --hero: #1D4650; --hero-rule: #1D4650; --on-hero: #FFFFFF; --on-hero-2: #C8D6D9; --on-hero-3: #A9BEC3;
  --hero-warn: #FFD08A; --hero-alert: #FFB4AB;
  --lime: #D1EF54; --lavender: #C1B9ED; --avatar: #CFEFE6;
  --ddp-bg: #1D4650; --ddp-fg: #FFFFFF; --ddu-bg: #ECE9FB; --ddu-fg: #3E3592;
  --alert: #B42318; --alert-wash: #FDEDEC; --caution: #8A5300; --caution-wash: #FFF3D6;
  --shadow: 0 0 0 1px rgba(20, 39, 44, .06), 0 1px 2px rgba(20, 39, 44, .06), 0 4px 12px rgba(20, 39, 44, .04);
  --pop: 0 0 0 1px rgba(20, 39, 44, .08), 0 8px 24px rgba(20, 39, 44, .14);
  --focus: #1D4650;
  --r-control: 8px; --r-card: 14px; --r-hero: 20px; --r-pill: 999px;
  --font: Lato, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 48px;
  --sticky-top: 0px; /* measured: height of the sticky filter bar on the result page */
}

/* ------------------------------------------------------------------ tokens: dark (System → dark, or chosen) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0C181B; --card: #122226; --raised: #182C31; --well: #0F1D20; --row-hover: #16292D;
    --field: #0F1D20; --field-border: #6B8085;
    --line: rgba(230, 239, 239, .10); --line-strong: rgba(230, 239, 239, .20);
    --ink: #E6EFEF; --ink-2: #C2D0D2; --ink-3: #9DB2B6;
    --sea-ink: #33E3C1; --sea-wash: rgba(6, 206, 168, .12);
    --hull: #06CEA8; --hull-hover: #2EE0BC; --on-hull: #0C181B; --link: #33E3C1;
    --hero: #1B3238; --hero-rule: #06CEA8;
    --avatar: #2A4A44;
    --ddp-bg: #DDEAEC; --ddp-fg: #12343C; --ddu-bg: #2E2860; --ddu-fg: #C9C2F5;
    --alert: #F97066; --alert-wash: rgba(249, 112, 102, .12); --caution: #FFB547; --caution-wash: rgba(255, 181, 71, .12);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .07);
    --pop: 0 0 0 1px rgba(255, 255, 255, .10), 0 12px 32px rgba(0, 0, 0, .5);
    --focus: #33E3C1;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0C181B; --card: #122226; --raised: #182C31; --well: #0F1D20; --row-hover: #16292D;
  --field: #0F1D20; --field-border: #6B8085;
  --line: rgba(230, 239, 239, .10); --line-strong: rgba(230, 239, 239, .20);
  --ink: #E6EFEF; --ink-2: #C2D0D2; --ink-3: #9DB2B6;
  --sea-ink: #33E3C1; --sea-wash: rgba(6, 206, 168, .12);
  --hull: #06CEA8; --hull-hover: #2EE0BC; --on-hull: #0C181B; --link: #33E3C1;
  --hero: #1B3238; --hero-rule: #06CEA8;
  --avatar: #2A4A44;
  --ddp-bg: #DDEAEC; --ddp-fg: #12343C; --ddu-bg: #2E2860; --ddu-fg: #C9C2F5;
  --alert: #F97066; --alert-wash: rgba(249, 112, 102, .12); --caution: #FFB547; --caution-wash: rgba(255, 181, 71, .12);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .07);
  --pop: 0 0 0 1px rgba(255, 255, 255, .10), 0 12px 32px rgba(0, 0, 0, .5);
  --focus: #33E3C1;
}

/* logo variants: charcoal CARGO on light, white CARGO on dark */
.logo-d { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-l { display: none; }
  :root:not([data-theme="light"]) .logo-d { display: block; }
}
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--scroll-pad, 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 900; text-wrap: balance; }
a, button, label, summary, select, input[type="checkbox"], input[type="radio"] { touch-action: manipulation; -webkit-tap-highlight-color: rgba(6, 206, 168, .15); }
h1 { font-size: 28px; line-height: 34px; letter-spacing: -.01em; }
h2 { font-size: 22px; line-height: 28px; }
h3 { font-size: 16px; line-height: 22px; }
p { margin: 0; }
b, strong { font-weight: 700; }
code, .mono { font-family: var(--mono); font-size: 13px; }
svg.i { flex: none; vertical-align: -3px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.small { font-size: 12px; line-height: 16px; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.clamp1, .clamp2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { -webkit-line-clamp: 1; }
.clamp2 { -webkit-line-clamp: 2; }
.link { color: var(--link); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100; display: inline-flex; align-items: center;
  height: 40px; padding: 0 14px; border-radius: var(--r-control); background: var(--hull); color: var(--on-hull);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--sea); outline-offset: 2px; }

/* ------------------------------------------------------------------ app bar */
.topbar { background: var(--card); box-shadow: 0 1px 0 var(--line); position: relative; z-index: 20; }
.topbar-in { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { height: 26px; width: auto; }
.brand-rule { width: 1px; height: 24px; background: var(--line-strong); }
.brand-name { font-size: 15px; font-weight: 700; white-space: nowrap; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a {
  position: relative; display: flex; align-items: center; height: 40px; padding: 0 12px; border-radius: var(--r-control);
  font-size: 14px; font-weight: 700; color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.mainnav a:hover { color: var(--ink); background: var(--well); }
.mainnav a[aria-current="page"] { color: var(--ink); }
.mainnav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 3px; border-radius: var(--r-pill); background: var(--sea);
}
.usermenu { margin-left: auto; position: relative; }
.usermenu-btn {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 4px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink); font: 700 14px var(--font); cursor: pointer;
}
.usermenu-btn:hover { background: var(--well); }
.usermenu-who { display: flex; flex-direction: column; align-items: flex-start; line-height: 16px; text-align: left; }
.usermenu-who span { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.avatar {
  width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--avatar); color: #1D4650;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; flex: none;
}
.avatar.admin { background: var(--lavender); }
.avatar.lg { width: 40px; height: 40px; font-size: 16px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 32px); z-index: 30;
  border-radius: var(--r-card); background: var(--raised); box-shadow: var(--pop); padding: 8px; display: flex; flex-direction: column;
}
.menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { font-size: 15px; display: block; }
.menu-head .email { font-size: 13px; color: var(--ink-3); word-break: break-all; }
.menu-head .badge { margin-left: auto; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-control);
  background: transparent; color: var(--ink); font: 700 15px var(--font); text-decoration: none; text-align: left; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--well); color: var(--ink); }
.menu-item:focus-visible { outline-offset: -2px; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu-theme { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 10px; font-size: 15px; font-weight: 700; }
.menu-nav { display: none; }
.only-narrow { display: none; }
.only-wide, .only-narrow { line-height: 0; }
.seg-mini { margin-left: auto; display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--well); }
.seg-mini button {
  height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2);
  font: 700 13px var(--font); cursor: pointer;
}
.seg-mini button[aria-checked="true"] { background: var(--hull); color: var(--on-hull); }

/* ------------------------------------------------------------------ page */
.page { max-width: 1440px; margin: 0 auto; padding: 24px var(--gutter) 64px; display: flex; flex-direction: column; gap: 24px; }
.page:focus { outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-head .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head p { font-size: 15px; line-height: 22px; color: var(--ink-2); max-width: 820px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 14px; color: var(--ink-3); }
.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.section-head h2 .sub { font-size: 15px; font-weight: 700; color: var(--ink-3); }
.card { border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); padding: 24px; }
.card.tight { padding: 0; overflow: hidden; }
.card > h2, .card-title { font-size: 18px; line-height: 24px; font-weight: 900; margin: 0 0 4px; }
.card-sub { font-size: 13px; line-height: 18px; color: var(--ink-3); margin-bottom: 16px; }
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.sm { gap: 8px; }
.footer-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 8px; font-size: 13px; color: var(--ink-3); }
.pillbar { display: flex; gap: 6px; align-items: center; }
.pillbar span { display: block; height: 6px; border-radius: var(--r-pill); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 0;
  border-radius: var(--r-control); background: var(--hull); color: var(--on-hull); font: 700 14px var(--font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--hull-hover); color: var(--on-hull); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--well); color: var(--ink-3); cursor: not-allowed; }
.btn.secondary { background: var(--card); box-shadow: inset 0 0 0 1px var(--field-border); color: var(--ink); }
.btn.secondary:hover { background: var(--well); }
.btn.secondary:disabled { box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); background: var(--card); }
.btn.quiet { background: transparent; color: var(--link); padding: 0 12px; text-decoration: underline; text-underline-offset: 2px; }
.btn.quiet:hover { background: var(--sea-wash); color: var(--link); }
.btn.danger { background: var(--card); box-shadow: inset 0 0 0 1px var(--alert); color: var(--alert); }
.btn.danger:hover { background: var(--alert-wash); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn.block { width: 100%; }
button.linkbtn {
  border: 0; background: none; padding: 0; font: 700 14px var(--font); color: var(--link);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
form.inline { display: inline; }

/* ------------------------------------------------------------------ fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.field .hint { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.err, .field .err { font-size: 12px; line-height: 16px; color: var(--alert); display: flex; gap: 4px; align-items: flex-start; }
.control {
  display: flex; align-items: center; gap: 8px; height: 40px; border-radius: var(--r-control); background: var(--field);
  box-shadow: inset 0 0 0 1px var(--field-border); padding: 0 12px;
}
.control:focus-within { box-shadow: inset 0 0 0 2px var(--hull); }
.control input, .control select {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0; box-shadow: none;
  font: 400 16px var(--font); color: var(--ink);
}
.control input:focus-visible, .control select:focus-visible { outline: none; }
.control .unit { font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.control.invalid, .field.invalid .control { background: var(--alert-wash); box-shadow: inset 0 0 0 1px var(--alert); }
input.std, select.std, textarea.std {
  height: 40px; border: 0; border-radius: var(--r-control); background: var(--field); box-shadow: inset 0 0 0 1px var(--field-border);
  padding: 0 12px; font: 400 16px var(--font); color: var(--ink); min-width: 0; width: 100%;
}
select.std { padding-right: 32px; }
input.std:focus-visible, select.std:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--hull); }
.field.invalid input.std { background: var(--alert-wash); box-shadow: inset 0 0 0 1px var(--alert); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--hull); width: 18px; height: 18px; margin: 0; flex: none; }
input[type="file"].std { height: auto; padding: 10px 12px; font-size: 14px; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; color: var(--ink); cursor: pointer; }
label.check input { margin-top: 1px; }

/* ------------------------------------------------------------------ badges, tags, notes */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--well); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle;
}
.badge.sm { height: 22px; padding: 0 8px; }
.badge.ddp { background: var(--ddp-bg); color: var(--ddp-fg); font-weight: 900; letter-spacing: .02em; }
.badge.ddu { background: var(--ddu-bg); color: var(--ddu-fg); font-weight: 900; letter-spacing: .02em; }
.badge.lg { height: 28px; padding: 0 12px; font-size: 14px; }
.badge.valid, .badge.ok { background: var(--sea-wash); color: var(--sea-ink); }
.badge.caution, .badge.warn, .badge.review { background: var(--caution-wash); color: var(--caution); }
.badge.alert, .badge.bad, .badge.broken, .badge.expired { background: var(--alert-wash); color: var(--alert); }
.badge.role-rep { background: var(--well); color: var(--ink-2); }
.badge.role-manager { background: var(--ddu-bg); color: var(--ddu-fg); }
.badge.role-admin { background: var(--hull); color: var(--on-hull); }
.badge.cheapest { background: var(--sea); color: #0C181B; font-weight: 900; height: 22px; padding: 0 8px; }
.badge.fastcheap { background: var(--lime); color: #1D4650; font-weight: 900; height: 22px; padding: 0 8px; }
.badge.active { background: var(--sea-wash); color: var(--sea-ink); }
.badge.pending { background: var(--caution-wash); color: var(--caution); }
.badge.failed, .badge.rejected { background: var(--alert-wash); color: var(--alert); }
.badge.superseded { background: var(--well); color: var(--ink-3); }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: var(--well);
  font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.meter { display: inline-flex; gap: 2px; }
.meter i { width: 4px; height: 10px; border-radius: 2px; background: var(--line-strong); }
.meter i.on { background: currentColor; }
.meter.lg i { height: 12px; }
.note {
  display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 20px;
  background: var(--well); color: var(--ink-2);
}
.note > svg { margin-top: 2px; }
.note.ok { background: var(--sea-wash); color: var(--ink); }
.note.ok > svg { color: var(--sea-ink); }
.note.warn { background: var(--caution-wash); color: var(--ink); }
.note.warn > svg { color: var(--caution); }
.note.bad { background: var(--alert-wash); color: var(--ink); }
.note.bad > svg { color: var(--alert); }
.note b { color: var(--ink); }
.inline-warn { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 18px; color: var(--caution); }
.inline-alert { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 18px; color: var(--alert); font-weight: 700; }
.inline-warn svg, .inline-alert svg { margin-top: 2px; }
.inline-warn > span, .inline-alert > span { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ data tables */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; padding: 10px 16px; background: var(--well); font-size: 12px; line-height: 16px; font-weight: 700; color: var(--ink-3);
  white-space: nowrap;
}
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:hover { background: var(--row-hover); }
table.data th.num, table.data td.num { text-align: right; }
table.data .sub { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.table-scroll { overflow-x: auto; }
.empty { padding: 32px 24px; text-align: center; color: var(--ink-3); }

/* row-as-link: a real <a> stretched over the row */
tr.rowlink { position: relative; cursor: pointer; }
tr.rowlink td:first-child a.stretch::after { content: ""; position: absolute; inset: 0; }
tr.rowlink a.stretch { color: var(--ink); text-decoration: none; font-weight: 700; }
tr.rowlink:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
tr.rowlink a.stretch:focus-visible { outline: none; }
tr.rowlink .above { position: relative; z-index: 1; }

/* ------------------------------------------------------------------ popovers (filters, menus) */
.pop {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; min-width: 280px; max-width: calc(100vw - 32px);
  border-radius: var(--r-card); background: var(--raised); box-shadow: var(--pop); padding: 8px; display: flex; flex-direction: column;
}
.pop fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pop legend { font-size: 13px; font-weight: 900; padding: 4px 10px 6px; }
.pop-opt { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: var(--r-control); font-size: 14px; cursor: pointer; }
.pop-opt:hover { background: var(--well); }
.pop-opt input:checked ~ .lbl { font-weight: 700; }
.pop-opt .lbl { flex: 1; }
.pop-opt .count { font-size: 12px; color: var(--ink-3); }
.pop-opt.disabled { color: var(--ink-3); cursor: not-allowed; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 2px 0; }

/* ------------------------------------------------------------------ dialog */
dialog.dlg {
  border: 0; padding: 0; border-radius: var(--r-hero); background: var(--raised); color: var(--ink); box-shadow: var(--pop);
  width: min(560px, calc(100vw - 32px));
}
dialog.dlg { overscroll-behavior: contain; max-height: calc(100vh - 32px); overflow-y: auto; }
dialog.dlg::backdrop { background: rgba(12, 24, 27, .45); }
.dlg-in { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.iconbtn {
  width: 32px; height: 32px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.iconbtn:hover { background: var(--well); color: var(--ink); }

/* ------------------------------------------------------------------ busy state */
form.busy .spinner { display: inline-flex; }
.spinner { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.spinner::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--hull);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner::before { animation: none; } * { scroll-behavior: auto !important; } }

/* ------------------------------------------------------------------ phone */
@media (max-width: 1100px) {
  :root { --gutter: 24px; }
  .grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar-in { gap: 16px; }
  .mainnav { display: none; }
  .menu-nav { display: flex; flex-direction: column; }
  .usermenu-who { display: none; }
  .only-wide { display: none; }
  .only-narrow { display: inline; }
  .usermenu-btn { padding-right: 10px; }
}
@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .topbar-in { height: 56px; }
  .brand img { height: 22px; }
  .brand-name { font-size: 14px; }
  .page { padding-top: 16px; gap: 20px; }
  h1 { font-size: 24px; line-height: 30px; }
  .card { padding: 18px; }
  .menu { overscroll-behavior: contain; position: fixed; inset: 56px 0 0 0; width: auto; max-width: none; border-radius: 0; overflow-y: auto; }
  .menu-item { height: 48px; }
}

/* ================================================================== quote result */
/* request card ("hero"): navy in light, a raised teal-ruled surface in dark */
.hero {
  border-radius: var(--r-hero); background: var(--hero); box-shadow: inset 0 2px 0 var(--hero-rule); color: var(--on-hero);
  padding: 22px 28px 24px; display: flex; flex-direction: column; gap: 16px;
}
.hero :focus-visible { outline-color: #FFFFFF; }
.hero-meta { display: flex; align-items: center; gap: 8px 24px; font-size: 14px; color: var(--on-hero-2); flex-wrap: wrap; }
.hero-meta h2 { min-width: 0; flex: 0 1 auto; font-size: 16px; line-height: 22px; color: var(--on-hero); }
.hero-meta b { color: var(--on-hero); }
.hero-btn {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--r-control); background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
  color: var(--on-hero); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.hero-btn:hover { background: rgba(255, 255, 255, .2); color: var(--on-hero); }
.route { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; align-items: center; gap: 20px; }
.route-end { display: flex; flex-direction: column; min-width: 0; }
.route-big { font-size: 28px; line-height: 34px; font-weight: 900; letter-spacing: -.01em; white-space: nowrap; }
.route-city { font-size: 20px; font-weight: 700; color: var(--on-hero-2); letter-spacing: 0; }
.route-sub { font-size: 13px; line-height: 18px; color: var(--on-hero-3); }
.route-bar { display: flex; align-items: center; gap: 6px; padding-bottom: 18px; color: var(--sea); }
.route-bar .dot { width: 14px; height: 14px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 3px var(--sea); flex: none; }
.route-bar .sea { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--sea); }
.route-bar .lime { width: 28px; height: 6px; border-radius: var(--r-pill); background: var(--lime); flex: none; }
.facts {
  list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, .16);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 14px; color: var(--on-hero-2);
}
.facts b { font-size: 16px; color: var(--on-hero); }
.hero-warn { display: inline-flex; align-items: center; gap: 4px; color: var(--hero-warn); margin-left: 6px; }
.muted-hero { color: var(--on-hero-3) !important; font-weight: 400 !important; }
.hero-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-notes li {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px;
  background: rgba(255, 208, 138, .12); box-shadow: inset 0 0 0 1px rgba(255, 208, 138, .45); color: var(--on-hero); font-size: 14px;
}
.hero-notes li svg { color: var(--hero-warn); margin-top: 2px; }
.hero-notes li.alert { background: rgba(255, 180, 171, .14); box-shadow: inset 0 0 0 1px rgba(255, 180, 171, .6); }
.hero-notes li.alert svg { color: var(--hero-alert); }

.empty-state { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 36px; flex-wrap: wrap; }
.empty-state h2 { margin-bottom: 6px; }
.empty-state p { color: var(--ink-2); max-width: 640px; font-size: 15px; line-height: 22px; }

/* best by tier */
.tier-row { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.tier-mode { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.tier-mode .badge { align-self: flex-start; }
.tier-mode b { font-size: 16px; }
.tier-mode span:not(.badge) { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.tier-mode .link { font-size: 13px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile {
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); padding: 14px 18px 16px;
  display: flex; flex-direction: column; gap: 8px; outline: none;
}
.tile.cheapest { box-shadow: inset 0 0 0 2px var(--sea), var(--shadow); }
.tile:hover, .tile:focus-visible, .tile.tier-hi { box-shadow: inset 0 0 0 2px var(--hull), var(--shadow); }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.tile-tier { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.tile-who { display: flex; flex-direction: column; gap: 1px; }
.tile-co { font-size: 17px; line-height: 22px; font-weight: 700; }
.tile-svc { font-size: 14px; line-height: 20px; }
.tile-route { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.tile-transit { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tile-price { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tile-price .amt { font-size: 26px; line-height: 32px; font-weight: 900; letter-spacing: -.01em; }
.tile-price .sfx { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tile-price .perkg { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* filter bar: sticky, one scroll context with the table below */
.opts-section { gap: 0; padding-top: 8px; }
.opts-section > h2 { margin-bottom: 12px; }
.fbar {
  position: sticky; top: 0; z-index: 6; border-radius: var(--r-card) var(--r-card) 0 0; background: var(--card);
  box-shadow: var(--shadow); padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.seg { border: 0; margin: 0; display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--well); box-shadow: inset 0 0 0 1px var(--field-border); gap: 2px; }
.seg label {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--hull); color: var(--on-hull); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg .cnt { font-weight: 400; opacity: .85; }
.cnt { font-weight: 400; color: var(--ink-3); }
.seg label:has(input:checked) .cnt { color: inherit; }
.facet { position: relative; }
.fbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--field-border); color: var(--ink); font: 700 14px var(--font);
  white-space: nowrap; cursor: pointer;
}
.fbtn:hover { background: var(--well); }
.fbtn.on { background: var(--ink); color: var(--card); box-shadow: none; }
.fbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.fbtn.only-phone { display: none; }
.maxt { padding: 8px 10px 4px; width: 300px; }
.maxt-row { display: flex; align-items: center; gap: 10px; }
.maxt input[type=range] { width: 100%; accent-color: var(--hull); margin: 8px 0 2px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 36px; margin-left: 4px; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--well); box-shadow: inset 0 0 0 1px var(--field-border); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: var(--r-pill); background: var(--field-border); transition: transform .15s; }
.switch input:checked + .track { background: var(--hull); box-shadow: none; }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--on-hull); }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }
.fbar-status { margin-left: auto; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.fbar-status b { color: var(--ink); }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.sort select.std { height: 36px; width: auto; font-size: 14px; font-weight: 700; }
.pills { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 12px; border-radius: var(--r-pill); background: var(--sea-wash); color: var(--ink); font-size: 13px; }
.pill button { width: 28px; height: 28px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pill button:hover { background: rgba(6, 206, 168, .2); }

/* options table: a real table, no overflow wrapper, so the sticky header shares the page's scroll */
.opts-card { border-radius: 0 0 var(--r-card) var(--r-card); background: var(--card); box-shadow: var(--shadow); }
table.opts { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.opts thead th {
  position: sticky; top: var(--sticky-top); z-index: 4; background: var(--well); padding: 8px 10px; text-align: left;
  font-size: 12px; line-height: 16px; font-weight: 700; color: var(--ink-3); white-space: nowrap; border-bottom: 1px solid var(--line);
}
.opts thead th.num { text-align: right; }
.opts th .light { font-weight: 400; }
.sortbtn { height: 28px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sortbtn:hover { color: var(--ink); }
th[aria-sort="ascending"] .sortbtn, th[aria-sort="descending"] .sortbtn { color: var(--ink); }
th[aria-sort="ascending"] .sortbtn::after { content: "▲"; font-size: 9px; }
th[aria-sort="descending"] .sortbtn::after { content: "▼"; font-size: 9px; }
.opts > tbody > tr > td { padding: 14px 10px; vertical-align: top; border-top: 1px solid var(--line); background: var(--card); }
.opts tbody.opt:first-of-type tr.main td { border-top: 0; }
.opts tr.main:hover > td { background: var(--row-hover); }
.opts tr.main td:first-child, .opts thead th:first-child { padding-left: 20px; }
.opts tr.main td:last-child, .opts thead th:last-child { padding-right: 20px; }
.opts .c-co { width: 150px; }
.opts .c-co b { font-size: 15px; }
.opts td.c-co { padding-top: 10px; }
.co-cell { display: flex; align-items: center; gap: 8px; }
.opts .c-ch { min-width: 300px; }
.opts td.c-ch { position: relative; }
.opts .c-sp { width: 88px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.opts .c-md { width: 62px; }
.opts .c-tr { width: 132px; }
.opts .c-rt { width: 132px; }
.opts .c-dt { width: 120px; color: var(--ink-3); font-size: 13px; }
.opts .c-tt { width: 110px; }
.opts .c-pk { width: 64px; font-size: 12px; color: var(--ink-3); }
.opts .sub { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: normal; }
.opts .tt { font-size: 17px; font-weight: 900; }
.opts .sfx { font-weight: 700; color: var(--ink-2); }
.exp {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.exp:hover { background: var(--well); }
.exp[aria-expanded="true"] { background: var(--well); }
.exp[aria-expanded="true"] svg { transform: rotate(90deg); }
.ch-name { display: flex; align-items: center; gap: 4px; }
.ch-name b { font-size: 15px; line-height: 20px; }
.info-btn {
  flex: none; width: 28px; height: 28px; margin: -4px 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--link);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.info-btn:hover, .info-btn[aria-expanded="true"] { background: var(--sea-wash); }
.ch-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.ch-tags .cn { font-size: 12px; color: var(--ink-3); }
.c-ch .inline-warn, .c-ch .inline-alert { margin-top: 6px; }
.inline-warn.info { color: var(--ink-3); }
.tr-days { display: block; font-size: 14px; font-weight: 700; }
.tr-bar { position: relative; display: block; height: 4px; margin-top: 6px; border-radius: var(--r-pill); background: var(--well); }
.tr-bar span { position: absolute; top: 0; height: 4px; border-radius: var(--r-pill); background: var(--sea); }
tbody.opt.blocked tr.main td { color: var(--ink-3); }
tbody.opt.blocked .tt { text-decoration: line-through; }
tbody.opt.expired tr.main td:first-child { box-shadow: inset 4px 0 0 var(--alert); }
tbody.opt.paged-out, tbody.opt.filtered-out { display: none; }
.opts tr.detail > td { padding: 0 20px 20px 62px; border-top: 0; }
.bd { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; border-radius: var(--r-card); background: var(--well); padding: 18px 22px; }
.bd-lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.bd-lines th, .bd-lines td { padding: 9px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; background: transparent; }
.bd-lines thead th { border-top: 0; padding-top: 0; font-size: 12px; color: var(--ink-3); font-weight: 700; position: static; background: none; }
.bd-lines .num { text-align: right; padding-left: 12px; width: 100px; }
.bd-lines tr.total th, .bd-lines tr.total td { border-top: 2px solid var(--ink); font-size: 15px; font-weight: 900; }
.bd-notes { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.bd-notes > b { color: var(--ink); }

/* channel ⓘ popover */
.chpop {
  position: absolute; z-index: 8; top: 34px; left: 0; width: 420px; max-width: calc(100vw - 32px); border-radius: var(--r-card);
  background: var(--raised); box-shadow: var(--pop); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px;
  font-weight: 400;
}
.chpop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.chpop-head b { display: block; font-size: 16px; font-weight: 900; }
.chpop-head span { font-size: 13px; color: var(--ink-3); }
.chpop-route { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.chpop-route i { flex: 1; min-width: 12px; height: 6px; border-radius: var(--r-pill); background: var(--sea); }
.chpop-route i:last-of-type { flex: 0 0 28px; background: var(--lime); }
.chpop dl { margin: 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px 12px; font-size: 13px; line-height: 19px; }
.chpop dt { color: var(--ink-3); }
.chpop dd { margin: 0; color: var(--ink-2); }
.chpop-foot { padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }

.nomatch { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.nomatch p { color: var(--ink-2); max-width: 640px; }
.nomatch .row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.more { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 13px; }

.sheet-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sheet-group legend, .sheet-group > label { font-size: 14px; font-weight: 900; padding: 0 0 6px; }
.sheet-foot { position: sticky; bottom: 0; background: var(--raised); padding: 12px 0 4px; justify-content: space-between; }

@media (max-width: 1240px) {
  .opts .c-pk, .opts .c-dt { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .route { grid-template-columns: 1fr; gap: 6px; }
  .route-bar { display: none; }
  .route-big { white-space: normal; font-size: 24px; line-height: 30px; }
  .hero { padding: 18px 18px 20px; }
  .hero-btn { margin-left: 0; width: 100%; justify-content: center; order: 9; }
  .tier-row { grid-template-columns: 1fr; gap: 10px; }
  .tier-mode { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .tier-mode span:not(.badge) { flex-basis: 100%; }
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile-price .amt { font-size: 22px; line-height: 28px; }
  .fbar { gap: 8px; padding: 10px 12px; }
  .fbar .facet, .fbar #mode-seg, .fbar .switch { display: none; }
  .fbtn.only-phone { display: inline-flex; }
  .fbar-status { margin-left: auto; font-size: 13px; }
  .sort > span { display: none; }
  .opts thead { display: none; }
  table.opts, .opts > tbody, .opts > tbody > tr, .opts > tbody > tr > td { display: block; }
  .opts tbody.opt { border-top: 1px solid var(--line); }
  .opts tbody.opt.filtered-out, .opts tbody.opt.paged-out { display: none; }
  .opts tr.main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 10px; padding: 14px 14px 12px; }
  .opts tr.main td { border: 0; padding: 0; width: auto; min-width: 0; background: transparent !important; }
  .opts td.c-co { grid-column: 1; grid-row: 1; padding: 0; }
  .opts td.c-sp { grid-column: 2; grid-row: 1; align-self: center; }
  .opts td.c-md { grid-column: 3; grid-row: 1; align-self: center; }
  .opts td.c-ch { grid-column: 1 / -1; grid-row: 2; }
  .opts td.c-tr { grid-column: 1 / 3; grid-row: 3; align-self: end; }
  .opts td.c-tt { grid-column: 3; grid-row: 3; }
  .opts td.c-rt { display: none; }
  .opts td.c-co .exp { order: 2; margin-left: auto; }
  .co-cell { justify-content: flex-start; }
  .chpop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 80vh; overflow: auto; }
  .opts tr.detail > td { padding: 0 12px 14px; }
  .bd { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--r-hero) var(--r-hero) 0 0; }
}

/* ================================================================== new quote */
.quote-layout { grid-template-columns: minmax(0, 1fr) 420px; }
.qform { padding: 0; display: flex; flex-direction: column; }
.qform-head { padding: 28px 32px 8px; display: flex; flex-direction: column; gap: 6px; }
.qform-head p { color: var(--ink-2); font-size: 15px; line-height: 22px; }
.qform > .note { margin: 12px 32px 0; }
.qform .note ul { margin-top: 4px; }
.qform .note a { color: var(--ink); }
.fgroup { display: grid; grid-template-columns: 164px minmax(0, 1fr); gap: 16px; padding: 24px 32px; border-top: 1px solid var(--line); }
.fgroup:first-of-type { border-top: 0; }
.qform-head + .fgroup, .note + .fgroup { border-top: 0; }
.fgroup-title { font-size: 17px; line-height: 40px; font-weight: 900; padding-top: 22px; }
.fstack { display: flex; flex-direction: column; gap: 16px; }
.fgrid { display: grid; gap: 16px 20px; align-items: start; }
.fgrid.route-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.fgrid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid.two-a { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.code-input { font-weight: 700 !important; text-transform: uppercase; max-width: 90px; }
.control .place { flex: 1; text-align: left; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.control .place.unknown { font-style: normal; }
.calc { border-radius: 10px; background: var(--sea-wash); padding: 10px 14px; font-size: 14px; line-height: 22px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 24px; }
.calc b { color: var(--ink); }
.calc .flag { color: var(--caution); display: inline-flex; align-items: center; gap: 6px; }
.more-box { border-radius: var(--r-card); background: var(--well); padding: 0 16px; }
.more-box summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; list-style: none; font-size: 14px; }
.more-box summary::-webkit-details-marker { display: none; }
.more-box summary svg { transform: rotate(-90deg); transition: transform .15s; }
.more-box[open] summary svg { transform: none; }
.more-box[open] { padding-bottom: 18px; }
.more-box .fgrid { margin: 4px 0 16px; }
.check.ins .muted { margin-left: 4px; }
.actionbar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 32px; border-top: 1px solid var(--line); background: var(--card); border-radius: 0 0 var(--r-card) var(--r-card);
  box-shadow: 0 -6px 16px rgba(20, 39, 44, .05); font-size: 13px;
}
.actionbar .clear { margin-left: auto; }
.actionbar .opened { color: var(--sea-ink); font-weight: 700; }
kbd { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line-strong); font: 700 12px var(--font); color: var(--ink); }
.card.side { padding: 20px 20px 16px; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.side-head h2 { font-size: 20px; line-height: 26px; }
table.data.compact th { padding: 6px 8px; background: transparent; border-bottom: 1px solid var(--line); }
table.data.compact td { padding: 10px 8px; font-size: 13px; }
table.data.compact th:first-child, table.data.compact td:first-child { padding-left: 0; }
table.data.compact tbody tr:hover { background: transparent; }
table.data.compact .badge { margin-top: 4px; }
a.strong { color: var(--ink); font-weight: 700; text-decoration: none; }
a.strong:hover { text-decoration: underline; }
.struck { text-decoration: line-through; color: var(--ink-3); }
.alert-text { color: var(--alert) !important; }
.sea-tick { color: var(--sea-ink); }
.side-foot { margin-top: 10px; }
.recent li a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.recent li:first-child a { border-top: 0; }
.recent li a:hover b { text-decoration: underline; }
.recent .rid { color: var(--ink-3); }
.recent .rmain { display: flex; flex-direction: column; min-width: 0; }
.recent .rmain span { font-size: 12px; color: var(--ink-3); }
.recent .rtime { font-size: 12px; color: var(--ink-3); }
@media (max-width: 1100px) { .quote-layout { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .fgroup { grid-template-columns: 1fr; padding: 18px; gap: 8px; }
  .fgroup-title { padding-top: 0; line-height: 24px; }
  .qform-head { padding: 20px 18px 4px; }
  .qform > .note { margin: 12px 18px 0; }
  .fgrid.four, .fgrid.three, .fgrid.two-a { grid-template-columns: 1fr 1fr; }
  .fgrid.route-grid { grid-template-columns: 1fr; }
  .fgrid.three > :last-child { grid-column: 1 / -1; }
  .actionbar { padding: 12px 18px; }
  .actionbar .muted { display: none; }
}

.expired-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-card); background: var(--alert-wash); box-shadow: inset 0 0 0 1px var(--alert); font-size: 14px; }
.expired-banner > svg { color: var(--alert); }
.expired-banner p { flex: 1; }
@media (max-width: 767px) { .expired-banner { flex-wrap: wrap; } }

/* ================================================================== quotes list */
.seg-links { padding: 3px; }
.seg-links a { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: var(--r-pill); font-weight: 700; color: var(--ink-2); text-decoration: none; }
.seg-links a[aria-current="page"] { background: var(--hull); color: var(--on-hull); }
.qfilters { padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: relative; z-index: 5; }
.control.search { border-radius: var(--r-pill); width: 368px; max-width: 100%; color: var(--ink-3); }
.control.search input { font-size: 15px; }
.pillselect select {
  appearance: none; height: 36px; padding: 0 32px 0 12px; border: 0; border-radius: var(--r-pill); background: var(--card)
  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='%2314272C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  box-shadow: inset 0 0 0 1px var(--field-border); color: var(--ink); font: 700 14px var(--font); cursor: pointer;
}
.pillselect.on select { background-color: var(--ink); color: var(--card); box-shadow: 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='%23FFFFFF' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.pillselect select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
details.datepop summary { list-style: none; }
details.datepop summary::-webkit-details-marker { display: none; }
details.datepop .pop { width: 360px; }
table.quotes td { vertical-align: middle; padding: 14px 20px; }
table.quotes th { padding: 12px 20px; }
table.quotes .c-ref { min-width: 260px; max-width: 360px; }
table.quotes .c-ref a.stretch { font-size: 15px; line-height: 20px; }
table.quotes .price b { font-size: 16px; }
table.quotes tr.is-expired .price { color: var(--ink-3); }
.mini-route { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; }
.mini-bar { display: inline-flex; gap: 3px; }
.mini-bar i { width: 18px; height: 5px; border-radius: var(--r-pill); background: var(--sea); }
.mini-bar i + i { width: 5px; background: var(--lime); }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
@media (max-width: 767px) {
  .control.search { width: 100%; }
  .qfilters .fbar-status { margin-left: 0; }
}

/* ================================================================== sign in, first sign-in, account */
main.auth { display: grid; grid-template-columns: minmax(360px, 600px) minmax(0, 1fr); min-height: 100vh; }
main.auth:focus { outline: none; }
.auth-panel { background: #1D4650; color: #FFFFFF; padding: 56px 64px 56px; display: flex; flex-direction: column; }
:root[data-theme="dark"] .auth-panel { background: #1B3238; box-shadow: inset -2px 0 0 #06CEA8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-panel { background: #1B3238; box-shadow: inset -2px 0 0 #06CEA8; } }
.auth-logo { height: 40px; width: auto; align-self: flex-start; }
.auth-panel-mid { margin: auto 0; display: flex; flex-direction: column; gap: 16px; padding: 48px 0; }
.auth-title { font-size: 44px; line-height: 52px; letter-spacing: -.02em; }
.auth-lede { font-size: 18px; line-height: 28px; color: #C8D6D9; max-width: 420px; }
.auth-route { display: flex; align-items: center; gap: 6px; max-width: 440px; margin-top: 24px; }
.auth-route .dot { width: 14px; height: 14px; border-radius: 999px; box-shadow: inset 0 0 0 3px #06CEA8; flex: none; }
.auth-route .dot.end { box-shadow: none; background: #D1EF54; }
.auth-route .sea { flex: 1; height: 6px; border-radius: 999px; background: #06CEA8; }
.auth-route .lime { width: 28px; height: 6px; border-radius: 999px; background: #D1EF54; }
.auth-route-labels { display: flex; justify-content: space-between; max-width: 440px; font-size: 13px; font-weight: 700; color: #C8D6D9; }
.auth-panel-foot { font-size: 13px; color: #A9BEC3; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h2 { font-size: 30px; line-height: 36px; letter-spacing: -.01em; }
.auth-form .note code { display: block; margin-top: 6px; font-size: 12px; word-break: break-all; }
.auth :focus-visible { outline-color: var(--focus); }
.auth-panel :focus-visible { outline-color: #FFFFFF; }
input.std.lg, .control.lg { height: 48px; }
.control .reveal { margin-right: -6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row label { font-size: 14px; font-weight: 700; }
.small-link { font-size: 13px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 16px; position: relative; padding-bottom: 32px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 32px; bottom: 4px; width: 4px; border-radius: 999px; background: #06CEA8; }
.steps .step-dot { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: #1D4650; background: #06CEA8; }
.steps li.now .step-dot { background: #D1EF54; }
.steps b { display: block; font-size: 17px; }
.steps span span { font-size: 14px; color: #C8D6D9; }
.pw-checks { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.pw-checks li { display: flex; align-items: center; gap: 8px; }
.pw-checks .ck { width: 14px; height: 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink-3); flex: none; }
.pw-checks li.ok .ck { box-shadow: none; background: var(--sea-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat; }
.pw-checks li.no { color: var(--alert); }
.pw-checks li.no .ck { box-shadow: inset 0 0 0 1.5px var(--alert); }
.ok-text { color: var(--sea-ink) !important; }
.narrow { max-width: 784px; width: 100%; margin: 0 auto; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.card.split { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.card.split.center { align-items: center; }
.card.split h2 { font-size: 20px; line-height: 26px; margin-bottom: 4px; }
.card.split p { font-size: 13px; line-height: 18px; }
.card.split .right { justify-self: end; }
.form-narrow { max-width: 420px; }
dl.kv { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 15px; }
dl.kv dt { color: var(--ink-3); font-size: 14px; }
dl.kv dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) {
  main.auth { grid-template-columns: 1fr; }
  .auth-panel { padding: 20px 20px 24px; }
  .auth-panel-mid { padding: 20px 0 0; gap: 8px; }
  .auth-title { font-size: 30px; line-height: 36px; }
  .auth-lede { font-size: 15px; line-height: 22px; }
  .auth-route { margin-top: 8px; }
  .auth-panel-foot { display: none; }
  .auth-logo { height: 32px; }
  .auth-main { align-items: flex-start; padding: 24px 16px 40px; }
  .card.split { grid-template-columns: 1fr; gap: 12px; }
}

/* ================================================================== users */
.temp-callout { display: flex; align-items: center; gap: 24px; padding: 18px 20px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 2px var(--sea), var(--shadow); }
.temp-main { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.temp-main h2 { font-size: 17px; line-height: 22px; }
.temp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.temp-pw { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: var(--r-control); background: var(--well); }
.temp-pw code { font: 900 24px var(--font); letter-spacing: .01em; color: var(--ink); }
.temp-main p { font-size: 13px; color: var(--ink-2); }
.caution-text { color: var(--caution) !important; }
table.users td { vertical-align: middle; padding: 12px 20px; }
table.users th { padding: 12px 20px; }
table.users tr.is-disabled td { color: var(--ink-3); }
table.users .who > span { display: flex; flex-direction: column; }
table.users .who b { font-size: 15px; }
select.role-select { height: 36px; width: 240px; font-size: 14px; font-weight: 700; }
select.role-select.invalid { box-shadow: inset 0 0 0 2px var(--alert); }
table.users td:nth-child(2) { white-space: nowrap; }
table.users td:nth-child(3) form.inline { display: block; }
table.users .err { margin-top: 6px; max-width: 260px; font-size: 13px; line-height: 18px; }
.row-actions { white-space: nowrap; }
.row-actions form + form, .row-actions form + span { margin-left: 16px; }
.danger-link { color: var(--alert) !important; }
.dot-ok { width: 8px; height: 8px; border-radius: 999px; background: var(--sea); }
.role-cards { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.role-cards legend { font-size: 14px; font-weight: 700; padding: 0 0 6px; }
.role-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--field-border); cursor: pointer; }
.role-card b { display: block; font-size: 15px; }
.role-card span span { font-size: 13px; color: var(--ink-2); }
.role-card:has(input:checked) { background: var(--sea-wash); box-shadow: inset 0 0 0 2px var(--hull); }
.role-card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.role-card input { margin-top: 2px; }
@media (max-width: 767px) { .temp-callout { flex-direction: column; align-items: stretch; } }

/* ================================================================== price lists + upload report */
table.plists td { vertical-align: middle; padding: 14px 20px; }
table.plists th { padding: 12px 20px; }
table.plists tr.editing td { background: var(--row-hover); vertical-align: top; }
.validity { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.iconbtn.sm { width: 28px; height: 28px; color: var(--ink-2); }
.dates-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; max-width: 460px; }
.dates-form .field { width: 170px; }
.dates-form .field label { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.dates-form .hint { flex-basis: 100%; }
.dates-actions { display: flex; align-items: center; gap: 12px; height: 40px; }
.upload-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
.dropzone { display: flex; flex-direction: column; gap: 0; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.drop-target {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 190px;
  margin: 16px 16px 0; border-radius: 10px; box-shadow: inset 0 0 0 2px var(--field-border); color: var(--ink); cursor: pointer; padding: 24px;
  background-image: repeating-linear-gradient(90deg, transparent 0 0); font-size: 13px;
}
.drop-target > svg { color: var(--hull); }
.drop-main { font-size: 16px; }
.drop-target.over, .drop-target:hover { background: var(--sea-wash); box-shadow: inset 0 0 0 2px var(--hull); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-input:focus-visible + .drop-foot, .dropzone:has(.file-input:focus-visible) .drop-target { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop-foot { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 16px; }
.inline-field { width: 240px; }
a.card.pend { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; margin-bottom: 10px; }
a.card.pend:hover { box-shadow: inset 0 0 0 2px var(--hull), var(--shadow); }
.page-head .badges { align-items: center; }
.report-card { display: flex; flex-direction: column; gap: 16px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.stat { display: flex; align-items: baseline; gap: 6px; }
.stat b { font-size: 24px; line-height: 30px; font-weight: 900; }
.stat span { color: var(--ink-2); }
.up { color: var(--alert); } .down { color: var(--sea-ink); }
.chg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; background: var(--well); white-space: nowrap; }
.chg.up { background: var(--alert-wash); color: var(--alert); }
.chg.down { background: var(--sea-wash); color: var(--sea-ink); }
.report-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
form.activate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card > h2 { margin-bottom: 14px; }
.card .note { margin-bottom: 12px; }
.change-list { display: flex; flex-direction: column; gap: 8px; }
.change-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--well); font-size: 14px; }
.change-list li.warn { background: var(--caution-wash); }
.change-list li > svg { margin-top: 2px; color: var(--sea-ink); }
.change-list li.warn > svg { color: var(--caution); }
.table-scroll.inset { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.sub-h { margin: 20px 0 10px; }
pre.diff { background: var(--well); border-radius: 10px; padding: 12px 14px; font: 12px/18px var(--mono); overflow-x: auto; white-space: pre; }
pre.diff .add { color: var(--sea-ink); } pre.diff .del { color: var(--alert); }
.more-lanes { margin-top: 10px; }
.notes-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.notes-list li { padding-left: 14px; position: relative; }
.notes-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 99px; background: var(--ink-3); }
@media (max-width: 1100px) { .upload-grid { grid-template-columns: 1fr; } }

/* ================================================================== glossary */
.gloss { display: flex; gap: 40px; align-items: flex-start; }
.gloss-toc { flex: 0 0 240px; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 2px; }
.gloss-toc .control.search { width: 100%; }
.toc-group { display: flex; flex-direction: column; gap: 1px; }
.toc-group a { font-size: 13px; padding: 5px 10px 5px 20px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.toc-group a.toc-h { font-size: 14px; font-weight: 900; color: var(--ink); padding-left: 10px; }
.toc-group a:hover { background: var(--well); color: var(--ink); }
.gloss-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.gloss-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.gloss-head h1 { font-size: 34px; line-height: 40px; letter-spacing: -.015em; }
.gloss-head p { font-size: 17px; line-height: 26px; color: var(--ink-2); }
.gloss-key { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--ink-2); padding-top: 4px; }
.gloss-key > span { display: inline-flex; align-items: center; gap: 8px; }
.gloss-key i { width: 32px; height: 6px; border-radius: 999px; display: inline-block; }
.leg-sea { background: var(--sea); }
.leg-rail { background: repeating-linear-gradient(90deg, var(--hull) 0 8px, transparent 8px 12px) !important; }
.leg-truck { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(20, 39, 44, .2); }
.badge.confirming { background: var(--well); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--field-border); }
.gloss-group { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.gloss-group-h { display: flex; align-items: center; gap: 12px; }
.gloss-group-h span { flex: 1; height: 1px; background: var(--line); }
.gloss-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.term { border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.term:focus { outline: none; }
.term.hl { box-shadow: inset 0 0 0 2px var(--sea), var(--shadow); }
.term-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.term-h h3 { font-size: 18px; line-height: 24px; }
.term-h .cn { font-size: 14px; color: var(--ink-3); }
.term-h .badge { margin-left: auto; }
.term p { font-size: 15px; line-height: 23px; color: var(--ink-2); }
.legs { display: flex; align-items: center; gap: 6px; padding: 6px 0 2px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.legs span { white-space: nowrap; }
.legs i { flex: 1; min-width: 20px; height: 6px; border-radius: 999px; }
.tell { margin-top: auto; border-radius: 10px; background: var(--sea-wash); padding: 10px 12px; font-size: 14px; line-height: 20px; }
.tell b { font-weight: 900; color: var(--hull); }
@media (max-width: 900px) {
  .gloss { flex-direction: column; gap: 20px; }
  .gloss-toc { position: static; flex: none; width: 100%; max-height: none; }
  .gloss-toc .toc-group { display: none; }
  .gloss-grid { grid-template-columns: 1fr; }
  .gloss-head h1 { font-size: 28px; line-height: 34px; }
}

/* ================================================================== 403 / 404, co-loader */
.errcard { max-width: 720px; width: 100%; margin: 24px auto; border-radius: var(--r-hero); padding: 48px 48px 44px; display: flex; flex-direction: column; gap: 16px; min-height: 360px; }
.errcode { font-size: 14px; font-weight: 700; color: var(--ink-3); }
.errcard p { font-size: 16px; line-height: 24px; color: var(--ink-2); max-width: 520px; }
.errcard .row { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.errbar { display: flex; align-items: center; gap: 6px; max-width: 360px; padding: 8px 0; }
.errbar .dot { width: 12px; height: 12px; border-radius: 999px; box-shadow: inset 0 0 0 3px var(--sea); }
.errbar .dot.off { box-shadow: inset 0 0 0 3px var(--line-strong); }
.errbar .sea { flex: 1; height: 6px; border-radius: 999px; background: var(--sea); }
.errbar .stop { width: 6px; height: 22px; border-radius: 999px; background: var(--hull); }
.errbar .rest { flex: 1; height: 6px; border-radius: 999px; background: var(--well); }
.errbar .dash { flex: 1; height: 6px; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 14px); }
.co-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.co-grid > .stack { gap: 24px; }
.qlist { display: flex; flex-direction: column; gap: 8px; counter-reset: q; }
.qlist li { display: flex; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--caution-wash); font-size: 14px; }
.qlist li::before { counter-increment: q; content: counter(q); flex: none; width: 22px; height: 22px; border-radius: 999px; background: var(--caution); color: var(--card); font-size: 12px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
dl.terms { margin: 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
dl.terms dt { color: var(--ink-3); }
dl.terms dd { margin: 0; }
.rules p { font-size: 14px; line-height: 21px; color: var(--ink-2); margin-bottom: 10px; }
.rules b { color: var(--ink); }
@media (max-width: 1100px) { .co-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .errcard { padding: 28px 22px; } }

/* ------------------------------------------------------------------ feedback: on-page widget (feedback.js) */
:root { --mark: #E8366F; --mark-wash: rgba(232, 54, 111, .08); }
.navcount {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--mark); color: #fff; font-size: 12px; font-weight: 900;
}
.fb-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px;
  border: 0; border-radius: var(--r-pill); background: var(--hull); color: var(--on-hull); box-shadow: var(--pop);
  font: 700 14px var(--font); cursor: pointer;
}
.fb-launch:hover { background: var(--hull-hover); }
.fb-launch:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media print { .fb-launch, .fb-ui { display: none !important; } }

.fb-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 8999; pointer-events: none; }
.fb-mark {
  position: absolute; border: 3px solid var(--mark); border-radius: 4px; background: var(--mark-wash);
  box-shadow: 0 0 0 1px #fff, inset 0 0 0 1px #fff;
}
.fb-mark.drawing { border-style: dashed; }
.fb-mark-n, .fb-num, .fb-chip-n {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--r-pill); flex: none;
  background: var(--mark); color: #fff; font-size: 13px; font-weight: 900; box-shadow: 0 0 0 2px #fff;
}
.fb-mark-n { position: absolute; left: -13px; top: -13px; }
.fb-catcher {
  position: fixed; inset: 0; z-index: 9000; cursor: crosshair; touch-action: none; background: transparent;
  box-shadow: inset 0 0 0 3px var(--mark);
}
.fb-bar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 9001; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: var(--r-pill); background: #14272C; color: #fff; box-shadow: var(--pop);
  font-size: 14px; line-height: 20px; text-align: center; pointer-events: none;
}
.fb-bar span { color: #C8D6D9; }

.fb-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 9002; width: 380px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px);
  overflow: auto; border-radius: var(--r-card); background: var(--raised); color: var(--ink); box-shadow: var(--pop), 0 0 0 1px var(--line);
}
.fb-panel.busy { cursor: progress; }
.fb-head { display: flex; align-items: center; gap: 4px; padding: 12px 8px 12px 18px; border-bottom: 1px solid var(--line); }
.fb-head h2 { flex: 1; font-size: 16px; line-height: 22px; }
.fb-head h2:focus { outline: none; }
.fb-icon {
  width: 36px; height: 36px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.fb-icon:hover { background: var(--well); color: var(--ink); }
.fb-panel.min .fb-body { display: none; }
.fb-panel.min .fb-head { border-bottom: 0; }
.fb-panel.min .fb-icon[aria-expanded] svg { transform: rotate(180deg); }
.fb-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px 18px; }
.fb-markrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-count { font-size: 13px; color: var(--ink-2); }
.fb-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 6px; border: 0; border-radius: var(--r-pill);
  background: var(--well); color: var(--ink-2); font: 700 13px var(--font); cursor: pointer;
}
.fb-toggle i { position: relative; width: 30px; height: 18px; border-radius: var(--r-pill); background: var(--line-strong); flex: none; }
.fb-toggle i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; border-radius: var(--r-pill); background: #fff; transition: transform .15s; }
.fb-toggle[aria-pressed="true"] { color: var(--ink); }
.fb-toggle[aria-pressed="true"] i { background: var(--mark); }
.fb-toggle[aria-pressed="true"] i::after { transform: translateX(12px); }
.fb-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 136px; overflow: auto; }
.fb-chip { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 2px 0 4px; border-radius: var(--r-control); background: var(--well); font-size: 13px; }
.fb-chip-n { width: 20px; height: 20px; font-size: 11px; box-shadow: none; }
.fb-chip-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.fb-chip-x { width: 28px; height: 28px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.fb-chip-x:hover { background: var(--alert-wash); color: var(--alert); }
.fb-kinds { border: 0; margin: 0; padding: 3px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; border-radius: var(--r-pill); background: var(--well); box-shadow: inset 0 0 0 1px var(--field-border); }
.fb-kinds label { position: relative; display: flex; align-items: center; justify-content: center; height: 30px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.fb-kinds input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-kinds label:has(input:checked) { background: var(--hull); color: var(--on-hull); }
.fb-kinds label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
textarea.std { height: auto; min-height: 112px; padding: 10px 12px; line-height: 22px; resize: vertical; }
textarea.std:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--hull); }
.fb-err { font-size: 13px; line-height: 18px; color: var(--alert); font-weight: 700; }
.fb-foot { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.fb-actions { display: flex; align-items: center; gap: 8px; }
.fb-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9003; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: var(--r-pill); background: #14272C; color: #fff; box-shadow: var(--pop); font-weight: 700;
}
@media (max-width: 767px) {
  .fb-launch { right: 12px; bottom: 12px; height: 40px; padding: 0 14px 0 12px; }
  .fb-panel { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; max-height: 62vh; }
  .fb-bar { top: 8px; border-radius: 12px; font-size: 13px; }
}

/* ------------------------------------------------------------------ feedback: admin pages */
.seg-links a .cnt { margin-left: 6px; }
.seg-links a[aria-current="page"] .cnt { color: inherit; opacity: .8; }
.badge.fbk-bug { background: var(--alert-wash); color: var(--alert); }
.badge.fbk-improvement { background: var(--ddu-bg); color: var(--ddu-fg); }
.badge.fbk-suggestion { background: var(--sea-wash); color: var(--sea-ink); }
.badge.fbs-new { background: var(--mark); color: #fff; }
.badge.fbs-planned { background: var(--ddu-bg); color: var(--ddu-fg); }
.badge.fbs-done { background: var(--sea-wash); color: var(--sea-ink); }
.badge.fbs-wont_do { background: var(--well); color: var(--ink-3); }
table.fb-table .c-comment { min-width: 280px; max-width: 520px; }
table.fb-table .c-comment .sub { margin-top: 4px; }
table.fb-table tr.is-new a.stretch { font-weight: 900; }
table.fb-table td { vertical-align: middle; }
table.fb-table .who > span { display: flex; flex-direction: column; }
.fb-thumb { display: block; width: 112px; height: 70px; object-fit: cover; object-position: left top; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); background: var(--well); }
.fb-detail { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
.fb-shot { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong); background: var(--well); }
.fb-shot img { display: block; width: 100%; height: auto; }
ol.fb-marks { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.fb-marks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.fb-marks .sub { display: block; font-size: 12px; color: var(--ink-3); word-break: break-all; }
.fb-comment { margin: 0 0 20px; font-size: 17px; line-height: 26px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-meta { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px 12px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.fb-meta dt { color: var(--ink-3); }
.fb-meta dd { margin: 0; min-width: 0; }
.fb-meta .sub { display: block; font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.fb-meta .who > span { display: flex; flex-direction: column; }
.fb-status { flex-wrap: wrap; align-self: flex-start; }
@media (max-width: 1100px) { .fb-detail { grid-template-columns: 1fr; } }
