:root {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f; background: var(--canvas); font-size: 15px; line-height: 1.55; font-synthesis: none;
  --white: #fff; --canvas: #f5f5f7; --fill: #eef1f5; --beige: #efeeeb;
  --muted: #6e6e73; --line: #d2d2d7; --ink: #1d1d1f;
  --blue: #0066cc; --accent: #0071e3; --accent-hover: #0077ed;
  --icon: #4a5564; --focus: #0071e3; --shadow: #24242615;
  --content: 1180px; --edge: clamp(20px, 5vw, 66px);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; min-width: 0; }
main:focus { outline: none; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 25; top: 8px; left: 10px; background: white; color: var(--ink); padding: 10px 14px; border-radius: 8px; }

.top { position: sticky; top: 0; z-index: 12; background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(calc(100% - var(--edge) * 2), 1020px); margin: auto; min-height: 48px; }
.identity { width: max-content; font-size: 17px; font-weight: 700; letter-spacing: -.045em; white-space: nowrap; }
.identity span { font-weight: 450; color: var(--muted); margin-inline: 2px; }
#nav { display: flex; align-items: stretch; gap: clamp(19px, 4vw, 49px); }
.nav-item { display: inline-flex; align-items: center; min-height: 48px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.nav-item:hover, .nav-item[data-current], .nav-item[aria-current], .nav-item[aria-expanded=true] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 3px; }
.icon-button { display: grid; place-items: center; width: 39px; height: 40px; padding: 10px; border: 0; background: transparent; color: var(--icon); border-radius: 50%; }
.icon-button:hover, .icon-button[aria-expanded=true] { background: var(--beige); }
.icon-button svg, .tile-icon svg, .global-search svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu { display: none; }
.flyout { background: var(--canvas); position: absolute; inset: 100% 0 auto; max-height: calc(100dvh - 48px); overflow: auto; box-shadow: 0 15px 28px var(--shadow); animation: reveal .19s ease-out; }
.flyout-inner { width: min(calc(100% - var(--edge) * 2), 1020px); margin: auto; padding: 26px 0 37px; }
@keyframes reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.veil { position: fixed; z-index: 10; inset: 0; background: #f5f5f7ba; backdrop-filter: blur(5px); }
.menu-label { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.flyout-links, .quick-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.flyout-links a { font-size: clamp(18px, 2.5vw, 25px); font-weight: 650; letter-spacing: -.025em; }
.flyout-links a:hover, .quick-links a:hover, .site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.quick-links a { font-size: 14px; }
.global-search { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin-bottom: 27px; }
.global-search span { color: var(--muted); height: 26px; }
.global-search input { min-width: 0; background: transparent; border: 0; padding: 6px 0; font-size: clamp(17px, 2.6vw, 27px); letter-spacing: -.02em; font-weight: 600; color: inherit; }
.global-search select { max-width: 160px; }
.mode { background: #fff; text-align: center; padding: 11px 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mode div { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 15px; }
.mode a, .site-footer a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.hero { display: grid; justify-items: center; background: var(--beige); text-align: center; overflow: hidden; position: relative; }
.hero-copy { padding: clamp(35px, 5vw, 61px) var(--edge); position: relative; z-index: 1; }
.hero h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.12; font-weight: 650; margin: 0; letter-spacing: -.04em; }
.hero p { font-size: clamp(16px, 1.7vw, 21px); color: var(--muted); font-weight: 500; margin: 8px 0 20px; line-height: 1.4; letter-spacing: -.015em; }
.hero .actions { justify-content: center; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.primary, .secondary, .quiet { display: inline-flex; align-items: center; justify-content: center; text-align: center; border: 1px solid transparent; border-radius: 980px; padding: 9px 16px; line-height: 1.25; font-size: 14px; min-height: 37px; white-space: nowrap; }
.primary { background: var(--accent); color: var(--white); font-weight: 650; }
.primary:hover { background: var(--accent-hover); }
.secondary { border-color: var(--accent); color: var(--blue); background: transparent; }
.secondary:hover { background: #e9f2fb; }
.quiet { color: var(--blue); background: transparent; }
.quiet:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-section, .page-shell { width: min(calc(100% - var(--edge) * 2), var(--content)); margin-inline: auto; }
.home-section { padding: 42px 0 0; }
.page-shell { padding: 48px 0 72px; }
.home-records { padding-top: 32px; }
.section-head, .page-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(23px, 2.65vw, 32px); line-height: 1.22; letter-spacing: -.025em; margin: 0; }
.page-head h1 { font-size: clamp(28px, 3.55vw, 44px); line-height: 1.16; letter-spacing: -.035em; margin: 0 0 9px; }
.page-head p { font-size: clamp(14px, 1.35vw, 16px); color: var(--muted); margin: 0; }
.module-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.record-grid, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 14px; }
.stats { margin: 0 0 21px; }
.tile, .record, .metric, .panel { background: white; border-radius: 18px; border: 1px solid var(--line); }
.tile { min-height: 107px; padding: 16px; display: flex; flex-direction: column; gap: 11px; justify-content: center; }
.tile strong { font-size: 15px; font-weight: 650; }
.tile-icon { display: grid; place-items: center; width: 33px; height: 33px; color: var(--icon); border-radius: 10px; background: var(--fill); padding: 7px; }
.tile, .record, .metric { transition: box-shadow .2s, transform .2s; }
.tile:hover, .record:hover, .metric:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--shadow); }
.record { text-align: left; padding: 17px; color: inherit; min-height: 120px; overflow-wrap: anywhere; }
.record strong { display: block; font-size: 18px; letter-spacing: -.025em; }
.record small, .metric small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.metric { padding: 18px; }
.metric strong { display: block; font-size: 32px; letter-spacing: -.04em; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 23px 0 8px; }
.toolbar input { flex: 1 0 170px; min-width: 0; }
.toolbar input, .toolbar select, .field input, .field textarea, .field select, .global-search select { color: inherit; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 11px; min-height: 40px; font-size: 14px; }
.toolbar select { max-width: 100%; }
.summary { color: var(--muted); font-size: 13px; padding: 6px 0 12px; }
#more { margin-top: 14px; }
.panel { padding: 20px; }
.panel p { color: var(--muted); line-height: 1.65; margin: 7px 0; }
.table-wrap { overflow: auto; padding: 0; }
table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--line); min-width: 107px; max-width: 280px; vertical-align: top; overflow-wrap: anywhere; }
th { background: var(--canvas); color: var(--muted); font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--canvas); }
td button { border: 0; color: var(--ink); background: none; padding: 0; text-align: left; }
td button:hover { text-decoration: underline; }
.pill { display: inline-block; background: var(--fill); color: var(--muted); padding: 3px 8px; border-radius: 99px; font-size: 11px; margin: 6px 4px 0 0; }
.guide-list { display: grid; gap: 12px; }
.guide-list h2 { font-size: 18px; margin: 0; }

dialog { width: min(720px, calc(100% - 24px)); max-height: 87dvh; padding: 0; border: 0; border-radius: 24px; color: inherit; box-shadow: 0 16px 80px var(--shadow); }
dialog::backdrop { background: #f5f5f7c9; backdrop-filter: blur(5px); }
.dialog-body { padding: 23px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.dialog-head h2 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.035em; overflow-wrap: anywhere; }
.close { border: 0; background: var(--line); color: var(--muted); border-radius: 50%; font-size: 22px; width: 36px; height: 36px; flex: none; }
.close:hover { background: var(--beige); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field textarea { min-height: 74px; resize: vertical; }
.field output { border-radius: 10px; background: var(--fill); padding: 10px; min-height: 39px; white-space: pre-wrap; overflow-wrap: anywhere; }
.field a, td button { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.field-checks { display: flex; flex-wrap: wrap; gap: 5px; }
.field-checks label { display: flex; align-items: center; gap: 4px; background: var(--fill); border-radius: 7px; padding: 5px 8px; }
.field-checks input, .field input[type=checkbox] { min-height: auto; accent-color: var(--accent); }
.field input[type=checkbox] { align-self: start; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 18px; }
.error { color: #8c2525; }
.error:not(:empty) { margin-top: 12px; }
.toast { position: fixed; bottom: 21px; right: 21px; z-index: 20; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 13px; box-shadow: 0 8px 22px var(--shadow); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer div { display: flex; gap: 11px 16px; flex-wrap: wrap; padding: 18px 0 24px; width: min(calc(100% - var(--edge) * 2), var(--content)); margin: auto; }
.site-footer span { margin-right: auto; }
@media (max-width: 900px) {
  .module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-head { align-items: start; flex-direction: column; }
}
@media (max-width: 680px) {
  .top-inner { grid-template-columns: 1fr auto; }
  #nav { display: none; }
  .mobile-menu { display: grid; }
  .mobile-sections { display: grid; gap: 22px; }
  .flyout-links { gap: 11px 19px; }
  .global-search { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .global-search select { grid-column: 2; width: 100%; max-width: unset; }
  .global-search button { grid-column: 3; }
  .hero-copy { padding-block: 36px; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-shell { padding-top: 35px; padding-bottom: 46px; }
  .home-section { padding-top: 30px; }
  .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
