/* Student Housing Suppliers. Colors come only from brand/tokens.css variables (and theme overrides). */
:root {
  --display-xl: clamp(36px, 5.4vw, 60px);
  --display-lg: clamp(30px, 4.2vw, 44px);
  --display-md: clamp(24px, 3.2vw, 34px);
  --display-sm: 19px;
  --body: 16px;
  --body-lg: 18px;
  --body-sm: 14.5px;
  --label: 15px;
  --eyebrow: 12px;
}
[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }

* { box-sizing: border-box; }
/* Component display rules (.btn, .slot...) must never override the hidden attribute. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font-body); font-size: var(--body); line-height: 1.5;
  padding: 0 max(var(--space-4), env(safe-area-inset-right, 0px)) var(--space-7) max(var(--space-4), env(safe-area-inset-left, 0px));
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
.display-xl { font-size: var(--display-xl); }
.display-lg { font-size: var(--display-lg); }
.display-md { font-size: var(--display-md); }
.display-sm { font-size: var(--display-sm); line-height: 1.2; }
.lead { font-size: var(--body-lg); color: var(--ink-muted); max-width: 62ch; }
.lead.ink { color: var(--ink); }
.small { font-size: 13px; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.eyebrow { font-size: var(--eyebrow); font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-muted); }
.link { color: var(--primary); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top-gap { margin-top: var(--space-4); }
.grow { flex: 1; min-width: 0; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.skip { position: absolute; left: var(--space-4); top: -60px; background: var(--surface); color: var(--ink); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); z-index: 30; }
.skip:focus { top: var(--space-2); }
main:focus { outline: none; }

.page { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-8); }
main { display: flex; flex-direction: column; gap: var(--space-8); }

/* Buttons. Accent is for the one main action on a view. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 11px 18px; border-radius: var(--radius-md); border: 1.5px solid var(--primary);
  background: var(--primary); color: var(--on-primary); font: 600 var(--label)/1.2 var(--font-body);
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--primary); filter: none; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.inverse { background: var(--on-primary); color: var(--primary); border-color: var(--on-primary); }
.btn.small { padding: 7px 14px; font-size: 14px; }

/* Badges */
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill); width: fit-content; border: 1px solid transparent; }
.badge.featured { background: var(--accent-wash); color: var(--accent-ink); }
.badge.sponsor, .badge.verified { background: var(--primary-wash); color: var(--primary); }
.badge.verified::before { content: "\2713"; margin-right: 4px; font-weight: 700; }
.badge.basic { border-color: var(--line-strong); color: var(--ink-muted); }
.badges { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }

/* Supplier logo or monogram */
.mono, .logo { flex: none; width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; overflow: hidden; }
.mono { background: var(--primary-wash); color: var(--primary); font: 700 16px/1 var(--font-display); }
/* Supplier logos keep their own proportions: square minimum, up to ~2.5x wide for wordmarks. */
.logo { width: auto; min-width: 44px; max-width: 110px; background: var(--surface); border: 1px solid var(--line); padding: 5px 8px; }
.logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.logo.on-dark { background: var(--primary); border-color: var(--primary); }
/* Company logos are drawn for light backgrounds, so in dark mode they sit on a light chip (ink is light there). */
[data-theme="dark"] .logo { background: var(--ink); border-color: var(--ink); }
[data-theme="dark"] .logo.on-dark { background: var(--page); border-color: var(--line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo { background: var(--ink); border-color: var(--ink); }
  :root:not([data-theme="light"]) .logo.on-dark { background: var(--page); border-color: var(--line); }
}
.mono.lg, .logo.lg { height: 72px; font-size: 26px; border-radius: var(--radius-lg); }
.mono.lg { width: 72px; }
.logo.lg { min-width: 72px; max-width: 170px; padding: 10px 12px; }
.mono.sm, .logo.sm { height: 36px; font-size: 13px; }
.mono.sm { width: 36px; }
.logo.sm { min-width: 36px; max-width: 90px; padding: 4px 6px; }
.mono.xs, .logo.xs { height: 24px; font-size: 10px; border-radius: var(--radius-sm); }
.mono.xs { width: 24px; }
.logo.xs { min-width: 24px; max-width: 64px; padding: 2px 4px; }

/* Demo bar and header */
.demobar { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; justify-content: space-between; margin-top: var(--space-3); padding: 10px 14px; background: var(--ink); color: var(--page); border-radius: var(--radius-md); font-size: 13px; }
.demobar label { display: inline-flex; gap: var(--space-2); align-items: center; font-weight: 600; cursor: pointer; }
.demobar input { width: 18px; height: 18px; accent-color: var(--primary); }
header.top { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: center; justify-content: space-between; padding-top: var(--space-4); margin-bottom: calc(var(--space-8) * -0.5); }
.brandrow { display: flex; align-items: center; gap: var(--space-4); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 140px; }
.brand img { height: 32px; width: auto; }
/* The lockup is part of our logo, so it keeps the brand typeface in every partner skin. */
.lockup { display: flex; flex-direction: column; font: 700 var(--display-sm)/1.05 "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif; letter-spacing: -0.01em; }
.lockup .l2 { color: var(--primary); }
.m-dark { display: none; }
[data-theme="dark"] .m-light { display: none; } [data-theme="dark"] .m-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .m-light { display: none; } :root:not([data-theme="light"]) .m-dark { display: block; } }
.cobrand { display: flex; align-items: center; gap: var(--space-2); font-size: 12px; color: var(--ink-muted); padding-left: var(--space-4); border-left: 1px solid var(--line); }
.cobrand img { height: 40px; width: auto; max-width: 170px; object-fit: contain; }
nav.main { display: flex; flex-wrap: wrap; gap: var(--space-2) 22px; align-items: center; font-size: var(--label); font-weight: 500; }
nav.main a:not(.btn) { text-decoration: none; color: var(--ink-muted); }
nav.main a:not(.btn):hover, nav.main a[aria-current] { color: var(--ink); }
.navtoggle { display: none; margin-left: auto; font: 600 14px var(--font-body); padding: 8px 12px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-6); align-items: end; }
.hero h1 { margin-top: 10px; }
.hero .lead { margin-top: var(--space-4); }
.search { margin-top: var(--space-5); display: flex; gap: var(--space-2); }
.search input, .fld input, .fld select, .fld textarea {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; width: 100%;
}
.search input { padding: 14px 16px; }
#searchHint { margin-top: var(--space-2); }
.results { margin-top: var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.results ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-direction: column; }
.results li a { display: flex; justify-content: space-between; gap: var(--space-3); padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; }
.results li:first-child a { border-top: 0; }
.results li a span:last-child { color: var(--ink-muted); font-size: 13px; text-align: right; }
.results li a.all { color: var(--primary); font-weight: 600; }
.searchform, .searchform.panel { display: flex; flex-direction: row; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
.searchform .fld { flex-grow: 1; }
.searchform .fld { flex: 1 1 200px; }
.searchform .grow2 { flex: 2 1 280px; }
.searchform p { flex-basis: 100%; margin-top: calc(var(--space-2) * -1); }
.listing li.grouphead { display: block; padding: var(--space-4) 0 var(--space-1); border-top: 0; font: 700 var(--display-sm)/1.2 var(--font-display); }
.listing li.grouphead:first-child { padding-top: 0; }
.listing li.grouphead + li { border-top: 0; }
.panel h2 .count { font: 500 14px var(--font-body); }
.guide h2 + p, .guide h2 + ul { margin-top: calc(var(--space-2) * -1); }
.guide p { color: var(--ink); max-width: 68ch; }
.checklist { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); max-width: 70ch; }
.checklist li { position: relative; padding-left: 26px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.invite { margin-top: var(--space-2); }
nav.main a.li { color: var(--primary); font-weight: 600; }
.prose { gap: var(--space-3); }
.prose h2 { font-size: var(--display-sm); margin-top: var(--space-3); }
.prose p, .prose li { max-width: 68ch; }
.byline { margin-top: var(--space-2); }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.choices label, label.check { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; cursor: pointer; }
.choices input, label.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.lbl { font-weight: 600; font-size: 14px; }
.regions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.stategrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.stategrid label { display: flex; gap: 6px; align-items: center; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; }
.stategrid label:has(input:checked) { background: var(--primary-wash); border-color: var(--primary); }
#descCount.over { color: var(--danger); font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
fieldset.panel > legend { float: left; width: 100%; margin-bottom: var(--space-2); }
fieldset.panel > legend + * { clear: both; }
/* Category learning hub */
.hub-head { margin-bottom: 0; }
.hub-head .row { margin-top: var(--space-2); }
.hub-aside { position: sticky; top: var(--space-4); }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: block; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: 15px; }
.toc a:hover { background: var(--primary-wash); color: var(--primary); }
.bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.qlist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; max-width: 70ch; }
.qlist li::marker { color: var(--primary); font-weight: 700; }
.sec-head.tight { margin-bottom: 0; }
#suppliers, #overview, #challenges, #look-for, #pricing, #questions, #guides { scroll-margin-top: var(--space-4); }
@media (max-width: 860px) { .hub-aside { position: static; order: -1; } .hub-aside .toc { display: none; } }
@media print {
  header.top, footer.foot, .hub-aside, #suppliers, .invite, .demobar, .crumb, .hub-head .row, .row.wrap, .skip, #modeBtn { display: none !important; }
  body { background: Canvas; color: CanvasText; padding: 0; }
  .panel { border: 0; padding: 0; }
  .two { display: block; }
}

/* Sponsor page and provenance */
.sponsor-hero .row { margin-top: var(--space-2); }
.cards.sponsors { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards.sponsors .panel { border-top: 4px solid var(--primary); }
.crisis { border-left: 4px solid var(--primary); }
.provenance { border-top: 1px solid var(--line); padding-top: var(--space-3); }

/* Contributor forms */
.expertgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px var(--space-3); max-height: 320px; overflow-y: auto; padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-md); }
.expertgrid label { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 4px 0; }
.expertgrid input { width: 18px; height: 18px; accent-color: var(--primary); }
.expertgrid label:has(input:disabled) { color: var(--ink-muted); }
#discDetail { margin-top: var(--space-2); padding: 12px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; width: 100%; }

/* Articles and topics */
.disclosure { background: var(--primary-wash); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--body-sm); max-width: 75ch; }
.article .prose { font-size: 17px; line-height: 1.65; }
.article .prose > * { max-width: 68ch; }
.article .prose h2 { margin-top: var(--space-4); }
.pcard.topic { border-top: 4px solid var(--primary); }
.art[hidden] { display: none; }
.hub-head .chips { align-items: center; margin-top: var(--space-2); }

/* Knowledge-hub homepage */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.pathcard { position: relative; display: flex; flex-direction: column; gap: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: var(--radius-lg); padding: var(--space-5); text-decoration: none; color: var(--ink); }
a.pathcard:hover { border-color: var(--primary); }
.pathcard p { color: var(--ink-muted); font-size: var(--body-sm); }
.pathcard .btn { width: fit-content; margin-top: auto; }
.catlist { list-style: none; margin: 0 0 var(--space-5); padding: 0; columns: 3 240px; column-gap: var(--space-6); }
.catlist li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--space-3); }
.catlist a { color: var(--primary); font-weight: 600; text-decoration: none; }
.catlist a:hover { text-decoration: underline; }
.supported { border-top: 1px solid var(--line); padding-top: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); max-width: 70ch; }
.sponsorline a { color: var(--primary); font-weight: 600; }
.h4 { font-size: 17px; line-height: 1.2; }
.tile .small { margin-top: -4px; }
.prose ol, .prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.results-area { gap: var(--space-4); margin-top: calc(var(--space-8) * -0.5); }
#searchSummary { font-weight: 600; }
.statepick { flex: 1 1 180px; min-width: 0; padding: 12px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; }
.filterbar { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.filterbar label { font-weight: 600; font-size: 14px; }
.filterbar .statepick { flex: 0 1 240px; padding: 8px 12px; }
.filterbar p { flex-basis: 100%; }
[data-sa][hidden] { display: none; }
.serves { color: var(--ink); font-weight: 600; }
.serves.based { color: var(--ink-muted); font-weight: 400; }
.sh { display: inline-block; background: var(--primary-wash); color: var(--primary); font-weight: 600; font-size: 12px; padding: 1px 8px; border-radius: var(--radius-pill); }
#searchCats { margin: 0; }
#searchCats .muted { font-weight: 400; }
.badge-img { width: 200px; height: 56px; }
textarea.code { width: 100%; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: var(--space-2); border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--page); color: var(--ink); resize: none; }
.hero-links { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: 6px var(--space-5); font-size: 14px; }
.hero-links a { color: var(--primary); font-weight: 600; }
.glance { gap: var(--space-3); }
dl.mix { margin: 0; display: flex; flex-direction: column; font-size: 14px; color: var(--ink-muted); }
dl.mix div { display: flex; justify-content: space-between; gap: var(--space-3); border-top: 1px solid var(--line); padding: 10px 0; }
dl.mix dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Sections and cards */
.sec-head { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); justify-content: space-between; align-items: end; margin-bottom: var(--space-5); }
.sec-head h2 { margin-top: 6px; max-width: 24ch; }
.sec-head p { color: var(--ink-muted); max-width: 52ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.panel > p { color: var(--ink-muted); }
.panel.mini { padding: var(--space-4); gap: 6px; }
.stack { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.pcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.pcard.partner { border: 1.5px solid var(--accent); }
.pcard > .row, .offer > .row { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.pcard p { color: var(--ink-muted); font-size: var(--body-sm); }
.pcard:hover { border-color: var(--primary); }
.stretch { text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row { display: flex; gap: var(--space-3); align-items: center; min-width: 0; }
.row.wrap { flex-wrap: wrap; }

/* Concept notes: rendered only in builds that allow them, shown when toggled on */
.note { display: none; margin-top: var(--space-3); font-size: 13.5px; color: var(--ink); background: var(--primary-wash); border-left: 4px solid var(--primary); padding: 10px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; max-width: 80ch; }
.note b { color: var(--primary); letter-spacing: 0.06em; text-transform: uppercase; font-size: 11px; margin-right: 6px; }
body[data-notes="on"] .note { display: block; }
body[data-notes="hidden"] .note { display: none !important; }

/* Category tiles */
.group + .group { margin-top: var(--space-6); }
.group-title { display: flex; flex-wrap: wrap; gap: 4px var(--space-3); align-items: baseline; margin-bottom: var(--space-3); }
.group-title span { color: var(--ink-muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); min-height: 128px; }
.tile:hover { border-color: var(--primary); }
.tile[hidden], .group[hidden] { display: none; }
.tile-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.tile h4 { font-size: 17px; line-height: 1.2; }
.count { font-size: 12px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.chip { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: 13px; text-decoration: none; background: var(--page); max-width: 100%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: var(--primary); }
.chip.partner { border: 1.5px solid var(--accent); }
.chip.open { padding: 4px 10px; border-style: dashed; color: var(--primary); font-weight: 600; }
.chip.cat { padding: 4px 10px; }

/* Tiers */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.tier.featured { border: 2px solid var(--accent); }
.price { font: 700 30px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.price small { font: 500 14px var(--font-body); color: var(--ink-muted); }
.tier ul { margin: 0; padding-left: 18px; color: var(--ink-muted); font-size: var(--body-sm); display: flex; flex-direction: column; gap: 6px; }
.tier .btn { margin-top: auto; }

.band { background: var(--primary); color: var(--on-primary); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); justify-content: space-between; align-items: center; }
.band p { margin-top: 6px; max-width: 56ch; }

footer.foot { border-top: 1px solid var(--line); padding-top: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); justify-content: space-between; color: var(--ink-muted); font-size: 14px; }
.foot-about { max-width: 60ch; display: flex; flex-direction: column; gap: var(--space-2); }
.foot-about strong { color: var(--ink); }
footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); max-width: 520px; align-content: start; }
footer nav a { color: var(--primary); font-weight: 600; text-decoration: none; }
.modebtn { align-self: start; }

/* Inner pages */
.crumb { font-size: 14px; color: var(--ink-muted); margin-bottom: calc(var(--space-8) * -0.6); }
.crumb a { color: var(--primary); font-weight: 600; text-decoration: none; }
.page-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: calc(var(--space-8) * -0.4); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-5); align-items: start; }
.listing { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.listing li { display: flex; gap: var(--space-3); align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.listing li:first-child { border-top: 0; padding-top: 0; }
.listing a { font-weight: 600; color: var(--ink); }
.listing p { margin-top: 2px; max-width: 70ch; }
.slot { border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; justify-content: space-between; }
.slot p { color: var(--ink-muted); margin-top: 4px; }
.profile .row { align-items: flex-start; }
.domain { font-size: 14px; color: var(--ink-muted); padding: 11px 0; }
.prefill { background: var(--primary-wash); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--body-sm); }
dl.stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: 0; }
dl.stats div { background: var(--page); border-radius: var(--radius-md); padding: var(--space-3); }
dl.stats dt { font-size: 12px; color: var(--ink-muted); }
dl.stats dd { margin: 2px 0 0; font: 700 26px var(--font-display); font-variant-numeric: tabular-nums; }

/* Offers */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.offer[hidden] { display: none; }
.offer h4 { font-size: 18px; line-height: 1.2; margin: 4px 0 6px; }
.offer p { color: var(--ink-muted); font-size: var(--body-sm); }
.offer .btn.small { width: fit-content; }
.offer-co { font-size: 18px; margin-top: 4px; }
.offer-co a { text-decoration: none; }
.offer.mini { padding: var(--space-4); }
.kind { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.codebox { background: var(--primary-wash); border: 1.5px dashed var(--primary); border-radius: var(--radius-md); padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; min-height: 68px; }
.codebox code { font: 700 19px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.05em; overflow-wrap: anywhere; }
.pills { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.pill { padding: 7px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 14px var(--font-body); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.sample { background: var(--accent-wash); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; margin-bottom: calc(var(--space-8) * -0.5); }

/* Resources */
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.event { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); }
.event[hidden] { display: none; }
.event .when { font-weight: 600; }
.event .badges { margin: var(--space-2) 0 0; }
.evactions { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.btnrow { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }
#catFilterMsg.filtering { background: var(--accent-wash); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius-md); font-weight: 600; }
/* Homepage: the stats panel moves below the fold on phones, so a one-line version sits in the hero instead. */
.glance-line { display: none; }
@media (max-width: 760px) { .hero .glance { display: none; } .glance-line { display: block; } }
/* Category guide sections fold (closed by default on phones, see site.js). */
.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "+"; font: 600 24px/1 var(--font-body); color: var(--primary); }
.fold[open] > summary::after { content: "\2212"; }
.fold > summary h2 { margin: 0; }
.fold[open] > summary { margin-bottom: var(--space-3); }
.evmonth { margin-bottom: var(--space-6); }
.evfilters { margin-bottom: var(--space-3); }
.evfilters .fld { flex: 1 1 170px; }
.check { display: flex; gap: var(--space-2); align-items: center; font-weight: 600; min-height: 44px; }
.check input { accent-color: var(--primary); width: 18px; height: 18px; }
@media (max-width: 760px) {
  .event { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .evactions { flex-direction: row; flex-wrap: wrap; gap: var(--space-3); }
}
.orgs { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.orgs h4 { font-size: 16px; }
.orgs a { color: var(--primary); text-decoration: none; }
.group-h { margin-bottom: var(--space-3); }

/* Forms */
form.f { display: flex; flex-direction: column; gap: 18px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: var(--space-2); padding: 0; }
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.types label { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); padding: var(--space-3); cursor: pointer; background: var(--surface); }
.types label:has(input:checked) { border-color: var(--primary); background: var(--primary-wash); }
.types input { margin-top: 3px; accent-color: var(--primary); }
.types b { display: block; font-size: 15px; }
.types span span { font-size: 13px; color: var(--ink-muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld label { font-weight: 600; font-size: 14px; }
.fld textarea { min-height: 110px; resize: vertical; }
.fld[hidden] { display: none; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.err { color: var(--danger); font-size: 14px; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { background: var(--primary-wash); border: 1.5px solid var(--primary); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.done ul { margin: 0; padding-left: 18px; color: var(--ink-muted); display: flex; flex-direction: column; gap: 4px; }
.done .btn { width: fit-content; }
.dialog { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

/* Package builder */
.build { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-5); align-items: start; }
.sticky { position: sticky; top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.panel h2 + .opt { border-top: 0; }
.opt label, .optl { flex: 1; font-weight: 600; font-size: 15px; cursor: pointer; }
.opt label span, .optl span { display: block; font-weight: 400; font-size: 13px; color: var(--ink-muted); }
.opt .pr { order: 3; margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-muted); white-space: nowrap; font-size: 14px; }
.opt input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.sum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: 14px; }
.sum li { display: flex; justify-content: space-between; gap: var(--space-3); }
.sum span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: var(--space-3); font: 700 28px var(--font-display); font-variant-numeric: tabular-nums; }
.total span:first-child { font: 500 14px var(--font-body); color: var(--ink-muted); }
.logoup { display: flex; align-items: center; gap: 14px; }
.logoup img { width: 56px; height: 56px; object-fit: contain; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); }
#pkPreview { margin-top: var(--space-2); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--page); padding: 12px 18px; border-radius: var(--radius-md); font-size: 14px; max-width: min(90vw, 520px); z-index: 40; box-shadow: var(--shadow-pop); }

@media (max-width: 860px) {
  .hero, .two, .build { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .event { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .event .btn { width: fit-content; }
}
@media (max-width: 700px) {
  .page, main { gap: var(--space-7); }
  header.top { margin-bottom: calc(var(--space-7) * -0.5); }
  .brandrow { width: 100%; }
  .navtoggle { display: inline-flex; }
  nav.main { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  nav.main.open { display: flex; }
  nav.main a:not(.btn) { padding: 12px 0; border-top: 1px solid var(--line); }
  nav.main .btn { margin-top: var(--space-3); }
  .search { flex-direction: column; }
  .cobrand span { display: none; }
  .profile > .row { flex-direction: column; }
  .band { padding: var(--space-5); }
}
@media (prefers-reduced-motion: no-preference) { .tile, .chip, .btn, .pcard { transition: border-color 0.15s, background-color 0.15s, filter 0.15s; } }

/* ---------- Section bands: full-width backgrounds that break the page into clear sections ----------
   The band color is painted out to the window edges with box-shadows and trimmed with clip-path,
   so content stays in the centered column and the page never gets wider than the window.
   Light and dark colors both come from tokens.css. */
.bleed, header.top, footer.foot { --band-line: transparent; clip-path: inset(-1px -100vmax); }
.bleed { padding-block: var(--space-7); background: var(--band-bg);
  box-shadow: 0 0 0 100vmax var(--band-bg), 0 -1px 0 100vmax var(--band-line), 0 1px 0 100vmax var(--band-line); }
.bleed.wash { --band-bg: var(--primary-wash); }
.bleed.surface { --band-bg: var(--surface); --band-line: var(--line); }
@media (max-width: 760px) { .bleed { padding-block: var(--space-6); } }

/* Site frame: a white header bar and footer on every page. */
header.top { padding-block: var(--space-3); background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface), 0 1px 0 100vmax var(--line); }
footer.foot { border-top: 0; padding-block: var(--space-6) var(--space-7); background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface), 0 -1px 0 100vmax var(--line); clip-path: inset(-1px -100vmax 0); }
body { padding-bottom: 0; }

/* Section headings: a short accent rule marks where each section starts. */
.sec-head .eyebrow { color: var(--primary); display: flex; align-items: center; gap: 10px; }
.sec-head .eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); }

/* Homepage hero sits on its band, directory groups get clear headings. */
.hero.bleed { align-items: center; margin-top: calc(var(--space-4) * -1); }
#categories .group-title { border-bottom: 2px solid var(--primary); padding-bottom: var(--space-2); }
#categories .group + .group { margin-top: var(--space-7); }
