:root {
  color-scheme: light;
  --paper: #fbf5ef;
  --ink: #401923;
  --hero: #e60012;
  --muted: #66464b;
  --line: #e8d4d6;
  --accent: #fff0eb;
  --hero-ink: #ffffff;
  --serif: Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", SimSun, serif;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

h1, h2, h3, p, dl, dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid #c30012;
  outline-offset: 5px;
}

.shell {
  width: min(1152px, calc(100% - 96px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1;
  inset: 12px auto auto 12px;
  padding: 8px 16px;
  background: var(--accent);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-inner {
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 650;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  background: var(--hero);
  color: var(--accent);
  font: 600 17px/1 Georgia, serif;
  letter-spacing: -.03em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3.2vw, 42px);
  color: var(--muted);
  font-size: 14px;
}

nav a, .footer-inner a {
  padding-block: 8px;
}

nav a:hover, .footer-inner a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero {
  background: var(--hero);
  background-image: radial-gradient(ellipse at 100% 100%, #ff5147 0, transparent 51%);
  color: var(--hero-ink);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(32px, 7vw, 96px);
  padding-block: clamp(50px, 6vw, 84px);
}

.intro-kicker {
  margin-bottom: 24px;
  color: var(--hero-ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .14em;
}

.intro h1 {
  font: 700 clamp(62px, 8vw, 102px)/1.08 var(--serif);
  letter-spacing: .045em;
}

.roman-name {
  margin-top: 8px;
  color: #ffffff;
  font: italic 30px/1.2 Georgia, serif;
}

.hero-description {
  max-width: 33ch;
  margin-top: 26px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.9;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: 27px;
  padding: 11px 17px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.primary-link:hover {
  background: #ffffff;
}

.hero a:focus-visible {
  outline-color: var(--accent);
}

.ledger {
  min-width: 0;
  margin: 0;
  padding: clamp(22px, 3.8vw, 51px) clamp(18px, 3.2vw, 43px);
  border: 1px solid #ff7d75;
  border-radius: 14px;
  background-color: #c60010;
  background-image: linear-gradient(135deg, #ff4b43 0%, #a90012 90%);
}

.ledger figcaption, .ledger-sheet {
  background: #fff4ea;
  color: var(--ink);
}

.ledger figcaption {
  padding: 22px clamp(14px, 2.5vw, 27px) 17px;
  border-radius: 7px 7px 0 0;
  border-bottom: 1px solid #e6cfd0;
}

.ledger figcaption p {
  margin-bottom: 5px;
  color: #7a3b48;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
}

.ledger figcaption strong {
  display: block;
  font: 700 clamp(17px, 2.75vw, 32px)/1.35 var(--serif);
}

.ledger-sheet {
  padding: 0 clamp(14px, 2.5vw, 27px) 17px;
  border-radius: 0 0 7px 7px;
  box-shadow: 0 4px 0 -1px #efd4ce, 0 8px 0 -3px #dba6ae, 0 13px 24px #39111f90;
}

.ledger table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(11px, 1.2vw, 14px);
  font-variant-numeric: tabular-nums;
}

.ledger caption {
  padding: 12px 0 8px;
  color: #7a3b48;
  text-align: left;
}

.ledger th, .ledger td {
  padding: 7px 0 7px 6px;
  border-bottom: 1px solid #e6cfd0;
  text-align: right;
  white-space: nowrap;
}

.ledger th:first-child {
  padding-left: 0;
  text-align: left;
}

.ledger thead {
  color: #7a3b48;
}

.ledger tfoot {
  color: #752e41;
  font-weight: 700;
}

.ledger tfoot th, .ledger tfoot td {
  border-bottom: 0;
}

.focus-section {
  padding-block: clamp(56px, 8vw, 96px);
  scroll-margin-top: 20px;
}

.section-heading h2 {
  font: 700 clamp(30px, 4vw, 43px)/1.25 var(--serif);
  letter-spacing: .035em;
}

.section-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 29px;
}

.focus-card {
  padding: clamp(18px, 2.5vw, 29px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffbf7;
}

.focus-card::before {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: #e60012;
  content: "";
}

.focus-card h3 {
  margin: 15px 0 7px;
  font-size: 21px;
  font-weight: 720;
}

.focus-card p, .note-body {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.notes-section {
  padding-block: clamp(44px, 7vw, 78px);
  border-block: 1px solid #ecd7da;
  background: #faedef;
}

.notes-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 28px;
}

.notes-list {
  border-top: 1px solid #e6cbd0;
}

details {
  border-bottom: 1px solid #e6cbd0;
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 61px;
  padding: 10px 5px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  color: #b50012;
}

.note-toggle {
  display: grid;
  flex: 0 0 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #d6a9b1;
  border-radius: 50%;
  font: 20px/1 Georgia, serif;
}

.note-toggle::before {
  content: "+";
}

details[open] .note-toggle::before {
  content: "−";
}

.note-body {
  padding: 0 5px 20px;
}

.entry {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

.entry div {
  display: flex;
  gap: 12px;
}

.entry dt {
  color: var(--ink);
  font-weight: 700;
}

.footer-inner {
  min-height: 76px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 800px) {
  .shell {
    width: calc(100% - 56px);
  }

  .hero-inner {
    gap: 24px;
  }

  .focus-grid {
    gap: 12px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: calc(100% - 36px);
  }

  .header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .hero-inner, .focus-grid, .notes-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-inner {
    gap: 34px;
    padding-block: 38px 28px;
  }

  .intro-kicker {
    margin-bottom: 18px;
  }

  .hero-description {
    margin-top: 20px;
  }

  .notes-inner {
    gap: 20px;
  }
}

