/* Report pages: competitive analysis (analysis.html) and market analysis (market.html); colors come from style.css. */
body.report-page { height: auto; min-height: 100%; background: var(--bg); }
.r-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.r-brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 15px; }
/* Left: Back, then the site title. Right: the market / competitive switch and Subscribe. */
.r-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.r-back { display: inline-flex; align-items: center; gap: 3px; padding: 6px 11px 6px 7px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; }
.r-back:hover { background: var(--accent-soft); }
.r-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.r-switch { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.r-switch a { padding: 5px 12px; border-radius: 6px; font-size: 13px; color: var(--text); text-decoration: none; white-space: nowrap; }
.r-switch a[href]:not([aria-current]):hover { background: var(--accent-soft); }
.r-switch a[aria-current="page"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 650; }
.r-switch a[aria-disabled="true"] { color: var(--muted); opacity: .6; cursor: not-allowed; }
.r-sub { font: inherit; font-size: 14px; font-weight: 700; padding: 8px 16px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); white-space: nowrap; }
.r-sub:hover, .r-sub[aria-expanded="true"] { filter: brightness(1.1); }
.r-sub:focus-visible, .r-back:focus-visible, .r-switch a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The sign-up form, below the Subscribe button */
.r-subpanel { position: absolute; right: 24px; top: calc(100% + 6px); width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 90px);
  overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 28px 8px 8px; }
.r-subpanel[hidden] { display: none; }
.r-subclose { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1;
  padding: 2px 8px; cursor: pointer; border-radius: 6px; }
.r-subclose:hover { color: var(--text); background: var(--accent-soft); }
.r-subpanel .ml-embedded { min-height: 60px; }
.report { max-width: 1080px; margin: 0 auto; padding: 20px 24px 60px; }
.r-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; }
.r-loading .spinner { width: 22px; height: 22px; }
.r-empty { padding: 40px 0; }
.r-stale { background: #fbeee0; border: 1px solid #e7b98a; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.r-head { padding: 8px 0 4px; }
.r-kicker { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; font-weight: 700; color: var(--accent); margin: 0 0 2px; }
.r-head h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.015em; }
.r-dates { color: var(--muted); font-size: 12.5px; margin: 0; }
.r-notes { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; padding-left: 18px; }
.r-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 16px; margin-top: 16px; }
.r-sec h2 { font-size: 18px; margin: 0 0 6px; letter-spacing: -.01em; }
.r-sec h3 { font-size: 17px; margin: 0 0 4px; }
.r-sec h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 6px; }
.r-lead { font-size: 15px; margin: 0 0 12px; max-width: 75ch; }
.r-foot { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.muted { color: var(--muted); }
.r-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.r-tile { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.r-tile.hi { background: var(--accent-soft); outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.r-n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.r-l { font-size: 13px; font-weight: 600; }
.r-s { font-size: 12px; color: var(--muted); }
.cmp { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 4px; font-variant-numeric: tabular-nums; }
.r-ring { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.r-ring > div { border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; display: flex; flex-direction: column; }
.r-ring .r-n { font-size: 21px; }
.r-ring .r-l { font-weight: 400; color: var(--muted); font-size: 12px; }
.r-mapwrap { margin: 6px 0 12px; }
.r-map { height: 380px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.r-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.r-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.r-legend i.dot { border-radius: 50%; width: 9px; height: 9px; background: #1d2125; margin-left: 4px; }
.r-legend i.dot.hollow { background: #fff; border: 1px solid #1d2125; }
.r-tablewrap { overflow-x: auto; }
.r-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.r-table th, .r-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; white-space: nowrap; }
.r-table th:first-child, .r-table td:first-child { text-align: left; }
.r-table tbody th { font-weight: 600; white-space: normal; min-width: 180px; }
.r-table thead th { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; white-space: normal; vertical-align: bottom; }
.r-table thead th[data-k] { cursor: pointer; }
.r-table thead th[aria-sort="ascending"]::after { content: " ▲"; }
.r-table thead th[aria-sort="descending"]::after { content: " ▼"; }
.r-table tr.flag th, .r-table tr.flag td { background: #fbefec; }
.r-table tr.chk th, .r-table tr.chk td { background: #fbeee0; }
.r-table tr.inactive th, .r-table tr.inactive td { color: var(--muted); }
.r-table .sub { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.r-table .tag, .tag { display: inline-block; font-weight: 400; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--muted); margin: 2px 4px 0 0; }
.r-small { font-size: 12.5px; }
.r-small tbody th { min-width: 0; }
.r-two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; margin-bottom: 12px; }
.r-fig { margin: 0; }
.r-fig figcaption { color: var(--muted); font-size: 12px; margin-top: 4px; }
.r-bars, .r-cols { width: 100%; height: auto; display: block; overflow: visible; }
.r-bars .bar, .r-cols .bar { fill: var(--accent); }
.r-bars .bar.chk { fill: #d9902c; }
.r-bars .bl-link { cursor: pointer; }
.r-bars .bl-link:hover .bl, .r-bars .bl-link:focus .bl { fill: var(--accent); text-decoration: underline; }
.r-bars .bl-link:focus { outline: none; }
.r-bars g:hover .bar { filter: brightness(1.15); }
.r-bars .bs { fill: var(--muted); font-weight: 600; }
.r-bars .bl, .r-cols .bl { fill: var(--text); font-size: 11.5px; }
.r-bars .bv, .r-cols .bv { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.r-cols .axis { stroke: var(--line); }
.r-facts { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-size: 12.5px; margin: 12px 0 0; }
.r-facts dt { color: var(--muted); }
.r-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.r-facts-wide { grid-template-columns: auto 1fr; margin: 0; }
.r-facts-wide dd { text-align: left; }
.r-tabletools { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; }
.r-tabletools input { max-width: 320px; }
.r-more, .r-check { font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.r-more { margin-top: 10px; }
.r-check:hover, .r-more:hover { background: var(--accent-soft); }
.r-mix td b { font-weight: 650; }
.dvh small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.dv { position: relative; display: block; width: 160px; height: 12px; margin-left: auto; }
.dv-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .6; }
.dv-bar { position: absolute; top: 2px; height: 8px; border-radius: 2px; }
.dv-bar.pos { background: #2a8f84; }
.dv-bar.neg { background: #c0412f; opacity: .75; }
.r-check-card { border: 1px solid #e7b98a; background: color-mix(in srgb, #fbeee0 45%, var(--surface)); border-radius: 10px; padding: 14px 16px; }
.r-check-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.r-claim { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.r-claim input { width: 180px; height: 36px; padding: 0 10px; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.r-verdict { font-size: 15px; font-weight: 600; margin: 4px 0 12px; }
.r-why { margin: 0; padding-left: 18px; font-size: 13px; }
.r-why li { margin: 3px 0; }
.r-notes-sec ul { padding-left: 18px; font-size: 13px; margin: 6px 0; }
.r-notes-sec li { margin: 4px 0; }
.r-notes-sec a { color: var(--accent); }
/* Competitive analysis: firm list and the firm's map pop-up */
.f-name { cursor: default; border-bottom: 1px dotted color-mix(in srgb, var(--muted) 70%, transparent); }
.f-name:hover, .f-name:focus { color: var(--accent); border-bottom-color: var(--accent); outline: none; }
#comp-table tbody tr { scroll-margin-top: 80px; }
#comp-table tr.flash th, #comp-table tr.flash td { animation: flash 2.2s ease-out; }
@keyframes flash { 0%, 35% { background: color-mix(in srgb, var(--accent) 22%, transparent); } 100% { background: transparent; } }
.f-pop { position: fixed; z-index: 20; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .12s; }
.f-pop.on { opacity: 1; }
.f-pop[hidden] { display: block; visibility: hidden; }
.f-pop-text { padding: 9px 12px 8px; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; line-height: 1.35; }
.f-pop-text b { font-size: 13.5px; }
.f-pop-note { color: #a8432f; font-size: 11.5px; margin-top: 2px; }
.f-pop-map { height: 170px; border-top: 1px solid var(--line); }
.f-pop .maplibregl-ctrl-attrib { font-size: 9px; }
@media (hover: none) { .f-pop { pointer-events: auto; } .f-name { cursor: pointer; } }

/* Market analysis (market.html) */
.m-crumbs { font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.m-crumbs a { color: var(--accent); text-decoration: none; }
.m-crumbs a:hover { text-decoration: underline; }
.m-tiles { grid-template-columns: repeat(4, 1fr); }
.r-n.up { color: #2a7a52; }
.r-n.down { color: #b2452f; }
.m-sub { font-size: 15px; margin: 20px 0 8px; }
.m-strips { display: flex; flex-direction: column; }
.m-strip { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(180px, 1.6fr) minmax(150px, .9fr); gap: 14px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.m-strip:last-child { border-bottom: 0; }
.m-sl { display: flex; flex-direction: column; }
.m-lab { font-size: 12.5px; color: var(--muted); }
.m-val { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.m-sv { min-width: 0; }
.m-stripsvg { width: 100%; height: auto; max-height: 48px; display: block; overflow: visible; }
.m-stripsvg .ax { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.m-stripsvg .pk { stroke: var(--muted); stroke-opacity: .5; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.m-stripsvg .pk:hover { stroke: var(--text); stroke-opacity: 1; stroke-width: 2.5; }
.m-stripsvg .rf line { stroke: var(--text); stroke-width: 1.6; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.m-stripsvg .rf text { font-size: 9px; fill: var(--text); font-weight: 600; }
.m-stripsvg .mk { fill: var(--accent); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.m-rank { font-size: 12px; color: var(--muted); line-height: 1.35; }
.m-peerwrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.m-peerwrap thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.m-peers tbody th { min-width: 150px; }
.m-peers a { color: var(--accent); text-decoration: none; }
.m-peers a:hover { text-decoration: underline; }
.m-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 22px; margin: 8px 0 4px; }
.m-chart h4 { margin: 0 0 2px; }
.r-line { width: 100%; height: auto; display: block; overflow: visible; }
.r-line .gl { stroke: var(--line); stroke-width: 1; }
.r-line .gl.base { stroke: var(--muted); stroke-opacity: .5; }
.r-line .tk { fill: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.r-line .ln path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.r-line .ln .sl { font-size: 11px; font-weight: 600; }
.r-line .ln.main path { stroke: var(--accent); stroke-width: 2.8; }
.r-line .ln.main circle { fill: var(--accent); }
.r-line .ln.main .sl { fill: var(--accent); }
.r-line .ln.st path { stroke: #d9902c; stroke-dasharray: 5 3; }
.r-line .ln.st circle { fill: #d9902c; }
.r-line .ln.st .sl { fill: #b8761d; }
.r-line .ln.us path { stroke: var(--muted); stroke-dasharray: 1.5 3; }
.r-line .ln.us circle { fill: var(--muted); }
.r-line .ln.us .sl { fill: var(--muted); }
.m-numbers { margin: 12px 0 0; }
.m-numbers summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; }
.m-numbers .r-tablewrap { margin-top: 8px; }
.m-acs tr.grp th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding-top: 12px; font-weight: 600; }
.m-acs tbody th { font-weight: 400; }
.m-acs td[title] { cursor: help; }
.m-acs sup { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .r-n.up { color: #6fc497; }
  :root:not([data-theme="light"]) .r-n.down { color: #ec8a72; }
}
@media (max-width: 820px) {
  .r-tiles, .m-tiles { grid-template-columns: 1fr 1fr; }
  .m-strip { grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .m-strip .m-sv { grid-column: 1 / -1; grid-row: 2; }
  .r-ring { grid-template-columns: 1fr 1fr; }
  .r-two { grid-template-columns: 1fr; }
  .report { padding: 12px 12px 40px; }
  .r-top { padding: 8px 12px; flex-wrap: wrap; position: relative; row-gap: 8px; }
  .r-subpanel { right: 12px; }
  .r-head h1 { font-size: 21px; }
  .r-sec { padding: 14px 14px 12px; }
  .r-map { height: 300px; }
}
@media (max-width: 560px) {
  .r-wide { display: none; }
  .r-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .r-switch a { padding: 5px 10px; }
  .r-sub { padding: 7px 12px; font-size: 13px; }
}
@media print {
  .r-top, .r-tabletools, .r-more, .r-check, .maplibregl-ctrl, .f-pop { display: none !important; }
  .m-peerwrap { max-height: none; overflow: visible; border: 0; }
  body.report-page { background: #fff; }
  .report { max-width: none; padding: 0; }
  .r-sec { break-inside: avoid-page; border: 0; padding: 8px 0; }
  #firms, #notes { break-inside: auto; }
  .r-map { height: 320px; }
  .r-claim input { border: 0; }
}
