:root {
  color-scheme: dark;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #141a17;
  --header: #171e1a;
  --hero: #1c2a23;
  --surface: #1c2420;
  --surface-raised: #23312a;
  --surface-hover: #29382f;
  --inset: #161e1a;
  --line: #36463c;
  --line-strong: #64786c;
  --text: #eef6f0;
  --muted: #b0c1b7;
  --accent: #a5deb8;
  --accent-strong: #c8f2d6;
  --accent-ink: #122c1e;
  --accent-surface: #284636;
  --warm: #ffdc9f;
  --warm-surface: #433522;
  --mark: #d6ebdc;
  --mark-ink: #1a2d22;
  --error: #ffbbb2;
  --error-border: #936459;
  --shadow: 0 12px 30px #08120a66;
  --radius: 12px;
  --sticky-header: 0px;
  --swatch-green: #a5deb8;
  --swatch-marine: #a5d4ff;
  --swatch-ivory: #e8c678;
  --current-swatch: var(--swatch-green);
  color: var(--text);
  background: var(--bg);
}

:root[data-theme="marine"] {
  --bg: #101a29;
  --header: #141f30;
  --hero: #1c2d45;
  --surface: #192638;
  --surface-raised: #22334a;
  --surface-hover: #2b405a;
  --inset: #131e2f;
  --line: #364a62;
  --line-strong: #6c829c;
  --text: #f0f5ff;
  --muted: #bccbe0;
  --accent: #a5d4ff;
  --accent-strong: #c9e5ff;
  --accent-ink: #0c2842;
  --accent-surface: #284661;
  --warm: #ffdc9f;
  --warm-surface: #453622;
  --mark: #d2e8ff;
  --mark-ink: #132e49;
  --error: #ffc0b6;
  --error-border: #9c6e68;
  --shadow: 0 12px 30px #080f1c66;
  --current-swatch: var(--swatch-marine);
}

:root[data-theme="ivory"] {
  color-scheme: light;
  --bg: #f8f4e9;
  --header: #fffcf3;
  --hero: #f1e8d0;
  --surface: #fffdf8;
  --surface-raised: #f8f0de;
  --surface-hover: #f3e9d4;
  --inset: #fcf8ee;
  --line: #e0d6bd;
  --line-strong: #907e58;
  --text: #2b251a;
  --muted: #64583f;
  --accent: #755018;
  --accent-strong: #583907;
  --accent-ink: #fffbef;
  --accent-surface: #f0e2ba;
  --warm: #70490b;
  --warm-surface: #f6e5bc;
  --mark: #f2d990;
  --mark-ink: #392907;
  --error: #882f26;
  --error-border: #b4796a;
  --shadow: 0 12px 30px #62491322;
  --current-swatch: var(--swatch-ivory);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-block-start: calc(var(--sticky-header) + 16px); }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent); text-underline-offset: .19em; }
a:hover { color: var(--accent-strong); }
input, button, select { font: inherit; }
button, select { min-width: 0; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.023em; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 12px; padding: 9px 12px; z-index: 10; background: var(--bg); }
.wrap { width: min(1184px, calc(100% - 64px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: var(--header); }
.header-inner, .header-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.header-inner { position: relative; min-height: 65px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { color: var(--text); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .88rem; letter-spacing: .105em; line-height: 1.15; }
.brand small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.brand-mark {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
}
.brand-mark::before { content: ""; width: 13px; height: 19px; border: 1.6px solid currentColor; border-radius: 3px; }
.brand-mark::after { content: ""; position: absolute; top: 12px; left: 15px; width: 4px; height: 4px; border: 1.5px solid currentColor; border-radius: 50%; }
.brand-mark i { position: absolute; top: 21px; left: 15px; width: 4px; height: 1.5px; background: currentColor; border-radius: 2px; }

.button, .text-button, .query-chip, .filter-chip, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: .86rem;
  font-weight: 640;
  text-decoration: none;
}
.button:hover, .query-chip:hover, .filter-chip:hover, .icon-button:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--line-strong);
}
.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.text-button { background: transparent; border-color: transparent; color: var(--accent); padding-inline: 5px; text-align: left; }
.text-button:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: .2em; }
.external-icon { position: relative; display: inline-block; width: 11px; height: 11px; color: var(--accent); flex: none; }
.external-icon::before { content: ""; position: absolute; inset: 1px 1px auto auto; width: 5px; height: 5px; border-top: 1.3px solid currentColor; border-right: 1.3px solid currentColor; }
.external-icon::after { content: ""; position: absolute; top: 8px; left: 1px; height: 1.3px; width: 11px; transform: rotate(-45deg); transform-origin: left center; background: currentColor; }
.chevron { display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.header-search, .mobile-tools, .mobile-file { display: none; }
.header-file { background: transparent; }
.header-menu { position: relative; }
.header-menu > summary { list-style: none; cursor: pointer; }
.header-menu > summary::-webkit-details-marker { display: none; }
.header-menu:not([open]) > .header-popover { display: none; }
.header-menu[open] > summary { background: var(--accent-surface); border-color: var(--line-strong); }
.header-menu[open] > summary .chevron { transform: translateY(1px) rotate(225deg); }
.header-popover {
  position: absolute;
  z-index: 7;
  top: calc(100% + 9px);
  right: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.current-swatch, .theme-swatch { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); }
.current-swatch { background: var(--current-swatch); }
.theme-popover { width: 222px; padding: 12px; }
.theme-options { border: 0; margin: 0; padding: 0; min-width: 0; }
.theme-options legend { padding: 0 7px; margin-bottom: 5px; font-weight: 690; font-size: .88rem; }
.theme-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr 14px;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: .86rem;
}
.theme-option:hover { background: var(--surface-hover); }
.theme-option:has(input:checked) { background: var(--accent-surface); border-color: var(--line-strong); font-weight: 670; }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-option input { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.theme-option input[value="green"] + .theme-swatch { background: var(--swatch-green); }
.theme-option input[value="marine"] + .theme-swatch { background: var(--swatch-marine); }
.theme-option input[value="ivory"] + .theme-swatch { background: var(--swatch-ivory); }
.theme-check, .filter-chip[aria-pressed="true"]::before {
  width: 6px;
  height: 10px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.theme-check { visibility: hidden; color: var(--accent); }
.theme-option input:checked ~ .theme-check { visibility: visible; }

.hero { border-bottom: 1px solid var(--line); background: var(--hero); }
.hero-inner { padding-block: 32px 26px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 3.75rem); letter-spacing: -.063em; line-height: 1.03; margin-bottom: 18px; font-weight: 750; }
.hero h1 span { color: var(--accent); }
#searchForm { max-width: 770px; }
.search-shell { position: relative; }
.search-box {
  display: flex;
  align-items: center;
  min-height: 60px;
  gap: 12px;
  padding: 6px 7px 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--inset);
}
.search-box:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.search-icon { width: 15px; height: 15px; border: 2px solid var(--accent); border-radius: 50%; position: relative; flex: none; margin-right: 3px; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; left: 9px; top: 10px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.search-box input { border: 0; flex: 1; min-width: 0; padding: 8px 0; background: transparent; color: var(--text); }
.search-box input:focus-visible { outline: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box input::placeholder { color: var(--muted); }
.search-submit { min-width: 74px; min-height: 44px; }
.search-key { border: 1px solid var(--line-strong); border-radius: 5px; min-width: 23px; padding: 0 6px; text-align: center; color: var(--muted); }
.icon-button { padding-inline: 8px; min-width: 38px; }
.clear-query { font-size: 1.25rem; line-height: 1; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.examples-label { color: var(--muted); font-size: .82rem; font-weight: 640; margin-inline-end: 4px; }
.query-chip { min-height: 34px; border-radius: 6px; padding: 4px 10px; color: var(--text); font-size: .8rem; background: transparent; }
.suggestions {
  position: absolute;
  z-index: 4;
  top: calc(100% + 7px);
  inset-inline: 0;
  max-height: min(50vh, 350px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 5px;
  box-shadow: var(--shadow);
}
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; min-height: 48px; border-radius: 7px; padding: 8px 12px; cursor: pointer; }
.suggestion:hover, .suggestion[aria-selected="true"] { background: var(--accent-surface); }
.suggestion strong { font-size: .9rem; line-height: 1.35; }
.suggestion small { font-size: .77rem; color: var(--muted); flex: none; }

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  grid-template-areas: "workspace tools";
  gap: 30px;
  align-items: start;
  padding-block: 28px 50px;
}
.workspace, .tools { min-width: 0; }
.workspace { grid-area: workspace; display: grid; gap: 28px; }
.section h2 { margin-bottom: 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 7px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.section-count, .footer-status { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.section-button { margin-top: 9px; }
.quick-grid, .product-grid, .resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-card, .resource-card, .product-card { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); min-width: 0; }
.quick-card, .resource-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 9px 12px;
  min-height: 62px;
  color: var(--text);
  text-decoration: none;
}
.quick-card:hover, .resource-card:hover { background: var(--surface-hover); border-color: var(--line-strong); color: var(--text); }
.quick-card > span:first-child, .resource-card > span:first-child, .tool-link > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.quick-card strong, .resource-card strong { display: block; font-size: .94rem; font-weight: 680; line-height: 1.25; }
.quick-card small, .resource-card small, .tool-list small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.34; margin-top: 3px; }
.jump-arrow { flex: none; color: var(--accent); font-size: 1.1rem; }
.product-card { padding: 12px 13px; }
.product-card h3 { font-size: 1.05rem; overflow-wrap: anywhere; line-height: 1.28; }
.product-meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: .8rem; }
.article-number { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-variant-numeric: tabular-nums; }
.product-destination { color: var(--muted); font-size: .8rem; margin-top: 5px; }
.product-card.exact { border-color: var(--line-strong); background: var(--accent-surface); }

.tools {
  grid-area: tools;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 13px 12px 7px;
}
.tools h2 { margin: 1px 6px 9px; font-size: 1.07rem; }
.tool-list { margin: 0; padding: 0; list-style: none; }
.tool-list li + li { border-top: 1px solid var(--line); }
.tool-link, .tool-footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
}
.tool-link { min-height: 52px; padding: 8px 6px; }
.tool-link strong { display: block; font-size: .87rem; line-height: 1.26; font-weight: 680; }
.tool-link small { font-size: .76rem; }
.tool-link:hover, .tool-footer-link:hover { background: var(--surface-hover); color: var(--text); }
.tool-link:hover strong, .tool-footer-link:hover { text-decoration: underline; text-underline-offset: .18em; }
.tool-list + .tool-footer-link { border-top: 1px solid var(--line); }
.tool-footer-link { min-height: 40px; padding: 6px 6px; color: var(--accent); font-size: .81rem; font-weight: 650; }
.tool-search { background: transparent; border: 0; width: 100%; text-align: left; }
.tool-search span { font-size: 1rem; }
.tool-link:focus-visible, .tool-footer-link:focus-visible { outline-offset: -1px; }

.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 15px; margin-bottom: 12px; }
.filter-field { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; min-width: 0; }
.filter-label { font-size: .8rem; color: var(--muted); font-weight: 640; }
.system-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-chip { min-width: 41px; min-height: 36px; padding: 4px 10px; border-radius: 20px; font-size: .82rem; }
.filter-chip[aria-pressed="true"] { border-color: var(--line-strong); background: var(--accent-surface); color: var(--accent-strong); }
.filter-chip[aria-pressed="true"]::before { content: ""; flex: none; }
.topic-filter select {
  min-height: 36px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
}
.topic-filter select.is-filtered { background: var(--accent-surface); color: var(--accent-strong); font-weight: 650; }
.filter-reset { min-height: 36px; font-size: .81rem; }

.card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 8px; }
.card:hover, .card[open] { border-color: var(--line-strong); }
.card > summary {
  display: block;
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 13px 48px 13px 15px;
  min-height: 53px;
  border-radius: 9px;
}
.card > summary::-webkit-details-marker { display: none; }
.card > summary:hover, .card[open] > summary { background: var(--surface-raised); }
.card > summary::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--inset);
}
.card > summary::after {
  content: "";
  position: absolute;
  right: 23px;
  top: 21px;
  width: 7px;
  height: 7px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.card[open] > summary { border-radius: 9px 9px 0 0; }
.card[open] > summary::before { border-color: var(--line-strong); background: var(--accent-surface); }
.card[open] > summary::after { transform: rotate(225deg); top: 24px; }
.question { display: block; font-size: 1rem; font-weight: 690; line-height: 1.36; overflow-wrap: anywhere; }
.excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: .86rem; margin-top: 4px; overflow-wrap: anywhere; }
.card[open] > summary .excerpt { display: none; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 7px; }
.system-meta { color: var(--muted); font-size: .75rem; font-weight: 640; }
.badge { background: var(--surface-raised); color: var(--muted); border-radius: 4px; padding: 1px 6px; font-size: .72rem; font-weight: 650; }
.badge.note { color: var(--warm); background: var(--warm-surface); }
mark { background: var(--mark); color: var(--mark-ink); border-radius: 2px; }
.article { border-top: 1px solid var(--line); padding: 18px; overflow-wrap: anywhere; }
.article h3 { font-size: 1rem; line-height: 1.3; margin: 0 0 8px; }
.article h4 { font-size: .94rem; line-height: 1.4; margin: 14px 0 5px; }
.article p, .article ul, .article ol { margin: 0 0 10px; }
.article ul, .article ol { padding-left: 1.5rem; }
.article li { margin-top: 5px; }
.article li > ul, .article li > ol { margin-block: 4px 8px; }
.article a { text-decoration-thickness: .08em; }
.article code { font: inherit; }
.article pre { overflow: auto; background: var(--inset); border-radius: 7px; padding: 11px; }
.article pre code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.article blockquote { margin: 8px 0; border-inline-start: 2px solid var(--line-strong); padding-left: 10px; color: var(--muted); }
.table-scroll { overflow-x: auto; max-width: 100%; margin-block: 8px; }
.article table { border-collapse: collapse; text-align: left; font-size: .87rem; }
.article td, .article th { border: 1px solid var(--line); padding: 6px 8px; min-width: 7rem; }
.article th { background: var(--surface-raised); }
.article-resources { margin-block: 17px 19px; }
.article-resources h4 { margin: 0 0 7px; }
.article-links { display: flex; align-items: stretch; flex-wrap: wrap; gap: 7px; }
.resource-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 45px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--accent-surface);
  color: var(--accent-strong);
  font-size: .89rem;
  font-weight: 660;
  line-height: 1.35;
  text-decoration: none;
}
.resource-button:hover { background: var(--surface-hover); color: var(--accent-strong); text-decoration: underline; }
.resource-button strong, .resource-button small { display: block; }
.resource-button small { font-size: .78rem; font-weight: 440; color: var(--muted); margin-top: 2px; }
.answer-content { max-width: 69ch; line-height: 1.69; margin-bottom: 20px; }
.answer-content > h3 { color: var(--accent-strong); font-size: 1.06rem; margin-bottom: 8px; }
.answer-content .answer-block + .answer-block { margin-top: 18px; }
.answer-block h4 { font-size: .99rem; margin: 0 0 7px; }
.answer-block p, .answer-block ul, .answer-block ol { margin-bottom: 13px; }
.answer-block > :last-child { margin-bottom: 0; }
.answer-block li + li { margin-top: 8px; }
.answer-block :is(ul,ol) { padding-left: 1.28rem; }
.answer-block li::marker { color: var(--accent); }
.product-link { font-weight: 650; white-space: normal; }
.article .product-number { color: var(--muted); font-size: .82em; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; white-space: nowrap; }
.article-details { border: 1px solid var(--line); border-radius: 8px; margin-top: 7px; background: var(--inset); }
.article-details > summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  min-height: 42px;
  padding: 9px 31px 9px 12px;
  font-weight: 620;
  color: var(--text);
  font-size: .88rem;
  border-radius: 7px;
}
.article-details > summary::-webkit-details-marker { display: none; }
.article-details > summary::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 14px;
  width: 6px;
  height: 6px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.article-details > summary:hover, .article-details[open] > summary { background: var(--surface-raised); }
.article-details[open] > summary { border-radius: 7px 7px 0 0; }
.article-details[open] > summary::after { transform: rotate(225deg); top: 18px; }
.details-content { border-top: 1px solid var(--line); padding: 10px 12px; font-size: .89rem; }
.details-content > h4:first-child { margin-top: 0; }
.article .product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 4px 14px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.product-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.answer-notes > summary { color: var(--warm); }
.sources > summary, .sources .details-content { color: var(--muted); }
.article-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.article-reference { color: var(--muted); font-size: .78rem; }

.import-panel, .empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 19px; }
.import-panel h2 { margin-bottom: 8px; }
.empty-state h3 { font-size: 1rem; margin-bottom: 5px; overflow-wrap: anywhere; }
.import-panel p, .empty-state p { color: var(--muted); font-size: .94rem; }
.import-panel button, .empty-actions { margin-top: 11px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.import-panel.drag-over { border-color: var(--accent); background: var(--accent-surface); }
.message { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; background: var(--surface); }
.error { color: var(--error); border: 1px solid var(--error-border); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 55px; }
.footer-status { overflow-wrap: anywhere; }
.toast {
  position: fixed;
  z-index: 5;
  bottom: 16px;
  right: 16px;
  max-width: min(360px, calc(100% - 32px));
  border-radius: 8px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: .9rem;
  padding: 9px 13px;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.toast:empty { display: none; }

@media (max-width: 960px) {
  .wrap { width: calc(100% - 40px); }
  .content { grid-template-columns: minmax(0, 1fr) 248px; gap: 19px; }
}

@media (max-width: 740px) {
  :root { --sticky-header: 58px; }
  .wrap { width: calc(100% - 28px); }
  .site-header { position: sticky; top: 0; z-index: 6; }
  .header-inner { min-height: var(--sticky-header); }
  .header-actions { gap: 6px; }
  .header-actions .button { min-height: 44px; }
  .header-file, .tools { display: none; }
  .header-search { display: inline-flex; width: 44px; padding: 0; }
  .theme-trigger { min-width: 44px; padding-inline: 7px; }
  .theme-trigger-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .theme-trigger .chevron { display: none; }
  .mobile-file { display: flex; width: 100%; margin-top: 8px; }
  .mobile-tools { position: static; display: block; }
  .mobile-tools > summary { padding-inline: 9px; }
  .header-popover { max-height: calc(100dvh - var(--sticky-header) - 14px); overflow-y: auto; }
  .tools-popover { top: calc(100% + 5px); width: min(302px, 100%); padding: 7px 10px; }
  .tool-footer-link, .theme-option { min-height: 44px; }
  .hero-inner { padding-block: 24px 19px; }
  .hero h1 { margin-bottom: 15px; }
  .search-box { min-height: 55px; padding-left: 11px; gap: 7px; }
  .search-key { display: none !important; }
  .search-submit { min-width: 50px; padding-inline: 9px; }
  .clear-query { min-width: 40px; min-height: 44px; }
  .query-chip { min-height: 40px; padding-inline: 8px; }
  .filter-chip, .topic-filter select, .filter-reset { min-height: 41px; }
  .content { grid-template-columns: minmax(0, 1fr); grid-template-areas: "workspace"; gap: 0; padding-block: 20px 32px; }
  .workspace { gap: 24px; }
  .quick-card { min-height: 56px; }
  .quick-card strong { font-size: .89rem; }
  .quick-card small { display: none; }
  .suggestion small { max-width: 7rem; white-space: normal; text-align: right; }
  .article { padding: 13px; }
  .resource-button { width: 100%; }
}

@media (max-width: 375px) {
  .header-inner { width: calc(100% - 16px); gap: 5px; }
  .header-actions { gap: 4px; }
  .brand { gap: 6px; }
  .brand strong { font-size: .81rem; letter-spacing: .08em; }
  .brand small { display: none; }
  .mobile-tools > summary { padding-inline: 7px; }
  .mobile-tools > summary .chevron { display: none; }
  .quick-card .jump-arrow { display: none; }
  .product-grid, .resource-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-card, .resource-card { padding-inline: 9px; }
  .search-box input::placeholder { font-size: .86rem; }
}

@media (forced-colors: active) {
  .current-swatch, .theme-swatch { forced-color-adjust: none; }
  .filter-chip[aria-pressed="true"], .theme-option:has(input:checked) { border-color: SelectedItem; }
}
