:root {
  --ink: #17212b;
  --muted: #687784;
  --line: #d9e1e5;
  --paper: #f7f9f8;
  --card: #ffffff;
  --accent: #16756f;
  --accent-soft: #e2f0ee;
  --warm: #d88945;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}

.shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--accent); font-family: Georgia, serif; font-size: 20px; }
.brand strong, .brand small { display: block; line-height: 1.25; }
.brand strong { font-size: 16px; letter-spacing: .04em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.header-note { color: var(--muted); font-size: 13px; }

.intro { padding: 78px 0 56px; max-width: 760px; }
.eyebrow, .section-label { margin: 0 0 16px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
h1, h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-weight: 600; line-height: 1.2; }
h1 { max-width: 680px; font-size: clamp(42px, 6vw, 72px); letter-spacing: .01em; }
.lead { max-width: 650px; margin: 24px 0 28px; color: #52616d; font-size: 18px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: 13px; }

.note-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 64px; padding: 36px 0 96px; border-top: 1px solid var(--line); }
.note-index { padding-top: 4px; position: sticky; top: 24px; align-self: start; }
.note-index p { margin: 0 0 12px; color: var(--ink); font-size: 13px; font-weight: 700; }
.note-index a { display: block; padding: 5px 0; color: var(--muted); font-size: 13px; text-decoration: none; }
.note-index a:hover, .note-index a:focus { color: var(--accent); }
.note-content { max-width: 780px; min-width: 0; }
.note-section { padding: 0 0 54px; margin: 0 0 54px; border-bottom: 1px solid var(--line); }
.note-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
h2 { margin-bottom: 18px; font-size: clamp(27px, 3vw, 38px); }
.note-section p { margin: 0; color: #3d4d59; font-size: 16px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.table-wrap { overflow-x: auto; margin-top: 24px; background: var(--card); border: 1px solid var(--line); }
table { width: 100%; min-width: 700px; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 15px 16px; vertical-align: top; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
thead th { color: var(--muted); background: #f0f5f4; font-size: 12px; font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { width: 120px; color: var(--ink); font-weight: 700; }
td { color: #455560; }
.caption { margin-top: 12px !important; color: var(--muted) !important; font-size: 12px !important; }
.advice-list { padding: 0; margin: 22px 0 0; list-style: none; counter-reset: advice; }
.advice-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; margin: 13px 0; color: #3d4d59; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.advice-list li::before { counter-increment: advice; content: counter(advice, decimal-leading-zero); color: var(--warm); font-family: Georgia, serif; font-size: 15px; font-weight: 700; }
.advice-list li > span { min-width: 0; }
.advice-list strong { color: var(--ink); }
.closing-note { margin-top: 26px; padding: 17px 20px; color: #245e5a; background: var(--accent-soft); border-left: 3px solid var(--accent); font-size: 14px; }
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { min-height: 82px; color: var(--muted); font-size: 12px; }
.icp-link { color: var(--muted); text-decoration: none; }
.icp-link:hover, .icp-link:focus { color: var(--accent); text-decoration: underline; }

@media (max-width: 700px) {
  .shell { width: min(100% - 32px, 1120px); }
  .header-inner { min-height: 68px; }
  .header-note { display: none; }
  .intro { padding: 56px 0 42px; }
  h1 { font-size: 46px; }
  .lead { font-size: 16px; }
  .note-layout { display: block; padding-top: 26px; }
  .note-index { display: flex; gap: 16px; position: static; padding-bottom: 28px; overflow-x: auto; }
  .note-index p { margin: 5px 4px 0 0; white-space: nowrap; }
  .note-index a { padding: 4px 0; white-space: nowrap; }
  .note-section { padding-bottom: 42px; margin-bottom: 42px; }
  .footer-inner { display: block; padding: 20px 0; }
  .footer-inner span { display: block; }
  .footer-inner span + span { margin-top: 4px; }
  .footer-inner .icp-link { display: inline-block; margin-top: 4px; }
}
