:root {
  color-scheme: light;
  --background: #f8faf7;
  --paper: #fff;
  --ink: #1c2924;
  --muted: #53645b;
  --brand: #173932;
  --link: #235a4c;
  --tint: #e7efe7;
  --line: #cbd8ce;
  --shell: 70rem;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-size: 100%;
  line-height: 1.75;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .16em; }
a:focus-visible { outline: 3px solid #ab561f; outline-offset: 4px; }
p, h1, h2, h3, figure, ul, ol { margin: 0; }
h1, h2, h3 { line-height: 1.34; overflow-wrap: anywhere; }
h1, h2 { color: var(--brand); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.18rem; }
.shell { width: min(var(--shell), calc(100% - 3rem)); margin-inline: auto; }
.skip-link {
  position: absolute;
  top: .5rem;
  left: .75rem;
  transform: translateY(-150%);
  color: var(--brand);
  background: var(--paper);
  padding: .5rem .75rem;
  z-index: 2;
}
.skip-link:focus { transform: none; }
.site-header { background: var(--brand); color: var(--paper); }
.header-inner, .site-footer > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 4.15rem; }
.site-header a, .site-footer a { color: inherit; }
.site-header nav { font-size: .875rem; }
.brand {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  min-height: 2.75rem;
  font-size: 1.33rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .025em;
  text-decoration: none;
}
.brand-mark { position: relative; width: 1.1rem; height: 1.3rem; border: 1px solid #d3e6d8; border-radius: 2px; }
.brand-mark::after { position: absolute; content: ""; inset: .17rem .17rem .17rem .39rem; border: 1px solid #d3e6d8; border-radius: 1px; }
.site-footer { margin-block-start: 4rem; padding-block: 1.35rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.02fr);
  gap: clamp(1.5rem, 5vw, 4.1rem);
  align-items: center;
  padding-block: clamp(2.25rem, 6vw, 4.75rem) clamp(1.5rem, 4vw, 3rem);
}
.topic { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .48rem; font-size: .875rem; font-weight: 650; color: var(--link); }
.hero h1, .home-intro h1 { margin-block-start: .65rem; font-size: clamp(2.1rem, 4.6vw, 4rem); letter-spacing: -.045em; }
.standfirst { margin-block-start: 1rem; font-size: clamp(1rem, 2vw, 1.14rem); line-height: 1.8; max-width: 28em; }
.updated, figcaption { font-size: .8125rem; color: var(--muted); }
.updated { margin-block-start: .85rem; }
.hero figure { min-width: 0; }
.hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 1rem .28rem 1rem .28rem; background: var(--tint); }
figcaption { margin-block-start: .25rem; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 46rem);
  gap: clamp(1.5rem, 5.5vw, 4rem);
  align-items: start;
}
.toc { padding-block: .25rem; border-block: 1px solid var(--line); }
.toc ul { list-style: none; padding: 0; }
.toc a { display: block; padding: .57rem .25rem; font-size: .89rem; }
.article-body { min-width: 0; }
.answer { margin-block-start: 1rem; background: var(--tint); border-inline-start: .25rem solid var(--link); padding: 1rem 1.25rem; color: var(--brand); }
.article-body section { margin-block-start: 2.55rem; scroll-margin-top: 1.25rem; }
.article-body section > p, .article-body table, .article-body ol, .article-body .worked-example { margin-block-start: .95rem; }
.size-heading { margin-block-start: .85rem; color: var(--brand); }
.article-body .size-heading + p { margin-block-start: .35rem; }
.window-sizes { margin-block-start: .85rem; }
.window-sizes figcaption { margin-block: 0 .35rem; font-size: .875rem; }
.window-sizes ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  list-style: none;
  padding: 1px;
  background: var(--line);
}
.window-sizes li { display: grid; gap: .12rem; padding: .55rem .6rem; background: var(--paper); line-height: 1.5; }
.window-sizes strong { color: var(--brand); }
.size-sketch { display: grid; place-items: end start; min-height: 4rem; margin-block-end: .35rem; }
.size-frame {
  display: block;
  width: var(--frame-width);
  height: var(--frame-height);
  border: 2px solid var(--link);
  background: linear-gradient(90deg, var(--tint) calc(50% - 1px), var(--link) calc(50% - 1px) 50%, var(--tint) 50%);
}
.size-range { font-weight: 650; }
.size-range, .size-example { font-size: .875rem; font-variant-numeric: tabular-nums; }
.size-example { color: var(--muted); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--paper); line-height: 1.5; }
caption { text-align: left; font-weight: 650; padding: 0 0 .45rem; color: var(--brand); }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: .69rem .6rem; }
thead th { background: var(--brand); color: var(--paper); font-size: .85rem; }
thead th:first-child { width: 45%; }
thead th:nth-child(2) { width: 30%; }
tbody th { font-weight: 600; }
tbody td { font-variant-numeric: tabular-nums; }
.eligible { font-weight: 700; color: var(--link); }
.source, .references { color: var(--muted); }
.source { font-size: .875rem; }
.checklist, .references ul { padding-inline-start: 1.4rem; }
.checklist li { padding-inline-start: .2rem; }
.checklist li + li { margin-block-start: .65rem; }
.checklist strong { display: block; color: var(--brand); }
.worked-example { padding: 1.05rem 1.2rem; border: 1px solid var(--line); background: var(--paper); }
.worked-example p { margin-block-start: .35rem; }
.action {
  display: inline-block;
  max-width: 100%;
  padding: .65rem .95rem;
  border: 1px solid var(--brand);
  border-radius: .32rem;
  background: var(--brand);
  color: var(--paper);
  font-weight: 650;
  text-decoration: none;
}
.action:hover { background: var(--link); }
.references { padding-block-start: 1.2rem; border-top: 1px solid var(--line); }
.references h2 { font-size: 1.18rem; }
.references ul { margin-block-start: .6rem; }
.references li + li { margin-block-start: .3rem; }
.home-intro { padding-block: clamp(2.8rem, 8vw, 6rem) clamp(2rem, 5vw, 3.6rem); }
.home-intro p { margin-block-start: 1rem; max-width: 34em; }
.home-section { margin-block-end: 3rem; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: stretch;
  max-width: 53rem;
  margin-block-start: 1rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  overflow: hidden;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
}
.feature img { width: 100%; height: 100%; min-height: 10rem; max-height: 16rem; object-fit: cover; }
.feature-copy { padding: clamp(1rem, 3vw, 1.75rem); align-self: center; }
.feature h3 { color: var(--brand); margin-block: .35rem; }
.feature:hover h3 { text-decoration: underline; text-underline-offset: .18em; }
.about { max-width: 44rem; border-top: 1px solid var(--line); padding-block-start: 1.15rem; }
.about p { margin-block-start: .55rem; }

@media (max-width: 48rem) {
  .shell { width: calc(100% - 2.25rem); }
  .hero, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .hero { padding-block: 1.6rem 1rem; }
  .hero img { aspect-ratio: 16 / 8; }
  .toc { order: 0; }
  .toc ul { display: flex; flex-wrap: wrap; column-gap: 1rem; }
  .toc a { padding: .42rem 0; }
  .answer { padding: .85rem .95rem; }
  .article-body section { margin-block-start: 2.15rem; }
}
@media (max-width: 41rem) {
  .window-sizes ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 30rem) {
  .header-inner { min-height: 3.5rem; }
  .brand { font-size: 1.2rem; }
  .standfirst { margin-block-start: .67rem; }
  .updated { margin-block-start: .6rem; }
  .hero figure { margin-block-start: .12rem; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature img { aspect-ratio: 16 / 8; min-height: 0; }
  th, td { padding: .56rem .42rem; font-size: .89rem; }
  thead th { font-size: .81rem; }
}
