:root {
  color-scheme: dark;
  --canvas: #17181a;
  --panel: #202322;
  --line: #363a38;
  --ink: #f2f2ef;
  --text: #dbdcd7;
  --muted: #b2b8b1;
  --green: #9ade6f;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--canvas); font-size: 1rem; line-height: 1.88; overflow-wrap: anywhere; }
a { color: var(--green); text-underline-offset: .23em; }
a:hover { color: #c7efa9; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 2px; }
header, main, footer { display: block; }
.masthead { background: #101212; border-bottom: 1px solid var(--line); }
.masthead-inner, .page, .footer { width: min(100% - 2.5rem, 43rem); margin: 0 auto; }
.masthead-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4.1rem; }
.masthead-inner a, .footer a { font-size: .9rem; }
.masthead .brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-size: 1rem; font-weight: 700; text-decoration: none; }
.brand img { border-radius: .4rem; }
.intro { padding: clamp(2.3rem, 6vw, 4.75rem) 0 1.65rem; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.45; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: .015em; }
.intro p { max-width: 35em; margin-top: .85rem; font-size: 1.08rem; }
.contents { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; padding: .65rem 0; border-block: 1px solid var(--line); }
.contents a { display: inline-block; padding: .3rem 0; font-size: .91rem; }
.chapter { padding: 2.3rem 0 2.4rem; scroll-margin-top: 1rem; }
.chapter + .chapter { border-top: 1px solid var(--line); }
.chapter h2 { font-size: clamp(1.32rem, 3.5vw, 1.8rem); letter-spacing: .01em; margin-bottom: .8rem; }
.chapter h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.chapter section { margin-top: 1.45rem; }
.chapter p + p { margin-top: .8rem; }
.notebook { padding: 1rem 1.15rem; margin: 1.25rem 0; border-left: 3px solid var(--green); background: var(--panel); }
.notebook figcaption, .schedule caption { color: var(--green); font-size: .9rem; font-weight: 650; text-align: left; }
.problem { margin: .35rem 0 .8rem; font-weight: 650; color: var(--ink); }
.notebook dl { display: grid; grid-template-columns: 5.6em 1fr; gap: .44rem 1rem; }
.notebook dt { font-weight: 650; color: var(--muted); }
.schedule { width: 100%; margin: 1.2rem 0; border-collapse: collapse; }
.schedule caption { padding: 0 0 .55rem; }
.schedule th, .schedule td { text-align: left; vertical-align: top; padding: .65rem .7rem; border-bottom: 1px solid var(--line); }
.schedule thead th { color: var(--muted); background: var(--panel); font-size: .9rem; }
.schedule tbody th { width: 7.2rem; color: var(--ink); }
.schedule small { font-weight: 500; color: var(--muted); font-size: .86rem; }
.guide-ad { margin: 1rem auto 2rem; text-align: center; max-width: 100%; }
.guide-ad > span { color: var(--muted); font-size: .85rem; }
.privacy .intro { border-bottom: 1px solid var(--line); }
.reading-links { padding-left: 1.3rem; margin: 1rem 0 0; }
.reading-links li + li { margin-top: .4rem; }
.footer { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; border-top: 1px solid var(--line); padding: 1.35rem 0 max(2.25rem, env(safe-area-inset-bottom)); }
@media (max-width: 36rem) {
  .notebook dl { display: block; }
  .notebook dt { margin-top: .65rem; }
  .schedule tbody th { width: 6.25rem; }
  .schedule th, .schedule td { padding: .55rem .4rem; }
  .chapter { padding-block: 1.8rem; }
}
