:root {
  color-scheme: light;
  --paper: #faf9f5;
  --white: #fff;
  --ink: #24251f;
  --muted: #62645b;
  --line: #dedfd5;
  --yellow: #fec502;
  --yellow-light: #fff5ca;
  --green: #2d5c43;
  --red: #984529;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
::selection { color: var(--ink); background: var(--yellow-light); }
.skip {
  position: absolute; z-index: 10; top: 16px; left: 16px;
  padding: 10px 20px; background: var(--white); border: 2px solid var(--ink);
  border-radius: 8px; transform: translateY(-180%);
}
.skip:focus { transform: translateY(0); }
.wrap { width: min(100% - 96px, 1180px); margin-inline: auto; }
.masthead { padding-block: 21px; border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; letter-spacing: .06em; }
.mark { width: 18px; height: 24px; border: 4px solid var(--yellow); border-radius: 3px; transform: rotate(-9deg); }
.hero { padding-block: 68px 64px; }
.hero-copy { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 19px; font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--yellow); }
h1 { margin: 0; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.32; font-weight: 800; letter-spacing: .025em; }
.subtitle { display: block; width: fit-content; margin-top: 17px; padding: 4px 13px; border-radius: 4px; background: var(--yellow); font-size: 17px; line-height: 1.7; font-weight: 700; letter-spacing: .1em; }
.intro { max-width: 640px; margin-top: 28px; }
.intro p { margin-bottom: 10px; }
p { margin: 0 0 15px; }
p:last-child { margin-bottom: 0; }
main.wrap { display: grid; grid-template-columns: 166px minmax(0, 1fr); column-gap: 58px; align-items: start; padding-top: 8px; padding-bottom: 100px; }
.contents { position: sticky; top: 32px; display: grid; gap: 5px; margin-top: 32px; }
.contents-label { padding: 0 12px 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.contents a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 12px; border-radius: 7px; font-size: 14px; font-weight: 600; line-height: 1.5; text-decoration: none; transition: background .15s ease; }
.contents a span { font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.contents a:hover { background: var(--yellow-light); }
.contents a:focus-visible { background: var(--yellow-light); }
.rule-content { min-width: 0; }
.section { padding-block: 42px 0; margin-top: 42px; border-top: 1px solid var(--line); }
.prepare { padding-top: 27px; margin-top: 0; border-top: 0; }
.section-head { display: flex; align-items: baseline; gap: 17px; margin-bottom: 24px; }
.section-number { flex: 0 0 auto; color: #696c60; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
h2 { margin: 0; font-size: 29px; line-height: 1.5; font-weight: 750; letter-spacing: .02em; }
h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.6; font-weight: 700; }
.prepare-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: center; }
.prepare-copy { max-width: 430px; }
.front-figure { margin: 0; padding: 20px 0; border-radius: 12px; background: #f2f1e9; text-align: center; }
.front-figure img { display: block; width: min(100% - 32px, 160px); height: auto; margin: 0 auto; border-radius: 3px; box-shadow: 0 3px 9px #24251f18; }
.explanation { margin-top: 30px; padding: 26px 30px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.explanation h2 { margin-bottom: 16px; font-size: 20px; }
.explanation p { font-size: 17px; }
.formula { margin-top: 20px; padding: 15px 20px; border-radius: 7px; background: var(--yellow-light); font-size: 23px; font-weight: 750; text-align: center; letter-spacing: .015em; }
.formula small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 19px; padding: 27px 28px; background: var(--white); border: 1px solid var(--line); }
.steps li + li { border-top: 0; }
.steps li:first-child { border-radius: 12px 12px 0 0; }
.steps li:last-child { border-radius: 0 0 12px 12px; }
.step-number { display: grid; place-items: center; width: 38px; height: 38px; background: var(--yellow); border-radius: 50%; font-size: 16px; font-weight: 800; line-height: 1; }
.steps p { margin-bottom: 9px; }
.steps p:last-child { margin-bottom: 0; }
.steps li.discussion { background: #fff9e4; }
.figure { margin: 28px 0 19px; padding: 29px 25px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.figure-label { margin-bottom: 24px; color: var(--muted); font-size: 14px; font-weight: 600; }
.insertion { display: grid; grid-template-columns: .72fr 1.55fr .72fr 1.55fr .72fr 1.55fr .72fr; gap: 7px; align-items: center; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--muted); line-height: 1.5; }
.slot-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 25px; font-weight: 600; }
.slot.correct .slot-number { color: var(--ink); background: var(--yellow); }
.slot-label { font-size: 13px; text-align: center; white-space: nowrap; }
.number-card { min-width: 0; padding: 16px 4px 18px; border: 1.5px solid #b1b6a8; border-radius: 8px; background: #f7f8f3; text-align: center; font-size: clamp(22px, 2.2vw, 29px); line-height: 1.3; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.card-label { display: block; margin-bottom: 6px; font-size: 18px; color: var(--muted); }
.insertion .number-card { position: relative; display: grid; place-content: center; width: 100%; max-width: 145px; aspect-ratio: 222 / 314; justify-self: center; padding: 25px 3px; background: var(--white); border-color: #b8bbae; border-radius: 10px; box-shadow: 0 3px 0 #dedfd5, 0 6px 12px #24251f0a; }
.insertion .card-label { position: absolute; top: 17px; left: 0; right: 0; margin: 0; font-size: 16px; font-weight: 500; }
.order-direction { display: flex; align-items: center; gap: 13px; margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.order-direction span { white-space: nowrap; }
.order-direction svg { flex: 1; min-width: 0; height: 20px; }
.new-card { width: 172px; margin: 25px auto 0; border: 3px solid var(--yellow); background: #fffcf0; font-size: 32px; }
.new-card small { display: block; margin-bottom: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.figure figcaption { margin-top: 21px; font-size: 16px; text-align: center; }
.note { padding: 18px 22px; border-left: 3px solid #bbbfb0; background: #efefe8; border-radius: 0 7px 7px 0; font-size: 16px; }
.results { width: 100%; margin-top: 4px; border-spacing: 0; font-size: 18px; }
.results th, .results td { padding: 22px 26px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.results thead th { padding-top: 0; padding-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 500; }
.results tbody tr:first-child { background: #edf3eb; }
.results tbody tr:last-child { background: #f8eee8; }
.results tbody th { width: 116px; font-size: 24px; white-space: nowrap; }
.results tbody tr:first-child th { border-top-left-radius: 10px; }
.results tbody tr:first-child td { border-top-right-radius: 10px; }
.results tbody tr:last-child th { border-bottom-left-radius: 10px; border-bottom: 0; }
.results tbody tr:last-child td { border-bottom-right-radius: 10px; border-bottom: 0; }
.success { color: var(--green); }
.failure { color: var(--red); }
.compare { margin-top: 28px; padding: 24px 28px; background: var(--white); border-left: 4px solid var(--yellow); border-radius: 0 9px 9px 0; }
.compare p { font-size: 17px; }
.optional { margin-top: 48px; padding-top: 42px; border-top: 1px solid var(--line); }
.optional-intro { margin-bottom: 27px; color: var(--muted); font-size: 17px; }
.optional-intro p { margin-bottom: 7px; }
.optional-rule { padding: 24px 0; border-top: 1px solid var(--line); }
.optional-rule:last-child { padding-bottom: 0; }
.optional-rule p { font-size: 17px; }
footer { border-top: 1px solid var(--line); background: #f1f0e8; padding-block: 40px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
footer .wrap > p { margin: 0; }
.designer-credit { display: grid; grid-template-columns: auto auto; gap: 3px 24px; align-items: center; }
.designer-credit p { margin: 0; }
.designer-credit p:first-child { grid-column: 1 / -1; font-size: 12px; }
.designer-name { color: var(--ink); font-size: 19px; font-weight: 700; letter-spacing: .07em; }
.designer-credit a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 64px); }
  h1 { font-size: clamp(32px, 4.5vw, 49px); }
  main.wrap { grid-template-columns: 150px minmax(0, 1fr); gap: 32px; }
  .contents a { padding-inline: 8px; gap: 8px; font-size: 13px; }
  .prepare-layout { grid-template-columns: minmax(0, 1fr) 255px; gap: 20px; }
  .slot-label span { display: block; }
  .number-card { font-size: clamp(18px, 2.2vw, 25px); }
  .new-card { font-size: 32px; }
}
@media (max-width: 900px) {
  .hero { padding-block: 48px; }
  h1 { font-size: 36px; }
  main.wrap { display: block; }
  .contents { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; margin: 0 0 25px; padding: 20px 0; border-block: 1px solid var(--line); }
  .contents-label { grid-column: 1 / -1; padding: 0 8px 7px; }
  .contents a { font-size: 14px; gap: 10px; }
  .prepare-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .slot-label span { display: inline; }
  .number-card { font-size: clamp(20px, 3.3vw, 27px); }
  .new-card { font-size: 32px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 20px; }
  body { font-size: 17px; }
  .wrap { width: calc(100% - 40px); }
  .masthead { padding-block: 16px; }
  .masthead .wrap { font-size: 12px; }
  .mark { width: 16px; height: 21px; border-width: 3px; }
  .hero { display: block; padding-block: 35px 30px; }
  .eyebrow { margin-bottom: 16px; font-size: 12px; letter-spacing: .04em; }
  h1 { font-size: clamp(29px, 8.2vw, 46px); letter-spacing: .01em; }
  .subtitle { margin-top: 14px; padding: 3px 11px; font-size: 14px; }
  .intro { margin-top: 22px; font-size: 17px; }
  .intro p { margin-bottom: 9px; }
  main.wrap { padding-top: 0; padding-bottom: 56px; }
  .contents { padding-block: 16px; margin-bottom: 15px; gap: 3px; }
  .contents-label { padding: 0 5px 7px; font-size: 11px; }
  .contents a { flex-direction: column; align-items: flex-start; gap: 3px; min-height: 62px; padding: 7px 5px; font-size: 14px; }
  .contents a span { font-size: 11px; }
  .section { margin-top: 33px; padding-top: 32px; }
  .prepare { margin-top: 0; padding-top: 16px; }
  .section-head { gap: 11px; margin-bottom: 20px; }
  .section-number { font-size: 12px; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }
  .prepare-layout { display: block; }
  .front-figure { margin-top: 22px; padding-block: 20px; }
  .front-figure img { width: min(100% - 32px, 176px); }
  .explanation { margin-top: 22px; padding: 22px 20px; }
  .explanation h2 { font-size: 19px; }
  .formula { padding: 13px 10px; font-size: 20px; }
  .formula small { font-size: 13px; }
  .steps li { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 23px 17px; }
  .step-number { width: 32px; height: 32px; font-size: 14px; }
  .figure { margin-top: 24px; padding: 21px 8px 23px; }
  .figure-label { padding-inline: 8px; margin-bottom: 22px; font-size: 12px; }
  .insertion { grid-template-columns: minmax(24px, .65fr) minmax(0, 1.55fr) minmax(24px, .65fr) minmax(0, 1.55fr) minmax(24px, .65fr) minmax(0, 1.55fr) minmax(24px, .65fr); gap: 2px; }
  .slot { gap: 6px; }
  .slot-number { width: 26px; height: 26px; font-size: 20px; }
  .slot-label { font-size: 11px; line-height: 1.5; }
  .slot-label span { display: block; }
  .number-card { padding: 13px 1px; font-size: clamp(14px, 4.05vw, 24px); border-radius: 5px; }
  .card-label { font-size: 14px; margin-bottom: 6px; }
  .insertion .number-card { padding: 16px 1px; border-radius: 6px; }
  .insertion .card-label { top: 8px; font-size: 12px; }
  .order-direction { gap: 8px; margin-top: 16px; font-size: 12px; }
  .new-card { width: 154px; margin-top: 23px; padding: 14px 6px; font-size: 28px; border-radius: 8px; }
  .figure figcaption { margin-top: 18px; padding-inline: 10px; text-align: left; font-size: 16px; }
  .note { padding: 17px 18px; font-size: 16px; }
  .results th, .results td { padding: 20px 15px; }
  .results { font-size: 17px; }
  .results tbody th { width: 73px; font-size: 21px; }
  .results thead th { font-size: 12px; }
  .compare { padding: 22px 20px; margin-top: 23px; }
  .optional { margin-top: 35px; padding-top: 32px; }
  .optional-rule { padding-block: 22px; }
  footer { padding-block: 30px; }
  footer .wrap { display: block; }
  .designer-credit { margin-top: 22px; width: fit-content; gap: 4px 22px; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 32px); }
  .contents a { font-size: 13px; }
  h2 { font-size: 22px; }
  .steps li { padding-inline: 13px; gap: 10px; }
  .figure { padding-inline: 4px; }
  .insertion { gap: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .contents a { transition: none; }
}
@media print {
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body { background: var(--white); font-size: 11pt; line-height: 1.65; }
  .wrap { width: 100%; max-width: none; }
  .masthead, .contents, .skip { display: none; }
  .hero { display: block; padding: 0 0 20px; }
  h1 { font-size: 28pt; }
  .eyebrow { margin-bottom: 10px; }
  .intro { max-width: none; margin-top: 14px; font-size: 11pt; }
  main.wrap { display: block; padding-bottom: 0; }
  .section, .optional { margin-top: 20px; padding-top: 20px; }
  .prepare { margin: 0; border: 0; padding-top: 0; }
  .section-head { margin-bottom: 12px; }
  h2 { font-size: 17pt; }
  h3 { font-size: 12pt; }
  .prepare-layout { display: grid; grid-template-columns: 1fr 220px; }
  .front-figure { margin: 0; }
  .explanation { margin-top: 16px; padding: 16px 20px; }
  .explanation h2 { font-size: 12pt; }
  .explanation p, .steps p, .compare p, .optional-intro, .optional-rule p { font-size: 11pt; }
  .formula { font-size: 15pt; padding: 10px; }
  .formula small { font-size: 10pt; }
  .steps li { display: grid; grid-template-columns: 32px 1fr; padding: 13px 18px; break-inside: avoid; }
  .step-number { width: 28px; height: 28px; }
  .figure { margin-block: 16px; padding: 18px; }
  .number-card { font-size: 20pt; }
  .slot-label span { display: inline; }
  .new-card { font-size: 24pt; }
  .figure figcaption, .note, .results { font-size: 11pt; }
  .results tbody th { font-size: 15pt; }
  .results th, .results td { padding: 13px 18px; }
  .compare { padding: 16px 20px; }
  .optional-rule { padding-block: 15px; }
  h2, h3 { break-after: avoid; }
  .explanation, .figure, .front-figure, .results tr, .compare, .optional-rule { break-inside: avoid; }
  footer { margin-top: 22px; padding-block: 18px 0; background: var(--white); break-inside: avoid; }
  footer .wrap { display: flex; }
  .designer-credit { margin: 0; }
}
