/* The colours, fonts and the wordmark come from the shared theme, static/anyavs/theme.css. */
* { box-sizing: border-box; }
/* The page is as wide as the whole window, so the centred layout keeps its place whether a page is long enough to scroll
   or not: a scrollbar covers the right edge of the full-width bars instead of narrowing the page. Neither an always-shown
   scrollbar (overflow-y: scroll) nor a reserved gutter (scrollbar-gutter) is used: both leave a blank strip on short pages. */
html { scroll-behavior: smooth; width: 100vw; overflow-x: hidden; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.55 var(--body-font);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; width: 100%; height: auto; object-fit: cover; background: var(--image-surface); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
/* --topbar-offset follows the sticky topbar's real height (it wraps on narrow screens). */
[id] { scroll-margin-top: calc(var(--topbar-offset) + 24px); }
.wrap { max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 20px;
    border: 0;
    background: var(--primary);
    color: white;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.button:hover { background: #2e4719; }
.button:focus-visible { outline-color: var(--accent); }
.lead, .results { padding-block: 28px 44px; }
.lead {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, .93fr);
    align-items: start;
    gap: clamp(18px, 2.5vw, 32px);
}
.report > a { display: block; }
.kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
    align-items: center;
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}
.kicker span { opacity: .6; }
.hero h1, .results h1 {
    margin: 0 0 14px;
    font: 900 clamp(30px, 3.4vw, 44px)/1.18 var(--display-font);
}
.hero .deck { margin: 0 0 13px; max-width: 34em; font-size: 16.5px; line-height: 1.65; }
.report-meta { margin: 0; color: var(--muted); font-size: 12.5px; }
.report-meta span { padding-inline: 5px; }
.hero .report-meta { margin-bottom: 16px; }
.hero img { aspect-ratio: 623 / 338; }
.report a:hover :is(h1, h2, h3), .report:target :is(h1, h2, h3) { color: var(--accent); }
.story-stack { display: grid; gap: 24px; }
.report img { margin-bottom: 12px; }
.report h2, .report h3 { margin: 0 0 5px; font: 700 18px/1.4 var(--display-font); }
.report-summary { margin: 5px 0; color: var(--muted); font-size: 14px; }
.story-stack img, .results-grid img { aspect-ratio: 305 / 172; }
.expansion-grid img { aspect-ratio: 2; }

.data-rail h2 { margin: 0 0 18px; font: 900 24px/1.25 var(--display-font); }
.company { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.period { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.metrics { margin: 0 0 18px; }
.metrics > div {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 7px;
    padding-block: 14px 10px;
}
.metrics dt { color: var(--muted); font-size: 13.5px; }
.metrics dd { margin: 0; color: var(--accent); font: 800 40px/1 var(--display-font); }
.text-link {
    display: inline-flex;
    gap: 8px;
    align-items: baseline;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    padding-block: 8px;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin: 6px 0 20px;
}
.section-heading h2 { margin: 0; font: 900 28px/1.25 var(--display-font); }
.results h1 { margin: 0; overflow-wrap: anywhere; }
.expansion, .latest { padding-bottom: 32px; }
.expansion-grid, .results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.2vw, 28px);
}
.expansion-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.05fr); }
.briefing { padding: clamp(24px, 3.4vw, 40px); background: var(--briefing-surface); }
.briefing h3 { margin: 0 0 12px; font: 900 27px/1.25 var(--display-font); }
.briefing p { margin: 0 0 24px; max-width: 33em; color: #55534b; font-size: 15.5px; }
.briefing .button { background: var(--accent); }
.briefing .button:hover { background: #2a401d; }
.image-note { margin: 0; padding-bottom: 26px; color: var(--muted); font-size: 12px; }
.empty-results { color: var(--muted); }

/* Brand directory and market index (views/industry-directory.ejs). */
.directory { padding-block: 28px 12px; }
.directory-header { margin-bottom: 24px; }
.directory-header h1 { margin: 0; font: 900 clamp(30px, 4vw, 44px)/1.15 var(--display-font); overflow-wrap: anywhere; }
.directory-intro { margin: 10px 0 0; max-width: 40em; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 10px; padding: 0; list-style: none; font-size: 13.5px; }
.breadcrumbs li + li::before { content: "/"; padding-inline: 8px; color: var(--muted); }
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover, .entry-list a:hover .entry-name, .directory-group h2 a:hover, .brand-facts a:hover { text-decoration: underline; text-underline-offset: 4px; }
.letter-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.letter-nav a, .term-chips a {
    min-width: 36px;
    padding: 6px 10px;
    border: 1px solid #d8d6c8;
    text-align: center;
    font-weight: 700;
}
.letter-nav a:hover, .term-chips a:hover { border-color: var(--accent); color: var(--accent); }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.term-chips a { font-weight: 500; }
.directory-group { padding-bottom: 24px; }
.directory-group h2 { margin: 0 0 12px; font: 900 22px/1.3 var(--display-font); }
.directory-group h2 .entry-meta { font: 500 13px/1 "Noto Sans SC", system-ui, sans-serif; }
.entry-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 0 clamp(16px, 2.2vw, 28px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.entry-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid #e3e0d2; }
.entry-name { font-weight: 700; overflow-wrap: anywhere; }
.entry-meta { color: var(--muted); font-size: 13px; }
.brand-facts { display: grid; gap: 0; max-width: 720px; margin: 0 0 32px; }
.brand-facts > div { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid #e3e0d2; }
.brand-facts dt { color: var(--muted); }
.brand-facts dd { margin: 0; overflow-wrap: anywhere; }
.brand-facts a { color: var(--accent); font-weight: 700; }
.fact-separator { padding-inline: 6px; color: var(--muted); }

.site-footer { background: var(--accent); color: #f2efe3; }
.footer-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px clamp(20px, 4vw, 48px);
    padding-block: 26px;
    font-size: 13px;
}
.footer-inner .wordmark { font-size: 24px; }
.footer-inner nav { display: flex; gap: 4px 8px; flex: 1; flex-wrap: wrap; }
.footer-inner nav a { padding: 8px 10px; }
.footer-inner a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1000px) {
    .lead { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
    .hero { grid-column: 1 / -1; }
    .expansion-grid, .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .briefing { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .lead { padding-top: 22px; }
    .lead, .results-grid, .expansion-grid { grid-template-columns: minmax(0, 1fr); }
    .metrics dd { font-size: 34px; }
    .footer-inner nav { flex-basis: 100%; }
    .footer-inner nav a { padding-inline: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
