:root {
  --ink: #152033;
  --muted: #5c6b7a;
  --line: #d8dee6;
  --surface: #ffffff;
  --bg: #eef2f6;
  --bg-accent: #e7eef5;
  --navy: #0b3d5c;
  --navy-deep: #072c43;
  --teal: #0d7a5f;
  --teal-hover: #0a634d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 35, 55, 0.06), 0 8px 24px rgba(15, 35, 55, 0.06);
  --max: 920px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #d9e7f2 0%, transparent 55%),
    radial-gradient(900px 320px at 100% 0%, #d8ebe3 0%, transparent 50%),
    var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Header ----- */
.site-header {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, #134a68 100%);
  color: #fff;
  border-bottom: 3px solid #0d7a5f;
  box-shadow: 0 2px 12px rgba(7, 44, 67, 0.25);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}

.brand-block { min-width: 0; flex: 1 1 180px; }

.brand {
  color: #fff;
  font-weight: 750;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  display: block;
}

.tagline {
  margin: 4px 0 0;
  padding-left: 42px;
  color: #b7c9d6;
  font-size: 0.88rem;
  font-weight: 450;
}

.auth-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
}

.auth-bar .m {
  color: #c9d6e0;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 240px);
}

.auth-bar button {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.auth-bar button:hover { background: var(--teal-hover); }
.auth-bar button#btn-signout { background: #4d5b6a; }
.auth-bar button#btn-signout:hover { background: #3f4b58; }

/* ----- Page shell ----- */
.page, main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 16px 28px;
  min-width: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel { padding: 14px; margin-bottom: 14px; }

.search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.search-form input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
  font: inherit;
  color: var(--ink);
}

.search-form input:focus {
  outline: 2px solid rgba(13, 122, 95, 0.35);
  border-color: #7bb9a3;
}

.btn-primary,
.btn-secondary,
button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  border: 0;
}

.btn-primary,
.search-form button[type="submit"],
#f > button {
  width: 100%;
  padding: 12px 16px;
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover,
.search-form button[type="submit"]:hover,
#f > button:hover { background: var(--teal-hover); }

.btn-secondary,
.pager button {
  padding: 10px 14px;
  background: #e8eef3;
  color: var(--navy);
}

.btn-secondary:hover,
.pager button:hover { background: #d9e3ec; }

button:disabled { opacity: 0.4; cursor: not-allowed; }

.meta-line, #meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 4px 2px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notice-list, ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notice-list li,
#list > li,
#list > li.notice-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin: 0 0 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid #1a7a9c;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.notice-list li:hover,
#list > li:hover,
#list > li.notice-item:hover {
  border-left-color: var(--teal);
  box-shadow: 0 2px 4px rgba(15, 35, 55, 0.06), 0 12px 28px rgba(15, 35, 55, 0.08);
}

a.notice-card {
  display: block;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.notice-card:hover,
a.notice-card:focus-visible {
  outline: none;
}

a.notice-card:focus-visible {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.notice-card__title {
  display: block;
  font-weight: 650;
  color: var(--navy);
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

a.notice-card:hover .notice-card__title {
  color: var(--teal);
  text-decoration: underline;
}

.notice-card__meta {
  display: block;
  margin-top: 6px;
}

/* legacy title-only links still look fine if present */
.notice-list a:not(.notice-card),
#list a:not(.notice-card) {
  font-weight: 650;
  color: var(--navy);
  text-decoration: none;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.notice-list a:not(.notice-card):hover,
#list a:not(.notice-card):hover { color: var(--teal); text-decoration: underline; }

.m {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.pager, nav.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.pager button { flex: 0 1 auto; min-width: 7rem; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 28px 16px 40px;
  max-width: var(--max);
  margin: 0 auto;
  line-height: 1.45;
}

.site-footer p { margin: 0 0 8px; }
.footer-note { opacity: 0.9; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.card h1 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--navy-deep);
  overflow-wrap: anywhere;
}

.card h3 {
  margin: 22px 0 8px;
  font-size: 1rem;
  color: var(--navy);
}

.desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 14px 0 0;
  color: #243041;
}

.lock {
  border: 1px dashed #b7bec8;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 8px, #f0f2f5 8px, #f0f2f5 16px);
}

.unlock {
  border: 1px solid #9dceb8;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  color: var(--navy);
  background: #eef8f3;
}

.crumb {
  max-width: var(--max);
  margin: 14px auto 0;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.crumb a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.crumb a:hover { text-decoration: underline; }
.crumb-sep { color: #b7bec8; }
.crumb-here {
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  flex: 1 1 140px;
}

#back-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 8px;
  background: #e8eef3;
  margin-right: 4px;
}

/* Tier badges */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.tier-text { text-transform: uppercase; }
.tier-pro { color: #f6d860; }
.tier-starter { background: #1a3d4f; color: #9ed0ea; border: 1px solid #3d7a96; }
.tier-api { background: #1e2a44; color: #c5d0ff; border: 1px solid #6b7fd7; }
.tier-free { background: #2a3440; color: #c9d6e0; border: 1px solid #5b6573; }
#meta .tier-pro, .card .tier-pro { color: #7a5600; }
#meta .tier-free, .card .tier-free { background: #eef1f4; color: #5b6573; border-color: #c9ced6; }
#meta .tier-starter, .card .tier-starter { background: #e7f4fb; color: #0b3d5c; border-color: #8ebcd4; }
#meta .tier-api, .card .tier-api { background: #eef0ff; color: #2f3f8f; border-color: #9aa8e8; }
.auth-bar .tier-badge { transform: translateY(-1px); }
.tier-seal { padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.tier-seal-svg { display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.auth-bar .tier-seal { transform: translateY(1px); }
#meta .tier-seal, #meta .tier-pro { background: transparent; border: 0; color: inherit; }
#meta .tier-seal-svg { filter: drop-shadow(0 1px 1px rgba(11, 61, 92, 0.2)); }

/* Desktop / wider phones in landscape */
@media (min-width: 640px) {
  .search-form {
    grid-template-columns: minmax(0, 1fr) 140px auto;
    align-items: stretch;
  }
  .search-form .btn-primary,
  .search-form button[type="submit"],
  #f > button {
    width: auto;
    min-width: 7.5rem;
  }
  .auth-bar .m { max-width: 320px; }
  .header-inner { padding: 18px 22px; }
  .page, main { padding: 24px 20px 36px; }
  .search-panel { padding: 16px; }
}

@media (min-width: 900px) {
  .brand { font-size: 1.45rem; }
}

/* ----- Header nav ----- */
.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.header-nav a {
  color: #d5e4ef;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.header-nav a:hover { color: #fff; }
.header-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: #3ecf9a;
}

/* ----- Pricing ----- */
.pricing-page { max-width: 1100px; }
.pricing-hero { margin: 8px 0 20px; }
.pricing-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  color: var(--navy-deep);
}
.pricing-lede { margin: 0; color: var(--muted); max-width: 42rem; }
.payments-note, .checkout-banner {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8e8;
  border: 1px solid #ecd9a8;
  color: #5a4a22;
  font-size: 0.92rem;
}
.checkout-banner.checkout-ok {
  background: #e8f7ef;
  border-color: #a8d9bc;
  color: #1d5c3a;
}
.checkout-banner.checkout-cancel {
  background: #f4f6f8;
  border-color: var(--line);
  color: var(--muted);
}
.pricing-manage {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.pricing-manage[hidden] { display: none; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 8px 0 28px;
}
.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.price-card-featured {
  border-color: #0d7a5f;
  box-shadow: 0 1px 2px rgba(13, 122, 95, 0.08), 0 10px 28px rgba(13, 122, 95, 0.12);
}
.price-card-current { outline: 2px solid #0b3d5c; }
.price-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--teal);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.price-card h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy);
}
.price-amount {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.price-amount .per {
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--muted);
  margin-left: 2px;
}
.price-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 2.7em;
}
.price-features {
  margin: 6px 0 12px;
  padding: 0 0 0 1.1rem;
  color: var(--ink);
  font-size: 0.9rem;
  flex: 1;
}
.price-features li { margin: 0.35em 0; }
.pricing-cta { width: 100%; text-align: center; text-decoration: none; display: inline-block; }
.pricing-footnote h2 { margin: 0 0 8px; font-size: 1.05rem; }
.pricing-footnote ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.92rem; }
.clerk-pricing-slot { margin-top: 16px; }
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ===== Notice cards (whole card is one link) ===== */
.notice-list li, #list > li { padding: 0; overflow: hidden; }
#list > li.loading, #list > li.empty { padding: 16px 18px; }
#list a.notice-card {
  display: block;
  padding: 14px 18px 14px;
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  font-size: inherit;
}
#list a.notice-card:hover { text-decoration: none; color: inherit; }
#list a.notice-card:hover .nc-title { color: var(--teal); text-decoration: underline; }
#list a.notice-card:focus-visible { outline: 3px solid rgba(13,122,95,.45); outline-offset: -3px; border-radius: var(--radius); }
.nc-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.nc-top .notice-closes { margin-left: auto; }
.nc-title {
  display: block;
  font-weight: 650;
  color: var(--navy);
  font-size: 1.04rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.nc-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 8px; }
.nc-buyer { color: #33424f; font-size: .92rem; overflow-wrap: anywhere; min-width: 0; }
.nc-meta { margin-top: 4px; font-size: .84rem; }

.notice-value {
  font-size: 1.22rem;
  font-weight: 760;
  color: var(--navy-deep);
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.notice-value-none { font-size: .9rem; font-weight: 550; color: var(--muted); font-style: italic; }
.notice-value-year { font-weight: 550; color: var(--muted); font-size: .86rem; white-space: nowrap; }

.notice-closes {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .8rem; font-weight: 650;
  white-space: nowrap;
  background: #eef2f6; color: #3c4b59; border: 1px solid #d5dde5;
}
.notice-closes b { font-weight: 600; opacity: .8; }
.closes-soon.notice-closes { background: #fff3e0; color: #8a4b00; border-color: #f2c98a; }
.closes-near.notice-closes { background: #e9f4ff; color: #0b4f7a; border-color: #b6d6ee; }
.closes-closed.notice-closes { background: #f3f3f3; color: #7a7a7a; border-color: #ddd; text-decoration: line-through; }

.lane-chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: .76rem; font-weight: 650; letter-spacing: .01em;
  background: #e6f3ee; color: #0a5c48; border: 1px solid #bfe0d3;
}
.lane-more { font-size: .76rem; color: var(--muted); font-weight: 600; }

/* ===== Detail key facts ===== */
.facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0 14px; }
.fact { background: #f6f9fb; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact-k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fact .notice-value { font-size: 1.5rem; }
.fact-v { font-size: 1.15rem; font-weight: 720; color: var(--navy-deep); }
.fact-v-sm { font-size: 1rem; }
.fact-sub { font-size: .84rem; color: var(--muted); }
.fact-closes.closes-soon { background: #fff6e8; border-color: #f2c98a; }
.fact-closes.closes-soon .fact-sub { color: #8a4b00; font-weight: 650; }
.fact-closes.closes-closed .fact-v { color: #888; text-decoration: line-through; }
.cpv-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.cpv-code { font: 600 .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #eef2f6; border: 1px solid #d8dee6; border-radius: 5px; padding: 1px 6px; color: #33424f; }
.card .nc-top { margin-bottom: 6px; }
@media (min-width: 640px) { .facts { grid-template-columns: 1.2fr 1fr 1fr; } }

/* ===== Search + filters ===== */
.search-form { grid-template-columns: 1fr; }
@media (min-width: 640px) { .search-form { grid-template-columns: minmax(0, 1fr) auto; } }
.filters { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.filters > summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 650; color: var(--navy); padding: 6px 2px; user-select: none;
}
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::before { content: "▸"; font-size: .8em; transition: transform .15s; }
.filters[open] > summary::before { transform: rotate(90deg); }
.filter-count { background: var(--teal); color: #fff; border-radius: 999px; font-size: .74rem; padding: 1px 8px; }
.filter-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
@media (min-width: 760px) { .filter-grid { grid-template-columns: 1fr 1fr; } }
.fgroup { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin: 0; min-width: 0; background: #fbfcfd; }
.fgroup legend { font-weight: 700; font-size: .86rem; color: var(--navy-deep); padding: 0 4px; }
.fgroup .hint { font-weight: 500; color: var(--muted); font-size: .78rem; margin-left: 4px; }
.fgroup label { font-size: .84rem; color: #33424f; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fgroup input[type="number"], .fgroup input[type="date"], .tree-find {
  width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .92rem; background: #fff; color: var(--ink);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.fgroup label.check { flex-direction: row; align-items: center; gap: 8px; margin-top: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.seg label { flex-direction: row; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .82rem; font-weight: 600; cursor: pointer; color: #33424f; }
.seg input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg input:focus-visible + span { outline: 2px solid rgba(13,122,95,.45); }
.filter-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.filter-actions button { width: auto !important; padding: 10px 16px; }

/* tick tree — labels wrap; chrome (tog/checkbox/count) does not shrink */
.tree {
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  margin-top: 6px;
  padding-right: 2px;
  overscroll-behavior: contain;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.tree-find { margin-bottom: 4px; }
.tree-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 4px 0 4px calc(var(--d) * 14px);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.tree-row:hover { background: #f1f5f8; border-radius: 6px; }
.tree-tog, .tree-tog-sp {
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}
.tree-tog-sp { border: 1px solid transparent; box-sizing: border-box; }
.tree-tog {
  background: #fff;
  border: 1px solid #c5d0da;
  padding: 0;
  color: var(--navy);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.tree-tog:hover { background: #e3eaf0; border-color: #9eb0c0; color: var(--navy); }
/* tree-boxed-plusminus-v1 */
.fgroup .tree-lbl, .tree-lbl {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
  font-size: .88rem;
  line-height: 1.35;
}
.tree-lbl input {
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--teal);
}
.tree-lbl.covered { opacity: .65; }
.tree-name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  text-overflow: unset;
}
.tree-code { font: 600 .72rem ui-monospace, Menlo, monospace; color: var(--muted); flex: 0 0 auto; flex-shrink: 0; }
.tree-count {
  font-size: .74rem;
  color: var(--muted);
  background: #eef2f6;
  border-radius: 999px;
  padding: 0 7px;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-top: 2px;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .tree-row { padding-left: calc(var(--d) * 10px); gap: 3px; }
  .fgroup { padding: 10px 8px 12px; }
  .fgroup .tree-lbl, .tree-lbl { gap: 6px; font-size: .84rem; }
}
/* tree-label-wrap-v1 */

/* active filter bar */
.active-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 2px 10px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid #bfe0d3; background: #e6f3ee; color: #0a5c48; font-size: .8rem; font-weight: 600; }
.fchip small { font-family: ui-monospace, Menlo, monospace; opacity: .75; }
.fchip-region { background: #e9f1fb; color: #0b4f7a; border-color: #b6d0ea; }
.fchip:hover { filter: brightness(.96); }
.bar-acts { display: flex; gap: 12px; margin-left: auto; }
.linkish { background: none; border: 0; padding: 2px 0; color: var(--navy); font-size: .86rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.linkish.strong { color: var(--teal); }
.lanes-note { font-size: .82rem; font-weight: 650; color: var(--teal); }

/* lanes onboarding */
.lanes-panel { padding: 18px 18px 16px; margin-bottom: 14px; border-top: 4px solid var(--teal); }
.lanes-head h2 { margin: 0 0 4px; font-size: 1.2rem; color: var(--navy-deep); letter-spacing: -0.01em; }
.tree-lanes { max-height: 340px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; margin-top: 12px; background: #fbfcfd; }
.lanes-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }
.lanes-foot .m { margin: 0; flex: 1 1 220px; }
.lanes-btns { display: flex; gap: 8px; }
.lanes-btns button { width: auto !important; padding: 10px 16px; }
.err { color: #a12a2a; font-size: .88rem; margin: 8px 0 0; }

/* named saved searches */
.saved-searches { margin-top: 14px; grid-column: 1 / -1; }
.saved-searches .hint-block { margin: 0 0 8px; font-size: .85rem; color: var(--muted, #5b6b7c); }
.saved-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.saved-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line, #d8e0e8); border-radius: 10px; background: #fbfcfd; }
.saved-list .saved-name { font-weight: 650; color: var(--navy-deep, #0b3d5c); flex: 1 1 140px; }
.saved-list .saved-meta { font-size: .78rem; color: var(--muted, #5b6b7c); flex: 1 1 100%; }
.saved-list .saved-btns { display: flex; gap: 6px; }
.saved-list .saved-btns button { width: auto !important; padding: 6px 10px; font-size: .85rem; }
.saved-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.saved-actions #save-search { width: auto !important; }
.saved-searches .err { margin: 8px 0 0; color: #b42318; font-size: .85rem; }

/* ----- email alerts (account settings) ----- */
.alerts-panel { padding: 14px 18px; margin-bottom: 14px; }
.alerts-toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.alerts-toggle input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal); flex: none; }
.alerts-toggle .m { font-size: .86rem; }
.alerts-note { margin: 8px 0 0 28px; font-size: .84rem; color: #6b5400; background: #fff7dd; border-left: 3px solid #d9a400; padding: 6px 10px; }
#alerts-msg { margin: 8px 0 0 28px; font-size: .84rem; }

/* Source badges (Find a Tender / Contracts Finder) */
.src-badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; margin-right: 6px; white-space: nowrap; border: 1px solid transparent; }
.src-fts { background: #e8f1f8; color: #0b3d5c; border-color: #c7dcec; }
.src-cf { background: #eef6ec; color: #1f5e2a; border-color: #cfe5cb; }
.src-below { background: #f6f1e7; color: #6b5400; border-color: #e9dcc0; }

/* API keys panel */
.apikeys-panel { padding: 12px 18px; margin-bottom: 14px; }
.apikeys summary { cursor: pointer; }
.apikey-list { list-style: none; padding: 0; margin: 10px 0; }
.apikey-list li { padding: 6px 0; border-bottom: 1px solid #eee; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.apikey-list li.revoked { opacity: .55; }
.apikey-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.apikey-form input { flex: 1 1 220px; padding: 6px 8px; }
.apikey-fresh { background: #fff7dd; border-left: 3px solid #d9a400; padding: 8px 12px; margin: 8px 0; }
.apikey-fresh code { word-break: break-all; }

/* ---------- intelligence panels ---------- */
.intel { border: 1px solid #dfe3ea; border-radius: 10px; padding: 14px 16px; margin: 14px 0; background: #fbfcfe; }
.intel h3 { margin: 0 0 8px; }
.intel h4 { margin: 12px 0 6px; }
.small { font-size: .85em; }
.factors { list-style: none; padding: 0; margin: 6px 0; }
.factors > li { margin: 4px 0; }
.fv { display: inline-block; width: 1.6em; }
.evidence { margin: 4px 0 4px 1.6em; font-size: .9em; }
.band { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .85em; font-weight: 600; background: #eef1f5; }
.band-good, .fit-high, .comp-beatable { background: #dff5e3; color: #1d6b2f; }
.band-mixed, .fit-medium, .comp-mixed { background: #fff3d6; color: #7a5600; }
.band-poor, .fit-low, .comp-entrenched, .comp-crowded { background: #fde2e1; color: #8a1f1b; }
.comp-unknown, .band-insufficient-data { background: #eef1f5; color: #444; }
.tbl-wrap { overflow-x: auto; }
table.awards { border-collapse: collapse; width: 100%; font-size: .88em; }
table.awards th, table.awards td { border-bottom: 1px solid #e5e8ee; padding: 5px 6px; text-align: left; vertical-align: top; }
.ch-card { border-left: 3px solid #3b6fd8; padding: 6px 10px; margin: 6px 0; background: #fff; }
.status-active { color: #1d6b2f; font-weight: 600; }
.status-dissolved, .status-liquidation, .status-administration { color: #8a1f1b; font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; color: #2457c5; text-decoration: underline; cursor: pointer; font: inherit; }
.winners { padding-left: 1.2em; }
.fit-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fit-form label { display: flex; flex-direction: column; gap: 4px; font-size: .9em; }
.fit-form fieldset { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; border: 1px solid #dfe3ea; border-radius: 8px; }
.fit-form label.chk { flex-direction: row; align-items: center; }
.fit-form button { grid-column: 1 / -1; justify-self: start; }
details.match { border-bottom: 1px solid #e5e8ee; padding: 8px 0; }
details.match summary { cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .two { grid-template-columns: 1fr; } }

/* Category relevance badges — rounded rectangles, natural text width (not circles) */
.cpv-badge {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0.2em 0.55em;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin: 0 4px 4px 0;
  border: 1px solid transparent;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
  box-sizing: border-box;
  flex: 0 1 auto;
}
.cpv-exact { background: #0b6b2f; color: #ffffff; border-color: #085526; }
.cpv-group { background: #1a4f9c; color: #ffffff; border-color: #143d7a; }
.cpv-division { background: #e8eef4; color: #3d4f63; border-color: #c5d0dc; font-weight: 600; }
.cpv-other { background: #eef1f5; color: #555; border-color: #d5dae3; font-weight: 600; }
.cpv-unknown { background: #f4f0fa; color: #5b4578; border-color: #d9d0e8; font-weight: 600; }
tr.row-exact { background: #e7f7ec; box-shadow: inset 3px 0 0 #0b6b2f; }
tr.row-group { background: #e8f0fb; box-shadow: inset 3px 0 0 #1a4f9c; }
tr.row-division { background: #f3f6f9; box-shadow: inset 3px 0 0 #c5d0dc; }
table.awards td:first-child { white-space: normal; min-width: 7.5rem; max-width: 11rem; }
.cat-counts { align-items: flex-start; }
.cat-counts .cpv-badge {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0.2em 0.55em;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin: 0 4px 4px 0;
  border: 1px solid transparent;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
  box-sizing: border-box;
  flex: 0 1 auto;
}
.cat-summary { border-left: 3px solid #3b6fd8; padding: 8px 12px; margin: 8px 0 12px; background: #f7f9fc; }
.cat-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0 0; }

details.buyer-wide { margin: 8px 0 12px; padding: 6px 10px; border: 1px dashed #c5ccd8; border-radius: 8px; background: #fafbfc; }
details.buyer-wide summary { cursor: pointer; font-weight: 600; }

/* Apply / MultiQuote */
.apply-card { border: 1px solid #c5d4f0; border-radius: 10px; padding: 14px 16px; margin: 14px 0; background: #f5f8fd; }
.apply-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.apply-ref { margin: 0 0 10px; }
.apply-ref code { font-size: 1.05em; background: #fff; padding: 2px 8px; border-radius: 6px; border: 1px solid #d5dae3; }
.apply-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 10px;
}
.apply-actions .btn-apply,
.apply-actions .btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
}
.apply-actions .btn-apply { background: #2457c5; color: #fff; border-color: #1e4aa8; }
.apply-actions .btn-apply:hover { background: #1e4aa8; }
.apply-actions .btn-apply:focus-visible { outline: 3px solid #9bb6f0; outline-offset: 2px; }
.apply-actions .btn-register { background: #e8eef9; color: #1e3a7a; border-color: #b7c8e8; }
.apply-actions .btn-register:hover { background: #d9e4f5; }
.apply-actions .btn-register:focus-visible { outline: 3px solid #9bb6f0; outline-offset: 2px; }
.btn-inline { background: transparent; border: 0; color: #2457c5; text-decoration: underline; padding: 4px 6px; cursor: pointer; font: inherit; }
.btn-inline:focus-visible { outline: 3px solid #9bb6f0; outline-offset: 2px; border-radius: 4px; }
.apply-pre { white-space: pre-wrap; font: inherit; background: #fff; padding: 8px; border-radius: 6px; border: 1px solid #e5e8ee; margin: 8px 0 0; }
.apply-original { margin-top: 4px; }
.apply-original summary { cursor: pointer; font-weight: 600; }
@media (max-width: 420px) {
  .apply-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .apply-actions .btn-apply,
  .apply-actions .btn-register { min-height: 44px; padding: 10px 8px; font-size: 0.95em; }
}

/* Collapsed methodology / coverage */
details.data-info { margin: 10px 0 0; padding: 0; border: 0; background: transparent; }
details.data-info > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85em;
  font-weight: 600;
  color: #4a5a70;
  padding: 4px 0;
}
details.data-info > summary::-webkit-details-marker { display: none; }
details.data-info > summary::before {
  content: "▸";
  display: inline-block;
  font-size: 0.9em;
  transition: transform 0.15s ease;
}
details.data-info[open] > summary::before { transform: rotate(90deg); }
details.data-info > summary:focus-visible { outline: 3px solid #9bb6f0; outline-offset: 2px; border-radius: 4px; }
details.data-info > *:not(summary) { margin-top: 8px; }

/* badge-hierarchy-refresh */

/* ----- Compact header (mobile) ----- */
.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,0.16); }
.icon-btn:focus-visible { outline: 3px solid #9bb6f0; outline-offset: 2px; }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.account-menu[hidden] { display: none !important; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  max-width: min(90vw, 280px);
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  z-index: 40;
  display: grid;
  gap: 6px;
}
.auth-bar { position: relative; }
.account-menu .account-email {
  margin: 0 0 4px;
  word-break: break-word;
  color: var(--muted);
  font-size: 0.85rem;
}
.account-menu button {
  width: 100%;
  text-align: left;
}
.header-nav.is-open { display: flex; }

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 12px;
    align-items: center;
  }
  .brand-block {
    flex: 1 1 auto;
    min-width: 0;
  }
  .brand { font-size: 1.1rem; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .tagline { display: none; }
  .header-tools { position: relative; }
  .header-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: max-content;
    min-width: 9.5rem;
    max-width: min(180px, calc(100vw - 24px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--navy-deep);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    z-index: 35;
    box-shadow: var(--shadow);
  }
  .header-nav.is-open { display: flex; }
  .header-nav a {
    padding: 12px 10px;
    border-radius: 8px;
  }
  .header-nav a:hover { background: rgba(255,255,255,0.08); }
  .auth-status-text { display: none !important; }
  .header-plan { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; max-width: 58vw; }
  .auth-bar { flex-wrap: nowrap; }
  .site-header { position: relative; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .header-plan { display: none; }
}
@media (min-width: 721px) {
  .nav-toggle { display: none; }
  .header-nav { display: flex; }
  #btn-account { display: none; }
  .account-menu {
    position: static;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
  }
  .account-menu[hidden] { display: flex !important; }
  .account-menu .account-email { display: none; }
  .account-menu button { width: auto; text-align: center; }
  .auth-status-text { display: inline; }
}

/* header-compact-v2 */

/* Keep crumbs clear of absolute header menus */
.crumb { position: relative; z-index: 1; margin-top: 4px; }
@media (max-width: 720px) {
  .crumb { padding-top: 2px; }
}

/* nav-panel-compact-v1 */

/* cpv-badge-rect-v1 */

/* cpv-badge-rect-v2 */
/* 2026-11-06T09:23:43+00:00 */

/* deploy-bump 20261106092538 */

/* nav-narrow-right-v1 */
/* ai-disclaimer-generic-v1 */

/* ----- Results sort toolbar ----- */
.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 4px 0 10px;
}
.results-toolbar .meta-line { margin: 0; flex: 1 1 auto; min-width: 0; }
.sort-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  flex: 0 0 auto;
}
.sort-label select {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  max-width: min(100%, 14rem);
}
.sort-label select:focus-visible { outline: 3px solid #9bb6f0; outline-offset: 2px; }
@media (max-width: 520px) {
  .results-toolbar { align-items: stretch; }
  .sort-label { width: 100%; justify-content: space-between; }
  .sort-label select { flex: 1 1 auto; max-width: none; }
}

/* filter-tree-no-h-overflow */
.search-panel, .filter-grid, .fgroup, .tree-lanes { min-width: 0; max-width: 100%; }
.tree-lanes { overflow-x: hidden; }

.live-match { margin: 10px 2px 0; font-size: .9rem; color: var(--muted); font-weight: 600; }
.live-match b { color: var(--navy); }
/* live-match-v1 */

/* plan-chip-v1 — account plan in header; upgrades are links only */
.plan-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #c5d0da;
  background: #eef2f6;
  color: #2a3440;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3;
  vertical-align: middle;
}
.plan-chip-k { font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .68rem; }
.plan-chip-v { text-transform: uppercase; letter-spacing: .03em; }
.plan-chip.tier-pro { background: #0b3d5c; color: #ffe08a; border-color: #f0b429; }
.plan-chip.tier-pro .plan-chip-k { color: #cfe0ee; }
.plan-chip.tier-starter { background: #e6f3ee; color: #0a5c48; border-color: #bfe0d3; }
.plan-chip.tier-api { background: #1f2933; color: #e8eef4; border-color: #5b6573; }
.plan-chip.plan-pending { font-weight: 600; color: var(--muted); }
.upgrade-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #b6d0ea;
  background: #e9f1fb;
  color: #0b4f7a;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  vertical-align: middle;
}
.upgrade-link:hover { background: #d7e8f8; color: #083552; }
.upgrade-link::after { content: "↗"; font-size: .7em; opacity: .75; }
.history-cap { color: var(--muted); font-size: .88rem; font-weight: 600; }
.saved-quota { font-weight: 600; }
.account-plan-row { padding: 8px 12px; border-bottom: 1px solid #e3eaf0; }
.account-plan-summary { margin: 0 0 4px; }
.account-plan-cta { margin: 0; }
.account-plan-cta .upgrade-link { margin-left: 0; }
#meta .tier-badge { display: none !important; } /* belt: never show plan badge beside counts */

/* spend-payments sort headers */
table.spend-payments th[aria-sort] button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-align: inherit;
}
table.spend-payments th[aria-sort] button:hover { text-decoration: underline; }
table.spend-payments th[aria-sort] button:focus-visible {
  outline: 3px solid #9bb6f0;
  outline-offset: 2px;
  border-radius: 4px;
}
table.spend-payments .sort-ind { font-weight: 700; color: var(--navy); }
table.spend-payments .sort-ind-idle { color: #9aa3ad; font-weight: 600; }
table.spend-payments td.num, table.spend-payments th.num { text-align: right; font-variant-numeric: tabular-nums; }


/* notice-tabs-v1 */
.notice-tabs [role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  border-bottom: 1px solid var(--line);
  margin: 16px 0 0;
}
.notice-tabs [role="tab"] {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
}
.notice-tabs [role="tab"]:hover { background: #f3f6f9; }
.notice-tabs [role="tab"][aria-selected="true"] {
  color: var(--navy-deep);
  border-bottom-color: var(--navy);
}
.notice-tabs [role="tab"]:focus-visible {
  outline: 3px solid #9bb6f0;
  outline-offset: 2px;
}
.notice-tabs [role="tab"][hidden] { display: none !important; }
.notice-tabs [role="tabpanel"] { padding-top: 14px; }
.notice-tabs [role="tabpanel"][hidden] { display: none; }
.notice-tabs .intel { margin: 0; }

.official-apply { margin: 12px 0 16px; }
.official-line { margin: 0; }
.official-k { font-weight: 700; margin-right: 0.55em; color: var(--navy); }
.sme-fit-sub { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.sme-fit-sub h4 { margin: 0 0 6px; }
.bc-comp { margin: 0 0 10px; }
/* notice-extras-v1 */
.notice-extras { margin: 18px 0 0; }
.notice-extra { margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.notice-extra summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.notice-extra[hidden] { display: none !important; }
.notice-extra .intel { margin: 10px 0 0; }
#intel-awards { margin-top: 18px; }

.list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 12px;
}
.list-tools .sort-label input[type="search"] {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  min-width: 12rem;
  max-width: 100%;
}
.list-tools .sort-label input[type="search"]:focus-visible {
  outline: 3px solid #9bb6f0;
  outline-offset: 2px;
}
.list-tools .pager {
  margin-top: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 16rem;
}
@media (max-width: 520px) {
  .list-tools .sort-label { width: 100%; justify-content: space-between; }
  .list-tools .sort-label input[type="search"],
  .list-tools .sort-label select { flex: 1 1 auto; min-width: 0; }
  .list-tools .pager { width: 100%; justify-content: space-between; }
}

/* pay-rollup-v1 */
.pay-rollup {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pay-rollup-totals { margin: 0 0 6px; font-weight: 650; color: var(--navy-deep); }
.pay-rollup-paid { font-size: 1.15rem; font-weight: 720; }
.pay-rollup-filtered { margin: 0 0 8px; }
.pay-rollup-vs { margin-top: 8px; }
.pay-rollup-compare { margin: 0 0 6px; }
.pay-rollup-compare .fact-k { display: inline; margin-right: 6px; }
.pay-bar {
  height: 10px;
  background: #e8eef3;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 8px;
}
.pay-bar-fill {
  display: block;
  height: 100%;
  background: var(--navy);
  border-radius: 999px;
}

/* ===== Market overview + charts (charts.js) ===== */
:root {
  --amber: #e89a2c;
  --coral: #d9573b;
  --sky: #2f7fc1;
}
.market { max-width: var(--max); margin: 0 auto; padding: 18px 16px 0; min-width: 0; }
.market:empty { display: none; }
.market-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 22px 20px 18px;
  color: #fff;
  background:
    radial-gradient(600px 220px at 85% -20%, rgba(46, 196, 152, 0.35), transparent 60%),
    radial-gradient(500px 240px at -10% 120%, rgba(47, 127, 193, 0.45), transparent 60%),
    linear-gradient(135deg, var(--navy-deep), var(--navy) 60%, #11587a);
  box-shadow: 0 10px 30px rgba(7, 44, 67, 0.22);
}
.market-hero .eyebrow { margin: 0 0 4px; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8fd9c0; font-weight: 700; }
.market-hero h1 { margin: 0; font-size: clamp(1.35rem, 3.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.02em; }
.hero-sub { margin: 8px 0 16px; color: #c9dbe7; max-width: 60ch; font-size: 0.95rem; }
.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 12px 12px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff; text-decoration: none; border-top: 3px solid var(--teal);
  transition: transform .15s ease, background .15s ease;
}
a.stat:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.14); }
.stat-k { font-size: 1.55rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 0.85rem; font-weight: 600; color: #e6f0f6; }
.stat-s { font-size: 0.72rem; color: #a9c2d3; }
.stat.t-navy { border-top-color: #9cc7e8; }
.stat.t-teal { border-top-color: #3fd0a4; }
.stat.t-amber { border-top-color: var(--amber); }
.stat.t-sky { border-top-color: #6fb3ea; }
.stat.t-coral { border-top-color: #f08a6e; }
@media (max-width: 760px) {
  .stat-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .stat { scroll-snap-align: start; }
}

.market-charts { margin-top: 14px; }
.market-charts > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 4px 2px 10px; font-weight: 700; color: var(--navy);
}
.market-charts > summary::-webkit-details-marker { display: none; }
.market-charts > summary span::before { content: "▸ "; color: var(--teal); }
.market-charts[open] > summary span::before { content: "▾ "; }
.market-charts > summary small { font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-grid .lanes-card { grid-column: 1 / -1; }
@media (max-width: 760px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }
.chart-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid #e3e9ef; padding: 14px 16px 12px; min-width: 0; display: flex; flex-direction: column;
}
.chart-card header h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.chart-q { margin: 2px 0 10px; color: var(--muted); font-size: 0.84rem; }
.chart-body { flex: 1; min-width: 0; }
.chart-foot { margin-top: 10px; font-size: 0.74rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.chart-src { margin: 10px 2px 0; }

/* horizontal bars */
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hb-row {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 3px 6px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 0.85rem;
}
a.hb-row:hover { background: #f1f6f9; }
.hb-label { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.hb-track { height: 10px; background: #edf2f6; border-radius: 99px; overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #35b68e, var(--teal)); }
.hbars-sky .hb-fill { background: linear-gradient(90deg, #7cbcf0, var(--sky)); }
.hbars-navy .hb-fill { background: linear-gradient(90deg, #4f86ad, var(--navy)); }
.hb-fill.is-mine { background: linear-gradient(90deg, #f6c46c, var(--amber)); }
.hb-mine { display: inline-block; font-size: 0.66rem; font-weight: 700; color: #8a5300; background: #fdf0d9; border-radius: 6px; padding: 0 5px; vertical-align: 1px; }
.hb-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-val small { display: block; font-weight: 500; color: var(--muted); font-size: 0.72rem; }

/* columns */
.cols { width: 100%; height: auto; display: block; overflow: visible; }
.cols rect { transition: opacity .15s; }
.cols rect:hover { opacity: 0.8; }
.c-teal { fill: var(--teal); background: var(--teal); }
.c-navy { fill: var(--navy); background: var(--navy); }
.col-lbl { font-size: 16px; fill: var(--muted); }
.col-val { font-size: 15px; font-weight: 700; fill: var(--ink); }
.legend { margin: 6px 0 0; font-size: 0.78rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pill-link { font-size: 0.8rem; padding: 4px 10px; border-radius: 99px; background: #eef6f2; color: var(--teal-hover); text-decoration: none; border: 1px solid #cfe7dc; }
.pill-link:hover { background: #dff0e8; }
.pill-link b { color: var(--ink); }

/* map */
.map-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.uk-map { width: 100%; max-height: 300px; display: block; }
.map-region { stroke: #fff; stroke-width: 3; transition: opacity .15s; }
.uk-map a:hover .map-region { opacity: 0.75; stroke: var(--amber); }
.map-legend { list-style: none; margin: 0; padding: 0; font-size: 0.84rem; display: grid; gap: 4px; }
.map-legend li a, .map-legend li.m { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: 8px; color: inherit; text-decoration: none; }
.map-legend li a { background: #f3f8f6; }
.map-legend li a:hover { background: #e3f1ec; }
.map-legend b { font-variant-numeric: tabular-nums; }

/* your market */
.lanes-card { background: linear-gradient(135deg, #fffaf0, #ffffff 60%); border-color: #f3dfb8; }
.lanes-card.is-empty .chart-body p { margin: 0; color: var(--muted); }
.lane-kpis, .bc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.lane-kpis div, .bc-kpis div { background: #f6f9fb; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.lane-kpis b, .bc-kpis b { font-size: 1.3rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.lane-kpis span, .bc-kpis span { font-size: 0.76rem; color: var(--muted); }
.lane-next { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.lane-next a { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lane-next a:hover { border-color: var(--teal); }
.lane-next small { color: var(--muted); }

/* notice page buyer charts */
.buyer-charts { margin: 12px 0 16px; padding: 14px; border-radius: var(--radius); background: linear-gradient(180deg, #f6fafc, #fff); border: 1px solid #e3e9ef; }
.buyer-charts h4 { margin: 0 0 10px; }
.bc-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.bc-toggle [role="tab"] {
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}
.bc-toggle [role="tab"][aria-selected="true"] {
  background: var(--navy);
  color: #fff;
}
.bc-toggle [role="tab"][aria-selected="true"] .m { color: rgba(255,255,255,.8); }
.bc-toggle [role="tab"]:focus-visible {
  outline: 3px solid rgba(13,122,95,.45);
  outline-offset: 2px;
}
.bc-scope { margin: 0 0 10px; }
.bc-scope-label { font-weight: 700; color: var(--navy-deep); }
.bc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bc-panel { min-width: 0; }
.bc-panel .cols { height: auto; }
@media (max-width: 720px) { .bc-grid, .map-wrap { grid-template-columns: minmax(0, 1fr); } .uk-map { max-height: 260px; } }

/* list cards: a touch more life */
.notice-list .notice-card { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.notice-list .notice-card:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .stat, .notice-list .notice-card, .cols rect { transition: none; } a.stat:hover, .notice-list .notice-card:hover { transform: none; } }
.mini-h { margin: 12px 0 4px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.lane-next span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 0.88rem; }
/* mobile: swipeable chart carousel keeps the search box and list close to the top */
@media (max-width: 760px) {
  .chart-grid { align-items: start; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 88%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; overscroll-behavior-x: contain; }
  .chart-grid > .chart-card { scroll-snap-align: start; }
  .chart-grid .lanes-card { grid-column: auto; }
  .market-charts > summary small::after { content: " · swipe →"; }
}
/* Filters collapsed by default: make the toggle read as a button */
.filters:not([open]) > summary { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #f6f9fb; }
.filters:not([open]) > summary:hover { border-color: var(--teal); background: #eef6f2; }
.filter-hint { font-weight: 500; font-size: .8rem; color: var(--muted); }
.filters[open] .filter-hint { display: none; }
@media (max-width: 420px) { .filter-hint { display: none; } }
/* Companies House badges (ch-badges.js) */
.ch-badge { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 6px; text-decoration: none; white-space: nowrap; vertical-align: 1px; }
.ch-verified { background: #e6f4ee; color: #0b6b4f; border: 1px solid #bfe3d3; }
.ch-possible { background: #f4f6f8; color: #5c6b7a; border: 1px dashed #c8d1da; font-weight: 500; white-space: normal; }
.hb-ch { display: block; margin-top: 2px; }
.hb-ch .ch-badge { margin-left: 0; }
/* Region / sector selection state (charts.js) */
.scope-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.scope-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .86rem; color: #1b2a12; background: #ffd27a; border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.scope-chip b { font-weight: 750; }
.scope-chip span { font-weight: 800; font-size: 1rem; line-height: 1; }
.scope-chip:hover { background: #ffc24d; }
.scope-chip.scope-lane { background: #bfe6ff; color: #0b2a44; }
.scope-all { font-size: .86rem; color: #cfe0ea; }
.scope-hint { font-size: .76rem; color: #a9c2d3; }
.map-hint { margin: -4px 0 6px; font-size: .78rem; color: var(--muted); }
.map-region.is-dim { opacity: .35; }
.map-region.is-selected { stroke: var(--amber); stroke-width: 7; stroke-linejoin: round; filter: drop-shadow(0 2px 6px rgba(232,154,44,.55)); }
.uk-map a:focus-visible .map-region { stroke: var(--navy); stroke-width: 6; }
.map-legend li.is-selected a { background: #fff1d6; outline: 2px solid var(--amber); font-weight: 700; }
.hbars.has-sel li:not(.is-selected) .hb-row { opacity: .5; }
.hbars li.is-selected .hb-row { background: #fff4e0; outline: 2px solid var(--amber); }
.hb-val small { white-space: normal; max-width: 15em; margin-left: auto; }
.comp-cue { margin: -4px 0 8px; font-size: .8rem; color: #8a5300; background: #fdf3e1; border-radius: 8px; padding: 4px 8px; display: inline-block; }
.market.is-filtered .market-hero { box-shadow: 0 10px 30px rgba(7,44,67,.22), inset 0 0 0 3px rgba(255,210,122,.6); }

/* ---------- Notice description (plain English / original toggle) ---------- */
.notice-desc { margin: 4px 0 16px; }
.desc-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.desc-toggle [role="tab"] {
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}
.desc-toggle [role="tab"][aria-selected="true"] {
  background: var(--navy);
  color: #fff;
}
.desc-toggle [role="tab"]:focus-visible {
  outline: 3px solid rgba(13,122,95,.45);
  outline-offset: 2px;
}
.notice-desc .intel { margin: 0; }
.notice-desc .intel h3 { margin-top: 0; }
.notice-desc .desc { margin-top: 0; }
.notice-desc .intel ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}
.notice-desc .intel ul ul {
  list-style: circle;
  margin: 0.15rem 0 0.35rem;
}
.notice-desc .intel li { margin: 0.15rem 0; }

/* ---------- Notice competition badge + strip (comp-badge.js) ---------- */
.fact-comp { gap: 4px; margin: 0 0 14px; }
.comp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comp-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; cursor: help; }
.comp-low { background: #dff5e3; color: #1d6b2f; }
.comp-moderate { background: #fff3d6; color: #7a5600; }
.comp-tough { background: #fde2e1; color: #8a1f1b; }
.comp-none { background: #eef1f5; color: #444; cursor: default; }
.comp-more { margin-left: auto; font-size: .85rem; font-weight: 600; }
.comp-say { margin: 2px 0 0; font-size: .95rem; color: var(--navy-deep); }
.comp-basis { margin: 0; }
.comp-strip { margin-top: 6px; max-width: 560px; }
.cs-ends { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cs-track { position: relative; height: 10px; border-radius: 999px; background: #e6ecf1; margin: 3px 0 2px; }
.cs-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #b9cfdd; }
.cs-mark { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--navy-deep, #12324a); box-shadow: 0 0 0 2px #fff; }
.fact-comp[data-level="tough"] .cs-mark { background: #b42318; }
.fact-comp[data-level="moderate"] .cs-mark { background: #a86b00; }
.fact-comp[data-level="low"] .cs-mark { background: #1d6b2f; }
.cs-ticks { position: relative; height: 14px; font-size: .7rem; color: var(--muted); }
.cs-ticks span { position: absolute; transform: translateX(-50%); }
.cs-say { margin: 4px 0 0; font-size: .9rem; }
.cs-cap { margin: 0; }
.buyer-typical { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line, #d5dee6); max-width: 560px; }
.buyer-typical-k { margin: 0 0 4px; font-size: .8rem; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--muted, #5a6b78); }
.buyer-typical-say { margin: 4px 0 2px; font-size: .95rem; color: var(--navy-deep); }
.buyer-typical-panel { margin: 8px 0 12px; }
.buyer-typical-demo { margin: 8px 0 0; }
.buyer-typical-demo .buyer-typical-say { margin: 6px 0; }
.bt-chart { margin: 2px 0 0; }
.bt-bars { display: flex; align-items: stretch; gap: 2px; height: 84px; position: relative; }
.bt-bars::before { content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 1px; background: var(--line, #d5dee6); }
.bt-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; position: relative; }
.bt-col.is-iqr { background: rgba(18, 50, 74, 0.10); border-radius: 3px 3px 0 0; }
.bt-track { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; position: relative; min-height: 0; }
.bt-bar { width: 100%; max-width: 26px; border-radius: 3px 3px 0 0; background: #8aa8b8; min-height: 0; }
.bt-col.is-iqr .bt-bar { background: #1a4a6a; }
.bt-tick { height: 16px; font-size: .68rem; line-height: 16px; color: var(--muted, #5a6b78); text-align: center; white-space: nowrap; }
.bt-ref-mark { position: absolute; top: -2px; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #c48a00; box-shadow: 0 0 0 1px #fff; pointer-events: none; }
.bt-ref-mark::before { content: ""; position: absolute; top: -1px; left: 50%; margin-left: -4px; border: 4px solid transparent; border-top-color: #c48a00; }
.bt-leg { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 6px 0 0; }
.bt-leg-iqr, .bt-leg-ref { display: inline-flex; align-items: center; gap: 6px; }
.bt-leg-iqr::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: #1a4a6a; box-shadow: 0 0 0 3px rgba(18, 50, 74, 0.10); }
.bt-leg-ref::before { content: ""; width: 2px; height: 12px; background: #c48a00; box-shadow: 0 0 0 1px #fff; }
.buyer-typical-demo .bt-bars { filter: blur(3px); }
@media (max-width: 480px) {
  .bt-bars { gap: 1px; height: 76px; }
  .bt-tick { font-size: .62rem; }
}

/* ---------- Consistent chart interaction (charts.js) ----------
   Filter elements: pointer + hover tint + amber ring when selected. Display-only: default cursor, no lift, tap shows value. */
.cols:not(.cols-pick) rect { cursor: default; }
.cols:not(.cols-pick) rect:hover { opacity: 1; }
.cols:not(.cols-pick) .col:hover rect:not(.col-hit), .cols .col.is-peek rect:not(.col-hit) { opacity: .82; }
.cols-pick .col-pick { cursor: pointer; outline: none; }
.col-hit { fill: transparent; }
.cols-pick .col-pick:hover .col-hit, .cols-pick .col-pick:focus-visible .col-hit { fill: rgba(232,154,44,.10); }
.cols-pick .col-pick.is-selected .col-hit { fill: rgba(255,210,122,.30); stroke: var(--amber); stroke-width: 3; rx: 8; }
.cols-pick.has-sel .col-pick:not(.is-selected) rect:not(.col-hit) { opacity: .4; }
.tap-readout { min-height: 1.2em; margin: 4px 0 0; font-size: .78rem; color: var(--muted); }
.pill-link { cursor: pointer; }
.pill-link.is-selected { background: #fff1d6; border-color: var(--amber); outline: 2px solid var(--amber); font-weight: 700; }
.pill-row.has-sel .pill-link:not(.is-selected) { opacity: .6; }
.stat { cursor: default; }
a.stat { cursor: pointer; }
a.stat.is-selected { outline: 3px solid #ffd27a; outline-offset: -3px; background: rgba(255, 210, 122, 0.18); }
.scope-chip.scope-close { background: #ffd27a; }
.hbars div.hb-row { cursor: default; }
.uk-map a, .map-legend li a, a.hb-row { cursor: pointer; }

/* ===== Async loading: skeletons, spinner, error (loading-preview) ===== */
:root {
  --sk: color-mix(in srgb, var(--ink) 9%, var(--surface));
  --sk-shine: rgba(255, 255, 255, 0.55);
}
html[data-theme="dark"] {
  --sk: rgba(255, 255, 255, 0.1);
  --sk-shine: rgba(255, 255, 255, 0.14);
}
.sk {
  display: inline-block;
  height: 0.85em;
  border-radius: 6px;
  background: var(--sk);
  position: relative;
  overflow: hidden;
  vertical-align: middle;
  max-width: 100%;
}
.sk.sk-block { display: block; }
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--sk-shine) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: sk-shimmer 1.2s ease-in-out infinite;
}
@keyframes sk-shimmer { to { transform: translateX(100%); } }
.sk-chip { width: 4.4rem; height: 1.15rem; border-radius: 6px; }
.sk-chip-end { width: 5.6rem; height: 1.3rem; border-radius: 999px; margin-left: auto; }
.sk-title { display: block; height: 1.05rem; margin: 0 0 0.35rem; }
.sk-val { width: 7.5rem; height: 1.3rem; }
.sk-buyer { width: 11rem; height: 0.9rem; }
.sk-meta { display: block; width: 12rem; height: 0.75rem; margin-top: 0.4rem; }
.sk-notice { display: block; padding: 14px 18px 14px; }
#list > li.sk-card { pointer-events: none; }
#list > li.sk-card:hover {
  border-left-color: #1a7a9c;
  box-shadow: var(--shadow);
}
.sk-stat-k { width: 4.2rem; height: 1.4rem; margin-bottom: 6px; }
.sk-stat-l { width: 5.5rem; height: 0.7rem; }
.market-hero .sk { background: rgba(255, 255, 255, 0.2); --sk-shine: rgba(255, 255, 255, 0.35); }
.sk-chart { height: 9.5rem; display: block; margin-top: 12px; }
.sk-panel { display: grid; gap: 0.55rem; margin: 10px 0 4px; }
.sk-panel .sk { display: block; height: 0.85rem; }
.sk-row { display: block; height: 2.4rem; margin: 0 0 8px; }
.sk-fact { height: 4.2rem; display: block; border-radius: 10px; }
.sk-detail { pointer-events: none; }
.sk-detail h1 .sk { height: 1.4rem; }
.sk-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
.sk-tab { width: 6.2rem; height: 2rem; border-radius: 8px; }
.spin {
  width: 1em;
  height: 1em;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: sk-spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: -0.15em;
  flex: 0 0 auto;
}
@keyframes sk-spin { to { transform: rotate(360deg); } }
.load-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
}
.load-err {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e2c2c2;
  background: #fff6f6;
  border-radius: var(--radius);
  color: var(--ink);
}
html[data-theme="dark"] .load-err {
  border-color: #5a3a3a;
  background: #2a1c1c;
  color: var(--dk-heading, #e8eaed);
}
.load-err p { margin: 0 0 8px; }
.load-err p:last-child { margin-bottom: 0; }
.load-err .btn-secondary { margin-top: 4px; }
.pricing-grid .sk-price {
  min-height: 16rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#list > li.empty .load-err { margin: -4px 0; }
@media (prefers-reduced-motion: reduce) {
  .sk::after { animation: none; display: none; }
  .spin { animation: none; border-top-color: var(--teal); opacity: 0.75; }
}

/* Free-plan upsell placeholders: clearly labelled DEMO data */
.demo-box { position: relative; margin: 14px 0; padding: 12px 14px; border: 2px dashed #c9a227; border-radius: 10px; background: #fffbea; overflow: hidden; }
.demo-box::after { content: "DEMO"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%) rotate(-14deg); font-size: 3.4rem; font-weight: 900; letter-spacing: .18em; color: rgba(160, 120, 0, .13); pointer-events: none; }
.demo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.demo-body { filter: saturate(.6); opacity: .85; user-select: none; }
.demo-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #8a6d00; color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; vertical-align: middle; }
.demo-cta { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.demo-cta-btn { display: inline-block; padding: 7px 14px; border-radius: 8px; text-decoration: none; }
.demo-match { padding: 8px 0; border-top: 1px solid var(--line); }
.locked-val { font-size: .8rem; color: #8a6d00; white-space: nowrap; }
.ch-tick { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #e6f3ee; color: #0a5c48; font-size: .78rem; font-weight: 700; }

/* ----- header-clean-v3: one tidy row; Sign in as a text link, Sign up as the one solid button ----- */
.auth-status-text { display: none !important; }
html:not(.ukt-signed-in) #header-plan,
html:not(.ukt-signed-in) #account-plan-row { display: none !important; }
#btn-signout[hidden], #btn-signin[hidden], #btn-signup[hidden] { display: none !important; }
.header-tools { gap: 10px; }
.auth-bar { gap: 10px; flex-wrap: nowrap; }
.header-plan { display: inline-flex; align-items: center; gap: 6px; }
.site-header #btn-signin {
  background: transparent; border: 0; color: #fff; padding: 8px 6px; font-weight: 600; border-radius: 6px;
}
.site-header #btn-signin:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.site-header #btn-signup { background: var(--teal); color: #fff; border: 0; padding: 8px 14px; border-radius: 8px; font-weight: 650; }
.site-header #btn-signup:hover { background: var(--teal-hover); }
.site-header #btn-signin:focus-visible, .site-header #btn-signup:focus-visible { outline: 3px solid #9bb6f0; outline-offset: 2px; }
@media (min-width: 721px) {
  html:not(.ukt-signed-in) #header-account-link { display: none; }
  .site-header .account-menu,
  html[data-theme="dark"] .site-header .account-menu { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; gap: 10px; }
  #account-plan-row { display: none !important; }
  .site-header #btn-signout { background: transparent; border: 0; color: #c9d6e0; padding: 8px 6px; font-weight: 600; }
  .site-header #btn-signout:hover { background: transparent; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 720px) {
  .site-header .account-menu #btn-signin { color: var(--navy, #0b3d5c); text-align: center; border: 1px solid var(--line); }
  .site-header .account-menu #btn-signup { text-align: center; }
  html[data-theme="dark"] .site-header .account-menu #btn-signin { color: var(--ink); }
}

/* ----- pricing-cards-v2: balanced three-card layout (cards ~372px, content 1160px centred); teal tick bullets ----- */
main.page.pricing-page { max-width: 1192px; } /* 1160px content + 16px padding each side */
.pricing-page .pricing-grid { grid-template-columns: repeat(3, minmax(0, 372px)); justify-content: center; gap: 22px; }
.pricing-page .price-card { padding: 22px 20px 20px; }
.pricing-page .price-blurb { min-height: 0; }
.pricing-page .price-features { list-style: none; padding: 0; margin: 8px 0 14px; font-size: 0.9rem; line-height: 1.45; }
.pricing-page .price-features li { position: relative; padding-left: 1.55em; margin: 0.45em 0; }
.pricing-page .price-features li::before {
  content: ""; position: absolute; left: 0; top: 0.18em; width: 1.05em; height: 1.05em; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.4l2.6 2.6L12 5.6'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.pricing-page .pricing-api { max-width: none; }
@media (max-width: 900px) {
  .pricing-page .pricing-grid { grid-template-columns: minmax(0, 520px); }
}

.preview-banner { margin: 0; padding: 8px 16px; background: #fff3d6; color: #5c4300; font-size: .9rem; border-bottom: 2px solid #e0b34a; }
.preview-banner code { font-size: .85em; }
