:root {
  color-scheme: light;
  --paper: #fcf9f7;
  --ink: #30292c;
  --wine: #542b39;
  --rose: #823e53;
  --note: #625459;
  --wash: #f1e6e8;
  --rule: #cfc1c5;
  --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.9 var(--sans);
  -webkit-text-size-adjust: 100%;
}
.wrap {
  width: min(47rem, calc(100% - 2.25rem));
  margin-inline: auto;
}
.mast { background: var(--wine); color: var(--paper); }
.mast-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .7rem;
}
.brand { font-size: 1.08rem; }
.edition { font-size: .86rem; }
h1, h2, p { margin: 0; }
h1, h2 {
  font: 400 1.5rem/1.6 var(--serif);
  color: var(--wine);
  line-break: strict;
}
h1 { font-size: clamp(1.55rem, 1.15rem + 1.6vw, 2.22rem); line-height: 1.48; }
a { color: var(--rose); text-underline-offset: .18em; }
a:visited { color: #663549; }
a:hover { color: #4d2232; text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.audience { margin-top: 1.25rem; color: var(--wine); font-weight: 700; }
.disclosure {
  margin-block: .4rem .22rem;
  color: var(--ink);
  font-size: .97rem;
  line-height: 1.7;
}
.disclosure strong { color: var(--rose); margin-inline-end: .25em; }
.restriction { color: var(--note); font-size: .9rem; line-height: 1.7; }

.sr, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed; z-index: 1; top: .35rem; left: .35rem;
  background: var(--paper); padding: .25rem .7rem;
}
.lead { padding-top: clamp(1.6rem, 4.2vw, 3.35rem); }
.title-topic {
  display: block;
  margin-bottom: .6rem;
  color: var(--rose);
  font: 400 .96rem/1.7 var(--sans);
}
.question { display: block; }
.phrase { display: inline-block; max-width: 100%; }
/* The illustrations sit in the reading order on the same paper as the text. */
.opening-drawing, .closing-drawing {
  display: block;
  height: auto;
  max-width: 100%;
}
.opening-drawing {
  width: min(28rem, 95%);
  margin: 1.35rem auto 1.1rem;
}
.closing-drawing {
  width: 12rem;
  margin: 1.25rem 1.4rem 0 auto;
}
.intro {
  max-width: 42rem;
  margin-top: .9rem;
  font-size: 1.075rem;
  line-height: 1.95;
}
.toc {
  margin-block: 1.75rem 2.8rem;
  padding-block: .85rem .95rem;
  border-block: 1px solid var(--rule);
}
.toc p { font-weight: 700; }
.toc ul { margin: .28rem 0 0; padding-inline-start: 1.4em; }
.toc li { padding-block: .13rem; line-height: 1.7; }
.copy section + section { margin-top: 2.7rem; }
.copy #before-purchase { margin-top: 1.1rem; }
.copy h2 { font-size: clamp(1.32rem, 1rem + 1.1vw, 1.78rem); line-height: 1.55; }
.copy p { max-width: 42rem; margin-top: .68rem; line-height: 1.95; }
.copy p + p { margin-top: .9rem; }
.table-scroll { margin-top: 1.45rem; min-width: 0; overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-variant-numeric: tabular-nums; line-height: 1.55;
}
caption { text-align: left; padding-bottom: .6rem; color: var(--wine); font-weight: 700; }
th, td { padding: .7rem .55rem; border-bottom: 1px solid var(--rule); text-align: left; }
thead { background: var(--wash); color: var(--wine); }
thead th { border-block: 1px solid var(--rule); }
tr > :nth-child(2) { text-align: center; }
tr > :last-child { text-align: right; }
tbody th { font-weight: 400; }
td:last-child { white-space: nowrap; }
.copy .table-note, .copy .source { max-width: none; font-size: .9rem; line-height: 1.75; color: var(--note); }
.copy .source { margin-top: .35rem; }
.foot {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-block: .9rem 1.7rem; border-top: 1px solid var(--rule);
  font-size: .88rem; color: var(--note);
}
@media (max-width: 600px) {
  .opening-drawing { width: min(20rem, 96%); margin-block: 1.1rem .75rem; }
  .closing-drawing { width: 9rem; margin: 1rem .35rem 0 auto; }
  .intro { font-size: 1rem; }
  .toc { margin-block: 1.25rem 2rem; }
  .copy section + section { margin-top: 2.05rem; }
  .copy #before-purchase { margin-top: .75rem; }
  table { table-layout: fixed; }
  thead th:nth-child(1) { width: 32%; }
  thead th:nth-child(2) { width: 19%; }
  thead th:nth-child(3) { width: 33%; }
  thead th:nth-child(4) { width: 16%; }
  caption { font-size: .94rem; }
  th, td { font-size: .875rem; padding: .55rem .3rem; overflow-wrap: anywhere; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: white; font-size: 10.5pt; line-height: 1.65; }
  .wrap { width: 100%; }
  .mast { background: white; color: var(--wine); }
  .mast-row { padding-block: 0 4pt; border-bottom: 1px solid var(--rule); }
  .lead { padding-top: 10pt; }
  h1 { font-size: 21pt; }
  .title-topic { margin-bottom: 3pt; }
  .intro, .audience { margin-top: 6pt; }
  .intro { font-size: 10.5pt; }
  .skip, .toc, .foot { display: none; }
  .opening-drawing { width: 42mm; margin-block: 5pt; }
  .closing-drawing { width: 23mm; margin-block: 5pt 0; }
  .copy p, .intro { max-width: none; line-height: 1.65; }
  .copy section, .copy section + section { margin-top: 12pt; }
  .copy h2 { font-size: 14pt; break-after: avoid; }
  .copy p { margin-top: 5pt; }
  .table-scroll { overflow: visible; margin-top: 8pt; }
  table { break-inside: avoid; }
  th, td { padding: 3pt 5pt; }
}
