:root {
  --ink: #1e293b;
  --muted: #667487;
  --accent: #245caa;
  --soft: #edf3fa;
  --line: #dfe5eb;
  --page: #f5f7fa;
  --surface: #ffffff;
  --subtle: #f8fafc;
  --heading: #182d4b;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button, a, input, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
h1, h2, h3, p { margin: 0; }
button, .button { background: var(--surface); border: 1px solid var(--line); padding: 8px 15px; border-radius: 5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
a:hover { color: var(--accent); }
.button.primary:hover { color: #fff; filter: brightness(.95); }
.wrap { max-width: 1200px; margin: auto; }
.skip-link { position: absolute; left: 12px; top: -70px; z-index: 20; padding: 10px 16px; background: var(--surface); }
.skip-link:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.header-shell { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-layout { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 68px; gap: 22px; padding: 0 4px; }
.masthead { display: contents; }
.brand { grid-column: 1; grid-row: 1; font-size: 23px; letter-spacing: -.7px; font-weight: 800; white-space: nowrap; color: var(--heading); }
.brand b { color: var(--accent); }
.brand-sub { display: none; color: var(--heading); font-size: 16px; }
.nav { grid-column: 2; grid-row: 1; display: flex; gap: 25px; align-items: center; justify-self: end; min-height: 68px; }
.nav a { display: flex; align-items: center; min-height: 68px; position: relative; font-size: 14px; white-space: nowrap; }
.nav .active { color: var(--accent); font-weight: 700; }
.nav .active::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.appearance { grid-column: 3; grid-row: 1; position: relative; margin-left: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.appearance summary { list-style: none; padding: 9px 0 9px 10px; }
.appearance summary::-webkit-details-marker { display: none; }
.appearance-panel { position: absolute; right: 0; top: calc(100% + 5px); z-index: 10; width: 224px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 8px 30px #182d4b14; color: var(--ink); }
.appearance-panel label { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.appearance-panel select { width: 111px; min-height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: 3px; }
.appearance-panel a { color: var(--accent); }
.hamburger { display: none; border: 0; padding: 5px; font-size: 20px; background: transparent; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0 23px; }
.hero h1 { font-size: 36px; font-weight: 750; line-height: 1.3; letter-spacing: -.6px; color: var(--heading); }
.hero p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 17px; }
.hero-actions .button { min-height: 37px; font-size: 13px; }
.search { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 5px 6px 5px 13px; width: 335px; min-height: 42px; color: var(--muted); font-size: 13px; }
.search input { min-width: 0; border: 0; width: 100%; background: none; }
.search button { flex: none; border: 0; background: transparent; color: var(--accent); padding: 5px 7px; font-size: 12px; }
.hero .entry-note { margin-top: 9px; text-align: right; font-size: 12px; color: var(--muted); }
.regions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.region { grid-column: span 2; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow: hidden; }
.region:first-child { grid-column: span 4; }
.scene { display: block; position: relative; height: 174px; overflow: hidden; isolation: isolate; background: #fbfcfe; }
.scene img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 61%; z-index: -2; filter: hue-rotate(var(--hue, -35deg)) saturate(.57); }
.scene::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #fffffff5 0%, #ffffff75 34%, transparent 70%); }
.region[data-code="SC"] { --hue: -125deg; }
.region[data-code="BJ"], .region[data-code="SH"] { --hue: 35deg; }
.scene h2 { padding: 15px 19px 0; font-size: 25px; line-height: 1.3; color: #203148; }
.scene h2 span { font: 15px Consolas, monospace; color: #667487; margin-left: 8px; font-weight: 400; }
.scene p { padding: 2px 19px; font-size: 12px; color: #526174; }
.region-links { display: flex; min-height: 41px; align-items: center; border-top: 1px solid var(--line); color: var(--accent); font-size: 13px; }
.region-links a { flex: 1; text-align: center; padding: 9px 0; }
.region-links a + a { border-left: 1px solid var(--line); }
.directory { margin: 12px 0 20px; }
.directory > summary { width: fit-content; margin: auto; padding: 4px 12px; color: var(--accent); font-size: 13px; list-style: none; }
.directory > summary::-webkit-details-marker { display: none; }
.directory[open] > summary span { display: inline-block; transform: rotate(180deg); }
.directory-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 17px; background: var(--surface); }
.directory-panel h2 { font-size: 18px; margin-bottom: 12px; color: var(--heading); }
.directory-regions .region:first-child { grid-column: span 2; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 12px; gap: 16px; }
.section-head h2 { font-size: 21px; color: var(--heading); }
.section-head a { color: var(--accent); font-size: 12px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; overflow: hidden; min-width: 0; }
.feature header { padding: 10px 16px; background: var(--subtle); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.feature header small { font: 12px/1.6 Consolas, monospace; color: var(--muted); }
.feature header > a:last-child { color: var(--accent); font-size: 12px; }
.feature-body { padding: 12px 16px; font-size: 13px; }
.tree { font: 13px/1.65 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--muted); }
.feature-body p { color: var(--muted); font-size: 12px; margin-top: 7px; }
.feature-body .file-tools { margin: 0; color: var(--ink); font-size: 14px; }
.footer { display: flex; gap: 20px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 28px; padding: 18px 0 25px; color: var(--muted); font-size: 12px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.revision { display: inline-block; margin-top: 4px; font: 11px/1.6 Consolas, monospace; }
.die { display: inline-block; position: relative; width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 2px; margin-right: 4px; }
.die::before { content: ""; position: absolute; width: 2px; height: 2px; background: currentColor; left: 2px; top: 2px; box-shadow: 5px 0 currentColor, 2.5px 2.5px currentColor, 0 5px currentColor, 5px 5px currentColor; }

html[data-appearance="noi"] { --page: #f0f3f4; --accent: #d22525; --heading: #29255c; --soft: #f7eeee; }
html[data-appearance="noi"] .header-shell { border: 0; }
html[data-appearance="noi"] .header-layout { display: block; padding: 0; }
html[data-appearance="noi"] .masthead { display: flex; align-items: center; gap: 22px; min-height: 78px; padding: 0 4px; }
html[data-appearance="noi"] .brand { font-size: 29px; }
html[data-appearance="noi"] .brand-sub { display: block; }
html[data-appearance="noi"] .appearance { margin-left: auto; }
html[data-appearance="noi"] .nav { background: #d22525; color: #fff; min-height: 52px; margin: 0; gap: 0; width: 100%; }
html[data-appearance="noi"] .nav a { padding: 0 27px; min-height: 52px; font-size: 16px; }
html[data-appearance="noi"] .nav a:hover { color: #fff; background: #b51b1b; }
html[data-appearance="noi"] .nav .active { color: #fff; background: #29255c; }
html[data-appearance="noi"] .nav .active::after { display: none; }
html[data-appearance="noi"] .region, html[data-appearance="noi"] .feature { border-radius: 3px; box-shadow: 0 3px 14px #1d324b05; }
html[data-appearance="noi"] .region-links { color: var(--heading); }
html[data-appearance="noi"] .section-head h2 { border-left: 4px solid #d22525; padding-left: 10px; }
html[data-appearance="noi"] .directory > summary { color: var(--heading); }
html[data-appearance="noi"] .hero { padding: 22px 0 20px; }
html[data-theme="dark"] { --ink: #e4ebf5; --muted: #a2b0c4; --accent: #89b8f5; --soft: #1a2d46; --line: #334256; --page: #111a28; --surface: #182435; --subtle: #1c2a3e; --heading: #eef4ff; color-scheme: dark; }
html[data-theme="dark"][data-appearance="noi"] { --accent: #ff9b9b; --heading: #edf1ff; --page: #141a25; --soft: #372529; }
html[data-theme="dark"] .scene { background: var(--surface); }
html[data-theme="dark"] .scene img { filter: hue-rotate(var(--hue, -35deg)) saturate(.57) brightness(.58); }
html[data-theme="dark"] .scene::after { background: linear-gradient(180deg, #142033f5 0%, #14203394 42%, #14203324 100%); }
html[data-theme="dark"] .scene h2 { color: var(--heading); }
html[data-theme="dark"] .scene h2 span, html[data-theme="dark"] .scene p { color: var(--muted); }
html[data-theme="dark"] .button.primary { color: #101a2b; }
html[data-theme="dark"][data-appearance="noi"] .button.primary { background: #d22525; border-color: #d22525; color: #fff; }

@media (max-width: 1240px) {
  .wrap { margin-left: 25px; margin-right: 25px; }
  .nav { gap: 23px; }
  .header-layout { gap: 16px; }
  html[data-appearance="noi"] .nav a { padding: 0 23px; }
}
@media (max-width: 850px) and (min-width: 701px) {
  .nav { gap: 15px; }
  .hero { gap: 16px; }
  .search { width: 290px; }
  .hero h1 { font-size: 32px; }
}
@media (max-width: 700px) {
  .wrap { margin-left: 16px; margin-right: 16px; }
  .header-shell .wrap { margin: 0; }
  .header-layout { display: block; padding: 0; min-height: 61px; }
  .masthead, html[data-appearance="noi"] .masthead { display: flex; align-items: center; min-height: 61px; padding: 0 16px; gap: 10px; }
  .brand, html[data-appearance="noi"] .brand { font-size: 21px; }
  .hamburger { display: block; }
  .nav, html[data-appearance="noi"] .nav { display: none; }
  html[data-menu-open="true"] .nav { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0; padding: 3px 12px; min-height: 0; }
  .nav a, html[data-appearance="noi"] .nav a { min-height: 42px; padding: 0 13px; font-size: 14px; }
  .appearance, html[data-appearance="noi"] .appearance { margin-left: auto; font-size: 11px; }
  .brand-sub, html[data-appearance="noi"] .brand-sub { display: none; }
  html[data-appearance="noi"] .masthead { border-bottom: 4px solid #d22525; }
  .hero, html[data-appearance="noi"] .hero { display: block; padding: 22px 0 18px; }
  .hero h1 { font-size: 29px; }
  .hero p { font-size: 12px; line-height: 1.7; margin-top: 8px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
  .hero-actions .primary { grid-column: 1 / -1; }
  .search-wrap { margin-top: 16px; }
  .search { width: 100%; min-height: 42px; font-size: 16px; padding: 5px 6px 5px 10px; }
  .search input { font-size: 16px; }
  .hero .entry-note { display: none; }
  .regions { grid-template-columns: 1fr 1fr; gap: 12px; }
  .region, .region:first-child { grid-column: span 1; }
  .region:first-child { grid-column: span 2; }
  .scene { height: 152px; }
  .region:first-child .scene { height: 164px; }
  .scene h2 { font-size: 22px; padding: 13px 12px 0; }
  .scene h2 span { font-size: 12px; margin-left: 4px; }
  .scene p { font-size: 11px; padding: 3px 12px; }
  .region-links { font-size: 12px; min-height: 40px; }
  .region:not(:first-child) .region-links { flex-direction: column; gap: 0; }
  .region:not(:first-child) .region-links a { padding: 7px 0; width: 100%; }
  .region:not(:first-child) .region-links a + a { border-left: 0; border-top: 1px solid var(--line); }
  .features { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 19px; }
  .feature header { font-size: 12px; }
  .directory { margin: 9px 0 16px; }
  .directory-panel { margin: 12px 0 0; padding: 12px; }
  .directory-regions .region, .directory-regions .region:first-child { grid-column: span 1; }
  .footer { flex-wrap: wrap; gap: 9px; margin-top: 22px; font-size: 11px; }
  .footer nav { gap: 18px; }
}
