*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #f8f7f4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
}

a { text-decoration: none; color: inherit; }
.top-stripe { background: #7f1d1d; height: 6px; width: 100%; }
header { background: #991b1b; width: 100%; }
.header-inner { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1.5rem; }

.header-flex { display: flex; align-items: flex-start; gap: 1.25rem; }

.avatar {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
}

.header-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.header-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

.header-desc {
  font-size: 0.85rem;
  color: #ffffff;
  margin-top: 0.35rem;
}
.summary-bar {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.2);
}

.summary-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
}

.summary-cell + .summary-cell { border-left: 1px solid rgba(0, 0, 0, 0.25); }

.summary-value { color: #ffffff; font-weight: 700; font-size: 1.4rem; }

.summary-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.63rem;
  text-align: center;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.divider-bar {
  background: #e8e4dc;
  border-bottom: 1px solid #d6d0c6;
  padding: 0.5rem 1.5rem;
}

.divider-inner {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.divider-text {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.legend {
  background: #ffffff;
  border: 1px solid #e8e4dc;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}

.legend-title {
  font-size: 0.65rem;
  color: #aaa;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.625rem;
}

.legend-items { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.legend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 4px;
  padding: 0.25rem 0.625rem;
}

.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.legend-label { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.section {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  background: #ffffff;
}

.section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  border: none;
  text-align: left;
  background: transparent;
  font-family: inherit;
}

.section-header:hover { filter: brightness(0.97); }

.section-header-left { display: flex; align-items: center; gap: 0.75rem; }

.section-icon {
  width: 36px; height: 36px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.section-name { font-size: 1rem; font-weight: 700; }

.section-count {
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.section-period { color: #888; font-size: 0.7rem; margin-top: 1px; letter-spacing: 0.03em; }

.chevron { transition: transform 0.2s ease; display: block; }
.chevron.closed { transform: rotate(-90deg); }
.table-header, .table-row {
  display: grid;
  grid-template-columns: 2rem 1fr 9rem 2.5rem;
  align-items: center;
  padding: 0.5rem 1.25rem;
}

.table-header {
  background: #fafafa;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
}

.col-head {
  font-size: 0.62rem;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.col-head.center { text-align: center; }

.table-row {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background: #ffffff;
  transition: background 0.12s;
  display: grid;
  grid-template-columns: 2rem 1fr 9rem 2.5rem;
  align-items: center;
  width: 100%;
}

.table-row + .table-row { border-top: 1px solid #f0f0f0; }

.row-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.row-title-wrap { display: flex; align-items: center; gap: 0.5rem; }

.row-title { font-size: 0.85rem; font-weight: 500; color: #1a1a2e; }

.row-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }

.row-code { color: #aaa; font-size: 0.68rem; font-family: monospace; }

.row-note { color: #bbb; font-size: 0.62rem; font-style: italic; }

.type-badge {
  display: inline-block;
  justify-self: start;
  width: auto;
  border-radius: 4px;
  padding: 0.125rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.link-col { display: flex; justify-content: center; }

.ext-link { color: #ccc; display: block; transition: color 0.15s; }
.table-row:hover .ext-link { color: #777; }
.section-body { display: block; }
.section-body.hidden { display: none; }
.footer { text-align: center; padding-bottom: 0.5rem; }
.footer p { font-size: 0.7rem; color: #bbb; }
@media (max-width: 600px) {
  .summary-bar { grid-template-columns: repeat(2, 1fr); }
  .summary-cell:nth-child(2) { border-right: none; }
  .summary-cell:nth-child(3),
  .summary-cell:nth-child(4) { border-top: 1px solid rgba(0,0,0,0.25); }
  .header-title { font-size: 1.35rem; }
  .table-header, .table-row { grid-template-columns: 2rem 1fr 7rem 2rem; }
}
