:root {
  color-scheme: light;
  --bg: #faf9f3;
  --card: #fffefa;
  --ink: #20392f;
  --sub: #526057;
  --line: #d6dbce;
  --tint: #e8eddf;
  --gold: #f2e4c8;
  --btn: #254b38;
  --onbtn: #fff;
  --hero: #e5e9ce;
  --shadow: 0 1px 2px #19332608;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17221d;
  --card: #202c25;
  --ink: #edf2dd;
  --sub: #bfcbbe;
  --line: #455246;
  --tint: #35463a;
  --gold: #514531;
  --btn: #cedebf;
  --onbtn: #142319;
  --hero: #334737;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17221d;
    --card: #202c25;
    --ink: #edf2dd;
    --sub: #bfcbbe;
    --line: #455246;
    --tint: #35463a;
    --gold: #514531;
    --btn: #cedebf;
    --onbtn: #142319;
    --hero: #334737;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.6 "Segoe UI",
    Arial,
    sans-serif;
}
header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.mast,
.shell {
  max-width: 1540px;
  margin: auto;
}
.mast {
  height: 76px;
  padding: 0 3.4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font:
    bold 32px Georgia,
    serif;
  letter-spacing: -1.8px;
  text-decoration: none;
}
.brand img {
  border-radius: 9px;
}
.shell {
  display: grid;
  grid-template-columns: 198px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
}
aside {
  padding: 37px 15px 25px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
}
nav {
  display: grid;
  gap: 6px;
  align-content: start;
  position: sticky;
  top: 24px;
}
nav a,
.index-link,
.section-title a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
nav a {
  padding: 11px 15px;
  border-radius: 7px;
  font-weight: 600;
  color: var(--sub);
}
nav a[aria-current],
nav a:hover {
  color: var(--ink);
  background: var(--tint);
}
.aside-foot,
.meta,
.tag,
.index-link,
#results,
.back {
  font-size: 13px;
  font-weight: 600;
}
.aside-foot,
.meta {
  color: var(--sub);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #6c8254;
  border-radius: 100%;
  margin-right: 5px;
}
.tag {
  display: inline-block;
  background: var(--tint);
  padding: 3px 10px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 12px;
}
.index-link {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 12px;
}
.index-link:hover,
.section-title a:hover,
.record h3 a:hover,
.directory h3 a:hover {
  text-decoration: underline;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
main {
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
  padding: 40px clamp(22px, 4vw, 72px) 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.045em;
  line-height: 1.12;
  font-weight: 500;
}
h1 {
  font-size: clamp(40px, 4.2vw, 66px);
}
h2 {
  font-size: clamp(27px, 2.3vw, 38px);
}
h3 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.lede {
  font-size: 17px;
  margin: 9px 0 26px;
  color: var(--sub);
  max-width: 75ch;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-radius: 14px;
  overflow: hidden;
  background: var(--hero);
  border: 1px solid var(--line);
  position: relative;
}
.hero-copy {
  padding: clamp(24px, 3.3vw, 52px);
  align-self: center;
}
.hero h2 {
  font-size: clamp(36px, 3.55vw, 56px);
  margin: 12px 0;
}
.hero p,
.tools p,
.record p,
.directory p,
.panel p,
.check p,
.reading {
  color: var(--sub);
}
.hero p {
  margin-bottom: 21px;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 240px;
  object-position: 52% center;
}
.button,
button,
.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--btn);
  color: var(--onbtn);
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 7px;
  text-decoration: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.button:hover,
button:hover {
  filter: brightness(0.92);
}
.secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
.section-title,
.directory,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.section-title {
  margin: 30px 0 14px;
}
.section-title a {
  font-size: 14px;
  font-weight: 600;
}
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.tools > a,
.panel,
.filters {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.tools > a {
  padding: 19px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}
.tools > a > svg:last-child {
  margin-left: auto;
  flex-shrink: 0;
}
.tools > a:hover,
.directory a:hover {
  background: var(--tint);
}
.tool-icon,
.record-icon {
  background: var(--tint);
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
}
.amber {
  background: var(--gold);
}
.tools p,
.record p,
.directory p {
  font-size: 14px;
}
.record,
.directory {
  border-top: 1px solid var(--line);
  padding: 21px 0;
}
.record {
  display: flex;
  align-items: flex-start;
  gap: 17px;
}
.record-icon {
  margin-top: 3px;
}
.record h3,
.directory h3 {
  margin: 3px 0 6px;
}
.record h3 a,
.directory h3 a {
  text-decoration: none;
}
.record .tag {
  margin-top: 9px;
}
.row-arrow {
  margin-left: auto;
}
.panel,
.filters {
  padding: clamp(18px, 3vw, 32px);
  margin: 18px 0;
}
.panel h2 {
  margin-bottom: 10px;
}
.panel .section-title:first-child {
  margin-top: 0;
}
.panel p,
.reading {
  margin: 10px 0 16px;
  max-width: 74ch;
}
.filters {
  display: flex;
  gap: 20px;
}
.filters label:first-child {
  flex: 1;
}
.filters label:last-child {
  min-width: 190px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
input:not([type="checkbox"]),
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  padding: 11px 12px;
}
.panel > label {
  margin: 15px 0;
  max-width: 750px;
}
.back {
  display: inline-block;
  margin-bottom: 18px;
}
.detail {
  margin-top: 20px;
  font-size: 22px;
}
.timeline li {
  margin: 14px 0;
}
.timeline b,
.timeline a {
  display: block;
}
dl {
  display: grid;
  grid-template-columns: minmax(85px, 110px) 1fr;
  gap: 8px 12px;
}
dt {
  color: var(--sub);
}
dd {
  margin: 0;
}
progress {
  width: 100%;
  accent-color: var(--btn);
  height: 9px;
}
.check {
  display: flex;
  gap: 15px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.check input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--btn);
}
.check label {
  font-size: 18px;
  cursor: pointer;
}
.check p {
  margin: 4px 0;
}
.actions {
  flex-wrap: wrap;
  justify-content: start;
}
.file-label {
  position: relative;
}
.file-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-label:focus-within,
:focus-visible {
  outline: 3px solid #ba6728;
  outline-offset: 3px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    16px/1.65 Georgia,
    serif;
  background: var(--tint);
  padding: 22px;
  border-radius: 6px;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
  padding: 23px 0;
  color: var(--sub);
  font-size: 13px;
}
footer strong {
  margin-right: auto;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 4;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  padding: 12px 20px;
  max-width: min(90vw, 500px);
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: 10px;
  top: -80px;
  background: var(--card);
  padding: 8px;
  z-index: 5;
}
.skip:focus {
  top: 5px;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 154px minmax(0, 1fr);
  }
  aside {
    padding-left: 10px;
    padding-right: 10px;
  }
  .tools > a {
    padding: 14px;
    gap: 10px;
  }
  .hero-copy {
    padding: 24px;
  }
  .hero img {
    min-height: 220px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .mast {
    height: 64px;
    padding: 0 19px;
  }
  .brand {
    font-size: 28px;
  }
  .brand img {
    width: 33px;
    height: 33px;
  }
  .index-link {
    padding: 6px 9px;
  }
  aside {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 5px 3px max(5px, env(safe-area-inset-bottom));
    display: block;
  }
  nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
  }
  nav a {
    flex-direction: column;
    font-size: 11px;
    gap: 1px;
    padding: 6px 0;
    min-height: 44px;
  }
  .aside-foot {
    display: none;
  }
  main {
    padding: 25px 18px 82px;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero img {
    grid-row: 1;
    height: 162px;
    min-height: 0;
    object-position: center 53%;
  }
  .hero-copy {
    padding: 20px 23px 24px;
  }
  .hero h2 {
    font-size: 34px;
    max-width: 20ch;
  }
  .hero p {
    margin-bottom: 15px;
  }
  .lede {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .tools {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .tools > a {
    padding: 14px;
  }
  .filters {
    flex-direction: column;
    gap: 12px;
  }
  .record-icon {
    display: none;
  }
  .section-title {
    margin-top: 24px;
  }
  .section-title a {
    font-size: 13px;
  }
  .panel .section-title {
    flex-wrap: wrap;
  }
  .detail {
    font-size: 19px;
  }
  #notice:not(:empty) {
    bottom: 80px;
    right: 12px;
  }
  footer {
    gap: 12px;
  }
  .hero-copy h2 {
    margin-top: 6px;
  }
  .reading,
  .panel p {
    overflow-wrap: anywhere;
  }
}
@media print {
  header,
  aside,
  footer,
  .actions,
  .skip {
    display: none;
  }
  main {
    padding: 0;
  }
  .shell {
    display: block;
  }
  .panel {
    break-inside: avoid;
  }
}
