:root {
  color-scheme: light;
  --ink: #172033;
  --muted-ink: #445064;
  --paper: #ffffff;
  --page: #f7f9fc;
  --line: #344054;
  --soft-line: #d8dee8;
  --active-line: #1769aa;
  --active-fill: #edf6fc;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; }
.page-shell { width: 100%; margin-inline: auto; }

.app-layout {
  width: min(1400px, calc(100% - 48px));
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding-block: 18px;
}

.selector-section { padding: 0; }
h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.protocol-selector { display: grid; grid-template-columns: 1fr; gap: 7px; }
.protocol-option {
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  color: var(--muted-ink);
  background: var(--paper);
  font-size: .77rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .005em;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.protocol-option:hover { border-color: #91a6ba; color: var(--ink); }
.protocol-option:focus-visible {
  border-color: var(--active-line);
  outline: 3px solid rgba(23, 105, 170, .18);
  outline-offset: 1px;
}
.protocol-option[aria-current="true"] {
  border: 2px solid var(--active-line);
  padding: 7px 10px;
  color: #0f4f82;
  background: var(--active-fill);
  font-weight: 650;
}

.table-section { min-width: 0; padding: 0; }
.table-shell { display: flex; justify-content: center; }
#protocol-table { width: 100%; }
.table-scroll { overflow-x: auto; border-radius: 4px; background: var(--paper); }
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--paper);
}
th, td { border: 1px solid var(--line); vertical-align: middle; }
thead th {
  height: 56px;
  padding: 8px 12px;
  color: #111827;
  background: #f4f6f9;
  font-size: .81rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .01em;
  text-align: center;
}
tbody tr { height: 88px; }
tbody th { width: 28%; padding: 10px 12px; background: #fbfcfe; text-align: center; }
tbody td { width: 36%; padding: 10px 14px; text-align: left; }
.zone-name, .zone-range { display: block; line-height: 1.4; }
.zone-name {
  color: #182230;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.zone-range {
  margin-top: 2px;
  color: #526071;
  font-size: .78rem;
  font-weight: 600;
}
.rule-list {
  display: grid;
  grid-template-rows: repeat(3, 20px);
  align-content: center;
  min-height: 60px;
  margin: 0;
  padding: 0;
  color: #263244;
  list-style: none;
  font-size: .8rem;
  font-weight: 450;
  line-height: 20px;
  letter-spacing: .002em;
}
.rule-list li {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rule-list li:empty::after { content: "\00a0"; }

@media (min-width: 901px) {
  .app-layout {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    align-content: center;
    align-items: start;
    gap: clamp(24px, 2.25vw, 36px);
  }
  .selector-section { position: sticky; top: 18px; }
}

@media (max-width: 900px) {
  .app-layout {
    width: min(100% - 32px, 760px);
    min-height: 0;
    padding-block: 24px 40px;
  }
  .selector-section {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--soft-line);
  }
  .protocol-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .protocol-option { min-height: 52px; font-size: .8rem; }
  .table-section { padding-top: 28px; }
}

@media (max-width: 620px) {
  .app-layout { width: calc(100% - 24px); }
  .protocol-selector { grid-template-columns: 1fr; }
  .protocol-option { min-height: 56px; }
  .table-section { padding-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) { .protocol-option { transition: none; } }
@media print {
  html, body { background: var(--paper); }
  .selector-section { display: none; }
  .table-section { padding: 0; }
  .app-layout { display: block; width: 100%; min-height: 0; padding: 0; }
  .page-shell { width: 100%; }
}

