/* Veridio platform (projects, scores, satellite check, portfolio, methodology, store).
   Builds on site/tokens.css + site/site.css (type, buttons, form controls, header, footer).
   Square corners, hairlines instead of shadows, lime only as a small accent.
   Colour never carries meaning alone: every grade, level and verdict also has a text label. */

:root {
  /* text */
  --app-muted: #5f5e5b;            /* secondary text: 6.5:1 on white, 5.5:1 on cloud */
  /* five-step risk scale (very low -> very high), each >= 3:1 on white for bars and markers */
  --risk-0: #4f6b00;
  --risk-1: #7f9a16;
  --risk-2: #b07d00;
  --risk-3: #cc5f10;
  --risk-4: #b3261e;
  /* tinted chips: text on tint >= 6.6:1 */
  --tint-ok: #e6ecd2;   --on-tint-ok: #3d5300;
  --tint-warn: #f3e9cc; --on-tint-warn: #6b4a00;
  --tint-bad: #f5dcd8;  --on-tint-bad: #8f1d17;
  --app-gap: clamp(16px, 2vw, 24px);
}

/* ------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(960px + 2 * var(--gutter)); }
.wrap--mid { max-width: calc(1080px + 2 * var(--gutter)); }
section.body { padding-block: clamp(40px, 5vw, 72px); }
.page-app main { min-height: 50vh; }
.page-app code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
  background: var(--cloud); padding: 1px 5px; letter-spacing: 0; }
.page-app main a:not(.btn):not(.card) { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* page head: cloud band, eyebrow, big title, lead */
.phero { background: var(--cloud); border-bottom: 1px solid var(--line); padding-block: clamp(40px, 6vw, 88px) clamp(32px, 4vw, 56px); }
.phero .eyebrow { margin-bottom: 20px; }
.phero h1 {
  font-size: clamp(34px, 4.4vw, 64px); line-height: 1.05; letter-spacing: var(--track-tight);
  font-weight: 600; max-width: 22ch; overflow-wrap: anywhere;
}
.phero h1.long { font-size: clamp(30px, 3.6vw, 52px); max-width: 30ch; }
.phero .sub { margin-top: 20px; font-size: var(--fs-lg); line-height: 1.55; color: var(--app-muted); max-width: 760px; }
.phero .sub a { color: var(--charcoal); }
.crumb { margin-bottom: 20px; font-size: var(--fs-sm); }
.crumb a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.phero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.section-title { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.1; letter-spacing: var(--track-tight); margin: 0 0 24px; }
.section-title + .fine { margin-top: -12px; margin-bottom: 24px; }

/* hairline panel */
.block { background: var(--white); border: 1px solid var(--line); padding: clamp(20px, 2.5vw, 32px); margin-bottom: var(--app-gap); min-width: 0; }
.block > h3, .block-title { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.2; letter-spacing: var(--track); margin-bottom: 12px; }
.block > h3 + .fine { margin-bottom: 12px; }
.block p + p { margin-top: 12px; }
.block--tint { background: var(--cloud); }
.fine { font-size: var(--fs-sm); line-height: 1.6; color: var(--app-muted); }
.fine a { color: var(--charcoal); }
.fine + .fine { margin-top: 8px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: var(--app-gap); align-items: start; }
.detail-grid aside { position: sticky; top: 24px; }
.grid3b { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--app-gap); align-items: start; margin-top: var(--app-gap); }
.cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--app-gap); align-items: start; }
@media (max-width: 1023px) {
  .detail-grid, .grid3b { grid-template-columns: minmax(0, 1fr); }
  .detail-grid aside { position: static; }
}
@media (max-width: 860px) { .cards2 { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------- notices */
.notice { border: 1px solid var(--line); border-left: 4px solid var(--charcoal); background: var(--white); padding: 16px 20px; margin-bottom: var(--app-gap); }
.notice--error { border-left-color: var(--danger); background: var(--tint-bad); color: var(--on-tint-bad); }
.notice--error a { color: inherit; }
.notice--ok { border-left-color: var(--ok); }
.notice b, .notice strong { font-weight: 700; }
.empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--line-strong); color: var(--app-muted); background: var(--white); }
.empty a { color: var(--charcoal); font-weight: 600; }
.text-danger { color: var(--danger); }

/* "evidence aggregation, not a forecast" */
.disclaim {
  display: inline-block; margin-top: 20px; padding: 10px 14px; max-width: 760px;
  font-size: var(--fs-sm); line-height: 1.5; color: var(--charcoal);
  background: var(--white); border-left: 3px solid var(--lime);
}
.disclaim a { font-weight: 600; color: inherit; }

/* ------------------------------------------------------------ filters */
.filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px;
  align-items: end; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line);
}
.filter { display: grid; gap: 6px; min-width: 0; }
.filter > span { font-size: var(--fs-sm); font-weight: 500; }
.filter--search { grid-column: span 2; }
.filters-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters .btn { min-height: 48px; }
.filters .clear { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); font-weight: 600; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233e3d3b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
@media (max-width: 560px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .filter--search, .filters-actions { grid-column: 1 / -1; }
  .filters-actions .btn { flex: 1; }
  .filters .select { padding-left: 12px; padding-right: 32px; background-position: right 12px center; font-size: 15px; }
}
@media (max-width: 359px) {
  .filters { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------ tables */
.reject-table { position: relative; /* keeps .sr-only cells inside the scroller */
  overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0;
  /* scroll shadows: a visible hint that more columns sit off-screen */
  background:
    linear-gradient(to right, var(--white) 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--white) 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(62, 61, 59, .2), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(62, 61, 59, .2), transparent) right center / 14px 100% no-repeat scroll,
    var(--white);
}
.reject-table > h3 { font-size: clamp(20px, 1.7vw, 24px); margin-bottom: 16px; }
.reject-table table, .data-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.reject-table th, .data-table th {
  text-align: left; vertical-align: bottom; padding: 10px 12px 10px 0;
  font-size: 12px; font-weight: 600; line-height: 1.3; text-transform: uppercase; letter-spacing: .04em;
  color: var(--app-muted); border-bottom: 1px solid var(--charcoal); white-space: nowrap;
}
.reject-table td, .data-table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.reject-table tbody tr:last-child td { border-bottom: 0; }
.reject-table td a, .data-table td a { font-weight: 600; color: var(--charcoal); }
.reject-table th.num, .reject-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reject-table td.reason { color: var(--on-tint-bad); font-size: var(--fs-sm); }
.reject-table tfoot td { border-top: 1px solid var(--charcoal); border-bottom: 0; font-weight: 600; }
.evidence-table td { font-size: var(--fs-sm); }
.evidence-table td.pts { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.evidence-table td.ev { color: var(--app-muted); }
.scroll-x table { min-width: 620px; }
.scroll-hint { display: none; margin: 0 0 8px; font-size: 13px; color: var(--app-muted); }
.reject-table.is-scrollable .scroll-hint { display: block; }

/* stacked rows on phones: <table class="stack-sm">, cells carry data-label */
@media (max-width: 760px) {
  .stack-sm thead { display: none; }
  .stack-sm, .stack-sm tbody, .stack-sm tr, .stack-sm td { display: block; width: 100%; }
  .stack-sm tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .stack-sm tbody tr:last-child { border-bottom: 0; }
  .reject-table .stack-sm td, .reject-table .stack-sm td.num { border: 0; padding: 3px 0; text-align: left; white-space: normal; }
  .stack-sm td[data-label]::before {
    content: attr(data-label); display: block; font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: var(--app-muted);
  }
  .stack-sm td.lead::before { display: none; }
  .stack-sm td.lead { font-size: var(--fs-md); padding-bottom: 6px; }
  .stack-sm td[data-label].inline::before { display: inline; margin-right: 8px; }
}

/* ------------------------------------------------------- grade chips */
.grade {
  display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 28px;
  padding: 3px 10px; font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: .02em; white-space: nowrap;
  background: var(--charcoal); color: var(--white); border: 1px solid var(--charcoal);
}
.grade-AAA { background: var(--lime); color: var(--charcoal); border-color: var(--lime); }
.grade-AA { background: var(--charcoal); color: var(--lime); }
.grade-A { background: var(--charcoal); color: var(--white); }
.grade-BBB { background: var(--sage); color: var(--charcoal); border-color: var(--sage); }
.grade-BB, .grade-B { background: var(--stone); color: var(--charcoal); border-color: var(--stone); }
.grade-UNRATED, .grade-None, .grade- { background: var(--white); color: var(--app-muted); border: 1px dashed var(--line-strong); }
.grade-REJECTED { background: var(--white); color: var(--danger); border-color: var(--danger); }
.grade.lg { min-width: 72px; min-height: 56px; padding: 10px 16px; font-size: 22px; }
.grade--status { background: var(--cloud); color: var(--charcoal); border-color: var(--line); font-weight: 600; text-transform: capitalize; }

/* ------------------------------------------------------- project cards */
.grid3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (max-width: 1023px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid3 { grid-template-columns: minmax(0, 1fr); } }
.card {
  display: flex; flex-direction: column; min-width: 0; min-height: 260px; padding: clamp(20px, 2.2vw, 32px);
  background: var(--white); color: var(--charcoal); text-decoration: none;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background-color .2s var(--ease);
}
.card:hover { background: var(--cloud); }
.card:focus-visible { outline-offset: -4px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card .cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); text-align: right; }
.card h3 {
  margin: 28px 0 8px; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; letter-spacing: var(--track);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta { font-size: var(--fs-sm); color: var(--app-muted); }
.card-bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin-top: auto; padding-top: 24px;
}
.price { font-size: 24px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.price small { font-size: var(--fs-sm); font-weight: 500; color: var(--app-muted); }
.price .price-note { display: block; font-size: 12px; margin-top: 2px; }
.demand { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.demand::before { content: ""; width: 8px; height: 8px; background: var(--lime); outline: 1px solid var(--charcoal); flex: none; }

/* ----------------------------------------------------- project detail */
.detail-head { display: flex; gap: 24px; align-items: flex-start; }
.detail-head > div { min-width: 0; }
@media (max-width: 560px) { .detail-head { flex-direction: column; gap: 16px; } }
.evidence { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.evidence li { position: relative; padding-left: 30px; }
.evidence li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; background: var(--lime);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='%233e3d3b' stroke-width='1.8'/%3E%3C/svg%3E");
}
.pillars { display: grid; gap: 14px; margin: 8px 0 16px; }
.pillar { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 64px; gap: 16px; align-items: center; }
.pillar .plabel { font-size: var(--fs-sm); font-weight: 600; }
.pillar .plabel.wide { font-weight: 500; }
.pillar .pval { font-size: var(--fs-sm); color: var(--app-muted); text-align: right; font-variant-numeric: tabular-nums; }
.pbar { height: 8px; background: var(--cloud); overflow: hidden; }
.pfill { height: 100%; background: var(--charcoal); }
.pfill.red { background: var(--danger); }
@media (max-width: 560px) {
  .pillar { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .pillar .pbar { grid-column: 1 / -1; grid-row: 2; }
}

.buy-box .tier { font-size: var(--fs-sm); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.buy-box .amt { margin: 8px 0 16px; font-size: clamp(36px, 3.4vw, 48px); font-weight: 600; line-height: 1.05; letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.buy-box .amt small { font-size: var(--fs-md); font-weight: 500; letter-spacing: var(--track); color: var(--app-muted); }
.buy-box .btn { width: 100%; margin-top: 16px; }
.buy-box .btn + .fine { margin-top: 8px; }
.buy-box hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.buy-box details summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.qty-row { display: flex; gap: 12px; align-items: center; }
.qty-row label { font-size: var(--fs-sm); font-weight: 500; }
.qty-row .input { width: 120px; }
.price-warn { color: var(--on-tint-warn); }

/* stacked form inside a panel */
.quote-form { display: grid; gap: 16px; margin-top: 16px; }
.quote-form .btn { justify-self: start; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.input[type=file] { padding: 10px 12px; min-height: 48px; cursor: pointer; }
.input[type=file]::file-selector-button {
  margin-right: 12px; padding: 6px 14px; font: inherit; font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0;
  color: var(--charcoal); background: var(--white); border: 1px solid var(--charcoal); border-radius: 0; cursor: pointer;
}
.input[type=file]::-webkit-file-upload-button {
  margin-right: 12px; padding: 6px 14px; font: inherit; font-size: var(--fs-sm); font-weight: 600;
  color: var(--charcoal); background: var(--white); border: 1px solid var(--charcoal); border-radius: 0;
}
.textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-sm); letter-spacing: 0; min-height: 180px; }

/* -------------------------------------------------- risk + score parts */
.lvl-0 { --lvl: var(--risk-0); }
.lvl-1 { --lvl: var(--risk-1); }
.lvl-2 { --lvl: var(--risk-2); }
.lvl-3 { --lvl: var(--risk-3); }
.lvl-4 { --lvl: var(--risk-4); }
.lvl-na { --lvl: var(--stone); }

.score-num { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: var(--track); }
.score-num--lg { font-size: 22px; }
.score-hero { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.score-hero > div:last-child { flex: 1 1 320px; min-width: 0; }
.score-dial {
  --v: 0; flex: none; width: 152px; height: 152px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--charcoal) calc(var(--v) * 1%), var(--stone) 0);
}
.score-dial > div { width: 124px; height: 124px; border-radius: 50%; background: var(--white); display: grid; place-items: center; text-align: center; line-height: 1; }
.score-dial b { font-size: 48px; letter-spacing: var(--track-tight); }
.score-dial small { display: block; margin-top: 6px; font-size: 12px; color: var(--app-muted); }
.score-meta { margin-top: 16px; }
@media (max-width: 640px) {
  .score-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .score-hero > div:last-child { flex: none; width: 100%; }   /* a 320px flex-basis would become a height here */
  .score-dial { width: 112px; height: 112px; }
  .score-dial > div { width: 90px; height: 90px; }
  .score-dial b { font-size: 34px; }
}

/* KPIs in a page head */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--line); }
.kpis > div { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 0 0; }
.kpis > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.kpis strong { font-size: clamp(28px, 3vw, 44px); line-height: 1; font-weight: 600; letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.kpis span { font-size: var(--fs-sm); color: var(--app-muted); }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .kpis > div:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 20px; }
}

/* coverage bar */
.cov { display: inline-block; width: 72px; height: 6px; margin-right: 8px; vertical-align: middle; background: var(--cloud); overflow: hidden; }
.cov i { display: block; height: 100%; background: var(--charcoal); }
.cov.lvl-0 i, .cov.lvl-1 i, .cov.lvl-2 i, .cov.lvl-3 i, .cov.lvl-4 i { background: var(--lvl); }
.cov--full { display: block; width: 100%; height: 8px; margin: 8px 0 0; }

/* five-step scale: the active step is coloured and labelled */
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; margin: 16px 0 4px; max-width: 560px; }
.scale span { padding-top: 8px; border-top: 6px solid var(--cloud); font-size: 12px; line-height: 1.3; color: var(--app-muted); }
.scale span.on { border-top-color: var(--lvl); color: var(--charcoal); font-weight: 700; }

.risk-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 2px 8px; vertical-align: middle;
  font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; border: 1px solid var(--line);
}
.risk-pill::before { content: ""; width: 8px; height: 8px; background: var(--lvl); }

.factor { padding: 18px 0; border-top: 1px solid var(--line); }
.block > h3 + .factor, .block-title + .factor, .factor:first-child { border-top: 0; padding-top: 4px; }
.factor-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.factor-head h4 { font-size: var(--fs-md); text-transform: capitalize; }
.factor-head .w { font-size: var(--fs-sm); color: var(--app-muted); font-variant-numeric: tabular-nums; }
.factor-head .w b { color: var(--charcoal); font-size: var(--fs-lg); }
.factor p { margin-top: 6px; font-size: var(--fs-sm); color: var(--app-muted); }

/* rating page: risk at a glance */
.glance {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-bottom: var(--app-gap);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.glance a {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 44px; padding: 14px 14px 16px;
  background: var(--white); color: var(--charcoal); text-decoration: none;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.glance a:hover { background: var(--cloud); }
.glance a:focus-visible { outline-offset: -4px; }
.glance .g-l { font-size: 13px; font-weight: 600; line-height: 1.25; min-height: 2.5em; }
.glance .g-bar { height: 6px; background: var(--lvl); }
.glance .lvl-na .g-bar { background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.glance .g-v { font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: var(--track); font-variant-numeric: tabular-nums; }
.glance .g-v small { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--app-muted); }
@media (max-width: 1180px) { .glance { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.levers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--app-gap); }
.levers > div { border-left: 4px solid var(--lvl); padding: 2px 0 2px 14px; min-width: 0; }
.levers span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
@media (max-width: 760px) { .levers { grid-template-columns: minmax(0, 1fr); } }
.up { color: var(--ok); }
.down { color: var(--danger); }

.prov { display: flex; gap: 16px; align-items: flex-start; }
.prov > div { min-width: 0; }
.prov h3 { font-size: var(--fs-lg); }
.rung { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; font-weight: 700; background: var(--charcoal); color: var(--lime); }
.rung.approx { background: var(--stone); color: var(--charcoal); }
.rung.none { background: var(--white); color: var(--app-muted); border: 1px dashed var(--line-strong); }
.link-list a { font-weight: 600; color: var(--charcoal); }

/* risk cards */
.rcard { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--lvl); padding: clamp(20px, 2.2vw, 28px); min-width: 0; }
.rcard.muted { background: var(--cloud); }
.rc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.rc-head > div:first-child { min-width: 0; }
.rc-head h3 { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.2; }
.rc-q { margin-top: 4px; font-size: var(--fs-sm); color: var(--app-muted); }
.rc-val { flex: none; text-align: right; line-height: 1.1; }
.rc-val b { font-size: 40px; font-weight: 600; letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.rc-val small { display: block; font-size: 12px; color: var(--app-muted); }
.rcard .scale { margin: 16px 0 0; }
.rc-sec { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.rc-sec h4 { margin-bottom: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.rc-sec ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rc-sec li { position: relative; padding-left: 16px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.rc-sec li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--charcoal); }
.rc-sec.src a { color: var(--charcoal); font-weight: 600; }
.conf {
  display: inline-block; margin-right: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; background: var(--stone); color: var(--charcoal);
}
.conf-high { background: var(--tint-ok); color: var(--on-tint-ok); }
.conf-medium { background: var(--tint-warn); color: var(--on-tint-warn); }
.conf-low { background: var(--tint-bad); color: var(--on-tint-bad); }
.swings { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.swing { padding: 4px 10px; font-size: 13px; border: 1px solid var(--line); background: var(--white); }
.swing b { font-variant-numeric: tabular-nums; }

/* ratings list: one square per factor */
.rp { display: inline-flex; gap: 3px; vertical-align: middle; }
.rp i { display: block; width: 14px; height: 14px; background: var(--lvl); }
.rp i.nd { background: transparent; border: 1.5px dashed var(--line-strong); }
.rp i.na { background: transparent; border: 1.5px solid transparent; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 16px; font-size: 13px; color: var(--app-muted); }
.rp-legend > span:first-child { flex-basis: 100%; }
.rp-legend .rp i { width: 12px; height: 12px; }
.ratings-table td:last-child { white-space: nowrap; }
.kpis-note { margin-top: 16px; }

/* page links under a long list */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 0 0 24px; }
.pager-pages { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pager a, .pager-pages > [aria-current] {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--charcoal);
  border: 1px solid var(--line-strong); background: var(--white);
}
.pager a:hover { border-color: var(--charcoal); }
.pager-pages > [aria-current] { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.pager-pages > span[aria-hidden] { min-width: 16px; text-align: center; color: var(--app-muted); }
@media (max-width: 560px) { .pager-pages { order: -1; flex-basis: 100%; } }
/* tablets: seven columns don't fit, give the project name the room */
@media (min-width: 761px) and (max-width: 1100px) {
  .ratings-table .cov { display: none; }
  .ratings-table td:last-child { white-space: normal; }
  .ratings-table th:nth-child(5), .ratings-table td:nth-child(5) { display: none; }   /* registry */
}
@media (max-width: 760px) {
  .ratings-table thead { display: none; }
  .ratings-table table, .ratings-table tbody, .ratings-table td { display: block; width: 100%; }
  .ratings-table tr { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ratings-table td { border: 0 !important; padding: 0; }
  .ratings-table td.num { grid-row: span 3; text-align: left; }
  .ratings-table td.hide-sm { display: none; }
  .ratings-table td.meta-sm { font-size: 13px; color: var(--app-muted); }
  .ratings-table td:last-child { white-space: normal; }
}

/* ------------------------------------------------- satellite verdicts */
.verdict {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; white-space: nowrap;
  font-size: 13px; font-weight: 700; text-transform: capitalize; border: 1px solid currentColor; background: var(--white);
}
.verdict-supports { color: var(--ok); }
.verdict-contradicts { color: var(--danger); }
.verdict-neutral, .verdict-inconclusive, .verdict-pending { color: var(--app-muted); }
.verdict-inconclusive, .verdict-pending { border-style: dashed; }
.verdict.lg { font-size: var(--fs-md); padding: 8px 16px; }
.site-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.verdict-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: -8px 0 16px; font-size: 13px; color: var(--app-muted); }
.verdict-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--white); outline: 1px solid var(--line-strong); }

/* maps (Leaflet) */
.site-map { position: relative; z-index: 0; height: clamp(320px, 42vw, 520px); margin-bottom: var(--app-gap); border: 1px solid var(--line); background: var(--cloud); }
.site-map--sm { height: 320px; margin: 16px 0; }
.leaflet-container { font-family: var(--font); letter-spacing: 0; }
.leaflet-container a { color: var(--charcoal); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { border-radius: 0; box-shadow: 0 2px 12px rgba(62, 61, 59, .2); }
.leaflet-popup-content { font-size: var(--fs-sm); line-height: 1.5; }
.leaflet-bar, .leaflet-bar a, .leaflet-bar a:first-child, .leaflet-bar a:last-child { border-radius: 0; }
.leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin-top: 12px; }
.facts span { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.facts b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* satellite time series */
.rs-chart { position: relative; margin: 8px 0; }
.rs-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.rs-chart .tip {
  position: absolute; display: none; pointer-events: none; transform: translate(-50%, -110%);
  width: max-content; max-width: 100%; text-align: center;
  padding: 6px 10px; font-size: 13px; line-height: 1.4; background: var(--charcoal); color: var(--white);
}
.rs-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 4px; font-size: 13px; color: var(--app-muted); }
.rs-legend i { display: inline-block; width: 20px; height: 0; margin-right: 8px; vertical-align: middle; border-top: 2px solid; }

/* -------------------------------------------- order, cart and admin */
.status-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.status-step { padding: 6px 12px; font-size: 13px; font-weight: 600; text-transform: capitalize; background: var(--cloud); color: var(--app-muted); }
.status-step.on { background: var(--charcoal); color: var(--white); }
#cart-table input { width: 88px; min-height: 44px; }
#cart-table .rm { width: 44px; height: 44px; font-size: 22px; line-height: 1; color: var(--danger); background: none; border: 1px solid var(--line); cursor: pointer; }
#cart-table .rm:hover { border-color: var(--danger); }
.cart-badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px;
  font-size: 12px; font-weight: 700; background: var(--lime); color: var(--charcoal);
}
.admin-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.admin-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.admin-form .input, .admin-form .select { width: auto; min-width: 170px; flex: 1 1 170px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .select { width: auto; min-width: 130px; }

/* data note above the footer: see site/site.css (shared with the landing) */

/* ---------------------------------------------- marketing pages (about, legal, methodology) */
.prose-page { max-width: 760px; }
.prose-page h2 { margin: 56px 0 16px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: var(--track-tight); }
.prose-page > h2:first-child, .prose-page > section:first-child > h2:first-child { margin-top: 0; }
.prose-page h3 { margin: 28px 0 8px; font-size: var(--fs-lg); }
.prose-page p, .prose-page li { font-size: var(--fs-md); line-height: 1.7; }
.prose-page p + p { margin-top: 12px; }
.prose-page a { color: var(--charcoal); font-weight: 600; }
.prose-page em { color: var(--app-muted); }
.prose-page section { padding-top: 8px; }
.prose-page section + section { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.prose-page section > h2 { margin-top: 0; }
.check-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; background: var(--lime);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='%233e3d3b' stroke-width='1.8'/%3E%3C/svg%3E");
}
.callout { margin: 32px 0; padding: clamp(20px, 2.5vw, 32px); background: var(--sage); }
.callout h3 { margin: 0 0 8px; font-size: clamp(20px, 1.7vw, 24px); }
.callout p { color: var(--charcoal); }
.pillar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 24px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pillar-grid > div { padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.pillar-grid h3 { margin: 0 0 8px; }
.pillar-grid p { font-size: var(--fs-sm); color: var(--app-muted); }
@media (max-width: 640px) { .pillar-grid { grid-template-columns: minmax(0, 1fr); } }
.cta-band { background: var(--sage); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: clamp(48px, 6vw, 88px); }
.cta-band h2 { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.1; letter-spacing: var(--track-tight); max-width: 20ch; }
.cta-band p { margin-top: 12px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-strong); background: var(--white); font-weight: 600; text-decoration: none; color: var(--charcoal); }
.toc a:hover { border-color: var(--charcoal); }
.guarantee-quote { margin: 16px 0; padding: 20px 24px; border-left: 4px solid var(--lime); background: var(--cloud); font-size: var(--fs-lg); font-weight: 600; line-height: 1.5; }

/* the platform nav has longer labels than the landing's: keep it inside the gutter on small laptops */
@media (min-width: 1024px) and (max-width: 1279px) {
  .page-app .site-header__inner { gap: 16px; }
  .page-app .site-nav { gap: 14px; }
  .page-app .site-nav a { font-size: 15px; }
  .page-app .site-header__actions .btn { padding-inline: 16px; font-size: var(--fs-md); }
}

/* ------------------------------------------------------------- phones */
@media (max-width: 760px) {
  .phero .sub { font-size: var(--fs-md); }
  .block { padding: 20px 16px; }
  .reject-table.block { padding-inline: 16px; }
  .rcard { padding: 20px 16px; }
  .rc-val small { max-width: 7.5em; margin-left: auto; }   /* give the factor question the room */
  .ratings-table, .site-table { font-size: var(--fs-md); }
}
@media print {
  .site-header, .site-footer, .data-note, .filters { display: none; }
  .phero { background: none; }
}

/* Leaflet zoom buttons: 44px tap targets on touch screens (default 30px) */
.leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
