/* Palette: history-ac-cn. Typography: Cosmic Gemini's shared UI and Settings. */
:root {
  color-scheme: light dark;
  scrollbar-gutter: stable;
  --bg: #f8fafb;
  --surface: #fff;
  --text: #243c48;
  --muted: #617783;
  --blue: #287da9;
  --soft: #edf5fa;
  --line: #e2e9ed;
  --accent: #98c4dd;
  --hover: #f0f7fb;
  --sidebar: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: normal;
  line-height: 1.55;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e181d;
    --surface: #14232a;
    --text: #d8e5eb;
    --muted: #9fb2bd;
    --blue: #70b8dc;
    --soft: #152a34;
    --line: #2a3e48;
    --accent: #4f879f;
    --hover: #1b3541;
    --sidebar: #101c22;
  }
}
* { box-sizing: border-box; }
:lang(zh-CN) { letter-spacing: .04em; }
:lang(en) { letter-spacing: normal; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
::selection { background: var(--accent); color: var(--bg); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; display: flex; flex-direction: column; padding: 35px 20px 23px; border-right: 1px solid var(--line); background: var(--sidebar); }
.identity { display: flex; align-items: center; gap: 11px; padding: 0 2px; }
.identity img { width: 40px; height: 40px; flex-shrink: 0; }
.wordmark { display: grid; gap: 1px; min-width: 0; }
.wordmark strong { font-size: 17px; font-weight: 720; letter-spacing: .018em; white-space: nowrap; }
.navigation { display: grid; gap: 7px; margin-top: 51px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; text-align: left; }
.nav-item:hover { background: var(--hover); color: var(--blue); }
:root[data-view="documents"] #tab-documents, :root[data-view="links"] #tab-links, :root[data-view="requests"] #tab-requests { background: var(--soft); color: var(--blue); font-weight: 650; border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.sidebar-bottom { margin-top: auto; padding: 35px 15px 0; }
.sidebar-rule { display: block; width: 26px; height: 2px; background: var(--accent); margin-bottom: 18px; }
.help-link { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.help-link svg { width: 17px; height: 17px; }
.help-link span { margin-left: auto; }
.help-link:hover { color: var(--blue); }
main { margin-left: 260px; padding: 48px clamp(28px, 4vw, 64px); min-height: 100vh; }
main:focus, .view:focus { outline: none; }
.view { display: none; width: min(100%, 1100px); margin-inline: auto; }
:root[data-view="documents"] #panel-documents, :root[data-view="links"] #panel-links, :root[data-view="requests"] #panel-requests { display: block; }
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.section-index { display: block; font-size: 12px; font-weight: 500; color: var(--blue); margin-bottom: 9px; }
h1 { font-size: 25px; font-weight: 650; margin: 0; line-height: 1.4; }
h2 { font-size: 15px; font-weight: 650; margin: 0; }
.document-bar { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 15px; }
.attachment-legend { display: inline-flex; gap: 7px; align-items: center; }
.attachment-legend svg { width: 16px; height: 16px; }
.document-grid, .link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.document-group, .link-group { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 4px 4px 8px 8px; }
.document-group > h2, .link-group > h2 { padding: 16px 21px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.document-group > h2 svg { color: var(--blue); width: 19px; height: 19px; }
.file { display: flex; align-items: center; gap: 10px; padding: 19px 16px 19px 21px; }
.file + .file { border-top: 1px solid var(--line); }
.file-copy { min-width: 0; flex: 1; }
.file-copy a { display: block; width: fit-content; font-size: 15px; font-weight: 550; color: var(--text); }
.file-copy a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.file-copy small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.file-action { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 7px; color: var(--blue); }
.file-action:hover { background: var(--soft); }
.file-action svg { width: 19px; height: 19px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 21px; }
.link-row + .link-row { border-top: 1px solid var(--line); }
.link-row:hover, .request-row:hover { background: var(--hover); }
.link-row:last-child { border-radius: 0 0 8px 8px; }
.link-row > span:first-child { min-width: 0; }
.link-row strong { display: block; font-size: 14px; font-weight: 550; }
.link-row small { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.link-arrow { color: var(--blue); font-size: 18px; font-weight: 400; flex-shrink: 0; }
.server-tests { display: none; margin-top: 28px; }
:root[data-server-fixtures] .server-tests { display: block; }
.server-tests > h2 { color: var(--muted); margin-bottom: 14px; }
.server-tests .request-row:first-child { border-top: 0; }
.request-table { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 4px 4px 8px 8px; overflow: hidden; }
.request-labels, .request-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.5fr) 60px 18px; align-items: center; gap: 22px; padding: 19px 24px; }
.request-labels { background: var(--soft); color: var(--muted); font-size: 13px; padding-block: 12px; }
.request-row { border-top: 1px solid var(--line); min-height: 70px; }
.request-row strong { font-size: 14px; font-weight: 550; }
.request-row > span:not(.link-arrow) { font-size: 13px; color: var(--muted); }
.request-row .format { font-variant-numeric: tabular-nums; }
.test-notes { margin-top: 25px; color: var(--muted); font-size: 13px; max-width: 680px; }
.test-notes summary { width: fit-content; cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; }
.test-notes summary::-webkit-details-marker { display: none; }
.test-notes summary:before { content: ''; width: 5px; height: 5px; border-top: 1.5px solid; border-right: 1.5px solid; transform: rotate(45deg); margin-right: 3px; }
.test-notes[open] summary:before { transform: rotate(135deg); }
.test-notes p { margin: 12px 0 0 17px; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 10px 16px; z-index: 5; background: var(--surface); color: var(--blue); }
.skip-link:focus { top: 12px; }
@media (min-width: 1650px) { main { padding-top: 60px; } .document-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } .file { padding-inline: 16px 12px; } }
@media (max-width: 1100px) { .sidebar { width: 238px; padding-inline: 14px; } main { margin-left: 238px; padding-inline: 28px; } .request-labels, .request-row { grid-template-columns: minmax(110px, 1fr) minmax(145px, 1.4fr) 48px 16px; gap: 12px; padding-inline: 18px; } }
@media (max-width: 800px) {
  .sidebar { position: relative; width: 100%; padding: 20px 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; padding-bottom: 14px; }
  .nav-item { justify-content: center; padding: 10px 7px; gap: 8px; white-space: nowrap; }
  .sidebar-bottom { display: none; }
  main { margin-left: 0; padding: 27px 22px; min-height: auto; }
}
@media (max-width: 560px) {
  .sidebar { padding-inline: 16px; }
  .nav-item { font-size: 13px; gap: 5px; }
  .nav-item svg { width: 16px; height: 16px; }
  main { padding: 25px 16px; }
  .view-heading { align-items: start; flex-direction: column; gap: 10px; margin-bottom: 20px; padding-bottom: 18px; }
  h1 { font-size: 23px; }
  .document-grid, .link-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .request-labels { display: none; }
  .request-row { grid-template-columns: minmax(0, 1fr) 48px 16px; gap: 4px 10px; padding-block: 16px; }
  .request-row strong { grid-column: 1; }
  .request-row > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .request-row .format { grid-column: 2; grid-row: 1/3; }
  .request-row .link-arrow { grid-column: 3; grid-row: 1/3; }
}
