:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --white: #fff;
  --ink: #20231f;
  --muted: #565a51;
  --rule: #dadbd2;
  --cobalt: #243faa;
  --night: #1e2b69;
  --yellow: #efed85;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --serif: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.75 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .23em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #926008; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); letter-spacing: -.06em; line-height: 1.35; }
.wrap { width: min(1140px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 1rem; left: 1rem; padding: .5rem 1rem; background: white; transform: translateY(-250%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .67rem; text-decoration: none; font-size: 1.1rem; font-weight: 800; white-space: nowrap; line-height: 1.25; }
.brand-mark { display: grid; width: 38px; height: 41px; border-radius: 5px 9px 9px 5px; place-items: center; background: var(--cobalt); color: white; font: 700 italic 1.9rem/1 var(--serif); }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: .77rem; font-weight: 700; letter-spacing: .05em; }
nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); color: #30342d; font-size: .9rem; font-weight: 700; }
nav a { text-decoration: none; }
nav a:hover { color: var(--cobalt); text-decoration: underline; }
.hero { overflow: hidden; border-bottom: 1px solid var(--rule); background-color: #f0efe7; }
.hero-grid { display: grid; grid-template-columns: 1fr minmax(330px, .83fr); align-items: center; min-height: 472px; gap: 3rem; padding-block: 53px 55px; }
.kicker, .eyebrow { font-size: .82rem; font-weight: 800; letter-spacing: .12em; color: var(--cobalt); }
.kicker span { display: inline-block; width: 20px; height: 2px; margin: 0 .35rem .24rem 0; background: currentColor; }
.hero h1 { margin: .65rem 0 .9rem; font-size: clamp(3.3rem, 7.3vw, 6.9rem); line-height: 1.1; letter-spacing: -.105em; font-weight: 900; white-space: nowrap; }
.hero h1 span { margin-inline-start: .06em; }
.hero-intro { font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.85; color: #363930; font-weight: 650; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.65rem; }
.button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; padding: .52rem 1rem; border: 1px solid transparent; border-radius: 7px; text-align: center; text-decoration: none; font-weight: 750; font-size: .9375rem; line-height: 1.5; }
.button.primary { background: var(--cobalt); color: white; }
.button.primary:hover { background: var(--night); }
.button.outline { background: transparent; color: var(--ink); border-color: #a5a799; }
.button.outline:hover { background: white; border-color: var(--cobalt); }
.button:disabled { cursor: default; opacity: .6; }
.hero-meta { font-size: .85rem; margin-top: .9rem; font-weight: 700; color: var(--muted); }
.hero-meta span { color: #888b79; margin-inline: .24rem; }
.cover-frame { position: relative; display: grid; min-height: 350px; place-items: center; isolation: isolate; background: repeating-linear-gradient(0deg, transparent 0 23px, #d5d8cc 23px 24px); border: 1px solid #d1d2c6; border-radius: 11px; }
.cover-shadow, .cover { width: min(78%, 294px); height: 315px; border-radius: 6px 14px 14px 6px; }
.cover-shadow { position: absolute; transform: translate(14px, 4px) rotate(9deg); background: #dedfce; border: 1px solid #b9bcaa; }
.cover { position: relative; transform: rotate(-7deg) translateX(-9px); background: var(--cobalt); border-left: 10px solid #1c318e; color: white; padding: 19px 24px 17px; box-shadow: 5px 12px 19px #252f552d; display: flex; flex-direction: column; }
.cover-top { display: flex; justify-content: space-between; letter-spacing: .16em; font-size: .72rem; font-weight: 750; border-bottom: 1px solid #9ba8ec; padding-bottom: 8px; }
.cover-title { font: 700 clamp(2.9rem, 5vw, 4.3rem)/.93 var(--serif); margin-top: 15px; letter-spacing: -.09em; }
.cover-title em { color: var(--yellow); }
.cover-lines { display: grid; gap: 1px; margin-top: auto; font-size: .8rem; letter-spacing: .1em; }
.cover-lines i { color: #d7dcff; font: .7rem ui-monospace, monospace; margin-right: .5rem; }
.cover-foot { display: flex; justify-content: space-between; border-top: 1px solid #9ba8ec; padding-top: 6px; margin-top: 8px; font-size: .76rem; letter-spacing: .1em; }
.cover-tab { position: absolute; right: 7%; bottom: 33px; display: grid; align-content: center; width: 72px; height: 75px; padding-left: 10px; transform: rotate(10deg); background: var(--yellow); border: 1px solid #d1ce63; color: var(--ink); border-radius: 4px; box-shadow: 2px 4px #1d215534; font-size: .72rem; line-height: 1.1; font-weight: 800; letter-spacing: .08em; }
.cover-tab b { font: 800 1.6rem/1.05 var(--serif); letter-spacing: -.05em; }
.catalog { padding-block: 55px 68px; scroll-margin-top: 1rem; }
.section-top { display: flex; align-items: end; justify-content: space-between; gap: .75rem; }
.section-top h2, .teacher h2 { margin-top: .22rem; }
.stats { padding-bottom: 4px; font-size: .9rem; color: var(--muted); font-weight: 650; white-space: nowrap; }
.stats strong { font: 700 1.6rem/1 var(--serif); color: var(--cobalt); }
.stats span { padding-inline: .15rem; }
.filters { display: flex; flex-wrap: wrap; gap: .48rem; margin-block: 24px 20px; }
.filter { border: 1px solid var(--rule); border-radius: 999px; background: var(--white); color: var(--ink); padding: .37rem .8rem; font-size: .875rem; font-weight: 700; min-height: 38px; }
.filter:hover { border-color: var(--cobalt); }
.filter[aria-pressed="true"] { border-color: var(--night); background: var(--night); color: white; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; align-items: flex-start; gap: .82rem; min-width: 0; min-height: 121px; text-decoration: none; padding: 17px 15px; border: 1px solid var(--rule); border-radius: 9px; background: var(--white); }
.card:hover { border-color: var(--cobalt); box-shadow: 0 2px 7px #1d215513; }
[data-tone="blue"] { --tone: #20337b; --tint: #e9edff; }
[data-tone="green"] { --tone: #235641; --tint: #e3f0e4; }
[data-tone="rose"] { --tone: #823a4b; --tint: #f8e8eb; }
[data-tone="indigo"] { --tone: #4c3b83; --tint: #eeebf9; }
[data-tone="amber"] { --tone: #634508; --tint: #f8eed5; }
.card-mark { flex: 0 0 37px; display: grid; place-items: center; width: 37px; height: 39px; border-radius: 5px; font: 700 1.15rem/1 var(--serif); color: var(--tone); background: var(--tint); }
.category { color: var(--tone); font-size: .83rem; font-weight: 750; }
.card h3 { font-size: 1.03rem; line-height: 1.5; margin-block: 2px 3px; }
.card-meta { color: var(--muted); font-size: .825rem; }
.card-meta .complete { color: #206246; font-weight: 800; }
.teacher { background: #eaedfa; border-block: 1px solid #d4d9ed; padding-block: 48px; scroll-margin-top: .8rem; }
.teacher-grid { display: grid; grid-template-columns: 1.58fr 1fr; gap: 2.5rem; align-items: start; }
.teacher h2 + p, .license h3 + p, .sources h2 + p { margin-top: .62rem; }
.teacher-actions { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; margin-block: 1.25rem .75rem; }
.note { font-size: .875rem; color: var(--muted); }
.license { background: var(--white); border: 1px solid #ccd2e8; border-radius: 10px; padding: 20px; }
.license h3 { font-size: 1.15rem; }
.license-mark { display: inline-block; padding: 0 .5rem; margin-bottom: .4rem; border-radius: 4px; background: var(--yellow); color: var(--ink); font: 800 1.45rem/1.3 var(--serif); }
.license a, .sources a { display: inline-block; margin-top: .65rem; font-weight: 700; color: #203485; }
.sources { font-size: .9rem; padding-block: 32px 35px; }
.sources h2 { font-size: 1.12rem; letter-spacing: 0; }
.sources ul { margin: .1rem 0 0; padding-left: 1.2rem; }
.sources li a { margin-top: .25rem; }
.site-footer { border-top: 1px solid var(--rule); font-size: .875rem; color: var(--muted); }
.footer-row { min-height: 58px; }
.workbook { max-width: 850px; padding-block: 34px 50px; }
.back { color: var(--cobalt); font-size: .9375rem; font-weight: 700; }
.exercise-head { padding-block: 19px 21px; border-bottom: 1px solid var(--rule); }
.exercise-head h1 { margin-block: 2px 5px; font-size: clamp(1.65rem, 5vw, 2.8rem); line-height: 1.4; letter-spacing: -.045em; }
.exercise-head p:last-child { color: var(--muted); }
.material { margin-top: 18px; padding: 20px; background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--cobalt); border-radius: 8px; }
.material h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.material p { margin-top: .48rem; }
.material [lang="en"], .question [lang="en"] { font-family: var(--sans); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; line-height: 1.45; text-align: left; }
th, td { border: 1px solid var(--rule); padding: .6rem; }
th { background: #eaedfa; }
.audio-tools { display: flex; flex-wrap: wrap; gap: .55rem; margin-block: .5rem; }
details summary { cursor: pointer; color: var(--cobalt); font-weight: 700; }
.audio-status { min-height: 1.7em; font-size: .875rem; color: var(--muted); }
.question { min-width: 0; margin: 16px 0 0; padding: 17px 19px; border: 1px solid var(--rule); border-radius: 8px; background: white; }
.question h3 { font-size: 1rem; font-weight: 750; margin-bottom: .55rem; }
.question-number { display: inline-block; min-width: 2.3em; color: var(--cobalt); font-weight: 800; }
.choices { display: grid; gap: .35rem; }
.choice { display: flex; align-items: baseline; gap: .5rem; padding: .42rem .7rem; border: 1px solid #dedfd7; border-radius: 5px; cursor: pointer; }
.choice:hover { background: #f1f3fa; }
.choice:has(input:checked) { border-color: var(--cobalt); background: #edf0fd; }
.choice input { accent-color: var(--cobalt); flex: 0 0 auto; }
.answer-text { width: 100%; padding: .6rem; resize: vertical; border: 1px solid #aaa99a; border-radius: 5px; background: #fcfcfa; }
.answer-label { display: block; font-size: .9rem; font-weight: 700; }
.feedback { margin-top: .7rem; padding: .7rem .8rem; border-radius: 5px; background: #f0f2ff; }
.feedback p + p { margin-top: .34rem; }
.feedback[data-result="correct"] { background: #e6f3e9; }
.feedback[data-result="incorrect"] { background: #fbeeee; }
.exercise-actions, .print-tools { display: flex; flex-wrap: wrap; gap: .55rem; margin-block: 16px; }
.summary { padding: .65rem .85rem; background: #eaedfa; border-radius: 6px; }
.print-tools { padding-top: 14px; border-top: 1px solid var(--rule); }
.print-tools .button { font-size: .875rem; }
#printout { display: none; }
@media (max-width: 920px) {
  .hero-grid { gap: 1.8rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .header-row { min-height: 62px; }
  .brand { font-size: .93rem; gap: .4rem; }
  .brand-mark { width: 30px; height: 33px; font-size: 1.55rem; }
  .brand small { font-size: .69rem; }
  nav { gap: .72rem; font-size: .78rem; white-space: nowrap; }
  .hero-grid { min-height: 0; grid-template-columns: 1fr; gap: 1.3rem; padding-block: 32px 28px; }
  .hero h1 { font-size: clamp(2.85rem, 11.6vw, 4.4rem); }
  .desktop-break { display: none; }
  .cover-frame { min-height: 204px; }
  .cover-shadow, .cover { width: 169px; height: 182px; }
  .cover { padding: 10px 12px 9px; border-left-width: 6px; }
  .cover-top { font-size: .5rem; padding-bottom: 3px; }
  .cover-title { font-size: 2.55rem; margin-top: 9px; }
  .cover-lines, .cover-foot, .cover-lines i { font-size: .53rem; }
  .cover-foot { margin-top: 3px; padding-top: 3px; }
  .cover-tab { right: max(13%, calc(50% - 136px)); bottom: 22px; width: 51px; height: 50px; padding-left: 7px; font-size: .55rem; }
  .cover-tab b { font-size: 1.05rem; }
  .catalog { padding-block: 33px 43px; }
  .card-grid { grid-template-columns: 1fr; gap: 8px; }
  .card { min-height: 95px; padding: 13px; }
  .teacher { padding-block: 33px; }
  .teacher-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .material, .question { padding: 12px; }
  .footer-row { flex-wrap: wrap; gap: .35rem 1rem; padding-block: .65rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@page { size: A4; margin: 15mm; }
@media print {
  body { background: white; color: black; font: 10.5pt/1.48 var(--sans); }
  body > :not(#printout) { display: none !important; }
  #printout { display: block; }
  #printout h1 { font-size: 21pt; line-height: 1.2; margin-bottom: 3mm; }
  #printout h2 { font-size: 15pt; margin-block: 6mm 2mm; letter-spacing: 0; break-after: avoid; border-bottom: 1px solid #333; }
  #printout h3 { font-size: 11pt; break-after: avoid; margin-block: 1mm; }
  #printout .material { background: none; margin-top: 2mm; padding: 2mm 3mm; border: 1px solid #777; border-radius: 0; break-inside: avoid; }
  #printout .table-scroll { overflow: visible; }
  #printout th, #printout td { background: white; padding: 1.6mm; border-color: #555; }
  #printout .print-question { break-inside: avoid; margin-top: 3mm; }
  #printout .print-choices { margin: 1mm 0 1.5mm; padding-left: 0; list-style: none; }
  #printout .blank-line { min-height: 7mm; border-bottom: 1px solid #999; }
  #printout .print-set + .print-set { break-before: page; }
  #printout .print-license { margin-top: 4mm; font-size: 9pt; }
}

.mock-catalog { padding-bottom: 30px; }
.mock-catalog + .catalog { padding-top: 35px; }
.mock-catalog-intro { color: var(--muted); margin-top: .65rem; }
.mock-grid { margin-top: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mock-card { background: white; border: 1px solid var(--rule); border-top: 3px solid var(--cobalt); border-radius: 9px; padding: 18px; min-width: 0; }
.mock-card h3 { font-size: 1.3rem; margin-bottom: .63rem; }
.mock-downloads { display: flex; flex-wrap: wrap; gap: .48rem; }
.mock-downloads .button { padding-inline: .68rem; }
.audio-label { margin: .8rem 0 .25rem; color: var(--muted); font-size: .875rem; font-weight: 750; }
audio { display: block; width: 100%; max-width: 410px; min-width: 0; height: 44px; margin-block: .15rem .65rem; }
.mock-teacher-files { margin-top: .85rem; border-top: 1px solid var(--rule); padding-top: .58rem; }
.mock-teacher-files summary, .mock-teacher-links a { font-size: .875rem; }
.mock-teacher-links { display: flex; gap: .25rem .85rem; flex-wrap: wrap; padding-top: .45rem; color: var(--night); }
.mock-audio-note { margin-top: .68rem; }
.drill-print { margin-top: 1.15rem; padding-top: .65rem; border-top: 1px solid #cdd3e9; }

@media (max-width: 820px) {
  .mock-grid { grid-template-columns: 1fr; }
  .mock-card { padding: 15px; }
}
@media (max-width: 400px) {
  nav { gap: .48rem; font-size: .7rem; }
  .brand { font-size: .83rem; }
}
