/* The learning room inherits OCHA's existing palette and typography. */
[hidden] { display: none !important; }
:where(a, button, input, select, summary, [tabindex]):focus-visible { outline: 3px solid #327052; outline-offset: 4px; }
html { scroll-padding-top: 100px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 14px 20px; background: #17382d; color: white; }
.skip-link:focus { top: 12px; }
.learning-nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 16px; }
.learning-nav a, .breadcrumb a, .lesson-sidebar a { text-underline-offset: 5px; }
.learning-nav a:hover, .breadcrumb a:hover, .lesson-sidebar a:hover { text-decoration: underline; }
ruby { ruby-align: center; }
rt { font-size: .58em; font-weight: 500; line-height: 1.2; }
.learning-figure { margin: 24px auto 30px; max-width: 470px; }
.learning-figure a { display: block; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #fffdf6; }
.learning-figure img { display: block; width: 100%; height: auto; }
.learning-figure figcaption { color: var(--ink-soft); font-size: 15px; line-height: 1.7; margin: 10px 0 0; }
.learning-main { padding: 40px 0 70px; }
.breadcrumb { color: var(--ink-soft); font-size: 16px; margin-bottom: 32px; }
.study-intro, .lesson-header { padding: 16px 0 38px; max-width: 960px; }
.study-intro h1, .lesson-header h1 { font-family: "Noto Serif JP", serif; font-size: clamp(32px, 4.1vw, 50px); line-height: 1.5; margin: 0 0 22px; letter-spacing: -.025em; }
.study-lead { font-size: 20px; line-height: 1.9; max-width: 45em; color: var(--ink-soft); }
.study-stats { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 16px; margin: 30px 0 4px; }
.study-stats span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.65); }
.study-controls, .course-progress, .learning-policy, .practice-tool { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.7); margin: 0 0 26px; }
.tool-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.tool-fields label, .glossary-search label { display: grid; gap: 8px; font-weight: 700; font-size: 17px; }
.learning-body input[type="search"], .learning-body input[type="number"], .learning-body select { font: inherit; font-size: 18px; color: var(--ink); padding: 12px 14px; border: 1px solid #83988b; border-radius: 10px; background: #fffef9; width: 100%; min-width: 0; min-height: 50px; }
.course-progress { display: grid; grid-template-columns: 1fr auto; gap: 12px 28px; align-items: center; }
.course-progress p, .lesson-completion p { font-size: 16px; color: var(--ink-soft); margin: 6px 0; }
.course-progress progress { accent-color: var(--accent); width: 100%; grid-row: 2; }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 12px 4px; font-size: 16px; text-decoration: underline; cursor: pointer; }
#storage-status { grid-column: 1 / -1; }
.lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; margin: 30px 0 42px; }
.lesson-card { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; padding: 26px; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.lesson-card-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--ink-soft); font-size: 15px; }
.lesson-number { font-family: Georgia, serif; font-size: 32px; color: var(--accent); }
.completed-badge { padding: 2px 8px; background: #d9e7d5; color: #214a35; border-radius: 6px; }
.lesson-card h2 { font-family: "Noto Serif JP", serif; font-size: 24px; line-height: 1.65; margin: 18px 0 12px; }
.lesson-card p { color: var(--ink-soft); margin: 0 0 24px; font-size: 18px; }
.lesson-open { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; color: var(--accent); font-size: 17px; display: flex; justify-content: space-between; }
.lesson-card:hover { border-color: #9caf9f; }
.learning-policy h2, .lesson-goals h2, .lesson-sidebar h2 { font-size: 20px; margin-top: 0; }
.lesson-category, .checked-date { color: var(--ink-soft); font-size: 16px; }
.lesson-layout { display: grid; grid-template-columns: 248px minmax(0,1fr); gap: 48px; align-items: start; }
.lesson-sidebar { position: sticky; top: 104px; padding: 24px 22px; background: rgba(255,255,255,.6); border-radius: 18px; border: 1px solid var(--line); font-size: 16px; }
.lesson-sidebar ol { margin: 0 0 24px; padding-left: 22px; }
.lesson-sidebar li { margin: 0 0 14px; line-height: 1.7; }
.lesson-article { min-width: 0; font-size: 18px; line-height: 1.95; }
.lesson-goals { padding: 24px 28px; border-left: 4px solid #789b68; background: #eaf0e1; border-radius: 0 18px 18px 0; }
.lesson-goals ul { margin: 0; padding-left: 24px; }
.lesson-goals li + li { margin-top: 7px; }
.lesson-section { padding-top: 48px; padding-bottom: 16px; scroll-margin-top: 16px; }
.section-index { display: block; color: var(--accent); font-size: 18px; font-family: Georgia, serif; margin-bottom: 12px; }
.lesson-section h2, .lesson-practice h2, .quiz-section h2, .lesson-references h2 { font-family: "Noto Serif JP", serif; font-size: 28px; line-height: 1.65; margin: 0 0 22px; }
.lesson-section p { margin: 0 0 24px; }
.study-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 26px 0; background: rgba(255,255,255,.8); }
.study-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 17px; line-height: 1.75; }
.study-table caption { text-align: left; padding: 14px 18px; font-size: 16px; color: var(--ink-soft); }
.study-table th, .study-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.study-table thead th { background: #eaf0e1; color: #244631; font-size: 16px; white-space: nowrap; }
.study-table tbody th { min-width: 140px; font-weight: 700; }
.study-table tbody tr:last-child > * { border-bottom: 0; }
.study-table a, .inline-sources a, .lesson-references a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.lesson-section .inline-sources, .inline-sources { font-size: 15px; line-height: 1.9; color: var(--ink-soft); overflow-wrap: anywhere; margin-top: 20px; }
.section-citations { margin-top: 18px; font-size: 16px; color: var(--ink-soft); }
.section-citations summary { cursor: pointer; padding: 6px 0; }
.practice-tool { margin-top: 28px; background: #edf1e6; }
.practice-tool h3 { font-size: 23px; margin: 0 0 14px; }
.tool-result { font-weight: 700; padding-top: 12px; }
.tool-result a { display: inline-block; margin-left: 12px; font-weight: 400; font-size: 16px; }
.lesson-practice { padding: 28px; margin: 42px 0; background: #e6eddd; border-radius: 20px; }
.practice-note { font-size: 16px; color: var(--ink-soft); }
.quiz-section { border-top: 1px solid var(--line); padding: 34px 0; }
.quiz-form fieldset { padding: 0; margin: 0 0 20px; border: 0; min-width: 0; }
.quiz-form legend { font-weight: 700; font-size: 20px; margin: 0 0 18px; }
.quiz-choice { display: flex; align-items: flex-start; gap: 14px; margin: 12px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf6; cursor: pointer; }
.quiz-choice input { width: 20px; height: 20px; flex: 0 0 20px; margin: 8px 0 0; accent-color: var(--accent); }
.quiz-explanation { background: rgba(255,255,255,.75); border-radius: 14px; border: 1px solid var(--line); padding: 18px 22px; }
.quiz-explanation summary { font-weight: 700; cursor: pointer; }
.quiz-result { font-weight: 700; }
.lesson-completion { border-block: 1px solid var(--line); padding: 30px 0; }
.lesson-completion button[aria-pressed="true"] { background: #d9e7d5; border-color: #6e8963; }
.lesson-references { padding-top: 42px; font-size: 16px; }
.lesson-references ol { padding-left: 24px; }
.lesson-references li { padding: 8px 0 14px 6px; overflow-wrap: anywhere; scroll-margin-top: 100px; }
.lesson-references li p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
.lesson-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 48px; border-top: 1px solid var(--line); padding-top: 28px; }
.lesson-pagination a { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.6); }
.lesson-pagination small { display: block; font-size: 15px; margin-bottom: 8px; color: var(--ink-soft); }
.glossary-search { padding: 24px; background: #eaf0e1; border-radius: 16px; margin-top: 30px; }
.glossary-search label { display: block; margin-bottom: 8px; }
.glossary-table { min-width: 420px; }
.study-preview { background: #e8edde; border: 1px solid var(--line); border-radius: 24px; padding: 32px; }
.study-preview h2 { font-family: "Noto Serif JP", serif; font-size: 30px; margin: 0 0 14px; }
.study-preview p { max-width: 54em; }
.study-preview-links { display: flex; gap: 14px 24px; flex-wrap: wrap; margin: 22px 0; }
.study-preview-links a { text-decoration: underline; text-underline-offset: 5px; color: var(--accent); }
.learning-deep-link { margin-top: 24px; font-size: 17px; }
.learning-deep-link a { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 1050px) {
 .lesson-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .lesson-layout { grid-template-columns: 210px minmax(0,1fr); gap: 26px; }
 .learning-nav { gap: 14px; }
}
@media (max-width: 800px) {
 .lesson-layout { grid-template-columns: 1fr; }
 .lesson-sidebar { position: static; }
 .lesson-sidebar ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; }
 .study-lead { font-size: 19px; }
 .lesson-header { padding-bottom: 16px; }
}
@media (max-width: 560px) {
 .learning-main { padding-top: 22px; }
 .learning-nav { font-size: 15px; gap: 12px; }
 .learning-body .header-inner { gap: 12px; flex-wrap: wrap; padding-block: 12px; }
 .learning-body .brand small { font-size: 14px; }
 .lesson-grid, .tool-fields, .lesson-pagination { grid-template-columns: minmax(0,1fr); }
 .lesson-card, .study-controls, .course-progress, .learning-policy, .practice-tool { padding: 22px; }
 .lesson-sidebar ol { display: block; }
 .lesson-section h2, .lesson-practice h2, .quiz-section h2, .lesson-references h2 { font-size: 25px; }
 .lesson-article { font-size: 18px; }
 .study-stats { gap: 8px; font-size: 15px; }
 .study-stats span { padding: 6px 10px; }
 .course-progress { grid-template-columns: 1fr; }
 .course-progress progress { grid-row: auto; }
 .study-preview { padding: 24px; }
 .lesson-practice, .lesson-goals { padding: 22px; }
}
@media (max-width: 840px) {
 .learning-body .header-inner { position: relative; }
 .learning-body .learning-nav-toggle:not([hidden]) { display: inline-flex; margin-left: auto; }
 .learning-body.learning-enhanced .learning-nav { display: none; position: absolute; top: calc(100% - 1px); left: 16px; right: 16px; z-index: 30; padding: 12px; border-radius: 18px; background: #fffdf6; border: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
 .learning-body.learning-enhanced .learning-nav.is-open { display: flex; }
 .learning-body .learning-nav a { min-height: 48px; display: flex; align-items: center; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
 .site-header, .site-footer, .lesson-sidebar, .js-only, .lesson-pagination, .skip-link { display: none !important; }
 .lesson-layout, .lesson-grid { display: block; }
 .learning-body, .learning-body::before { background: white; }
 .study-table-wrap { overflow: visible; }
 .study-table { min-width: 0; }
 a { color: black; }
}

/* Learning-journey review: practical entry first, stable URLs, readable copy. */
.home-body .lead, .home-body p, .home-body li { font-size: 18px; }
.home-body .scope-note, .home-body .inline-sources { font-size: 16px; }
.home-body .hero h1 { font-size: clamp(36px,4.4vw,60px); line-height: 1.45; }
.home-body .hero-visual { min-height: 530px; }

/* Editorial photography, with readable HTML as the source of facts. */
.home-body .hero-visual { overflow: hidden; border-radius: 26px; box-shadow: var(--shadow); min-height: 420px; background: #183a2b; }
.home-body .hero-visual img { display: block; width: 100%; height: 100%; min-height: 420px; object-fit: cover; object-position: 58% center; }
.home-body .hero-visual .figure-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
.home-body .hero-visual .figure-open:focus-visible, .photo-journey .figure-open:focus-visible { outline: 4px solid #c4933d; outline-offset: -4px; }
.hero-photo-note { position: absolute; bottom: 18px; left: 20px; color: #fff; background: rgba(12,36,26,.75); padding: 10px 15px; border-radius: 8px; letter-spacing: .12em; font-family: "Noto Serif JP",serif; }
.photo-journey { padding-top: 48px; padding-bottom: 72px; }
.photo-journey-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.photo-journey article { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fffdf8; }
.photo-journey .figure-open { display: block; padding: 0; width: 100%; border: 0; background: #173b2c; cursor: zoom-in; }
.photo-journey img { display: block; width: 100%; aspect-ratio: 1.48; object-fit: cover; }
.photo-journey article > div { padding: 20px 22px 23px; }
.photo-journey article span { color: #687d66; font-size: 14px; letter-spacing: .13em; }
.photo-journey article h3 { font-family: "Noto Serif JP",serif; font-size: 23px; margin: 8px 0; }
.photo-journey article p { margin: 0 0 16px; color: var(--ink-soft); }
.photo-journey article a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.hub-landscape { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 22px; margin-top: 28px; }
.learning-figure { max-width: none; margin: 34px 0 38px; border-radius: 22px; overflow: hidden; background: #fffdf6; border: 1px solid var(--line); box-shadow: var(--shadow); }
.learning-figure .figure-open { display: block; width: 100%; padding: 0; border: 0; background: #173b2c; cursor: zoom-in; }
.learning-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.learning-figure .figure-open:focus-visible { outline: 4px solid #c4933d; outline-offset: -4px; }
.learning-figure figcaption { margin: 0; padding: 17px 22px 19px; display: grid; gap: 4px; }
.learning-figure figcaption strong { font-family: "Noto Serif JP",serif; font-size: 19px; color: var(--ink); }
.learning-figure figcaption span { font-size: 14px; color: var(--ink-soft); }
.learning-concept { margin: 0 0 36px; padding: 24px; border: 1px solid #cbd9c3; border-radius: 18px; background: #edf2e8; }
.learning-concept h3 { margin: 0 0 20px; font-family: "Noto Serif JP", serif; font-size: 20px; }
.learning-concept ol { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; counter-reset: concept; }
.learning-concept li { position: relative; counter-increment: concept; min-height: 110px; padding: 16px; border-radius: 12px; background: #fffdf8; box-shadow: 0 2px 9px rgba(15,53,36,.08); }
.learning-concept li::before { content: counter(concept,decimal-leading-zero); display: block; color: #6e866a; font-size: 12px; letter-spacing: .12em; margin-bottom: 8px; }
.learning-concept li strong, .learning-concept li span { display: block; }
.learning-concept li strong { color: #153d2c; font-size: 17px; margin-bottom: 5px; }
.learning-concept li span { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.learning-concept > p { margin: 18px 0 0; font-size: 13px; color: var(--ink-soft); }
.tea-plant-photo { margin: 20px 0 28px; }
.tea-plant-photo figcaption .photo-credit { font-size: 12px; line-height: 1.6; }
.region-table .region-group-start > * { border-top: 3px solid #668a70; }
.region-table tbody th { background: transparent; }
.region-caption-note { display: block; margin-top: 5px; font-size: 13px; font-weight: 400; }
.region-familiar { display: block; width: fit-content; margin-top: 5px; padding: 1px 7px; border: 1px solid #65856c; border-radius: 999px; color: #27543a; background: transparent; font-size: 12px; line-height: 1.6; font-weight: 500; white-space: nowrap; }
.image-dialog { position: fixed; inset: 0; max-width: min(94vw, 1500px); max-height: 94vh; border: 0; border-radius: 18px; padding: 14px; background: #fffdf8; box-shadow: 0 24px 90px rgba(0,0,0,.35); }
.image-dialog::backdrop { background: rgba(8,27,18,.86); }
.image-dialog img { display: block; max-width: 100%; max-height: calc(94vh - 110px); object-fit: contain; margin: 0 auto; }
.image-dialog p { margin: 8px 4px 0; color: var(--ink); font-size: 15px; }
.image-dialog-close { display: block; margin: 0 0 10px auto; min-height: 44px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
@media (max-width: 800px) {
 .home-body .hero-visual { min-height: 0; }
 .home-body .hero-visual img { min-height: 0; aspect-ratio: 16 / 10; }
 .photo-journey-grid { grid-template-columns: 1fr; }
 .photo-journey article { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .photo-journey img { height: 100%; aspect-ratio: auto; }
}
@media (max-width: 560px) {
 .home-body .hero-visual { display: block; }
 .home-body .hero-visual img { aspect-ratio: 4 / 3; object-position: 68% center; }
 .hero-photo-note { font-size: 13px; left: 12px; bottom: 12px; }
 .learning-figure figcaption { padding: 14px 16px; }
 .image-dialog { max-width: 96vw; padding: 10px; }
 .photo-journey article { display: block; }
 .photo-journey img { aspect-ratio: 1.65; }
}
.home-body .tea-card-main { inset: 0 24px 82px 0; }
.home-body .tea-card-side { width: 58%; }
.home-body .tea-bowl { width: 200px; margin-top: 16px; }
.home-body .tea-orbit { gap: 12px; margin-bottom: 14px; }
.home-body .tea-orbit span { min-height: 50px; }
.home-body .info-panel { display: flex; flex-direction: column; }
.home-body .info-panel .lesson-open { margin-top: auto; }
.first-cup-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: stretch; }
.quick-recipe { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 18px; background: #e8efdf; border-radius: 14px; color: #173c2b; }
.brewing-steps { padding-left: 24px; }
.brewing-steps li { margin-bottom: 12px; }
.start-links { display: grid; gap: 4px; }
.start-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--accent); font-weight: 700; }
.start-links span { display: block; font-size: 16px; font-weight: 400; color: var(--ink-soft); margin-top: 4px; }
.home-course-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.home-context-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.home-body .card-grid { margin-top: 18px; }
.home-body :where(#regions,#brands,#awards,#history) { scroll-margin-top: 100px; }
.home-body:not(.home-enhanced) .site-nav { display: flex; position: static; flex-direction: row; background: transparent; box-shadow: none; }
.starter-path { background: #e7eddd; border: 1px solid #c7d5be; padding: 28px; border-radius: 22px; margin-bottom: 28px; }
.starter-path h2 { font-size: 25px; margin: 0 0 20px; font-family: 'Noto Serif JP',serif; }
.starter-path ol { list-style: none; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; padding: 0; margin: 0; }
.starter-path li a { display: flex; flex-direction: column; gap: 8px; background: #fffdf7; padding: 16px; border-radius: 12px; height: 100%; font-size: 17px; font-weight: 700; }
.starter-path li span { font-family: Georgia,serif; font-size: 24px; color: var(--accent); }
.starter-path p { margin-bottom: 0; font-size: 16px; }
.starter-path p a { margin-left: 12px; text-decoration: underline; text-underline-offset: 4px; }
.course-jump { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 26px 0; font-size: 17px; }
.course-jump a { padding: 8px 0; text-decoration: underline; text-underline-offset: 6px; color: var(--accent); }
.course-group { scroll-margin-top: 105px; padding-top: 22px; }
.course-group-heading { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.course-group-heading h2 { font-family: 'Noto Serif JP',serif; font-size: 28px; line-height: 1.5; margin: 0 0 8px; }
.course-group-heading p { font-size: 18px; color: var(--ink-soft); }
.lesson-card h3 { font-family: 'Noto Serif JP',serif; font-size: 24px; line-height: 1.65; margin: 18px 0 12px; }
.related-lessons { margin: 28px 0; padding: 20px 0; border-bottom: 1px solid var(--line); }
.related-lessons h2 { font-size: 21px; }
.learning-policy details { margin-top: 18px; }
.learning-policy summary { cursor: pointer; padding: 8px 0; font-size: 18px; color: var(--accent); }
#content-audit { margin-top: 40px; scroll-margin-top: 110px; }
@media (max-width: 1050px) {
 .home-course-grid, .home-background-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .starter-path ol { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 800px) {
 .first-cup-layout { grid-template-columns: 1fr; }
 .home-body .header-inner { flex-wrap: wrap; }
 .home-body .hero-visual { display: block; }
 .home-body .hero { padding-bottom: 16px; }
 .home-body .hero h1 { font-size: clamp(36px,7vw,52px); }
 .home-body .site-nav { max-height: 70vh; overflow-y: auto; }
 .home-body:not(.home-enhanced) .site-nav { padding: 0 0 14px; }
}
@media (max-width: 560px) {
 .home-course-grid, .home-context-grid, .home-background-grid { grid-template-columns: 1fr; }
 .starter-path { padding: 22px; }
 .starter-path ol { grid-template-columns: 1fr; }
 .starter-path li a { flex-direction: row; align-items: center; gap: 16px; padding: 12px 16px; }
 .home-body .section { padding: 54px 0; }
 .course-group-heading h2 { font-size: 25px; }
 .home-body .hero-copy { padding-bottom: 0; }
}

.keep-phrase { display: inline-block; white-space: nowrap; }
