:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #98a2b3;
  --line: #e4e7ec;
  --brand: #1858e6;
  --brand-ink: #0b3fb0;
  --brand-wash: #e8f0ff;
  --accent: #0ea5a4;
  --mark: #ffe9a8;
  --mark-ink: #101828;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --radius: 14px;
}
/* dark palette, shared by OS-dark (unless an explicit light choice) and the explicit dark toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f17;
    --surface: #151a24;
    --ink: #eef1f6;
    --ink-soft: #a9b2c3;
    --ink-faint: #6c778c;
    --line: #262d3a;
    --brand: #5b8dff;
    --brand-ink: #9db9ff;
    --brand-wash: #17233d;
    --accent: #2dd4bf;
    --mark: #6b5a1e;
    --mark-ink: #ffffff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0c0f17;
  --surface: #151a24;
  --ink: #eef1f6;
  --ink-soft: #a9b2c3;
  --ink-faint: #6c778c;
  --line: #262d3a;
  --brand: #5b8dff;
  --brand-ink: #9db9ff;
  --brand-wash: #17233d;
  --accent: #2dd4bf;
  --mark: #6b5a1e;
  --mark-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand-ink); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--brand) 70%);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--surface) 70%, transparent);
}
.brand-text { font-size: 19px; letter-spacing: -.01em; }
.brand-text strong { color: var(--brand); }
.tagline { font-size: 13px; color: var(--ink-faint); border-left: 1px solid var(--line); padding-left: 22px; }
@media (max-width: 620px) { .tagline { display: none; } }

/* hero */
.hero { padding: 30px 0 26px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; }

/* view tabs */
.viewtabs { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 20px; box-shadow: var(--shadow); max-width: 100%; }
.viewtab {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  transition: .14s;
}
.viewtab:hover { color: var(--brand); }
.viewtab[aria-selected="true"] { background: var(--brand); color: #fff; }
@media (max-width: 520px) {
  .viewtabs { display: flex; width: 100%; gap: 2px; }
  .viewtab { flex: 1; padding: 9px 6px; font-size: 12.5px; text-align: center; }
}
.hero .sub { margin: 0 0 22px; color: var(--ink-soft); max-width: 60ch; }
.searchbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 4px 12px; box-shadow: var(--shadow);
  transition: border-color .15s;
}
.searchbar:focus-within { border-color: var(--brand); }
.search-ico { width: 20px; height: 20px; color: var(--ink-faint); flex: none; }
#q {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 16px; padding: 12px 0;
}
.clear-btn { border: 0; background: transparent; color: var(--ink-faint); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
#q::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.reset-btn {
  font: inherit; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer;
  width: 100%; margin-top: 4px;
}
.reset-btn:hover { color: var(--brand); border-color: var(--brand); }

/* filter column */
.filter-col { position: sticky; top: 76px; align-self: start; }
.filter-toggle { display: none; }
.filter-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 18px;
}
.fgroup { display: flex; flex-direction: column; gap: 8px; }
.fgroup h3 { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 700; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: 6px 11px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500;
  white-space: nowrap; cursor: pointer; transition: .12s;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.fgroup select {
  font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 100%;
}
.fgroup-split { flex-direction: row; gap: 10px; }
.fgroup-split label { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); font-weight: 500; cursor: pointer; text-transform: none; letter-spacing: 0; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

/* active filter chips above results */
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.fchip {
  border: 1px solid var(--brand); background: var(--brand-wash); color: var(--brand-ink);
  padding: 4px 9px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.fchip:hover { background: var(--brand); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ads */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, var(--bg) 10px, var(--bg) 20px);
  border: 1px dashed var(--line); border-radius: 10px; color: var(--ink-faint);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.ad-leaderboard { height: 90px; margin: 22px auto; }
.ad-rect { height: 250px; margin-bottom: 18px; }

/* layout */
.layout { display: grid; grid-template-columns: 232px 1fr 300px; gap: 24px; padding-bottom: 60px; align-items: start; }
.layout > * { min-width: 0; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.count { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.sort-label { font-size: 12px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.sort-label select { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }

.cards { display: grid; gap: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s, border-color .12s;
}
.card:hover { transform: translateY(-1px); border-color: var(--brand); }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card-name { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.card-mfr { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; min-width: 0; }
.tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--brand-wash); color: var(--brand-ink); text-transform: capitalize; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.tag.mat { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.tag.disc { background: color-mix(in srgb, var(--ink-faint) 18%, transparent); color: var(--ink-soft); }
.tag.rx { background: color-mix(in srgb, var(--ink-faint) 16%, transparent); color: var(--ink-soft); text-transform: none; }
.tag.pf { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); text-transform: none; }
.tag.cl { background: var(--brand-wash); color: var(--brand-ink); text-transform: none; }
.tag.cost { background: color-mix(in srgb, var(--ink-faint) 14%, transparent); color: var(--ink-soft); text-transform: none; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.card.is-disc { opacity: .72; }
.card.is-disc:hover { opacity: 1; }
.card-mfr.wrap { white-space: normal; text-align: right; max-width: 46%; }
.card-sub { margin: 0 0 8px; font-size: 13px; color: var(--ink-faint); font-weight: 500; }
.card-desc { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }

/* equivalency finder (lens modal) */
.equiv { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.equiv h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 700; }
.equiv-intro { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
.equiv-none { margin: 0; font-size: 13px; color: var(--ink-faint); }
.equiv-row {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 7px; cursor: pointer; font: inherit; transition: .12s;
}
.equiv-row:hover { border-color: var(--brand); background: var(--brand-wash); }
.equiv-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.equiv-meta { font-size: 12px; color: var(--ink-faint); }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 10px 14px; }
.spec { display: flex; flex-direction: column; }
.spec .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 600; }
.spec .v { font-size: 14px; font-weight: 600; margin-top: 1px; }
mark { background: var(--mark); color: var(--mark-ink); border-radius: 3px; padding: 0 1px; }

.empty { text-align: center; color: var(--ink-soft); padding: 40px 0; }

.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.side-card h3 { margin: 0 0 10px; font-size: 14px; }
.side-card ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 13.5px; }
.side-card li { margin-bottom: 7px; }
.side-card code { background: var(--brand-wash); color: var(--brand-ink); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(16,24,40,.55); }
.modal-box { background: var(--surface); border-radius: 18px; max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 26px 26px 30px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 26px; color: var(--ink-faint); cursor: pointer; line-height: 1; }
.modal-box h2 { margin: 0 4px 2px 0; font-size: 21px; letter-spacing: -.01em; }
.modal-box .m-mfr { color: var(--ink-faint); font-size: 13px; margin-bottom: 16px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.m-row { display: flex; flex-direction: column; gap: 2px; }
.m-row.full { grid-column: 1 / -1; }
.m-row .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 700; }
.m-row .v { font-size: 15px; font-weight: 500; }
.m-note { margin-top: 16px; padding: 12px 14px; background: var(--brand-wash); border-radius: 10px; font-size: 13px; color: var(--brand-ink); }
.m-note.subtle { background: transparent; color: var(--ink-faint); padding-left: 0; }
.m-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 10px 16px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.m-link:hover { filter: brightness(1.06); }
.m-link svg { flex: none; }

/* calculators */
#view-calc { padding-bottom: 60px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.calc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.calc-card h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.01em; }
.calc-help { margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--ink-faint); }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.calc-fields label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--ink-faint);
}
.calc-fields input, .calc-fields select {
  font: inherit; font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0;
  padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%;
}
.calc-fields input:focus, .calc-fields select:focus { outline: 0; border-color: var(--brand); }
.calc-out {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--brand-wash); color: var(--brand-ink);
  font-size: 14px; line-height: 1.5; font-weight: 500;
}
.calc-out b { font-weight: 700; }
.calc-muted { color: var(--ink-soft); font-size: 12px; font-weight: 400; }
.calc-foot { margin: 22px 0 0; font-size: 12px; color: var(--ink-faint); }

/* reference pages (myopia management) */
#view-myopia { padding-bottom: 60px; }
.ref-section { margin-bottom: 34px; }
.ref-section > h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.ref-lead { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-soft); max-width: 78ch; line-height: 1.5; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.ref-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 18px; box-shadow: var(--shadow);
}
.ref-card > h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: -.01em; }
.ref-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ref-head h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.ref-badge {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); white-space: nowrap;
}
.ref-card > p { margin: 0 0 12px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.ref-dl { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.ref-dl > div { display: flex; flex-direction: column; gap: 2px; }
.ref-dl dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--ink-faint); }
.ref-dl dd { margin: 0; font-size: 12.5px; color: var(--ink); line-height: 1.45; }
.ref-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.ref-list li { margin-bottom: 7px; }
.ref-list b { font-weight: 700; }
.ref-table-wrap { overflow-x: auto; }
.ref-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ref-table th, .ref-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.ref-table td:first-child { white-space: nowrap; font-weight: 600; }
.ref-note { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; max-width: 78ch; }

/* standalone document pages (about, privacy) */
.doc { max-width: 760px; padding-top: 34px; padding-bottom: 64px; }
.doc h1 { margin: 0 0 4px; font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; }
.doc h2 { margin: 30px 0 8px; font-size: 17px; letter-spacing: -.01em; }
.doc p, .doc li { color: var(--ink-soft); line-height: 1.6; font-size: 14.5px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc .doc-meta { color: var(--ink-faint); font-size: 12.5px; margin: 0 0 18px; }
.doc .doc-back { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }

/* forms (feedback, pilot survey) */
.ref-form { margin-top: 8px; max-width: 620px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-section {
  margin: 30px 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--brand-ink);
}
.form-section:first-of-type { margin-top: 12px; }
.form-field { display: block; border: 0; padding: 0; margin: 0 0 22px; }
fieldset.form-field { margin-bottom: 22px; }
.form-field > legend, .form-label {
  display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; padding: 0;
}
.form-hint { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.req { color: var(--brand); }
.form-field label {
  display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--ink-soft);
  line-height: 1.45; padding: 6px 0; cursor: pointer;
}
.form-field label input[type="radio"], .form-field label input[type="checkbox"] {
  margin-top: 2px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; cursor: pointer;
}
.ref-form textarea, .ref-form input[type="email"], .ref-form input[type="number"], .ref-form input[type="text"] {
  font: inherit; font-size: 15px; width: 100%; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.ref-form input[type="number"] { max-width: 120px; }
.ref-form textarea { resize: vertical; min-height: 68px; }
.ref-form textarea:focus, .ref-form input:focus { outline: 0; border-color: var(--brand); }
.cf-turnstile { margin: 4px 0 16px; }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.form-submit {
  font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: var(--brand);
  border: 0; border-radius: 10px; padding: 11px 22px; cursor: pointer;
}
.form-submit:hover { filter: brightness(1.06); }
.form-submit:disabled { opacity: .55; cursor: default; }
.form-status { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: #e5484d; }

/* floating feedback button */
.feedback-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  color: #fff; background: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 60%, #000);
  box-shadow: 0 6px 20px rgba(16,24,40,.28);
}
.feedback-fab:hover { filter: brightness(1.07); }
.feedback-fab svg { flex: none; }
@media (max-width: 620px) { .feedback-fab { font-size: 0; gap: 0; padding: 11px; } .feedback-fab svg { width: 18px; height: 18px; } }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 26px 0 40px; }
.site-footer p { margin: 0 0 8px; color: var(--ink-soft); font-size: 13.5px; max-width: 80ch; }
.site-footer .disclaimer { font-size: 12px; color: var(--ink-faint); }
.site-footer .small { font-size: 12px; color: var(--ink-faint); }

@media (max-width: 1040px) {
  .layout { grid-template-columns: 210px 1fr; }
  .side-col { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
  .ad-rect { height: 140px; }
}

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .filter-col { position: static; }
  .filter-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font: inherit; font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; width: 100%;
    justify-content: center;
  }
  .filter-badge {
    background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
  }
  .filter-panel { display: none; margin-top: 12px; }
  .filter-panel.open { display: flex; }
  .side-col { grid-template-columns: 1fr; }
  .ad-rect { height: 120px; }
}

/* print, clean single-column reference output */
@media print {
  .site-header, .viewtabs, .searchbar, .ad-slot, .filter-col, .side-col,
  .feedback-fab, .results-head, .active-filters, #empty, .hero .sub, .calc-fields {
    display: none !important;
  }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { padding: 0 0 8px; }
  .layout { display: block; padding: 0; }
  .card, .ref-card, .calc-card, .m-grid, .modal-box {
    box-shadow: none; border: 1px solid #ccc; break-inside: avoid;
  }
  .modal { position: static; background: none; padding: 0; }
  .modal-close { display: none; }
  a { color: #000; text-decoration: underline; }
}
