/* Apple retail-inspired presentation with blue sampled from the existing SGG logo.
   The original stylesheet remains the functional baseline. */
:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --surface-2: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5e9;
  --brand-blue: #004fa2;
  --brand-blue-hover: #00448b;
  --brand-blue-soft: #edf4fa;
  --brand-blue-rgb: 0, 79, 162;
  --blue: var(--brand-blue);
  --blue-2: var(--brand-blue-hover);
  --blue-soft: var(--brand-blue-soft);
  --glass-solid: #fff;
  --glass-fill: rgba(255, 255, 255, .94);
  --glass-edge: #e5e5e9;
  --shadow: 0 8px 30px rgba(0, 0, 0, .04);
  --glass-shadow: 0 8px 30px rgba(0, 0, 0, .04);
  --control-shadow: none;
}
html { background: var(--bg); scroll-behavior: smooth; }
body.apple-theme { background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
body.apple-theme :is(button, a, input, textarea, summary):focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 4px; }
.site-header { background: #1d1d1f; color: #f5f5f7; }
.site-navigation { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: min(1240px, calc(100% - 64px)); height: 52px; margin: auto; }
.site-brand { display: flex; align-items: center; gap: 16px; color: #f5f5f7; text-decoration: none; min-height: 44px; flex-shrink: 0; }
.site-brand .banner-company-logo { width: 112px; height: 28px; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); }
.site-brand-title { display: flex; align-items: baseline; gap: 10px; margin: 0; color: inherit; font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; white-space: nowrap; text-shadow: none; }
.site-brand-title > span { color: inherit; }
.site-brand-title .site-brand-en { color: #c9c9ce; font-size: 16px; font-weight: 500; letter-spacing: -.025em; }
.site-brand-divider { width: 1px; height: 18px; background: #535356; }
.site-nav-links { display: flex; align-items: center; gap: 40px; }
.site-nav-links button, .site-help { position: relative; padding: 0; border: 0; background: none; color: #c9c9ce; font-size: 12px; min-height: 44px; cursor: pointer; transition: color 160ms ease; white-space: nowrap; }
.site-nav-links button[aria-pressed="true"], .site-nav-links button:hover, .site-help:hover { color: #fff; }
.site-nav-links button[aria-pressed="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 3px; border-radius: 2px; background: var(--brand-blue); }
.site-help { color: #f5f5f7; }
/* Shared friend-menu presentation from SewInfo. */
.site-header { position: relative; z-index: 30; }
.site-nav-actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; font-size: 12px; }
.top-friends { margin-left: auto; }
.friend-menu { position: relative; margin: 0; font-family: inherit; font-size: inherit; }
.site-nav-actions .site-help, .friend-menu > summary { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0; color: #f5f5f7; font-family: inherit; font-size: inherit; font-weight: 400; line-height: 20px; }
.friend-menu > summary { gap: 8px; cursor: pointer; list-style: none; white-space: nowrap; }
.friend-menu > summary::-webkit-details-marker { display: none; }
.friend-chevron { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-top: -3px; }
.friend-menu[open] .friend-chevron { transform: rotate(225deg); margin-top: 3px; }
body.apple-theme .friend-menu > summary:focus-visible { outline: 2px solid #8ac4ff; outline-offset: 2px; border-radius: 4px; }
.friend-menu-links { position: absolute; top: calc(100% + 6px); right: 0; width: 200px; padding: 6px; background: #fff; border: 1px solid #e5e5e8; border-radius: 10px; box-shadow: 0 8px 28px #0002; z-index: 60; }
.top-friends .friend-menu-links a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: #1d1d1f; font-size: 13px; border-radius: 6px; white-space: nowrap; text-decoration: none; }
.top-friends .friend-menu-links a:hover, body.apple-theme .top-friends .friend-menu-links a:focus-visible { color: #0071e3; background: #f0f6ff; outline: none; }
@media (max-width: 600px) {
  .site-nav-actions { gap: 12px; }
  .friend-menu-links { width: 190px; }
}
.app-shell { width: 100%; padding: 0 0 72px; }
.hero { min-height: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; overflow: visible; }
.hero::after, .hero-media { display: none; }
.hero-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 0; width: min(1240px, calc(100% - 64px)); min-height: 0; margin: auto; padding: 24px 0 20px; align-content: start; }
.brand-lockup { grid-column: 1 / -1; grid-row: 1; align-self: auto; width: 100%; max-width: none; gap: 0; }
.brand-title-row { display: block; }
.brand-name-pair { display: flex; flex-direction: row; align-items: baseline; gap: 12px; }
.brand-en { order: 0; font-size: 14px; font-weight: 600; letter-spacing: -.025em; border: 0; padding: 0; }
.brand-en > span, .brand-en > strong { color: var(--muted); }
.brand-lockup h1 { color: #1d1d1f; font-size: clamp(28px, 3vw, 36px); font-weight: 650; line-height: 1.12; letter-spacing: -.045em; text-shadow: none; }
.hero-tagline { display: none; margin: 16px 0 0; font-size: clamp(20px, 2vw, 26px); font-weight: 500; line-height: 1.4; letter-spacing: -.025em; color: #1d1d1f; }
.brand-subtitle { display: none; margin: 12px 0 0; color: #6e6e73; font-size: 13px; font-weight: 400; letter-spacing: .01em; line-height: 1.6; white-space: normal; }
.search-anchor { grid-column: 1 / -1; grid-row: 2; width: min(660px, 100%); margin-top: 20px; }
.search-panel { padding: 6px; border: 1px solid #d2d2d7; border-radius: 18px; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 4px 20px rgba(0, 0, 0, .025); transition: border-color 160ms ease, box-shadow 160ms ease; }
.search-panel:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(var(--brand-blue-rgb), .12); }
.search-input-row { position: relative; grid-template-columns: minmax(0, 1fr) 88px; gap: 6px; }
.search-symbol { position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; color: #86868b; pointer-events: none; }
.search-main input { min-height: 44px; padding: 0 16px 0 46px; border: 0; border-radius: 12px; background: transparent; box-shadow: none; font-size: 16px; color: var(--ink); }
.search-main input:focus { outline: none; box-shadow: none; }
.search-main input::placeholder { color: #86868b; -webkit-text-fill-color: #86868b; }
.search-button { min-height: 44px; background: var(--brand-blue); box-shadow: none; border: 0; font-size: 14px; font-weight: 400; border-radius: 12px; }
.search-discovery { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 2px; text-align: center; color: var(--muted); }
.search-discovery > p { margin: 0; font-size: 12px; }
.search-examples { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 32px; margin-top: 0; font-size: 11px; }
.search-examples button { display: inline-flex; align-items: center; border: 0; border-radius: 7px; background: transparent; min-height: 32px; padding: 0 4px; color: var(--brand-blue); font-size: 11px; cursor: pointer; }
.search-examples button:hover { text-decoration: underline; text-underline-offset: 4px; }
.brand-rail-label { display: none; grid-column: 1 / -1; grid-row: 4; margin: 22px 0 16px; color: #1d1d1f; font-size: 13px; font-weight: 500; text-align: center; }
.brand-rail-label > span { margin-left: 12px; color: var(--muted); font-size: 12px; font-weight: 400; }
.brand-stack { grid-row: 1; width: auto; min-width: 0; display: block; margin-top: 0; }
.brand-stack-left { grid-column: 1; padding-right: 4px; }
.brand-stack-right { grid-column: 2; padding-left: 4px; }
.source-brand-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.source-brand { width: 100%; height: 54px; min-height: 54px; border: 1px solid transparent; border-radius: 14px; padding: 10px 13px; background: #f5f5f7; box-shadow: none; transition: background-color 160ms ease, border-color 160ms ease; }
.source-brand .brand-logo, .source-brand .da-logo { width: 100%; height: 100%; max-width: 100%; max-height: 34px; padding: 0; object-fit: contain; filter: none; }
.source-brand .brand-logo-cropped { width: 100%; height: auto; max-width: none; max-height: none; flex: 0 0 100%; }
.source-brand.brand-richpeace { gap: 4px; padding-inline: 8px; }
.source-brand.brand-richpeace .brand-logo { display: block; width: 16px; height: 24px; flex-shrink: 0; }
.brand-wordmark { font-size: 10px; letter-spacing: -.4px; text-shadow: none; }
.source-brand .brand-logo-butterfly { width: 38px; height: 38px; max-height: 38px; }
.butterfly-wordmark { display: none; }
.source-brand.active { border-color: var(--brand-blue); background: var(--brand-blue-soft); box-shadow: none; }
.source-brand.active::after { color: var(--brand-blue); }
.source-brand.brand-reference { padding-bottom: 20px; }
.source-brand.brand-reference::after { content: '官网'; top: auto; right: 6px; bottom: 3px; padding: 1px 4px; border-radius: 4px; background: var(--brand-blue-soft); color: var(--brand-blue); font-size: 9px; font-weight: 500; line-height: 12px; white-space: nowrap; }
.library-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 24px 0 18px; }
.library-intro p { display: none; margin: 0 0 9px; color: #86868b; font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.library-intro h2 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.035em; font-weight: 600; }
.library-intro > span { color: var(--muted); font-size: 14px; padding-bottom: 3px; }
.workbench { width: min(1240px, calc(100% - 64px)); grid-template-columns: 222px minmax(0, 1fr); gap: 32px; margin: 0 auto; }
.sidebar { position: sticky; top: 24px; max-height: calc(100dvh - 48px); padding: 0 14px 6px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; gap: 24px; scrollbar-color: #c7c7cc transparent; }
.side-section { gap: 3px; }
.side-section h2 { color: #6e6e73; font-size: 11px; font-weight: 600; margin-bottom: 8px; padding-inline: 13px; }
.side-section p { padding-inline: 13px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.document-filters { gap: 24px; border-color: #dedee3; padding-top: 24px; }
.side-section + .side-section { padding-top: 23px; border-color: #dedee3; }
.quick, .term-nav .quick, .brand-nav .quick, .doc-nav .quick, .system-topic-nav .quick { min-height: 42px; border: 1px solid transparent; border-radius: 10px; padding: 9px 12px; background: transparent; box-shadow: none; color: #424245; font-size: 13px; line-height: 1.4; transition: color 160ms ease, background-color 160ms ease; }
.quick.active, .term-nav .quick.active, .brand-nav .quick.active, .doc-nav .quick.active, .system-topic-nav .quick.active { background: #fff; color: var(--brand-blue); border-color: transparent; box-shadow: 0 2px 8px rgba(0,0,0,.025); font-weight: 600; }
.brand-nav .quick { gap: 8px; padding: 10px 8px; font-size: 12px; }
.nav-brand-logo { width: 24px; height: 22px; flex-basis: 24px; }
.nav-brand-count { font-size: 10px; font-weight: 400; color: #6e6e73; }
.clear-brand-filter { font-size: 12px; margin-left: 12px; }
.results-title { margin: 0 0 12px; color: #1d1d1f; font-size: 23px; line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
.results-title:focus { outline: none; }
.summary { min-height: 44px; margin-bottom: 14px; gap: 8px 14px; font-size: 12px; color: var(--muted); }
.summary-left { flex: 1 1 auto; gap: 8px 14px; }
#generatedAt { font-size: 11px; }
.feedback-open { border: 0; min-height: 32px; padding: 0; background: transparent; color: var(--brand-blue); box-shadow: none; font-size: 12px; }
.feedback-open::after { content: ' ›'; margin-left: 3px; }
.pagination { gap: 10px; }
.page-button { min-height: 36px; padding: 0 14px; border: 1px solid #e1e1e5; border-radius: 999px; background: #fff; box-shadow: none; font-size: 12px; color: var(--brand-blue); font-weight: 400; }
.page-button:disabled { color: #86868b; opacity: .55; }
.page-status { color: #6e6e73; font-size: 11px; font-variant-numeric: tabular-nums; }
.pagination-bottom { margin-top: 24px; }
.pagination-bottom .page-button { min-height: 44px; }
.results { gap: 10px; }
.card, .empty { border: 1px solid #ededf0; border-radius: 18px; background: #fff; box-shadow: none; padding: 23px 26px; }
.term-card { padding-right: 62px; }
.terms { gap: 26px; }
.term-cell { gap: 9px; }
.term-language, .term-cell span { color: #6e6e73; font-size: 11px; font-weight: 400; }
.term-language i { font-size: 12px; }
.term-cell strong { color: #1d1d1f; font-weight: 550; font-size: 17px; line-height: 1.5; letter-spacing: -.01em; }
.term-cell .term-missing { color: #86868b; font-size: 14px; }
.term-report-button { width: 44px; height: 44px; right: 9px; color: #6e6e73; }
.term-report-button span { width: 24px; height: 24px; border-color: #e5e5e9; background: #f5f5f7; color: #86868b; font-size: 11px; font-weight: 500; }
.doc-card { padding: 28px; }
.doc-card h2 { font-size: 20px; line-height: 1.5; font-weight: 600; letter-spacing: -.02em; }
.doc-card .card-head { gap: 16px; }
.doc-card p, .product-description, details p { line-height: 1.7; }
.badge { min-height: 25px; padding-inline: 9px; font-size: 10px; background: #f5f5f7; color: #6e6e73; }
.badges { min-width: 0; }
.doc-actions a { font-weight: 400; }
.doc-actions.prominent { gap: 10px; margin-top: 20px; }
.doc-open, .doc-open.primary { min-height: 42px; padding: 10px 18px; border: 1px solid var(--brand-blue); border-radius: 999px; background: transparent; color: var(--brand-blue); font-size: 12px; font-weight: 400; box-shadow: none; text-decoration: none; }
.doc-open.primary { background: var(--brand-blue); color: #fff; }
.resource-meta, .doc-source-note, .doc-file-count { color: #6e6e73; font-size: 12px; }
.doc-file-list { margin-top: 22px; padding-top: 15px; border-color: #e5e5e9; }
details > summary { min-height: 34px; padding-block: 6px; color: var(--brand-blue); font-weight: 400; }
.doc-file-list a { color: var(--brand-blue); background: #f5f5f7; border-color: transparent; border-radius: 10px; padding: 12px; }
.doc-file-list a:hover { background: var(--brand-blue-soft); }
.language-pill, .model-chip { border-color: transparent; background: #f5f5f7; color: #515154; font-size: 11px; }
.doc-model-details, .doc-models { margin-top: 10px; }
.empty { color: var(--muted); text-align: center; padding: 42px 20px; line-height: 1.7; }
.empty .page-button { min-height: 44px; margin-top: 12px; }
.feedback-dialog { width: min(520px, calc(100% - 32px)); padding: 30px; border: 1px solid #e5e5e9; border-radius: 24px; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 24px 100px rgba(0,0,0,.2); }
.feedback-dialog::backdrop { background: rgba(0,0,0,.32); backdrop-filter: blur(5px); }
.dialog-head h2 { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.dialog-note { color: var(--muted); line-height: 1.7; }
.feedback-dialog label { color: #424245; font-size: 13px; }
.feedback-dialog textarea { padding: 14px; border-color: #d2d2d7; border-radius: 12px; background: #fafafa; font-size: 15px; line-height: 1.7; }
.feedback-dialog textarea:focus { background: #fff; outline: 3px solid rgba(var(--brand-blue-rgb), .22); outline-offset: 2px; }
.icon-button { border: 0; background: #f5f5f7; box-shadow: none; color: #6e6e73; }
.submit-button { border: 0; border-radius: 999px; min-height: 44px; padding: 10px 25px; background: var(--brand-blue); box-shadow: none; font-weight: 400; flex-shrink: 0; white-space: nowrap; }
.feedback-dialog .feedback-status { min-width: 0; overflow-wrap: anywhere; }
.back-to-top { width: 46px; height: 46px; border: 1px solid #e5e5e9; border-radius: 50%; background: rgba(255,255,255,.94); color: #424245; box-shadow: 0 3px 18px rgba(0,0,0,.08); }
.site-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; width: min(1240px, calc(100% - 64px)); padding: 30px 0 40px; margin: auto; border-top: 1px solid #dedee3; color: var(--muted); }
.site-footer strong { color: #424245; font-size: 14px; font-weight: 600; }
.site-footer strong span { margin-left: 7px; font-size: 12px; }
.site-footer p { margin: 9px 0 0; font-size: 11px; line-height: 1.8; }
.site-footer > p { margin: 0; text-align: right; }
@media (hover: hover) and (pointer: fine) {
  .source-brand:hover { transform: none; background: #eaeaec; border-color: transparent; box-shadow: none; }
  .source-brand.active:hover { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
  .quick:hover { background: #e8e8ed; color: var(--brand-blue); border-color: transparent; }
  .page-button:hover:not(:disabled) { background: var(--brand-blue-soft); color: var(--brand-blue); border-color: transparent; }
  .term-report-button:hover span { border-color: var(--brand-blue); }
  .quick.active:hover { background: #fff; color: var(--brand-blue); }
  .feedback-open:hover { background: transparent; color: var(--brand-blue); text-decoration: underline; text-underline-offset: 3px; }
  .doc-open:not(.primary):hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
  .search-button:hover, .submit-button:hover, .doc-open.primary:hover { background: var(--brand-blue-hover); }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .site-navigation, .hero-content, .library-intro, .workbench, .site-footer { width: calc(100% - 48px); }
  .site-nav-links { gap: 24px; }
  .workbench { grid-template-columns: 195px minmax(0,1fr); gap: 24px; }
  .source-brand { padding: 12px 7px; height: 54px; min-height: 54px; }
  .brand-wordmark { font-size: 8px; }
  .source-brand.brand-richpeace .brand-logo { display: none; }
  .summary { row-gap: 4px; }
  .terms { gap: 15px; }
  .term-card { padding-left: 20px; }
  .term-cell strong { font-size: 16px; }
}
@media (max-width: 768px) {
  html { scroll-padding-top: var(--search-offset, 76px); }
  .site-navigation { width: calc(100% - 32px); height: 52px; gap: 8px; }
  .site-brand { gap: 9px; }
  .site-brand .banner-company-logo { width: 82px; height: 22px; }
  .site-brand-title { flex-direction: column; align-items: flex-start; gap: 1px; font-size: 16px; line-height: 1.2; }
  .site-brand-title .site-brand-en { font-size: 11px; line-height: 1.2; }
  .site-nav-actions { gap: 10px; }
  .site-brand-divider { height: 15px; }
  .site-nav-links { display: none; }
  .hero-content { width: calc(100% - 40px); grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(4, auto); padding: 16px 0 14px; }
  .brand-lockup { grid-column: 1 / -1; grid-row: 1; gap: 0; }
  .brand-title-row { display: block; }
  .brand-name-pair { gap: 10px; }
  .brand-en { padding: 0; border: 0; font-size: 12px; }
  .brand-lockup h1 { font-size: 30px; letter-spacing: -.04em; }
  .hero-tagline { margin-top: 12px; font-size: 22px; }
  .brand-subtitle { margin-top: 10px; font-size: 11px; line-height: 1.7; }
  .search-anchor { grid-column: 1 / -1; grid-row: 3; margin-top: 16px; width: 100%; }
  .search-panel { position: static; top: env(safe-area-inset-top, 0px); padding: 6px; border-radius: 16px; }
  .search-input-row { grid-template-columns: minmax(0, 1fr) 62px; gap: 2px; }
  .search-main input { font-size: 16px; padding-left: 35px; padding-right: 3px; min-height: 44px; }
  .search-symbol { left: 9px; top: 13px; width: 19px; height: 19px; }
  .search-button { min-height: 44px; border-radius: 11px; font-size: 13px; padding: 0 12px; }
  body.search-docked .search-panel { position: fixed; top: env(safe-area-inset-top,0px); left: 0; right: 0; width: 100%; z-index: 90; margin: 0; border: 0; border-bottom: 1px solid #e5e5e9; border-radius: 0; padding: 9px 16px; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 4px 16px rgba(0,0,0,.04); }
  body.search-docked .search-main input { background: #f5f5f7; }
  .search-discovery { grid-row: 4; margin-top: 2px; gap: 12px; }
  .search-examples > span { display: none; }
  .search-discovery > p, .search-examples { font-size: 11px; }
  .search-examples { gap: 12px; margin-top: 0; }
  .search-examples button { min-height: 40px; font-size: 11px; }
  .brand-rail-label { margin: 16px 0 14px; font-size: 12px; }
  .brand-rail-label > span { display: none; }
  .brand-stack { width: 100%; padding: 0; }
  .brand-stack-left { grid-row: 1; grid-column: 1 / -1; }
  .brand-stack-right { grid-row: 2; grid-column: 1 / -1; margin-top: 7px; }
  .source-brand-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
  .source-brand { min-height: 44px; height: 44px; padding: 7px; border-radius: 10px; }
  .source-brand .brand-logo, .source-brand .da-logo { width: 100%; height: 100%; max-height: 28px; padding: 0; object-fit: contain; }
  .source-brand .brand-logo-cropped { width: 100%; height: auto; max-height: none; }
  .source-brand.brand-richpeace .brand-logo { display: none; }
  .source-brand.brand-richpeace { padding: 6px 3px; }
  .brand-wordmark { font-size: 8px; letter-spacing: -.5px; }
  .source-brand .brand-logo-butterfly { width: 30px; height: 30px; max-height: 30px; }
  .library-intro { width: calc(100% - 40px); padding: 20px 0 14px; gap: 12px; }
  .library-intro p { font-size: 9px; margin-bottom: 8px; }
  .library-intro h2 { font-size: 23px; }
  .library-intro > span { display: none; }
  .workbench { width: calc(100% - 32px); display: grid; grid-template-columns: 1fr; gap: 20px; margin: auto; }
  .sidebar { position: static; max-height: none; overflow: visible; padding: 0; border: 0; background: none; display: grid; gap: 14px; }
  .term-nav { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 7px; margin: 0; }
  .term-nav::-webkit-scrollbar { display: none; }
  .side-section.term-nav h2 { position: absolute; width: 1px; height: 1px; min-width: 0; flex: none; overflow: hidden; clip-path: inset(50%); padding: 0; margin: -1px; }
  .term-nav .quick { flex: 0 0 auto; width: auto; min-height: 44px; border-radius: 999px; padding: 10px 16px; font-size: 12px; background: #e8e8ed; color: #424245; white-space: nowrap; }
  .term-nav .quick.active { color: #fff; background: var(--brand-blue); box-shadow: none; }
  .ui-ready .filter-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 13px 17px; border: 1px solid #e5e5e9; border-radius: 14px; background: #fff; color: #424245; text-align: left; box-shadow: none; }
  .filter-toggle b { font-weight: 500; font-size: 13px; }
  .filter-toggle small { margin-top: 4px; font-size: 11px; color: #6e6e73; }
  .filter-toggle.has-selection { border-color: var(--brand-blue); background: #fff; }
  .filter-chevron { font-size: 19px; color: #6e6e73; }
  .document-filters { padding: 18px; gap: 20px; border: 1px solid #e5e5e9; border-radius: 16px; background: #fff; }
  .brand-nav, .doc-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .side-section h2 { padding: 0; grid-column: 1 / -1; }
  .side-section p { padding: 0; }
  .brand-nav .quick, .doc-nav .quick { background: #f5f5f7; min-height: 48px; border-radius: 10px; font-size: 11px; padding: 8px; }
  .brand-nav .quick.active, .doc-nav .quick.active { background: var(--brand-blue-soft); color: var(--brand-blue); border-color: var(--brand-blue); box-shadow: none; }
  .nav-brand-logo { width: 22px; flex-basis: 22px; }
  .nav-brand-count { font-size: 9px; }
  .clear-brand-filter { grid-column: 1 / -1; margin: 0; }
  .results-title { font-size: 21px; margin: 3px 4px 10px; }
  .summary { margin: 0 4px 14px; font-size: 11px; gap: 8px; }
  .summary-left { flex-basis: 100%; gap: 8px; justify-content: space-between; }
  .feedback-open { font-size: 11px; min-height: 36px; }
  #generatedAt { width: 100%; font-size: 10px; }
  .pagination { display: flex; width: 100%; justify-content: space-between; margin: 2px 0 0; }
  .page-button { min-height: 44px; font-size: 11px; padding: 0 17px; }
  .page-status { flex: 1; text-align: center; }
  .results { gap: 10px; }
  .card { border-radius: 16px; padding: 20px; }
  .term-card { padding-right: 50px; }
  .terms { gap: 16px; }
  .term-cell { gap: 6px; }
  .term-cell strong { font-size: 15px; font-weight: 500; }
  .term-report-button { width: 44px; height: 44px; right: 4px; }
  .doc-card { padding: 21px; }
  .doc-card .card-head { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
  .doc-card h2 { font-size: 18px; }
  .badges { justify-content: flex-start; }
  .doc-actions.prominent { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
  .doc-open, .doc-open.primary { width: auto; min-height: 44px; padding: 11px 16px; font-size: 12px; }
  .doc-file-list a { padding: 12px; }
  .context-grid { grid-template-columns: 1fr; }
  .feedback-dialog { padding: 23px; }
  .site-footer { width: calc(100% - 40px); padding: 25px 0 32px; display: block; }
  .site-footer > p { text-align: left; margin-top: 20px; }
  .app-shell { padding-bottom: 42px; }
}
@media (max-width: 600px) {
  .terms { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .term-cell { grid-template-columns: 76px minmax(0,1fr); align-items: baseline; gap: 8px; }
  .term-cell .term-language { font-size: 10px; }
  .term-language i { font-size: 11px; }
}
@media (max-width: 360px) {
  .hero-content { width: calc(100% - 32px); padding-top: 18px; }
  .brand-lockup h1 { font-size: 28px; }
  .hero-tagline { font-size: 20px; }
  .site-brand .banner-company-logo { width: 72px; }
  .search-main input { font-size: 16px; }
  .source-brand { padding: 9px 4px; }
  .brand-wordmark { font-size: 7px; }
  .card { padding-left: 15px; }
  .term-card { padding-right: 42px; }
  .term-cell { grid-template-columns: 71px minmax(0,1fr); gap: 4px; }
  .term-cell strong { font-size: 14px; }
  .term-report-button { right: 0; }
  .brand-nav, .doc-nav { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-transparency: reduce) {
  body.search-docked .search-panel, .back-to-top { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .feedback-dialog::backdrop { backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink: #000; --muted: #454545; --line: #717176; }
  .quick, .page-button, .card, .source-brand { border-color: #717176; }
  .quick.active, .term-nav .quick.active, .brand-nav .quick.active, .source-brand.active { border-color: var(--brand-blue); }
  .brand-subtitle, .term-language, .term-cell span, .nav-brand-count { color: #454545; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .apple-theme *, .apple-theme *::before, .apple-theme *::after { animation: none !important; transition: none !important; }
  .search-button:active, .source-brand:active { transform: none; }
}

.cache-controls{max-width:1200px;margin:12px auto;padding:0 24px;font-size:13px;color:#52667f}.cache-controls button{min-height:44px;background:transparent;border:0;color:#235d98;cursor:pointer}.cache-controls span{margin-left:12px}

.source-brand{height:76px;min-height:76px;display:flex;flex-direction:column;gap:6px;padding:9px 8px;overflow:hidden}
.source-brand .brand-logo-stage{width:100%;height:32px;display:flex;align-items:center;justify-content:center;overflow:hidden;gap:4px;flex:none}
.source-brand .brand-card-label{font-size:11px;line-height:1.4;color:#425a76;font-weight:550;white-space:nowrap}
.source-brand.brand-reference{padding-bottom:9px}.source-brand.brand-reference::after{display:none}
@media(max-width:600px){.source-brand{height:70px;min-height:70px;padding:7px 4px}.source-brand .brand-logo-stage{height:28px}.source-brand .brand-card-label{font-size:11px}}

/* Reserve the expanded masthead's space so compact mode never moves results. */
@media (min-width: 769px) {
  body.ui-ready .masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: #fff;
  }
  body.masthead-compact .masthead { box-shadow: 0 3px 16px rgba(0, 0, 0, .07); }
  body.masthead-compact .hero-content { padding-block: 8px; }
  body.masthead-compact .search-anchor { margin-top: 8px; }
  body.masthead-compact .source-brand { height: 64px; min-height: 64px; padding-block: 5px; gap: 2px; }
  body.ui-ready .sidebar {
    top: var(--search-offset, 302px);
    max-height: calc(100dvh - var(--search-offset, 302px) - 24px);
  }
}

/* Keep the status on the existing search caption line as the catalog loads. */
#searchHint { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#searchHint:not([data-state="ready"]) { padding: 3px 10px; border-radius: 7px; background: #eff6fc; color: #174f84; font-size: 13px; font-weight: 500; }
#searchHint progress { width: 38px; height: 6px; accent-color: var(--brand-blue); }
#searchHint .startup-retry { white-space: nowrap; color: var(--brand-blue); text-underline-offset: 2px; }
#searchHint[data-state="ready"] .startup-retry,
#searchHint[data-state="ready"] progress,
#searchHint[data-state="error"] progress { display: none; }
#searchHint[data-state="starting"] .startup-retry,
#searchHint[data-state="documents"] .startup-retry { animation: startup-retry-visible 0s 6s backwards; }
@keyframes startup-retry-visible { from { width: 0; overflow: hidden; visibility: hidden; } to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) {
  #searchHint progress { display: none; }
}
@media (max-width: 768px) {
  .search-discovery { min-height: 40px; flex-wrap: wrap; row-gap: 4px; }
  #searchHint:not([data-state="ready"]) + .search-examples { display: none; }
}
