:root {
  color-scheme: light;
  --ink: #1e2429;
  --text: #353e45;
  --muted: #586169;
  --blue: #173fa5;
  --blue-dark: #102d74;
  --line: #d4d8db;
  --quiet: #f4f6f8;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: #fff; font: 1rem/1.85 var(--sans); }
h1, h2, p, figure { margin: 0; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .23em; }
a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }
:where(a, button, input, summary):focus-visible {
  outline: 3px solid #161b21; outline-offset: 3px; box-shadow: 0 0 0 3px #ffe175;
}
::selection { background: #dce8ff; color: #101d32; }
.layout { width: min(66rem, calc(100% - 5rem)); margin-inline: auto; }
.visually-hidden, .switcher input {
  position: absolute; margin: -1px; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 3; background: white; padding: .45rem 1rem; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.masthead, .brand, nav, nav a, .form-link, .footer { display: flex; align-items: center; }
.masthead { min-height: 4.25rem; justify-content: space-between; gap: 1.5rem; }
.brand { gap: .6rem; min-height: 44px; color: var(--ink); font-weight: 650; font-size: 1rem; text-decoration: none; }
.brand-mark { display: inline-block; width: .9rem; height: 1.25rem; border-left: .32rem solid var(--blue); border-right: .32rem solid var(--blue); transform: skewY(-16deg); }
nav { gap: clamp(1rem, 3.3vw, 2.7rem); }
nav a { min-height: 44px; font-size: .9rem; color: var(--text); text-decoration: none; }
nav a:hover { text-decoration: underline; }
.hero {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: center;
  gap: clamp(2rem, 4.5vw, 4.5rem); padding-block: clamp(3rem, 5.25vw, 4.8rem);
}
.lesson-photo img { display: block; width: 100%; height: auto; border-radius: .25rem 10% .25rem .25rem; }
.lesson-photo figcaption { margin-top: .3rem; text-align: right; color: var(--muted); font-size: .78rem; }
.kicker { margin-bottom: 1rem; font-size: .9rem; font-weight: 580; color: var(--muted); }
h1 {
  color: #1a2026; font-family: "STIX Two Text", Georgia, var(--serif); font-size: clamp(2.45rem, 4.8vw, 3.9rem);
  font-weight: 500; letter-spacing: -.045em; line-height: 1.27; text-wrap: balance;
}
h1 span { display: inline-block; }
.lead { font-size: clamp(1rem, 1.5vw, 1.17rem); color: var(--text); margin-block: 1.1rem 1.45rem; }
.form-link { display: inline-flex; flex-wrap: wrap; width: fit-content; min-height: 44px; font-weight: 650; }
.link-note { font-weight: 400; font-size: .9em; }
.section-grid {
  display: grid; grid-template-columns: minmax(10rem, .68fr) minmax(0, 1.6fr); column-gap: clamp(2rem, 5vw, 5rem);
  border-top: 1px solid var(--line); padding-block: clamp(2.15rem, 4vw, 3.85rem);
}
h2 { font-size: clamp(1.3rem, 2.1vw, 1.75rem); font-weight: 600; line-height: 1.5; letter-spacing: -.025em; }
.steps { margin: .05rem 0 0; padding-left: 1.65rem; font-weight: 560; font-size: clamp(1.02rem,1.45vw,1.23rem); line-height: 1.75; }
.steps li { padding-left: .35rem; }
.steps li + li { margin-top: .45rem; }
.steps li::marker { color: var(--muted); font: 400 .92em Georgia, serif; }
.reading-link { margin-top: 1.15rem; color: var(--muted); font-size: .9rem; }
.works-list { padding: 0; margin: 0; list-style: none; }
.works-list li { display: grid; grid-template-columns: minmax(7rem,.5fr) minmax(0,1.5fr); align-items: baseline; gap: .15rem 1.4rem; padding-block: .85rem; border-bottom: 1px solid #e5e8ea; }
.works-list li:first-child { padding-top: 0; }
.work-name { font-size: 1.06rem; font-weight: 620; width: fit-content; }
.works-list p, .section-grid > div > p:not(.reading-link) { color: var(--text); }
.works-list p { font-size: .97rem; }
.instructor-copy p + p { margin-top: .7rem; }
#contact .form-link { margin-top: .35rem; }
.try-sample { margin-top: 1.25rem; }
.try-sample summary { color: var(--blue); cursor: pointer; width: fit-content; min-height: 44px; align-content: center; text-underline-offset: .2em; }
.try-sample summary:hover { text-decoration: underline; }
.work-example { max-width: 35rem; margin-top: .55rem; }
.footer { min-height: 4.5rem; justify-content: space-between; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }

.example-pages { background: var(--quiet); border: 1px solid var(--line); }
.sample { position: relative; min-height: 17.5rem; display: grid; align-items: center; }
.sample-web { display: block; background: white; }
.app-banner { isolation: isolate; position: relative; overflow: hidden; min-height: 5.65rem; display: flex; align-items: center; padding: .7rem clamp(1rem,2vw,1.75rem); color: white; background: #092682; }
.app-banner h2 { max-width: 75%; font: 600 clamp(1.35rem,2.15vw,1.9rem)/1.35 var(--serif); letter-spacing: .02em; }
.book-art { position: absolute; z-index: -1; inset: 0 0 0 auto; width: 39%; height: 100%; object-fit: cover; object-position: center 65%; mask-image: linear-gradient(to right, transparent, #000 25%); }
.app-body { padding: .85rem clamp(.9rem,2vw,1.65rem) .8rem; }
.book-form label { display: block; font-size: .875rem; font-weight: 650; }
.book-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .45rem; margin-top: .16rem; }
.book-entry input, .book-entry button { font: inherit; line-height: 1.35; min-height: 44px; border-radius: 3px; }
.book-entry input { width: 100%; padding: .5rem .65rem; border: 1px solid #77838f; color: var(--ink); }
.book-entry button { border: 1px solid var(--blue); padding: .5rem .9rem; background: var(--blue); color: white; font-weight: 650; cursor: pointer; }
.book-entry button:hover { background: var(--blue-dark); }
.books { list-style: none; margin: .65rem 0 0; padding: 0 4px; max-height: 11.5rem; overflow-y: auto; }
.books li { display: flex; align-items: center; justify-content: space-between; gap: .4rem; border-bottom: 1px solid var(--line); }
.books label { display: flex; flex: 1; align-items: center; gap: .5rem; min-width: 0; min-height: 44px; padding: .25rem 0; cursor: pointer; }
.books input { accent-color: var(--blue); height: 1rem; width: 1rem; margin: 0; flex: none; }
.saved-title { min-width: 0; overflow-wrap: anywhere; font-size: .91rem; }
.books input:checked + .saved-title { color: var(--muted); text-decoration: line-through; }
.book-state { margin-left: auto; padding: .06rem .35rem; flex-shrink: 0; font-size: .73rem; line-height: 1.6; color: var(--blue-dark); background: #ecf1fd; border-radius: 2px; }
.remove-book { border: 0; padding: .15rem .32rem; min-height: 44px; min-width: 44px; cursor: pointer; background: transparent; color: var(--muted); font: inherit; font-size: .79rem; text-decoration: underline; text-underline-offset: .2em; }
.remove-book:focus-visible, .remove-book:hover { color: var(--blue-dark); }
.storage-note { margin-top: .55rem; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.empty-books { color: var(--text); font-size: .89rem; padding: .3rem 0 .5rem; }
.example-controls { border: 0; margin: 0; padding: 0; min-width: 0; }
.switcher { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-bottom: 1px solid #bac3ce; }
.switcher label { position: relative; cursor: pointer; text-align: center; }
.switcher span { display: grid; align-items: center; min-height: 3.1rem; color: var(--muted); font-size: clamp(.78rem,1.5vw,.9375rem); }
.switcher label:hover span { color: var(--blue-dark); background: #f2f6ff; }
.switcher input:checked + span { font-weight: 700; color: var(--blue); box-shadow: inset 0 -3px var(--blue); }
.switcher input:focus-visible + span { outline-offset: -4px; outline: 3px solid #161a21; background: #ffeaa0; }
.sample-memo { color: #3c382e; background: #f2efe6; }
.memo-paper, .letter { padding: 1.4rem clamp(1.3rem,3vw,3rem); }
.sample-label { font-size: .875rem; letter-spacing: .05em; font-weight: 700; margin-bottom: .8rem; }
.sample-prose { background: #eaf0fa; }
.letter p:last-child { max-width: 29em; line-height: 1.85; }
.letter-title { font: 650 clamp(1.2rem,2vw,1.62rem)/1.5 var(--serif); margin-bottom: .7rem; }

@media (max-width: 48rem) {
  .layout { width: calc(100% - 2.75rem); }
  .hero { grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
  .section-grid { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  .works-list li { grid-template-columns: minmax(6rem,.5fr) minmax(0,1.5fr); }
}
@media (max-width: 35rem) {
  .layout { width: calc(100% - 2.25rem); }
  .masthead { gap: .65rem; flex-wrap: wrap; padding-block: .2rem; }
  nav { gap: .8rem; }
  nav a { font-size: .81rem; }
  .brand { font-size: .9rem; }
  .brand-mark { width: .72rem; height: 1rem; border-width: .25rem; }
  .hero { padding-block: 3rem 2.65rem; }
  h1 { font-size: clamp(2.25rem, 9vw, 3rem); }
  .lead { margin-block: .85rem 1rem; }
  .works-list li { grid-template-columns: minmax(0,1fr); gap: .05rem; }
  .steps { padding-left: 1.4rem; }
  .reading-link { margin-top: 1rem; }
}
@media (forced-colors: active) {
  .switcher input:checked + span { border-bottom: 3px solid Highlight; }
  .brand-mark { border-color: CanvasText; }
}

