/* Reference and deliberate data gaps: docs/visual-fidelity.md.
   These are native-raster targets from the pinned desktop screenshot, not
   purported computed styles from live Google (which was CAPTCHA-blocked). */
:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #202124;
  background: #fff;
  --archive-ink: #334155;
  --archive-muted: #64748b;
  --archive-line: #e2e8f0;
  --result-blue: #1a0dab;
  --result-text: #474747;
  --source-surface: #f1f4ff;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--result-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { border: 1px solid var(--archive-line); background: #fff; color: var(--archive-ink); border-radius: 6px; padding: 8px 12px; }
button:hover:not(:disabled) { background: #f1f5f9; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid #1a73e8; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 16px; padding: 12px; z-index: 20; background: white; }
.skip-link:focus { top: 10px; }
/* Archive chrome is intentionally NOT a simulated Google search header. */
.app-header { height: 60px; padding: 0 24px; display: flex; align-items: center; gap: 20px; background: #f8fafc; border-bottom: 1px solid var(--archive-line); }
#archive-toggle { font-size: 12px; min-height: 34px; background: transparent; }
.brand { display: flex; align-items: center; gap: 9px; color: #334155; font-size: 16px; font-weight: 600; letter-spacing: -.3px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 25px; height: 25px; display: grid; place-items: center; background: #334155; border-radius: 6px; color: #fff; font-size: 14px; }
.header-note { margin-left: auto; font-size: 10px; letter-spacing: 1px; color: var(--archive-muted); }
.read-only { letter-spacing: 0; margin-left: 16px; color: #476353; padding: 4px 8px; border-radius: 4px; border: 1px solid #d8e4dd; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - 60px); }
body.archive-open .workspace { grid-template-columns: 280px minmax(0, 1fr); }
.sidebar { min-width: 0; background: #f8fafc; border-right: 1px solid var(--archive-line); height: calc(100vh - 60px); position: sticky; top: 0; display: flex; flex-direction: column; }
.sidebar-controls { padding: 24px 18px 4px; max-height: 65%; overflow-y: auto; flex-shrink: 0; }
.eyebrow { color: var(--archive-muted); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; margin-bottom: 16px; }
label { display: block; color: #475569; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
select, input { min-width: 0; border: 1px solid #cbd5e1; background: white; border-radius: 6px; color: #334155; padding: 10px; }
#run { width: 100%; font-size: 12px; text-overflow: ellipsis; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 12px; color: var(--archive-muted); font-size: 10px; }
.pagination button { padding: 7px; font-size: 11px; }
.run-pagination { padding: 8px 0 18px; }
.run-pagination button { padding: 4px 8px; background: transparent; }
.search-control { display: flex; border: 1px solid #cbd5e1; background: white; border-radius: 6px; }
.search-control input { width: 100%; border: 0; font-size: 12px; background: transparent; }
.search-control button { border: 0; background: transparent; font-size: 20px; padding: 6px 10px; }
.muted { color: var(--archive-muted); font-size: 12px; line-height: 1.6; }
#list-status { font-size: 11px; margin: 14px 0 8px; }
.records { overflow: auto; flex: 1; padding: 0 8px 12px; }
.record { display: block; width: 100%; background: transparent; border: 1px solid transparent; text-align: left; padding: 14px 10px; margin-bottom: 4px; border-radius: 7px; }
.record[aria-pressed="true"] { background: #eaf0f8; border-color: #cbd8eb; box-shadow: inset 2px 0 #647eaa; }
.record-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.record-id { font-size: 10px; color: #64748b; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 10px; line-height: 16px; padding: 1px 5px; border-radius: 3px; background: #eef2f6; color: #64748b; }
.record-query { display: block; color: #334155; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.record-action { display: block; margin-top: 8px; font-size: 10px; color: #64748b; }
.record[aria-pressed="true"] .record-action { color: #355a92; }
main { min-width: 0; padding: 26px 32px 80px; }
#response { max-width: 960px; margin: 0 auto; }
.response-header { padding: 0 16px; }
.response-header .eyebrow { margin-bottom: 8px; }
h1 { margin: 0 0 12px; color: #334155; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -.25px; overflow-wrap: anywhere; }
.metadata { display: flex; flex-wrap: wrap; gap: 7px 0; color: var(--archive-muted); font-size: 11px; line-height: 16px; }
.metadata-item + .metadata-item::before { content: '·'; margin: 0 8px; color: #94a3b8; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--archive-line); padding: 0 16px; margin: 18px 0 0; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 12px 0; color: var(--archive-muted); font-size: 12px; }
.tabs button[aria-selected="true"] { color: #335c97; border-bottom-color: #335c97; font-weight: 600; }
.preview-toolbar { position: relative; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 16px 20px; }
.archive-note { font-size: 10px; line-height: 16px; color: var(--archive-muted); margin: 0; }
.text-button { background: transparent; border: 0; color: #526987; font-size: 10px; padding: 4px 0 4px 16px; }
.capture-diagnostics { font-size: 12px; line-height: 18px; color: #6b5a32; background: #fffbeb; border-left: 2px solid #e4d3a3; margin: 0 16px 20px; padding: 10px 12px; overflow-wrap: anywhere; }
.capture-diagnostics:empty { display: none; }
.state-message { margin: 4px 0; font-size: 12px; line-height: 18px; }
.notice { max-width: 960px; margin: 0 auto 20px; padding: 14px 16px; font-size: 13px; line-height: 20px; background: #f1f5f9; color: #475569; border-radius: 6px; }
.notice.error { background: #fff1f2; color: #9f1239; }
.welcome { max-width: 600px; margin: 14vh auto 0; text-align: center; color: #64748b; }
.welcome-icon { display: block; font-size: 40px; color: #94a3b8; margin-bottom: 18px; }
.welcome h1 { font-size: 24px; }
.welcome p { line-height: 24px; margin-bottom: 24px; }
/* Bounded results surface: native 960px desktop reference crop, 16px gutters.
   No gradient, enclosing AIO card, faux favicon or fabricated emphasis. */
.results-surface { color: #1f1f1f; background: #fff; }
.aio { background: #fff; border: 0; border-radius: 0; padding: 16px 16px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; min-height: 24px; }
#aio-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; color: #1f1f1f; }
.sparkle { color: #3876c8; font-size: 23px; line-height: 24px; }
.aio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.aio-layout:has(#sources:empty) { grid-template-columns: minmax(0, 544px); }
.aio-content { min-width: 0; font-size: 14px; line-height: 20px; color: var(--result-text); overflow-wrap: anywhere; }
.aio-content > .answer-block:first-child { color: #1f1f1f; }
.answer-block p { margin: 0 0 16px; }
.answer-block h3 { font-size: 14px; line-height: 20px; font-weight: 500; color: #1f1f1f; margin: 18px 0 8px; }
.answer-block-title { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: #1f1f1f; margin-bottom: 4px; }
.answer-block ul, .answer-block ol { margin: 8px 0 16px; padding-left: 24px; }
.answer-block li { margin: 0 0 8px; padding-left: 0; }
.answer-block li p { margin: 0; }
.answer-block li .answer-block ul, .answer-block li .answer-block ol { margin-bottom: 8px; }
.answer-block ul.descriptive-list { list-style: none; padding-left: 0; margin-top: 0; }
.answer-block .descriptive-list > li { margin-bottom: 12px; }
.aio-content a:not(.citation) { color: #1a0dab; }
/* A link glyph opens exactly the saved citation group, not a guessed source. */
.citation { display: inline-flex; vertical-align: middle; align-items: center; justify-content: center; min-width: 24px; height: 18px; border: 0; border-radius: 12px; margin-left: 4px; padding: 2px 6px; background: #e8efff; color: #536782; font-size: 10px; line-height: 14px; }
button.citation { position: relative; width: 24px; }
button.citation::before, button.citation::after { content: ''; position: absolute; width: 8px; height: 5px; border: 1px solid currentColor; border-radius: 5px; transform: rotate(-45deg); }
button.citation::before { left: 6px; top: 7px; }
button.citation::after { left: 10px; top: 4px; }
button.citation:hover { background: #dbe7fd; }
.citation.unmapped { color: #80571f; background: #fff1d6; min-width: 24px; }
.table-scroll { max-width: 100%; overflow: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { min-width: 100px; border: 1px solid #dadce0; padding: 12px; text-align: left; vertical-align: top; }
th { font-weight: 600; background: #f8fafd; }
td p, th p { margin: 0 !important; }
.preserve-lines { white-space: pre-wrap; }
/* A single pale source panel, not individually floating archive cards. */
#sources:not(:empty) { background: var(--source-surface); border-radius: 16px; padding: 0 12px 12px; }
.source-card { padding: 12px 0; border-bottom: 1px solid #dde3ef; overflow-wrap: anywhere; scroll-margin-top: 16px; }
.source-card:target { outline: 2px solid #7cacf8; outline-offset: 3px; }
/* Nearest local raster fit among six installed sans-serif families; this is
   not a claim that Noto Sans was Google's original font. */
.source-title { display: block; font-family: "Noto Sans", Arial, sans-serif; font-size: 13px; line-height: 18px; color: #1f1f1f; font-weight: 400; }
.source-snippet { font-size: 12px; line-height: 18px; color: #474c58; margin: 4px 0 8px; }
.source-name { font-size: 11px; line-height: 16px; color: #5e636e; }
.source-index { font-size: 11px; line-height: 16px; color: #5e636e; margin: 0 0 6px; }
.sources-toggle { width: 100%; border: 0; border-radius: 20px; background: #d4e4fe; font-size: 12px; line-height: 18px; color: #243852; margin-top: 12px; padding: 7px 12px; }
.sources-toggle:hover:not(:disabled) { background: #cbdfff; }
.mobile-sources { display: none; border: 0; background: #edf2fa; border-radius: 20px; font-size: 12px; line-height: 20px; padding: 4px 12px; }
/* Organic results retain the normal blue-link layout, not Web Result cards. */
.organic { max-width: 684px; padding: 0 16px; margin-top: 36px; }
.search-result { margin-bottom: 30px; overflow-wrap: anywhere; }
.result-identity { display: flex; align-items: center; min-height: 34px; margin-bottom: 6px; }
/* No made-up monogram: reserve only the space of the missing favicon. */
.result-identity::before { content: ''; flex: 0 0 28px; width: 28px; height: 28px; margin-right: 12px; }
.site-name { font-size: 14px; line-height: 20px; color: #202124; }
.display-url { font-size: 12px; line-height: 18px; color: #4d5156; overflow-wrap: anywhere; }
.search-result h3 { font-size: 20px; line-height: 26px; font-weight: 400; margin: 0 0 3px; }
.search-result h3 a { color: #1a0dab; }
.result-snippet { font-size: 14px; line-height: 22px; color: #4d5156; margin: 0; }
.result-date { color: #70757a; }
.result-author, .rich-snippet { font-size: 14px; line-height: 22px; color: #70757a; margin: 4px 0 0; }
.sitelinks-inline { display: flex; flex-wrap: wrap; gap: 0; font-size: 14px; line-height: 22px; margin-top: 2px; }
.sitelinks-inline > * + *::before { content: '·'; color: #70757a; margin: 0 6px; }
.sitelinks-expanded { margin: 16px 0 0 20px; }
.sitelink-expanded { margin-bottom: 18px; }
.sitelink-expanded a, .sitelink-expanded > span { display: block; font-size: 20px; line-height: 26px; }
.sitelink-expanded p { font-size: 14px; line-height: 22px; color: #4d5156; margin: 3px 0 0; }
/* Archive inspectors, deliberately outside the reference result surface. */
.json-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 16px 0; }
.json-toolbar label { margin: 0; }
.json-toolbar select { font-size: 12px; }
.json-toolbar button { margin-left: auto; font-size: 12px; }
pre { margin: 16px; padding: 20px; border: 1px solid var(--archive-line); border-radius: 6px; background: #f8fafc; color: #334155; font: 12px/20px ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#copy-status { margin-left: 16px; }
#sources-dialog { width: min(500px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border: 1px solid #dadce0; border-radius: 16px; padding: 20px; color: #202124; background: #fff; }
#sources-dialog::backdrop { background: #20212466; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-header h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 400; }
.dialog-header button { font-size: 12px; }
.dialog-note { font-size: 12px; line-height: 18px; color: #70757a; }
#sources-dialog .source-card:last-child { border: 0; }
body:has(.archive-backdrop:not([hidden])) { overflow: hidden; }
.archive-backdrop { position: fixed; inset: 60px 0 0; z-index: 8; border: 0; border-radius: 0; background: #0f172a55; }
/* Dataset controls and comparisons are archive chrome, not Google facsimiles. */
#compare-open { position: absolute; top: -36px; right: 16px; font-size: 11px; line-height: 16px; padding: 5px 9px; border: 1px solid var(--archive-line); border-radius: 5px; }
#filter-aio { width: 100%; font-size: 12px; }
.filter-label { margin-top: 16px; }
.filter-details { margin-top: 12px; color: var(--archive-ink); font-size: 12px; }
summary { cursor: pointer; }
.filter-details summary { padding: 4px 0; }
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; margin-top: 14px; }
.filter-grid label { font-size: 11px; margin-bottom: 6px; }
.filter-grid input, .filter-grid select { width: 100%; padding: 8px 6px; font-size: 11px; }
.filter-wide { grid-column: 1 / -1; }
.filter-hint { font-size: 10px; line-height: 16px; color: var(--archive-muted); }
.filter-actions { display: flex; gap: 8px; margin-top: 14px; }
.filter-actions button { font-size: 11px; padding: 7px 10px; }
.comparison { max-width: 1400px; margin: 0 auto; min-width: 0; }
.comparison-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.comparison-header .eyebrow { margin-bottom: 8px; }
.comparison-header > div { min-width: 0; }
.comparison-header button { flex-shrink: 0; font-size: 12px; }
.comparison-query { color: var(--archive-ink); font-size: 16px; line-height: 24px; overflow-wrap: anywhere; margin: 0 0 20px; }
.comparison-controls { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 14px; padding: 18px; border: 1px solid var(--archive-line); border-radius: 8px; background: #f8fafc; }
.comparison-controls > div { flex: 1 1 280px; min-width: 0; }
.comparison-controls select, .comparison-matches select { width: 100%; max-width: 100%; font-size: 12px; text-overflow: ellipsis; }
.comparison-controls .pagination { padding: 8px 0 0; }
#compare-load { margin-top: 22px; font-size: 12px; color: white; background: #335c97; border-color: #335c97; }
#compare-load:hover:not(:disabled) { background: #254a7e; }
.comparison-hint { flex-basis: 100%; color: var(--archive-muted); font-size: 12px; line-height: 18px; margin: 0; }
#compare-status { overflow-wrap: anywhere; }
.comparison-matches { padding: 14px 0; max-width: 700px; }
.comparison-summary { border: 1px solid var(--archive-line); border-radius: 8px; padding: 18px; margin: 20px 0; background: #f8fafc; min-width: 0; }
.comparison-summary h2 { color: var(--archive-ink); font-size: 16px; font-weight: 500; margin: 0 0 14px; }
.comparison-metrics { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; list-style: none; }
.comparison-metrics li { font-size: 12px; line-height: 18px; color: var(--archive-ink); padding: 6px 9px; border: 1px solid var(--archive-line); border-radius: 5px; background: white; overflow-wrap: anywhere; }
.comparison-ranks summary { font-size: 12px; line-height: 20px; color: #335c97; }
.comparison-ranks table { background: white; font-size: 12px; line-height: 18px; table-layout: fixed; }
.comparison-ranks th, .comparison-ranks td { min-width: 0; padding: 10px; overflow-wrap: anywhere; }
.comparison-ranks th:first-child { width: 50%; }
.comparison-jumps { display: flex; gap: 16px; font-size: 12px; margin: 14px 0 0; }
.comparison-panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.comparison-pane { min-width: 0; border: 1px solid var(--archive-line); border-radius: 8px; padding: 20px; overflow-wrap: anywhere; }
.comparison-pane > h2 { color: var(--archive-ink); font-size: 17px; line-height: 24px; font-weight: 500; margin: 0 0 8px; }
.comparison-pane-meta { font-size: 11px; line-height: 18px; color: var(--archive-muted); margin: 0 0 10px; }
.comparison-pane-status { font-size: 12px; line-height: 18px; padding: 8px 10px; background: #f1f5f9; color: var(--archive-ink); border-radius: 4px; }
.comparison-section-title { font-size: 14px; line-height: 20px; color: var(--archive-ink); margin: 24px 0 16px; font-weight: 600; }
.comparison-sources, .comparison-json { margin: 20px 0; font-size: 12px; line-height: 20px; color: var(--archive-ink); }
.comparison-sources .source-card { padding: 12px; background: var(--source-surface); }
.comparison-json pre { margin: 12px 0 0; padding: 12px; }
@media (max-width: 999px) {
  .comparison-panes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 759px) {
  .comparison { padding: 0 16px; }
  .comparison-header { flex-direction: column; gap: 4px; margin-bottom: 20px; }
  .comparison-query { font-size: 14px; line-height: 22px; }
  #compare-load { margin-top: 0; }
  .comparison-pane, .comparison-summary { padding: 14px; }
}
@media (max-width: 1239px) {
  body.archive-open .aio-layout { grid-template-columns: minmax(0, 1fr); }
  body.archive-open #sources { display: none; }
  body.archive-open .mobile-sources:not([hidden]) { display: inline-block; }
}
@media (max-width: 999px) {
  body.archive-open .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 9; top: 60px; left: 0; width: min(320px, calc(100vw - 48px)); }
  main { padding: 24px 16px 60px; }
}
@media (max-width: 759px) {
  .app-header { padding: 0 16px; gap: 16px; }
  .header-note { display: none; }
  .aio-layout { grid-template-columns: minmax(0, 1fr); }
  #sources { display: none; }
  .mobile-sources:not([hidden]) { display: inline-block; }
  main { padding: 22px 0 48px; }
  .response-header { padding: 0 16px; }
  h1 { font-size: 18px; line-height: 26px; }
  .preview-toolbar { padding-bottom: 20px; }
  .aio-content { font-size: 16px; line-height: 24px; }
  .answer-block h3, .answer-block-title { font-size: 16px; line-height: 24px; }
  .answer-block p { margin-bottom: 16px; }
  .aio-layout:has(#sources:empty) { grid-template-columns: minmax(0, 1fr); }
  .organic { margin-top: 32px; max-width: none; }
  .search-result { margin-bottom: 28px; }
  .result-snippet { font-size: 14px; line-height: 22px; }
  .display-url { font-size: 12px; line-height: 18px; }
  .sitelinks-expanded { margin-left: 0; }
  .json-toolbar { gap: 10px; }
  .json-toolbar select { max-width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button { transition: background-color .12s ease; }
}
