:root {
  color: #271f24;
  background: #e2e0df;
  font: 16px/1.55 "Source Sans 3", Verdana, "PingFang SC", "Microsoft YaHei", sans-serif;
  --wine: #591a29;
  --dark-wine: #3a0f19;
  --silver: #bbb1b3;
  --ink: #2d2528;
  --link: #233c77;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  background: repeating-linear-gradient(135deg, #e9e6e4 0 2px, #e3dfdd 2px 4px);
}
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.22; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: #822034; }
a:focus-visible { outline: 2px solid #93552e; outline-offset: 3px; }
code { font-family: "Courier Prime", Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; }
.skip { position: absolute; z-index: 3; inset: 4px auto auto 4px; padding: 10px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }

.page {
  width: min(970px, calc(100% - 42px));
  margin: 22px auto 30px;
  background: #fff;
  border: 1px solid #8d8184;
  box-shadow: 0 0 0 2px #f6f4f2, 4px 5px 0 #bdb6b4;
}
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  gap: 12px;
  padding: 12px 23px;
  background: linear-gradient(#983f51, #70263a 46%, #551322 47%, #3c0d1a);
  border: 1px solid #bc7f8a;
  border-bottom: 2px solid #2c0912;
  color: #fff0ee;
}
.wordmark {
  font: 850 clamp(2.35rem, 4.65vw, 3.85rem)/1.05 Georgia, "Songti SC", serif;
  letter-spacing: -.06em;
  text-decoration: none;
  color: #fff8f6;
  text-shadow: 1px 2px 0 #220711;
  white-space: nowrap;
}
.wordmark:hover { color: white; }
.wordmark span { margin-left: 4px; font-style: italic; color: #ffe3d8; }
.site-name { font-family: "Courier Prime", Consolas, monospace; font-size: .94rem; font-weight: 700; }
.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #eee8e7;
  border-bottom: 1px solid #aba0a3;
}
.tabs > * {
  background: linear-gradient(#fffefd, #e2dcdb 52%, #d5cccb);
  display: grid;
  place-items: center;
  min-height: 43px;
  padding: 5px;
  border-top: 1px solid white;
  border-right: 1px solid #b3a7a9;
  font-size: .9rem;
  font-weight: 750;
  text-align: center;
}
.tabs > :last-child { border-right: 0; }
.tabs [aria-current], .tabs a:hover { background: #f4e4e4; color: #671a2c; }

.home { display: grid; gap: 16px; padding: 17px 23px 18px; }
.intro h1 { color: var(--dark-wine); font-size: clamp(1.84rem, 3.3vw, 2.55rem); font-weight: 850; }
.intro p { margin-top: 6px; color: #493d42; font-size: 1.02rem; }
.directory { min-width: 0; border: 1px solid var(--silver); }
.directory h2, .guide-strip h2 {
  font-size: 1rem;
  padding: 7px 10px;
  color: var(--dark-wine);
  border-bottom: 1px solid var(--silver);
  background: linear-gradient(#fdf7f6, #ebd9da);
}
.directory table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.directory th, .directory td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #dfd7d8; }
.directory th:first-child { width: 36%; border-right: 1px solid #dfd7d8; }
.directory thead th { font-size: .86rem; font-weight: 750; background: #f2efee; color: #59474b; }
.directory tbody th { color: #5d202e; background: #fbf8f7; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; padding: 6px 8px; background: #f0edec; }
.actions a {
  display: flex;
  align-items: center;
  min-height: 39px;
  color: #253d73;
  font-weight: 750;
  padding: 5px 12px;
  background: linear-gradient(#fff, #e5dedc);
  border: 1px solid #a59598;
  border-color: white #a59598 #a59598 white;
}
.actions a:hover { background: #faefed; color: #631d2c; }
.harbor { margin: 0; background: #1a172d; border: 1px solid #8f7c80; padding: 3px; }
.harbor img { display: block; width: 100%; height: auto; }
.guide-strip { border: 1px solid var(--silver); }
.guide-list { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; padding: 3px 10px; }
.guide-item { display: inline-flex; align-items: center; min-height: 43px; padding: 5px 0; font-weight: 700; }

.document-main { padding: 14px 23px 23px; }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; color: #65565b; font-size: .88rem; }
.crumb > :not(:last-child)::after { content: "/"; margin-left: 8px; color: #83747a; display: inline-block; }
.reader { max-width: 820px; margin: 13px auto 0; border-left: 3px solid #7f293b; }
.lead { padding: 14px 17px 12px; background: linear-gradient(130deg, #f8eceb, #fbf8f5); border-bottom: 1px solid #dfcecf; }
.lead h1 { font-size: clamp(1.62rem, 3.6vw, 2.3rem); color: var(--dark-wine); overflow-wrap: anywhere; }
.lead p { margin-top: 8px; color: #4d3f44; }
.lead time { display: block; margin: 8px 0 0; color: #625055; font-size: .86rem; font-family: "Courier Prime", Consolas, monospace; }
.reader-body { padding: 0 17px 2px; }
.reader-body section, .reader-body .address-rows { padding: 15px 0; border-bottom: 1px solid #e6dadb; }
.reader-body h2 { margin-bottom: 6px; font-size: 1.13rem; color: var(--wine); }
.reader-body p { overflow-wrap: anywhere; }
.reader-body .address-rows { margin: 0; padding: 4px 0 0; }
.address-rows div { display: grid; grid-template-columns: 104px 1fr; gap: 9px; padding: 10px 0; }
.address-rows div + div { border-top: 1px solid #ede5e5; }
.address-rows dt { color: var(--wine); font-weight: 750; }
.address-rows dd { margin: 0; min-width: 0; }
.related { display: flex; flex-wrap: wrap; column-gap: 16px; padding-top: 9px; }
.related a { display: inline-flex; align-items: center; min-height: 43px; font-weight: 700; }
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 20px;
  padding: 8px 23px;
  border-top: 1px solid #a99ca0;
  background: linear-gradient(#f5f2f1, #e1dad9);
  color: #51454a;
  font-size: .84rem;
}
.footer nav { display: flex; gap: 14px; }
.footer nav a { display: flex; align-items: center; min-height: 38px; white-space: nowrap; }

@media (max-width: 640px) {
  .page { width: calc(100% - 18px); margin: 9px auto 16px; box-shadow: 0 0 0 1px #faf8f7, 2px 2px 0 #bdb6b4; }
  .mast { min-height: 68px; padding: 9px 12px; }
  .site-name { font-size: .81rem; }
  .home, .document-main { padding: 13px 12px 15px; }
  .home { gap: 13px; }
  .directory th:first-child { width: 43%; }
  .directory td, .directory th { padding: 6px 8px; }
  .directory tbody td, .directory tbody th { font-size: .92rem; }
  .reader-body, .lead { padding-left: 11px; padding-right: 11px; }
  .address-rows div { grid-template-columns: 1fr; gap: 2px; }
  .footer { flex-wrap: wrap; padding: 8px 12px 5px; gap: 0 16px; }
}
