:root {
  --navy: #16324f;
  --navy-deep: #0e2236;
  --enamel: #e4ecef;
  --sheet: #f7fafb;
  --ink: #1a232b;
  --muted: #3e4c59;
  --line: #b7c6d0;
  --amber: #e6b15a;
  --plate: #171a1e;
  --plate-edge: #8e99a3;
  --focus: #0b6b8a;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--navy-deep); }
a:hover { color: var(--focus); }
img { max-width: 100%; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-150%);
  background: #fff;
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 5;
}
.skip:focus { transform: none; }

.top {
  background: var(--navy);
  color: #f4f7f8;
}
.top-in {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1.5rem;
}
.brand {
  color: #fff;
  text-decoration: none;
  line-height: 1.05;
  padding-bottom: 0.55rem;
}
.brand:hover { color: var(--amber); }
.brand-1 {
  display: block;
  font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-2 {
  display: block;
  font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
}
.toc {
  margin-left: auto;
}
.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc a {
  display: inline-block;
  color: #e7eef2;
  text-decoration: none;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.98rem;
  padding: 0.45rem 0.55rem 0.7rem;
  border-bottom: 3px solid transparent;
}
.toc a:hover { color: #fff; }
.toc a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--amber);
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 2.25rem 2.5rem;
  align-items: start;
}
main { min-width: 0; }
main h1 {
  font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.8rem;
}
main h2 {
  font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 1.7rem 0 0.45rem;
}
main p { margin: 0 0 0.85rem; max-width: 68ch; }
main li { max-width: 68ch; margin: 0.25rem 0; }
main ul, main ol { margin: 0.3rem 0 1rem; padding-left: 1.2rem; }

.rail {
  border-left: 3px solid var(--navy);
  padding: 0.15rem 0 0.15rem 0.9rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}
.rail p { margin: 0 0 0.6rem; }
.rail a { font-weight: 600; }

.plate {
  background: var(--plate);
  color: #d7dee4;
  border: 7px solid var(--plate-edge);
  max-width: 28rem;
  margin: 1.1rem 0 1.2rem;
  padding: 0.95rem 1rem 0.85rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}
.plate strong {
  display: block;
  font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: #f3f6f8;
  margin-bottom: 0.55rem;
}
.plate .row { display: block; }
.plate .k { color: #9aa6b0; }
.plate figcaption {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  color: #c5ced6;
  font-size: 0.82rem;
  margin-top: 0.7rem;
}

.cats { margin: 0.4rem 0 1.2rem; }
.cats dt {
  font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.85rem;
}
.cats dd {
  margin: 0.15rem 0 0;
  max-width: 62ch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.4rem 0 1rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
}
caption {
  text-align: left;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
thead th {
  font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.foot {
  border-top: 1px solid var(--line);
  background: var(--sheet);
}
.foot-in {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.4rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  color: var(--muted);
}
.foot-in p { margin: 0.25rem 0; }
.foot nav { margin: 0.35rem 0 0.5rem; }
.foot nav a { margin-right: 0.8rem; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .brand-1 { font-size: 1.6rem; }
  main h1 { font-size: 2rem; }
  .wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .rail {
    border-left: 0;
    border-top: 3px solid var(--navy);
    padding: 0.9rem 0 0;
  }
  .toc { margin-left: 0; width: 100%; }
}

@media (max-width: 640px) {
  table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table tr { display: block; border-bottom: 1px solid var(--line); padding: 0.45rem 0 0.6rem; }
  table td, table tbody th {
    display: block;
    border: 0;
    padding: 0.15rem 0;
  }
  table td::before, table tbody th::before {
    content: attr(data-label);
    display: block;
    font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
    font-weight: 700;
  }
}
