/* Catalogue-only surfaces. Explicit colour roles keep both themes coherent. */
body.catalog-page {
  --catalog-paper:#fffaf3;
  --catalog-panel:#fff;
  --catalog-soft:#f7ede0;
  --catalog-text:#441e2b;
  --catalog-muted:#735c61;
  --catalog-border:#e5d3be;
  --catalog-wine:#702039;
  --catalog-deep:#481a2a;
  --catalog-gold:#f3cc80;
  --catalog-on-wine:#fff7ef;
  --catalog-shadow:0 16px 40px rgba(99,40,43,.07);
}
html[data-theme="dark"] body.catalog-page {
  --catalog-paper:#1b141c;
  --catalog-panel:#2a1e29;
  --catalog-soft:#34242f;
  --catalog-text:#fff0e6;
  --catalog-muted:#d6bdc5;
  --catalog-border:#60414e;
  --catalog-wine:#572037;
  --catalog-deep:#311823;
  --catalog-shadow:0 16px 40px rgba(0,0,0,.18);
}
html[data-theme] body.catalog-page .data-audit { background:var(--catalog-panel); border-color:var(--catalog-border); box-shadow:var(--catalog-shadow); }
html[data-theme] body.catalog-page .data-audit-mark { background:var(--catalog-wine); color:var(--catalog-gold); }
html[data-theme] body.catalog-page .data-audit strong { color:var(--catalog-text); }
html[data-theme] body.catalog-page .data-audit p { color:var(--catalog-muted); }
html[data-theme] body.catalog-page .data-audit-count { color:var(--catalog-text); }
html[data-theme] body.catalog-page .filter-panel { background:linear-gradient(125deg,var(--catalog-wine),var(--catalog-deep)); border-color:#955165; box-shadow:0 14px 36px rgba(91,26,47,.15); padding:1.4rem; }
html[data-theme] body.catalog-page .filter-toolbar>p { color:#f1d7d9; }
html[data-theme] body.catalog-page .search-field input { background:var(--catalog-panel); color:var(--catalog-text); border-color:var(--catalog-border); }
html[data-theme] body.catalog-page .search-field span { color:var(--catalog-text); }
html[data-theme] body.catalog-page .filter-panel :is(.shortlist-toggle,.filter-toggle,.finder-controls button) { border-color:#b78385; background:rgba(255,246,231,.06); color:#fff7ef; border-radius:12px; }
html[data-theme] body.catalog-page .filter-panel :is(.shortlist-toggle,.filter-toggle,.finder-controls button):hover { background:var(--catalog-gold); color:#481a2a; border-color:var(--catalog-gold); }
html[data-theme] body.catalog-page .filter-panel :is(.filter-toggle span,.shortlist-toggle b,.shortlist-toggle>span:first-child) { color:var(--catalog-gold); }
html[data-theme] body.catalog-page .finder-controls { border-color:#9a6272; color:#fff7ef; }
html[data-theme] body.catalog-page .filter-panel :is(select,.english-options button) { border-color:#a87784; background:#542035; color:#fff7ef; }
html[data-theme] body.catalog-page .filter-panel select option { background:#542035; color:#fff7ef; }
html[data-theme] body.catalog-page .filter-panel :is(.filter-select-grid label>span,.filter-check,.english-filter>span) { color:#f6e1e2; }
html[data-theme] body.catalog-page .english-options button.active { background:var(--catalog-gold); color:#481a2a; }
html[data-theme] body.catalog-page .search-prompt { background:var(--catalog-soft); border-color:var(--catalog-border); box-shadow:none; }
html[data-theme] body.catalog-page .search-prompt :is(strong,p) { color:var(--catalog-text); }
html[data-theme] body.catalog-page .search-prompt>span { color:var(--catalog-text); }

html[data-theme] body.catalog-page .college-randomizer { grid-template-columns:minmax(0,1fr) 112px; gap:1rem; align-items:stretch; }
html[data-theme] body.catalog-page :is(.random-teaser,.random-reveal) { border-color:var(--catalog-border); background:var(--catalog-panel); box-shadow:var(--catalog-shadow); }
html[data-theme] body.catalog-page .random-teaser { background:linear-gradient(125deg,var(--catalog-panel) 45%,var(--catalog-soft)); }
html[data-theme] body.catalog-page :is(.random-teaser strong,.random-reveal__copy strong) { color:var(--catalog-text); }
html[data-theme] body.catalog-page :is(.random-teaser p,.random-reveal__copy p,.discovery-routes>span) { color:var(--catalog-muted); }
html[data-theme] body.catalog-page :is(.random-teaser>span,.random-reveal__copy>span,.random-reveal__copy a) { color:var(--catalog-text); }
html[data-theme] body.catalog-page .discovery-routes button { min-height:42px; border-radius:12px; border-color:var(--catalog-border); background:var(--catalog-panel); color:var(--catalog-text); transition:background .18s ease,border-color .18s ease,transform .18s ease; }
html[data-theme] body.catalog-page .discovery-routes button b { border-radius:7px; background:var(--catalog-soft); color:var(--catalog-text); }
html[data-theme] body.catalog-page .discovery-routes button:is(:hover,.active) { background:#a82942; border-color:#a82942; color:#fff; }
html[data-theme] body.catalog-page .discovery-routes button:is(:hover,.active) b { background:var(--catalog-gold); color:#481a2a; }
html[data-theme] body.catalog-page .random-reveal__close { background:#702039; }
html[data-theme] body.catalog-page .random-reveal__photo::after { background:linear-gradient(transparent,rgba(72,26,42,.5)); }

/* The axle is fixed at the centre. Only the arm rotates toward the viewer. */
html[data-theme] body.catalog-page .random-lever { padding:.8rem .65rem .7rem; min-height:352px; border:1px solid #a47b3c; border-radius:20px; background:linear-gradient(145deg,#70273d,#391923); color:#fff7ef; box-shadow:6px 6px 0 rgba(83,31,46,.12); }
html[data-theme] body.catalog-page .random-lever::before { content:""; inset:5px; border:1px solid rgba(243,204,128,.25); border-radius:15px; }
html[data-theme] body.catalog-page .random-lever__heading { min-height:55px; justify-content:flex-start; gap:.25rem; }
html[data-theme] body.catalog-page .random-lever__heading>span { color:#f3cc80; font:500 .56rem var(--mono); letter-spacing:.13em; }
html[data-theme] body.catalog-page .random-lever__heading strong { max-width:88px; color:#fff7ef; font-size:.7rem; font-weight:700; line-height:1.3; letter-spacing:-.02em; }
html[data-theme] body.catalog-page .random-lever__track { width:84px; height:220px; margin:.15rem auto .45rem; border:1px solid #75504f; border-radius:6px; background:linear-gradient(90deg,#27121b,#462331 50%,#27121b); box-shadow:inset 0 0 0 4px #321923,inset 0 0 14px #180c12; perspective:460px; perspective-origin:50% 50%; }
html[data-theme] body.catalog-page .random-lever__track::before { content:""; top:22px; bottom:22px; width:2px; background:linear-gradient(#604a46,#958372 50%,#604a46); opacity:.5; }
html[data-theme] body.catalog-page .random-lever__threshold { display:block; width:36px; height:2px; left:calc(50% - 18px); bottom:19px; background:#f3cc80; box-shadow:none; opacity:.65; }
html[data-theme] body.catalog-page .random-lever__pivot { position:absolute; z-index:1; width:30px; height:30px; left:calc(50% - 15px); top:calc(50% - 15px); bottom:auto; border:1px solid #bba071; border-radius:50%; background:linear-gradient(135deg,#675447,#32282a); box-shadow:0 2px 5px rgba(0,0,0,.35),inset 0 0 0 4px #35262c,inset 0 0 0 5px #ab8b58; pointer-events:none; }
html[data-theme] body.catalog-page .random-lever__pivot::before,html[data-theme] body.catalog-page .random-lever__pivot::after { content:none; }
html[data-theme] body.catalog-page .random-lever__handle { top:calc(50% - 92px); bottom:auto; left:calc(50% - 32px); width:64px; height:184px; transform-style:preserve-3d; transform-origin:50% 50%; transform:rotateX(calc(var(--pull) * -145deg)); transition:transform .36s cubic-bezier(.22,.8,.3,1); border-radius:0; }
html[data-theme] body.catalog-page .random-lever__knob { position:absolute; z-index:2; top:7px; left:11px; width:42px; height:42px; margin:0; border:2px solid #ffe8a7; border-radius:50%; background:radial-gradient(circle at 35% 28%,#fff1b9 0 8%,#f1c66a 29%,#b57619 72%,#65410d 100%); box-shadow:0 4px 9px rgba(0,0,0,.4),inset -3px -4px 6px rgba(81,47,0,.3); transform:rotateX(calc(var(--pull) * 145deg)); transform-origin:50% 50%; animation:none; }
html[data-theme] body.catalog-page .random-lever__stem { position:absolute; top:43px; left:28px; width:8px; height:49px; margin:0; border:1px solid #c1cad3; border-radius:2px; background:linear-gradient(90deg,#65636a,#eef0f1 48%,#7a767d); box-shadow:0 2px 4px rgba(0,0,0,.4); }
html[data-theme] body.catalog-page .random-lever__stem::after { content:none; }
html[data-theme] body.catalog-page .random-lever.is-dragging .random-lever__handle { transition:none; }
html[data-theme] body.catalog-page .random-lever.is-ready .random-lever__track { border-color:#f3cc80; box-shadow:inset 0 0 0 4px #321923,inset 0 0 14px #180c12; }
html[data-theme] body.catalog-page .random-lever>p { min-height:30px; margin:0 auto; max-width:88px; font:500 .58rem/1.4 var(--mono); color:#f4dadd; }
html[data-theme] body.catalog-page .random-lever__count { display:block; margin-top:.4rem; padding:0; border:0; font:500 .53rem/1.5 var(--mono); color:#e5c3cb; }
html[data-theme] body.catalog-page .random-lever__count b { color:#f3cc80; font-weight:500; }

html[data-theme] body.catalog-page :is(.roi-section,.contact) { background:var(--catalog-paper); border-color:var(--catalog-border); }
html[data-theme] body.catalog-page .roi-banner { background:linear-gradient(120deg,var(--catalog-wine),var(--catalog-deep)); border-color:#955165; box-shadow:var(--catalog-shadow); }
html[data-theme] body.catalog-page .roi-banner::after { color:rgba(243,204,128,.09); }
html[data-theme] body.catalog-page .roi-banner :is(h2,.roi-banner-copy>p:last-child) { color:#fff7ef; }
html[data-theme] body.catalog-page .roi-banner .eyebrow-label { color:#f3cc80; }
html[data-theme] body.catalog-page .roi-banner-action>p { color:#f4dadd; }
html[data-theme] body.has-side-rail.catalog-page button.roi-toggle { background:#f3cc80; color:#481a2a; border:1px solid #f3cc80; border-radius:14px; transition:background .2s ease,transform .2s ease; }
html[data-theme] body.catalog-page .roi-toggle:hover { background:#ffe2a8; transform:translateY(-2px); }
html[data-theme] body.catalog-page :is(.roi-panel,.roi-calculator) { background:var(--catalog-panel); border-color:var(--catalog-border); box-shadow:var(--catalog-shadow); }
html[data-theme] body.catalog-page :is(.roi-field>span:first-child,.roi-range-field>span:first-child,.roi-disclaimer,.roi-fee-sources,.contact-intro>p:not(.eyebrow-label)) { color:var(--catalog-muted); }
html[data-theme] body.catalog-page :is(.roi-field select,.money-input) { background:var(--catalog-soft); color:var(--catalog-text); border-color:var(--catalog-border); border-radius:12px; }
html[data-theme] body.catalog-page .money-input :is(input,span) { color:var(--catalog-text); }
html[data-theme] body.catalog-page :is(.roi-results,.roi-range-field) { background:var(--catalog-wine); color:#fff7ef; }
html[data-theme] body.catalog-page :is(.roi-primary-result>span,.roi-result-grid span,.roi-method,.range-scale,.roi-range-field>span:first-child) { color:#f5dfe3; border-color:#a66d7f; }
html[data-theme] body.catalog-page :is(.roi-primary-result strong,.roi-range-field output,.roi-results-label) { color:#f3cc80; }
html[data-theme] body.catalog-page .roi-result-grid strong { color:#fff7ef; }
html[data-theme] body.catalog-page .roi-mode-switch { border-color:var(--catalog-border); }
html[data-theme] body.catalog-page .roi-mode-switch button { color:var(--catalog-text); }
html[data-theme] body.catalog-page .roi-mode-switch button.active { background:var(--catalog-wine); color:#fff7ef; border-color:var(--catalog-wine); }

html[data-theme] body.catalog-page .aid-guide { background:linear-gradient(125deg,var(--catalog-deep),var(--catalog-wine)); color:#fff7ef; border:1px solid #955165; }
html[data-theme] body.catalog-page .aid-guide-heading h2 { color:#fff7ef; }
html[data-theme] body.catalog-page .aid-guide :is(.eyebrow-label,.guide-grid article>span) { color:#f3cc80; }
html[data-theme] body.catalog-page :is(.aid-guide-heading>p:last-child,.guide-grid p) { color:#f5dfe3; }
html[data-theme] body.catalog-page .guide-grid { border:0; gap:.8rem; }
html[data-theme] body.catalog-page .guide-grid article { border:1px solid #a66d7f; border-radius:20px; background:rgba(255,245,230,.04); transition:transform .22s ease,background .22s ease,border-color .22s ease; }
html[data-theme] body.catalog-page .guide-grid h3 { color:#fff7ef; }
html[data-theme] body.catalog-page .guide-grid article:hover { transform:translateY(-3px); border-color:#f3cc80; background:rgba(255,245,230,.08); }

html[data-theme] body.catalog-page .contact-intro h2 { color:var(--catalog-text); }
html[data-theme] body.catalog-page .contact .eyebrow-label { color:var(--catalog-text); }
html[data-theme] body.catalog-page .contact-address { padding:1.2rem; border:1px solid var(--catalog-border); border-radius:18px; background:var(--catalog-soft); }
html[data-theme] body.catalog-page .contact-address :is(span,a,button) { color:var(--catalog-text); }
html[data-theme] body.catalog-page .contact-form { border-color:var(--catalog-border); background:var(--catalog-panel); box-shadow:var(--catalog-shadow); border-top:3px solid #ae2938; border-radius:24px; }
html[data-theme] body.catalog-page .contact-form__heading { border-color:var(--catalog-border); }
html[data-theme] body.catalog-page .contact-form :is(label>span,.contact-form__heading span,.contact-form__heading strong) { color:var(--catalog-text); }
html[data-theme] body.catalog-page .contact-form :is(input,select,textarea) { background:var(--catalog-paper); border-color:var(--catalog-border); color:var(--catalog-text); border-radius:12px; transition:border-color .18s ease,box-shadow .18s ease; }
html[data-theme] body.catalog-page :is(.contact-form input,.contact-form textarea,.search-field input)::placeholder { color:var(--catalog-muted); opacity:1; }
html[data-theme] body.catalog-page .contact-form :is(input,select,textarea):focus { border-color:#bb7a43; box-shadow:0 0 0 3px rgba(217,170,86,.19); }
html[data-theme] body.catalog-page .contact-form__actions button { background:#a82942; color:#fff; border-color:#a82942; border-radius:12px; transition:background .18s ease,transform .18s ease; }
html[data-theme] body.catalog-page .contact-form__actions button:hover { background:#7d2035; color:#fff; transform:translateY(-1px); }
html[data-theme] body.catalog-page .contact-form__actions p { color:var(--catalog-muted); }
html[data-theme] body.catalog-page .next-step-card { background:linear-gradient(125deg,var(--catalog-wine),var(--catalog-deep)); border-color:#955165; box-shadow:var(--catalog-shadow); }

@media(max-width:700px) {
  html[data-theme] body.catalog-page .college-randomizer { grid-template-columns:minmax(0,1fr) 112px; gap:.65rem; }
  html[data-theme] body.catalog-page .random-lever { padding:.9rem .3rem; }
  html[data-theme] body.catalog-page .random-teaser { padding:1.1rem; }
  html[data-theme] body.catalog-page .random-teaser strong { font-size:1.2rem; }
  html[data-theme] body.catalog-page .filter-panel { padding:1rem; }
}
@media(max-width:420px) {
  html[data-theme] body.catalog-page .college-randomizer { grid-template-columns:minmax(0,1fr); }
  html[data-theme] body.catalog-page .random-lever { width:112px; justify-self:center; }
}
/* Respect both the stored accessibility setting and the operating system. */
html[data-motion="reduce"] body.catalog-page *,html[data-motion="reduce"] body.catalog-page *::before,html[data-motion="reduce"] body.catalog-page *::after { animation:none!important; transition:none!important; }
html[data-motion="reduce"] body.catalog-page button.random-lever__handle:hover { transform:rotateX(calc(var(--pull) * -145deg))!important; }
@media(prefers-reduced-motion:reduce) { body.catalog-page *,body.catalog-page *::before,body.catalog-page *::after { animation:none!important; transition:none!important; } }
