:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #1d2330;
  --ink-2: #4a5263;
  --line: #d9dde5;
  --brand: #1f5fbf;
  --brand-ink: #ffffff;
  --brand-soft: #e8f0fc;
  --ok: #1e7a45;
  --ok-soft: #e6f4ec;
  --ng: #b3261e;
  --ng-soft: #fbeceb;
  --flag: #8a5a00;
  --flag-soft: #fff4d6;
  --focus: #f0a400;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px; line-height: 1.75; overflow-wrap: anywhere;
}
a { color: var(--brand); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* The static page carries the default language's header text; hide it until app.js has set the page language (no flash of Japanese on English pages). */
html:not([data-lang]) .brand-text, html:not([data-lang]) [data-loading] { visibility: hidden; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand small { display: block; font-weight: 400; color: var(--ink-2); font-size: .75rem; line-height: 1.3; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; flex: none; display: block; }
@media (max-width: 480px) { .brand-logo { width: 34px; height: 34px; } .brand { gap: 8px; } }
.header-spacer { flex: 1; }
.lang-switch { font-size: .9rem; }
/* Language menu: a dropdown at the top right (details/summary, so it works with keyboard and screen readers) */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); white-space: nowrap; line-height: 1.3; user-select: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { border-color: #9aa3b2; }
.lang-menu[open] > summary { border-color: var(--brand); }
.lang-menu .lang-globe, .lang-menu .lang-caret { color: var(--ink-2); flex: none; }
.lang-menu .lang-caret { transition: transform .15s; }
.lang-menu[open] .lang-caret { transform: rotate(180deg); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 12em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(20, 30, 50, .16); }
.lang-menu li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.lang-menu li a:hover, .lang-menu li a:focus-visible { background: var(--brand-soft); }
.lang-menu li a[aria-current] { font-weight: 700; color: var(--brand); }
.lang-menu li a[aria-current]::after { content: "✓"; }
@media (max-width: 480px) { .lang-menu > summary { padding: 6px 8px; } }
main { max-width: 1080px; margin: 0 auto; padding: 16px; min-height: 60vh; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .8rem; }
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Generic blocks */
h1 { font-size: 1.45rem; line-height: 1.4; margin: 8px 0 12px; }
h2 { font-size: 1.15rem; line-height: 1.4; margin: 24px 0 10px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.notice { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
.notice.warn { border-color: var(--flag); background: var(--flag-soft); }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); }
.notice.ng { border-color: var(--ng); background: var(--ng-soft); }
.disclaimer { font-size: .85rem; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 16px; }
.badge { display: inline-block; font-size: .75rem; line-height: 1.6; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.badge.brand { background: var(--brand-soft); border-color: #b9cff2; color: #17478f; }
.badge.ok { background: var(--ok-soft); border-color: #a9d8bd; color: #145a32; }
.badge.flag { background: var(--flag-soft); border-color: #e9cf86; color: var(--flag); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
/* Long badges (chapter titles on phones) wrap inside the card instead of running past it; short ones look the same. */
.badges .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; border-radius: .8em; }
.crumbs { font-size: .85rem; margin: 0 0 4px; }
/* Practice-set title (lesson, chapter, wrong, weak): same size as the breadcrumb above it, so the question starts higher. */
h1.h1-set { font-size: .85rem; font-weight: 700; line-height: 1.5; margin: 0 0 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--surface); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.flag-on { background: var(--flag-soft); color: var(--flag); border-color: #e9cf86; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Book cards */
.book-card h2 { margin: 0 0 2px; font-size: 1.2rem; }
.book-card .sub { color: var(--ink-2); font-size: .9rem; margin: 0 0 10px; }
.book-card .actions { margin-top: 12px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.row-link { display: flex; align-items: center; gap: 10px; padding: 10px 4px; text-decoration: none; color: var(--ink); min-height: 48px; }
.row-link:hover { background: var(--brand-soft); }
.row-link .grow { flex: 1; min-width: 0; }
.row-link .meta { color: var(--ink-2); font-size: .8rem; white-space: nowrap; }
details.chapter > summary { cursor: pointer; padding: 10px 4px; list-style: none; display: flex; gap: 10px; align-items: center; min-height: 48px; }
details.chapter > summary::-webkit-details-marker { display: none; }
details.chapter > summary::before { content: "▸"; color: var(--ink-2); width: 1em; }
details.chapter[open] > summary::before { content: "▾"; }
details.chapter .lessons { padding-left: 22px; }
.bar { height: 8px; background: #e7eaf0; border-radius: 99px; overflow: hidden; position: relative; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.bar.ok > span { background: var(--ok); }
.bar.ng > span { background: var(--ng); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }

/* Question */
.q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.q-num { font-weight: 700; }
.stem { font-size: 1.05rem; margin: 10px 0 14px; white-space: pre-wrap; }
table.data { border-collapse: collapse; margin: 0 0 14px; font-size: .95rem; background: var(--surface); }
table.data caption { text-align: left; font-size: .85rem; color: var(--ink-2); padding-bottom: 4px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 6px 12px; text-align: left; }
table.data th { background: #eef1f6; }
.statements { list-style: none; padding: 0; margin: 0 0 14px; }
.statements li { display: flex; gap: 10px; padding: 6px 0; }
.statements .lbl { font-weight: 700; min-width: 1.5em; }
fieldset.options { border: 0; padding: 0; margin: 0; }
fieldset.options legend { padding: 0; margin-bottom: 8px; font-size: .9rem; color: var(--ink-2); }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 8px; cursor: pointer; min-height: 48px; }
.opt:hover { border-color: var(--brand); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .mark { flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid #9aa3b2; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; line-height: 1; background: var(--surface); }
.opt.check .mark { border-radius: 6px; }
.opt .txt { padding-top: 3px; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt:has(input:checked) .mark { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-correct .mark { border-color: var(--ok); background: var(--ok); color: #fff; }
.opt.is-wrong { border-color: var(--ng); background: var(--ng-soft); }
.opt.is-wrong .mark { border-color: var(--ng); background: var(--ng); color: #fff; }
.opt.locked { cursor: default; }
.feedback { margin-top: 16px; }
.verdict { font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.verdict.ok { color: var(--ok); }
.verdict.ng { color: var(--ng); }
.why-list { list-style: none; padding: 0; margin: 8px 0 0; }
.why-list li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.why-list .tag { flex: none; font-weight: 700; min-width: 3.2em; }
.why-list .tag.ok { color: var(--ok); }
.why-list .tag.ng { color: var(--ng); }
.source { font-size: .8rem; color: var(--ink-2); margin-top: 10px; }
.score-big { font-size: 2.2rem; font-weight: 800; line-height: 1.2; }
.kv { display: flex; flex-direction: column; gap: 8px; }
.kvrow { display: grid; grid-template-columns: minmax(7em, 16em) 1fr 7.5em; grid-template-areas: "lbl bar num"; gap: 4px 12px; align-items: center; }
.kvrow .lbl { grid-area: lbl; font-size: .9rem; line-height: 1.5; }
.kvrow .bar { grid-area: bar; }
.kvrow .num { grid-area: num; font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; text-align: right; }
h1:focus, .q-num:focus { outline: none; }
.score-big { margin: 0; }
.verdict { margin: 0 0 4px; }

/* Exam (CBT/IBT) layout */
body.exam-mode .site-header, body.exam-mode .site-footer { display: none; }
body.exam-mode main { max-width: none; padding: 0; }
.exam { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; min-height: 100dvh; }
.exam-top { position: sticky; top: 0; z-index: 10; background: #24324a; color: #fff; display: flex; align-items: center; gap: 12px; padding: 8px 16px; flex-wrap: wrap; }
.exam-top .title { font-weight: 700; font-size: .95rem; flex: 1; min-width: 10em; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.1rem; background: rgba(255,255,255,.12); padding: 2px 10px; border-radius: 6px; }
.timer.low { background: #ffd7d3; color: #7a1410; }
.exam-top .btn { min-height: 38px; padding: 4px 12px; }
.exam-top .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.exam-body { display: grid; grid-template-columns: 1fr 300px; gap: 0; align-items: start; }
.exam-main { padding: 18px 24px 24px; max-width: 860px; width: 100%; justify-self: center; }
.exam-side { background: var(--surface); border-left: 1px solid var(--line); padding: 14px; position: sticky; top: 52px; max-height: calc(100vh - 52px); overflow: auto; align-self: stretch; }
.exam-bottom { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 10px; padding: 10px 16px; justify-content: space-between; z-index: 10; }
.exam-bottom .btn { flex: 1; max-width: 220px; }
.qgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qgrid button { position: relative; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink); }
.qgrid button.answered { background: #dbe6f7; border-color: #a7bfe6; }
.qgrid button.flagged::after { content: ""; position: absolute; top: 2px; right: 2px; width: 0; height: 0; border-top: 10px solid var(--flag); border-left: 10px solid transparent; }
.qgrid button.current { outline: 3px solid var(--brand); outline-offset: 1px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .75rem; color: var(--ink-2); margin: 10px 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line); border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.legend i.a { background: #dbe6f7; border-color: #a7bfe6; }
.legend i.f { background: var(--flag); border-color: var(--flag); }
.list-toggle { display: none; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 20px; max-width: min(92vw, 460px); box-shadow: 0 10px 40px rgba(0,0,0,.2); color: var(--ink); }
dialog::backdrop { background: rgba(15, 22, 35, .45); }

@media (max-width: 860px) {
  .exam-body { grid-template-columns: 1fr; }
  .exam-side { display: none; position: fixed; inset: 0; top: 0; max-height: none; z-index: 30; border-left: 0; padding: 16px; }
  .exam-side.open { display: block; }
  .list-toggle { display: inline-flex; }
  .exam-main { padding: 14px 16px 20px; }
  .qgrid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 480px) {
  h1 { font-size: 1.25rem; }
  .stem { font-size: 1rem; }
  .kvrow { grid-template-columns: 1fr auto; grid-template-areas: "lbl num" "bar bar"; }
  .exam-top { gap: 8px; padding: 8px 12px; }
  .exam-top .title { font-size: .85rem; min-width: 0; flex-basis: 100%; }
  .exam-bottom { padding: 8px 12px; gap: 8px; }
  .exam-bottom .btn { padding: 8px 6px; }
  .qgrid { grid-template-columns: repeat(5, 1fr); }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.actions.mocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 480px) { .actions.mocks { grid-template-columns: 1fr 1fr; } }

/* "where to read this in the book" under every explanation */
.read-more { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); border: 1px solid #b9cff2; }
.read-more p { margin: 0; }
.read-more > p:first-child { display: flex; gap: 8px; align-items: baseline; font-weight: 600; color: #17478f; line-height: 1.6; }
.read-more .ico { flex: none; }
.read-more .book-line { margin-top: 4px; padding-left: 1.9em; font-size: .85rem; color: var(--ink-2); }


/* compact book card (book home, mock result) */
.book-promo { display: flex; gap: 14px; align-items: flex-start; margin: 16px 0; border-left: 4px solid var(--brand); }
.book-promo .cover { flex: none; width: 96px; height: auto; border-radius: 4px; border: 1px solid var(--line); }
.book-promo .bp-body { min-width: 0; flex: 1; }
.book-promo .eyebrow { margin: 0 0 2px; font-size: .75rem; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; }
.book-promo .bp-title { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.5; }
.book-promo .bp-sub { margin: 2px 0 0; font-size: .85rem; color: var(--ink-2); }
.book-promo .bp-pitch { margin: 8px 0 0; }
.book-promo .actions { margin-top: 10px; align-items: center; }
.book-promo .badge.soon { font-size: .85rem; padding: 2px 12px; }
@media (max-width: 480px) {
  .book-promo .cover { width: 72px; }
  .book-promo .actions .btn { flex: 1 1 100%; }
}
.nw { white-space: nowrap; }
.ext { display: inline-block; vertical-align: -1px; margin-left: 3px; }
.read-more .book-line a { white-space: nowrap; }

/* book home header: title block + book cover */
.book-hero { margin-bottom: 8px; }
.bh-sub { margin-top: -6px; }
.book-hero.has-cover { display: grid; grid-template-columns: minmax(0, 1fr) 168px; grid-template-areas: "head cover" "book cover"; column-gap: 32px; align-items: start; }
.bh-head { grid-area: head; min-width: 0; }
.bh-cover { grid-area: cover; display: block; margin-top: 8px; }
.bh-cover img { display: block; width: 100%; height: auto; border-radius: 3px; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20, 30, 50, .10), 0 6px 18px rgba(20, 30, 50, .14); }
a.bh-cover:hover img { box-shadow: 0 1px 2px rgba(20, 30, 50, .12), 0 8px 24px rgba(20, 30, 50, .20); }
.bh-book { grid-area: book; min-width: 0; margin-top: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; }
.bh-intro { margin: 0; line-height: 1.7; }
.bh-book .actions { margin-top: 10px; align-items: center; }
@media (max-width: 600px) {
  .book-hero.has-cover { grid-template-columns: minmax(0, 1fr) 92px; grid-template-areas: "head cover" "book book"; column-gap: 14px; }
  .bh-cover { margin-top: 10px; }
  .bh-book .actions .btn { flex: 1 1 100%; }
}

/* scenario box (CCAR-F style exams) and inline code */
.scenario { border: 1px solid var(--line); border-left: 4px solid var(--brand, #2b5cab); border-radius: 8px; padding: 8px 12px; margin: 6px 0 4px; background: rgba(0,0,0,.02); }
.scenario summary { cursor: pointer; font-weight: 700; }
.scenario p { margin: 8px 0 2px; white-space: pre-wrap; }
.stem code, .opt code, .feedback code, .scenario code { font-family: ui-monospace, Consolas, "Source Code Pro", monospace; font-size: .92em; background: rgba(0,0,0,.06); padding: 0 .25em; border-radius: 4px; overflow-wrap: anywhere; }

/* online syllabus index */
.syl-search { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0 4px; margin-bottom: 8px; }
.syl-search label { display: block; margin-bottom: 4px; font-weight: 600; }
.syl-search input { font: inherit; font-size: 1rem; width: 100%; max-width: 36em; padding: 10px 12px; border: 1px solid #9aa3b2; border-radius: 8px; background: var(--surface); }
.syl-search p { margin: 4px 0 0; min-height: 1.4em; }
.syl-ch { padding: 0; margin-bottom: 10px; }
.syl-ch > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; min-height: 48px; cursor: pointer; font-weight: 700; list-style: none; }
.syl-ch > summary::-webkit-details-marker { display: none; }
.syl-ch > summary::before { content: "▸"; color: var(--ink-2); width: 1em; font-weight: 400; }
.syl-ch[open] > summary::before { content: "▾"; }
.syl-ch > summary .grow { flex: 1; min-width: 0; }
.syl-ch > summary .meta { color: var(--ink-2); font-size: .8rem; font-weight: 400; white-space: nowrap; }
.syl-sec { border-top: 1px solid var(--line); padding: 12px 16px 14px; }
.syl-sec h3 { margin: 0; font-size: 1.02rem; line-height: 1.5; display: flex; gap: 8px; align-items: baseline; }
.syl-meta { margin: 2px 0 0; }
.syl-go { margin-top: 8px; }
.syl-go .btn { min-height: 40px; padding: 6px 14px; font-size: .9rem; }
.syl-id { flex: none; font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 700; min-width: 3.4em; }
.syl-items { list-style: none; margin: 10px 0 0; padding: 0; }
.syl-item { padding: 8px 0; border-top: 1px dashed var(--line); }
.syl-name { margin: 0; display: flex; gap: 8px; align-items: baseline; line-height: 1.6; }
.syl-name .small { margin-left: 4px; }
.kws { list-style: none; margin: 6px 0 0 calc(3.4em + 8px); padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kw { font-size: .8rem; line-height: 1.6; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); }
.kw.hit { background: var(--flag-soft); border-color: #e9cf86; color: var(--ink); font-weight: 600; }
@media (max-width: 480px) {
  .syl-sec { padding: 10px 12px 12px; }
  .kws { margin-left: 0; }
  .syl-go .btn { flex: 1 1 100%; }
}

/* 参考資料 (sources) page; reuses the syllabus page layout */
.src-group { border-top: 1px solid var(--line); padding: 12px 16px 12px; }
.src-group h3 { margin: 0; font-size: 1rem; line-height: 1.5; display: flex; gap: 8px; align-items: baseline; }
.src-list { list-style: none; margin: 8px 0 0; padding: 0; }
.src-item { padding: 7px 0; border-top: 1px dashed var(--line); line-height: 1.6; overflow-wrap: anywhere; }
.src-item:first-child { border-top: 0; }
.src-item a { font-weight: 500; }
.src-meta { display: block; }
@media (max-width: 480px) { .src-group { padding: 10px 12px; } }

/* fenced code in stems (IT Passport pseudo-code), syllabus item -> lesson links, draft-syllabus notice */
pre.code { margin: 10px 0; padding: 10px 12px; background: #f2f4f7; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; white-space: pre; font-family: ui-monospace, Consolas, "Source Code Pro", monospace; font-size: .92rem; line-height: 1.55; }
pre.code code { background: none; padding: 0; font-size: inherit; }
.syl-lessons { list-style: none; margin: 4px 0 0 calc(3.4em + 8px); padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; }
.syl-lessons a::before { content: "▶ "; font-size: .7em; }
.home-notice { margin-top: 12px; }
@media (max-width: 480px) { .syl-lessons { margin-left: 0; } }

/* 略語一覧 (abbreviations) page */
.abbr-list { list-style: none; padding: 0 16px; margin: 0; }
.abbr-row { padding: 10px 0; border-top: 1px solid var(--line); }
.abbr-row:first-child { border-top: 0; }
.abbr-head { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.abbr-term { font-weight: 700; color: var(--brand); font-size: 1.05rem; min-width: 5em; overflow-wrap: anywhere; }
.abbr-en { color: var(--ink-2); font-size: .9rem; }
.abbr-ja { margin: 2px 0 0; line-height: 1.6; }
.abbr-lessons { margin-left: 0; }
@media (max-width: 480px) { .abbr-list { padding: 0 12px; } }

/* lesson sets (core / extra / ○×), chapter set size, errata */
.set-divider { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .85rem; font-weight: 600; color: var(--flag); }
.set-divider::before, .set-divider::after { content: ""; flex: 1; border-top: 1px dashed #e9cf86; }
.set-badge { margin-left: auto; background: var(--brand-soft); border-color: #b9cff2; color: #17478f; }
.set-size .actions { margin-top: 4px; }
.errata-list { list-style: none; padding: 0 16px; margin: 0; }
.errata-row { padding: 10px 0; border-top: 1px solid var(--line); }
.errata-row:first-child { border-top: 0; }
.errata-head { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.errata-row p { margin: 4px 0 0; }

/* error report form (errata page) and the report link under explanations */
.report-link { margin: 10px 0 0; font-size: .85rem; text-align: right; }
.report { margin-top: 20px; }
.report h2 { margin: 0 0 4px; }
.report > p { margin: 0 0 8px; }
.report form { margin-top: 8px; }
.report .field label { display: block; font-weight: 600; margin-bottom: 4px; }
.report input, .report textarea { font: inherit; font-size: 1rem; width: 100%; padding: 10px 12px; border: 1px solid #9aa3b2; border-radius: 8px; background: var(--surface); color: var(--ink); }
.report textarea { min-height: 9em; resize: vertical; line-height: 1.6; }
.report .field p { margin: 4px 0 0; }
.report .count { text-align: right; }
.report .req { color: var(--ng); font-weight: 600; font-size: .85rem; }
.report .opt-tag { color: var(--ink-2); font-weight: 400; font-size: .85rem; }
.report .report-book { margin: 0; }
.report .report-privacy { border-top: 1px solid var(--line); padding-top: 10px; }
.report .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* reader-bonus page (book config "kind": "bonus") */
.bonus-intro { margin: 12px 0; }
.bonus-toc { padding: 4px 12px; margin: 12px 0 8px; }
.bonus-toc .row-link { min-height: 40px; padding: 6px 4px; }
.bonus-sec { scroll-margin-top: 12px; }
.bonus-sec h2 { margin-top: 28px; }
.dl-row .grow { display: flex; flex-direction: column; }
.bonus-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 14px; }
.bonus-table table.data { margin: 0; min-width: max(100%, 36rem); }
.bonus-table table.data td { vertical-align: top; }
.bonus-table table.data code { white-space: nowrap; }
.dl-lesson { font-size: .8rem; color: var(--ink-2); line-height: 1.4; }
.dl-label { line-height: 1.5; }
.dl-desc { display: block; line-height: 1.5; }
.dl-zip .meta { font-weight: 400; font-size: .85rem; opacity: .9; }
.dl-zip .meta::before { content: "（"; }
.dl-zip .meta::after { content: "）"; }
html.brand-wait .brand { visibility: hidden; } /* a book may bring its own header (book config "brand") */
html:not([data-lang]) .brand-logo { visibility: hidden; } /* no site mascot flash before a book's own header */
