:root{font-family:-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN','Yu Gothic',Meiryo,sans-serif;color:#1b3044;background:#f2f6f8;font-size:16px;line-height:1.6}*{box-sizing:border-box}body{margin:0}.container{max-width:790px;margin:auto;padding-left:16px;padding-right:16px}.site-header{background:#147e78;color:#fff;padding:24px 0}.header-inner{display:flex;align-items:center;justify-content:space-between;gap:15px}.site-header h1{margin:0;font-size:clamp(24px,4vw,32px);line-height:1.35}.site-header p{margin:7px 0 0;font-size:14px}.header-tag{font-size:12px;border:1px solid #ffffff66;border-radius:20px;padding:5px 10px;white-space:nowrap}main{padding-top:18px;padding-bottom:58px}.card{background:#fff;border-radius:18px;padding:24px;margin:18px 0;box-shadow:0 5px 18px rgba(18,45,65,.04)}h2{font-size:22px;line-height:1.5;margin:0 0 18px}h3{font-size:17px;margin:0 0 3px}p{margin:10px 0}.section-heading,.quiz-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.section-heading h2{margin-bottom:10px}.muted{color:#61758a}.small{font-size:13px}.controls,.actions{display:flex;gap:10px;flex-wrap:wrap}.controls button{min-width:100px}.field-label{display:block;font-weight:700;margin:15px 0 6px}button,select{font:inherit}button{border:1px solid #ccdae2;border-radius:11px;padding:12px 16px;color:#1b3044;background:#fff;cursor:pointer;font-weight:600;min-height:48px}button.primary{background:#147e78;border-color:#147e78;color:#fff}button.active{background:#e7f6f4;border:2px solid #147e78;color:#155b58}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f0ad4e;outline-offset:2px}.actions{margin-top:18px}.actions button{flex:1}.hidden{display:none!important}select{width:100%;border:1px solid #ccdae2;padding:12px;border-radius:10px;background:#fff;color:#1b3044;min-height:48px}.check-label{display:flex;align-items:center;gap:10px;font-size:14px;margin:14px 0 0}.check-label input{width:19px;height:19px;accent-color:#147e78}.pill{border-radius:20px;background:#e5f6f3;color:#126c67;font-size:13px;padding:5px 12px}.exam-option{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e2ebef;border-radius:12px;margin:12px 0;padding:14px}.exam-option p{margin:2px 0}.exam-option button{flex-shrink:0}.outline-full{width:100%;margin-top:8px;border-color:#147e78;color:#147e78}.stats{font-weight:700}.category-stats{display:grid;gap:8px;margin-bottom:16px}.stat-row{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #edf1f3;padding:7px 0;font-size:13px}.stat-row strong{white-space:nowrap}.subtle{font-size:14px}.quiz-top{margin-bottom:10px}.question-text{font-size:16px;line-height:2;margin:20px 0;white-space:pre-line;overflow-wrap:anywhere}.bar{height:8px;background:#e4ebef;border-radius:9px;overflow:hidden;margin:15px 0}.bar>div{height:100%;width:0;background:#147e78;transition:width .2s}.wide{display:block;width:100%;text-align:left;margin:10px 0;padding:16px;white-space:normal}.wide.active{background:#e7f6f4;border:2px solid #147e78}.wide:disabled{opacity:1}.result{border-radius:12px;padding:14px;background:#f0f7f8;margin-top:18px}.result p{margin:8px 0}.correct{color:#0a8065}.wrong{color:#b52e44}.score-summary{font-size:21px;font-weight:750}.timer{font-variant-numeric:tabular-nums;font-weight:800;font-size:22px;color:#166c67}.timer.urgent{color:#bf3642}.nav-heading{margin-top:26px}.question-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.question-nav button{min-width:0;padding:8px 2px;min-height:44px;touch-action:manipulation}.question-nav button.done{background:#e7f6f4;border-color:#7cc9c0}.question-nav button.current{border:2px solid #147e78}.exam-bottom{display:flex;justify-content:space-between;gap:9px;margin-top:25px}.danger-outline{color:#b12d41;border-color:#d3a6ae}.review-item{padding:18px 0;border-bottom:1px solid #e4ebef}.review-item:last-child{border-bottom:0}.review-item h3{font-size:16px}.review-item p{margin:6px 0}.review-item .muted{font-size:14px}.page-notice{color:#61758a;font-size:13px;margin:16px 0}footer{text-align:center;color:#61758a;font-size:12px;padding:16px 16px 30px}@media(max-width:470px){.container{padding-left:13px;padding-right:13px}.card{padding:17px;border-radius:15px;margin:14px 0}.header-tag{display:none}.site-header{padding:20px 0}.actions button{padding:11px 8px;font-size:14px}.exam-option{align-items:flex-start;flex-direction:column}.exam-option button{width:100%}.question-nav{grid-template-columns:repeat(5,minmax(0,1fr))}.exam-bottom button{padding:9px;font-size:13px}}

/* Ver.5: iPhone向けの問題一覧と、採点後の要復習ビュー */
.exam-nav-details {border:1px solid #dce7ec;border-radius:13px;margin-top:26px;padding:0 12px 14px;background:#fbfdfd}
.exam-nav-details:not([open]) {padding-bottom:0}
.exam-nav-details summary {display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px;cursor:pointer;font-weight:700;list-style:none}
.exam-nav-details summary::-webkit-details-marker {display:none}
.exam-nav-details summary::before {content:'+';font-size:24px;color:#147e78;line-height:1}
.exam-nav-details[open] summary::before {content:'−'}
.exam-nav-details summary span:first-child {flex:1}
.exam-nav-details summary .nav-status {color:#61758a;font-size:12px;white-space:nowrap;font-weight:500}
.exam-nav-details .question-nav {margin-top:12px}
.exam-nav-details .question-nav button {min-height:45px}
.jump-unanswered {display:block;width:100%;margin-top:10px;color:#147e78;border-color:#9accc6;background:#fff}
.review-filters {display:flex;flex-wrap:wrap;gap:9px;margin:16px 0}
.review-filters button {flex:1;min-width:135px;font-size:14px}
.review-question {font-weight:650}
#reviewEmpty {border:1px solid #b3dcd1;background:#f0f9f6;padding:14px;border-radius:12px}
@media(max-width:470px){.exam-nav-details{padding-left:9px;padding-right:9px}.exam-nav-details .question-nav{gap:6px}.review-filters button{min-width:0;padding:12px 8px}}

.review-details {padding:0;border-bottom:1px solid #e4ebef}
.review-details summary {display:flex;align-items:center;gap:8px;justify-content:space-between;list-style:none;cursor:pointer;min-height:57px;padding:10px 2px;font-size:14px}
.review-details summary::-webkit-details-marker {display:none}
.review-details summary::before {content:'▸';color:#147e78;font-size:18px}
.review-details[open] summary::before {content:'▾'}
.review-details summary span {flex:1;min-width:0}
.review-details summary strong {font-size:12px;white-space:nowrap}
.review-details-body {padding:0 10px 13px 22px}
.review-details-body p {margin:8px 0}

/* Ver.6: 模試の見直し指定と受験履歴 */
.review-flag{display:block;width:100%;margin-top:12px;border:1px solid #c7d8e3;background:#fff;text-align:center;color:#416074}
.review-flag.active{background:#fff5db;border-color:#d49d28;color:#795000}
.exam-jumps{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.exam-jumps .jump-unanswered{margin-top:0;min-height:53px;font-size:14px}
.question-nav button.flagged{background:#fff5db;border-color:#d49d28;color:#775000}
.question-nav button.flagged.current{border:2px solid #147e78}
.exam-history-list{display:grid;gap:10px;margin:12px 0 20px}
.exam-history-entry{border:1px solid #e0e9ed;padding:12px 14px;border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.exam-history-entry p{margin:0;font-size:14px}
.exam-history-entry button{font-size:13px;flex-shrink:0}
@media(max-width:470px){.exam-jumps{grid-template-columns:1fr}.exam-history-entry{flex-wrap:wrap}.exam-history-entry button{width:100%}}

/* Ver.7: 公的根拠リンクと旧回答の改訂表示 */
#revisionNotice{background:#fff7e8;border:1px solid #f0dcaf;padding:12px;border-radius:10px}
.result a,.review-details-body a{color:#126b85;text-decoration:underline;overflow-wrap:anywhere}

/* Ver.10 実技科目、事例、計算入力のスマホ最適化 */
.home-tabs{display:flex;gap:10px;align-items:center;margin:12px 0 6px}
.home-tabs .tab-on{font-weight:750;padding:13px 20px;background:#fff;border:2px solid #147e78;border-radius:11px;color:#147e78}
.home-tabs button{flex:1;text-align:center;background:#e5f6f3;color:#126e68;border-color:#a1d4cd}
.full-width{width:100%}
.linkish{border:0;padding:8px 0;min-height:40px;color:#126e68;text-decoration:underline;background:transparent}
.pr-track-list{display:grid;gap:12px;margin-top:20px}
.pr-track{border:1px solid #d6e3e8;padding:16px;border-radius:14px}
.pr-track h3{font-size:17px;margin:4px 0 5px}
.pr-track p{margin:4px 0}
.pr-track .primary{margin-top:12px;width:100%}
.pr-track.disabled{background:#f8fafb}
.pr-track.disabled button{width:100%;margin-top:12px}
.pr-track .pr-org{color:#126e68;font-size:12px;font-weight:750}
.pr-case{background:#f4f9f8;border:1px solid #cce3e0;padding:16px;border-radius:14px;margin-top:22px}
.pr-case h3{color:#126e68}
.pr-case p{white-space:pre-line;line-height:1.8;margin-bottom:0}
.pr-num-wrap{display:flex;align-items:center;gap:12px}
.pr-num-wrap input{flex:1;min-width:0;padding:15px;border:1px solid #bdcfd9;border-radius:10px;font:inherit;font-size:20px}
.pr-num-wrap span{font-weight:700}
.pr-resume{background:#f2f8f6;border:1px solid #9dcac2;border-radius:14px;padding:16px;margin:18px 0}
.pr-result-status{font-size:13px;font-weight:750}
@media(max-width:470px){.home-tabs{gap:6px}.home-tabs button{padding:9px 7px;font-size:13px}.home-tabs .tab-on{padding:10px 14px;font-size:13px}}

.pr-history{margin-top:22px}
.pr-history-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #e3ebee}
.pr-history-row span{font-size:13px;font-weight:600}
.pr-history-row button{font-size:13px;min-height:40px;flex-shrink:0}
@media(max-width:470px){.pr-history-row{flex-wrap:wrap}.pr-history-row button{width:100%}}

/* Ver.11: clickable site title and short-by-default policy disclosure */
.site-title-link{color:inherit;text-decoration:none;display:inline-block;border-radius:6px}
.site-title-link:hover{text-decoration:underline;text-underline-offset:5px}
.site-title-link:focus-visible{outline:3px solid #fff;outline-offset:5px}
.usage-card p{margin:10px 0}
.usage-details{border:1px solid #d5e4e7;border-radius:12px;background:#f8fbfb;margin-top:15px;overflow:hidden}
.usage-details summary{list-style:none;cursor:pointer;min-height:52px;display:flex;align-items:center;gap:10px;padding:12px 15px;font-weight:700;color:#126e68}
.usage-details summary::-webkit-details-marker{display:none}
.usage-details summary::before{content:'＋';font-size:21px;line-height:1}
.usage-details[open] summary::before{content:'−'}
.usage-details-body{border-top:1px solid #d5e4e7;padding:8px 15px 14px;color:#526a7e;font-size:14px}
.usage-details-body a{color:#126e68;text-decoration:underline}

/* Ver.13: clearly separate practical levels and examination organizations */
.pr-course-switch{background:#f4faf9;border:1px solid #c5e1db;border-radius:14px;padding:15px;margin:20px 0}
.pr-course-switch-label{font-weight:750;margin:0 0 10px}
.pr-level-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pr-level-tabs button{border:2px solid #cadde2;background:#fff;min-height:66px;font-size:19px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.pr-level-tabs button small{color:#64778a;font-size:12px;font-weight:500}
.pr-level-tabs button.active{background:#e2f4f0;border:2px solid #147e78;color:#126e68}
.pr-level-tabs button.active small{color:#126e68}
.pr-track-groups{display:grid;gap:25px;margin:18px 0 25px}
.pr-org-group{border:1px solid #d6e5e9;background:#fafdfe;padding:16px;border-radius:15px}
.pr-org-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.pr-org-heading h3{font-size:19px;color:#145d60;margin:0}
.pr-org-count{font-size:12px;border-radius:20px;padding:5px 11px;background:#e5f6f3;color:#116b63;font-weight:750;white-space:nowrap}
.pr-org-group>.muted{margin:4px 0 0}
.pr-track-list{margin-top:12px}
.pr-track{background:#fff}
.pr-track h4{font-size:17px;margin:5px 0 6px}
.pr-history-panel{margin-top:30px;border-top:1px solid #e2ebee;padding-top:22px}
.pr-history-title{display:flex;gap:10px;align-items:center;justify-content:space-between}
.pr-history-title h3{font-size:18px}
.pr-clear-history{font-size:13px;min-height:40px;padding:8px 10px}
.pr-history-entry{border:1px solid #e1eaef;border-radius:12px;padding:13px;display:flex;justify-content:space-between;gap:12px;align-items:center;background:#fff}
.pr-history-summary{display:grid;gap:5px;min-width:0;flex:1}
.pr-history-summary strong{font-size:13px;line-height:1.5}
.pr-history-actions{display:flex;gap:7px}
.pr-history-actions button{min-height:41px;padding:8px 10px;font-size:12px;white-space:nowrap}
.pr-history-notice{min-height:1.5em}
@media(max-width:550px){.pr-org-group{padding:12px}.pr-history-entry{flex-direction:column;align-items:stretch}.pr-history-actions{display:grid;grid-template-columns:1fr 1fr}.pr-history-title{align-items:flex-start}.pr-history-title h3{font-size:16px}}

/* Ver.14: official information without using institutional branding */
.official-card{border:1px solid #d5e5e9}
.official-card .section-heading{align-items:flex-start;flex-wrap:wrap}
.official-card .section-heading h2{margin-bottom:8px}
.source-note{font-size:12px;color:#536f7e;background:#f3f7f8;border:1px solid #dae5e9;padding:4px 10px;border-radius:20px}
.official-organizations{display:grid;gap:11px;margin-top:18px}
.official-organization{border:1px solid #dae6eb;border-radius:13px;padding:14px;background:#fcfefe}
.official-organization h3{font-size:17px;margin-bottom:5px;color:#254658}
.official-organization p{margin:4px 0 12px}
.official-links{display:flex;gap:9px;flex-wrap:wrap}
.official-links a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;text-decoration:none;border:1px solid #bed8dd;background:#fff;border-radius:9px;color:#126c67;padding:9px 12px;font-size:13px;font-weight:650;flex:1 1 165px}
.official-links a:hover{background:#eff9f6;border-color:#5c9e99}
.official-links a:focus-visible,.source-details summary:focus-visible{outline:3px solid #eeab4e;outline-offset:3px}
.official-links a span{flex-shrink:0}
.source-details{border:1px solid #d5e4e7;border-radius:12px;background:#f8fbfb;margin-top:15px;overflow:hidden}
.source-details summary{list-style:none;cursor:pointer;min-height:48px;padding:11px 14px;font-weight:700;color:#126e68;display:flex;align-items:center;gap:9px}
.source-details summary::-webkit-details-marker{display:none}
.source-details summary::before{content:'＋';font-size:20px}
.source-details[open] summary::before{content:'−'}
.source-details-body{border-top:1px solid #d5e4e7;padding:9px 14px 14px;font-size:13px;color:#53677a}
.source-details-body p{margin:8px 0}
.usage-details-body h3{font-size:14px;color:#254658;margin:16px 0 4px}
.usage-details-body h3:first-child{margin-top:8px}
.usage-card a,.pr-source-disclosure a{color:#126e68;text-decoration:underline;overflow-wrap:anywhere}
.question-source-details{margin-top:12px;border-top:1px solid #d4e3e8;padding-top:11px;font-size:13px}
.question-source-details summary{cursor:pointer;color:#126e68;font-weight:650}
.question-source-details-body{padding:6px 0 2px;font-size:13px}
.question-source-details-body p{margin:8px 0}
.question-source-details-body a{color:#126b85;text-decoration:underline;overflow-wrap:anywhere}
@media(max-width:470px){.official-organization{padding:12px}.official-links{display:grid}.official-links a{min-height:42px}.official-card{padding:17px}}

.official-law-alert{background:#fff8e8;border:1px solid #eadab2;border-radius:10px;color:#705b34;font-size:12px;padding:10px 12px;line-height:1.65;margin:15px 0 0}

/* Ver.15 親ブランドとFPラボの区別 */
.brand-header{background:#fff;color:#092b43;padding:12px 0 13px;border-top:4px solid #147e78;border-bottom:2px solid #147e78}
.brand-header-inner{display:flex;align-items:center;justify-content:space-between;gap:14px}
.brand-home-link{display:flex;align-items:center;min-width:0;max-width:72%;border-radius:8px}
.brand-home-link:focus-visible{outline:3px solid #eeae44;outline-offset:3px}
.parent-brand-logo{display:block;max-width:100%;height:auto;max-height:73px;object-fit:contain;object-position:left center}
.brand-current{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#147e78;color:#fff;border-radius:10px;min-width:104px;padding:6px 10px;white-space:nowrap}
.brand-eyebrow{font-size:10px;font-weight:600}
.brand-current strong{font-size:22px;line-height:1.35}
.brand-subtitle{font-size:11px!important;color:#586b7f;margin:2px auto 0!important;text-align:center}
@media(max-width:470px){.brand-header{padding:10px 0}.brand-header-inner{gap:5px}.brand-home-link{max-width:69%}.parent-brand-logo{max-height:65px}.brand-current{min-width:87px;padding:5px 7px;border-radius:8px}.brand-current strong{font-size:19px}.brand-eyebrow{font-size:9px}.brand-subtitle{font-size:10px!important;line-height:1.45}}

/* Ver.16: 金財の実技演習を15問ずつ2回に分割 */
.pr-second-set{margin-top:8px;width:100%;border:1px solid #137e77;background:#fff;color:#126d68;padding:11px;border-radius:9px;font-weight:700;}

/* Ver.21: explicit reasons for every answer, when individually checked */
.choice-reason-list { padding-left: 1.4rem; margin: .65rem 0 0; }
.choice-reason-list li { margin: .55rem 0; overflow-wrap: anywhere; }
.choice-reason-list li p { margin: .16rem 0 .35rem; color: #536775; font-size: .94rem; line-height: 1.6; }

/* Ver.27: official-information section collapses like usage-details */
.official-card .official-lead{margin:5px 0 9px;line-height:1.7}
.official-toggle{margin-top:10px}
.official-toggle-body{padding:12px 14px 16px}
.official-toggle-body .official-organizations{margin-top:9px}
.official-toggle-body .source-details{margin-top:13px}

/* Exam materials: semantic tables, original conditions, and mobile reading. */
.pr-case{border:0;background:transparent;padding:0}
.pr-case>h3{font-size:18px;margin:20px 0 12px;line-height:1.6}
.material-document{--material-font:16px;background:#fff;border:1px solid #cad4dc;border-radius:12px;overflow:hidden;color:#172a3a;font-size:var(--material-font);line-height:1.75;margin:10px 0 20px}
.material-document.material-enlarged{--material-font:20px}
.material-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;background:#f3f6f8;border-bottom:1px solid #cad4dc}
.material-kicker{font-weight:750;letter-spacing:.08em;font-size:17px;white-space:nowrap}
.material-size-button{border:1px solid #bbc9d1;background:#fff;border-radius:7px;padding:8px 11px;min-height:44px;font-size:14px;line-height:1.3;white-space:nowrap;color:#23435c}
.material-table-wrap{padding:14px 16px;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.material-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:var(--material-font);background:#fff}
.material-table caption{text-align:left;font-weight:750;padding:0 0 9px;line-height:1.5}
.material-table th,.material-table td{border:1px solid #9eafbc;padding:10px 11px;vertical-align:top;overflow-wrap:anywhere;word-break:normal;line-height:1.7}
.material-table thead th{background:#eaf0f4;font-weight:700}
.material-table th:first-child{width:34%;text-align:left}
.material-table tbody th{background:#f7f9fb;font-weight:600}
.material-table td{font-variant-numeric:tabular-nums}
.material-number{font-weight:750;color:inherit}
/* JAFP2 question 3: compare the three distribution amounts at a glance.
   Only tables explicitly tagged by practical.js get this layout. */
.material-table.material-table-distribution{
  table-layout:fixed;
  width:100%;
  max-width:100%;
  /* Override generic wide-matrix minimums for this now-two-column table. */
  min-width:0!important;
}
.material-table.material-table-distribution th:first-child{width:52%;min-width:0}
.material-table.material-table-distribution th:nth-child(2){width:48%}
.material-table.material-table-distribution th,
.material-table.material-table-distribution td{
  padding:9px 7px;
  vertical-align:middle;
}
.material-table.material-table-distribution tbody td:last-child{
  text-align:right;
  white-space:normal;
  font-variant-numeric:tabular-nums;
}
.material-table-distribution .distribution-amount-value{
  display:block;
  white-space:nowrap;
  font-size:calc(var(--material-font) + 1px);
  font-weight:750;
  line-height:1.45;
}
.material-table-distribution .distribution-amount-unit{
  display:block;
  /* Do not shrink the unit into caption-sized text on a small phone. */
  white-space:nowrap;
  font-size:max(13px, calc(var(--material-font) * .86));
  font-weight:650;
  color:#30495b;
  line-height:1.5;
  margin-top:3px;
}

.material-statements{padding:2px 16px 14px}
.material-subheading{font-size:var(--material-font);font-weight:750;margin:12px 0 10px}
.material-lead{font-size:var(--material-font)!important;line-height:1.8!important;margin:12px 16px!important;overflow-wrap:anywhere;white-space:pre-wrap}
.material-statements>.material-lead{margin:10px 0!important}
.material-statements .material-table-wrap{padding:4px 0 0}
.material-case .material-statements .material-table th:first-child{width:15%;text-align:center;white-space:nowrap}
.material-condition-text{margin:0;padding:0}
.material-condition-paragraph{margin:0 0 .65em!important;line-height:1.8!important;overflow-wrap:anywhere;white-space:pre-wrap}
.material-condition-paragraph:last-child{margin-bottom:0!important}
.material-basis-note{margin:12px 16px!important;font-size:12px!important;line-height:1.6!important;color:#596b78;white-space:normal!important}
.material-original{border-top:1px solid #d5dfe5;padding:0 16px;font-size:14px;color:#465c6e}
.material-original summary{min-height:44px;padding:11px 0;cursor:pointer;font-weight:600}
.material-original p{white-space:pre-wrap;font-size:var(--material-font);line-height:1.8;overflow-wrap:anywhere}
.pr-source-disclosure{margin-top:8px}
.review-details-body .material-document{margin:10px 0 16px}
@media(max-width:470px){
 .material-heading{padding:11px 12px;gap:8px}
 .material-table-wrap{padding:13px 10px}
 .material-table th,.material-table td{padding:9px 8px}
 .material-table th:first-child{width:38%}
 /* Four-column exam tables retain readable cells; scroll the table rather than squeeze text. */
 .material-table:has(tr > :nth-child(4)){min-width:620px}
 .material-document.material-enlarged .material-table:has(tr > :nth-child(4)){min-width:760px}
 .material-statements{padding:2px 12px 12px}
 .material-kicker{font-size:16px}
 .material-size-button{font-size:13px;padding:8px}
 .material-lead{margin:12px!important}
 .material-document{border-radius:9px}
}
@media print{
 .material-size-button,.material-original{display:none}
 .material-document{border-radius:0;box-shadow:none}
 .material-table-wrap{overflow:visible}
 .material-table tr{break-inside:avoid}
}

/* Exact SVG diagrams rendered as image data, without external requests. */
.material-diagram{margin:16px;padding:14px 12px;border:1px solid #bccbd5;border-radius:8px;background:#fff}
.material-diagram figcaption{font-weight:750;font-size:var(--material-font);line-height:1.5;margin:0 0 12px}
.material-diagram-image{display:block;width:100%;height:auto;max-width:480px;margin:0 auto}
.material-diagram-note{font-size:14px!important;line-height:1.65!important;margin:12px 0!important;color:#465c6e;white-space:normal!important;overflow-wrap:anywhere}
.material-diagram-expand{border-top:1px solid #dbe3e9;margin-top:12px}
.material-diagram-expand summary{cursor:pointer;font-size:15px;font-weight:650;min-height:44px;padding:11px 0;color:#23435c}
.material-diagram-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #dae2e8;background:#fff}
.material-diagram-large{display:block;width:640px;max-width:none;height:auto}
.material-diagram-scroll:focus-visible{outline:3px solid #f0ad4e;outline-offset:2px}
@media(max-width:470px){.material-diagram{margin:12px 10px;padding:12px 9px}}
@media print{.material-diagram-expand{display:none}.material-diagram{break-inside:avoid}.material-diagram-image{max-width:420px}}

/* Academic reference materials: exact text and mobile-readable tables. */
.academic-stem { margin: 0 0 14px; white-space: pre-line; }
.academic-document { font-weight: 400; }
.academic-document .material-table { font-size: 16px; }
.academic-document.material-enlarged .material-table { font-size: 20px; }
.academic-document .material-original p { white-space: pre-line; }
.review-question .academic-stem { font-weight: 600; }

/* Wide practical data sheets retain readable columns within the existing scroll region. */
.material-table.material-table-matrix{min-width:540px;table-layout:auto}
/* Keep five- and seven-column comparison sheets legible on narrow phones. */
@media(max-width:470px){
 .material-table.material-table-matrix:has(thead tr > :nth-child(5)){min-width:680px}
 .material-table.material-table-matrix:has(thead tr > :nth-child(7)){min-width:860px}
}
.material-table.material-table-matrix th:first-child{width:auto;min-width:8em}

/* Shared question-reading rhythm across academic and practical exercises. */
#quiz .question-text,#exam .question-text,#practicalExam .question-text,.review-question{font-size:16px;line-height:2;white-space:pre-line;overflow-wrap:anywhere}
#quiz .wide,#practicalExam .wide{line-height:1.65;text-align:left;overflow-wrap:anywhere}
/* Keyboard focus is visible for scrollable matrices in exam, review and academic views. */
.material-table-wrap[tabindex="0"]:focus-visible{outline:3px solid #f0ad4e;outline-offset:-3px;scroll-margin:12px}
.material-table-wrap[tabindex="0"]{scroll-padding-inline:12px}
@media(max-width:600px){#quiz .question-text,#exam .question-text,#practicalExam .question-text,.review-question{font-size:15px;margin:18px 0}}
@media(max-width:470px){#quiz .wide,#practicalExam .wide{padding:15px 14px}}

/* Keep row labels visible while reading wide practical comparison tables on a phone. */
.material-table-matrix tbody th:first-child{position:sticky;left:0;z-index:1;background:#f7f9fb;box-shadow:2px 0 0 #9eafbc}
.material-table-matrix thead th:first-child{position:sticky;left:0;z-index:2;background:#eaf0f4;box-shadow:2px 0 0 #9eafbc}
.material-table-wrap{overscroll-behavior-x:contain}
@media(prefers-reduced-motion:reduce){.bar>div{transition:none}}

/* Distinguish the start of the next Kinzai case without altering navigation button order. */
#prNav button.scenario-start{box-shadow:inset 4px 0 0 #9db7c7}

.landing-title{font-size:clamp(21px,4.5vw,27px);line-height:1.4;margin:0 0 6px}.landing-intro{margin:0 0 12px}

/* Financial License Lab sibling learning areas */
.lab-nav{display:flex;gap:10px;margin-top:14px}.lab-nav a{display:inline-block;padding:8px 18px;border:1px solid #bdddd8;border-radius:24px;color:#126c67;text-decoration:none;background:#fff;font-weight:700}.lab-nav a[aria-current=page]{background:#147e78;color:#fff;border-color:#147e78}

/* Long explanations are reading text, not oversized headings. Keep exam/review answers scannable. */
.fp-explanation{white-space:pre-line;line-height:2;overflow-wrap:anywhere;font-size:16px}
.review-item .fp-explanation,.choice-reason-list li .fp-explanation{font-size:16px;line-height:2}
@media(max-width:600px){.fp-explanation,.review-item .fp-explanation,.choice-reason-list li .fp-explanation{font-size:15px}}


/* Mobile source materials: see every value without discovering hidden right-side columns. */
@media(max-width:600px){
  .material-table:not(.material-table-mobile-cards){
    width:100%;
    max-width:100%;
    min-width:0;
    table-layout:fixed;
    font-size:clamp(14px, calc(var(--material-font) * .9), 18px);
  }
  .academic-document .material-table:not(.material-table-mobile-cards){
    font-size:clamp(14px, calc(var(--material-font) * .9), 18px);
  }
  .material-table th,.material-table td{padding:8px 6px;line-height:1.55}
  .material-table:not(.material-table-matrix):not(.material-table-mobile-cards) th:first-child{width:43%;min-width:0}
  .material-table.material-table-unit-pair:not(.material-table-matrix) th:first-child{width:49%}
  .material-table.material-table-unit-pair th:nth-child(2){width:51%}
  .material-table-unit-pair tbody td:last-child{text-align:right}
  .material-table-unit-pair .material-compact-value{display:block;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}
  .material-table-unit-pair .material-compact-unit{display:block;font-size:.9em;line-height:1.5;overflow-wrap:anywhere}
  /* Three independent columns remain a compact table; their labels may wrap naturally. */
  .material-table.material-table-matrix:has(thead tr > :nth-child(3):last-child){width:100%;min-width:0;table-layout:fixed}
  .material-table.material-table-matrix:has(thead tr > :nth-child(3):last-child) th:first-child{
    width:34%;min-width:0;position:static;box-shadow:none;white-space:normal
  }
  /* Four or more columns turn into stacked key/value rows instead of a sideways sheet. */
  .material-table-wrap:has(> .material-table-mobile-cards){overflow-x:visible}
  .material-table.material-table-mobile-cards{
    display:block;width:100%;max-width:100%;min-width:0!important;
    table-layout:auto;font-size:clamp(14px, calc(var(--material-font) * .9), 18px)
  }
  .material-table-mobile-cards caption{display:block;padding:0 0 10px}
  .material-table-mobile-cards thead{
    position:absolute;clip-path:inset(50%);width:1px;height:1px;
    padding:0;margin:-1px;overflow:hidden;white-space:nowrap
  }
  .material-table-mobile-cards tbody{display:block}
  .material-table-mobile-cards tbody tr{
    display:block;margin:0 0 12px;overflow:hidden;
    border:1px solid #a5b7c5;border-radius:7px;background:#fff
  }
  .material-table-mobile-cards tbody :is(th,td){
    display:grid;grid-template-columns:minmax(0,42%) minmax(0,1fr);
    gap:10px;align-items:start;position:static;box-shadow:none;
    width:100%!important;min-width:0!important;
    padding:9px 10px;border:0;border-bottom:1px solid #d9e3e9;
    text-align:left;white-space:normal;overflow-wrap:anywhere
  }
  .material-table-mobile-cards tbody tr > :last-child{border-bottom:0}
  .material-table-mobile-cards tbody :is(th,td)::before{
    content:attr(data-column-label);font-weight:700;color:#3a5366
  }
  .material-table-mobile-cards tbody th:first-child{
    display:block;background:#eaf0f4;font-weight:750;font-size:1em
  }
  .material-table-mobile-cards tbody th:first-child::before{display:none}
}


/* Shared exam reading hierarchy: the instruction stays bold; supplied conditions do not. */
#practicalExam .pr-question-primary{display:block;font-weight:700}
#practicalExam .pr-question-conditions{
  display:block;margin-top:8px;padding:9px 11px;
  border-left:3px solid #b8cbd2;border-radius:0 6px 6px 0;
  background:#f5f8f9;color:#41596a;font-size:14px;font-weight:400;
  line-height:1.7;white-space:pre-line;overflow-wrap:anywhere
}
#practicalExam .pr-question-conditions::before{
  content:'前提・補足';display:block;color:#546d7d;
  font-size:12px;line-height:1.4;font-weight:650;margin-bottom:4px
}

/* Compact without sacrificing touch sizes. Applies to all FP learning modes. */
@media(max-width:600px){
  #quiz .card,#exam .card,#practicalExam .card{padding:14px 13px}
  #quiz .bar,#exam .bar,#practicalExam .bar{margin:10px 0}
  #quiz .question-text,#exam .question-text,#practicalExam .question-text{
    margin:11px 0;line-height:1.75
  }
  #practicalExam .pr-question-conditions{margin-top:6px;padding:8px 10px;line-height:1.65}
  #practicalExam #prMaterialHelp{margin:5px 0 7px;line-height:1.55}
  #practicalExam #prUpdatedDate{margin:5px 0}
  #practicalExam .pr-case{margin-top:9px}
  #practicalExam .pr-case>h3{font-size:16px;margin:10px 0 7px;line-height:1.5}
  #practicalExam #prTopic,#practicalExam .pr-source-disclosure{margin:7px 0;line-height:1.55}
  #practicalExam .field-label{margin:10px 0 5px}
  #practicalExam .actions{margin-top:10px}
  #practicalExam .exam-nav-details{margin-top:14px}
  #practicalExam .exam-bottom{margin-top:14px}
  #practicalExam .wide,#quiz .wide{margin:6px 0;padding:10px 12px;min-height:44px}
  #practicalExam .pr-num-wrap input{padding:11px 12px;font-size:16px;min-height:44px}
  .material-document{margin:7px 0 12px;line-height:1.65}
  .material-heading{padding:7px 10px}
  .material-kicker{font-size:15px}
  .material-table-wrap{padding:8px 6px}
  .material-table caption{padding-bottom:5px;line-height:1.4}
  .material-table th,.material-table td{
    padding:6px 5px;line-height:1.5;
    word-break:normal;overflow-wrap:break-word
  }
  .material-statements{padding:0 10px 8px}
  .material-subheading{margin:7px 0 5px;font-size:15px}
  .material-condition-paragraph{margin-bottom:.4em!important;line-height:1.65!important}
  .material-basis-note{margin:8px 10px!important}
  .material-original{padding:0 10px}
  .material-original summary{padding:7px 0}
  .material-table-mobile-cards tbody tr{margin-bottom:7px}
  .material-table-mobile-cards tbody :is(th,td){
    padding:7px 8px;gap:7px;grid-template-columns:minmax(0,38%) minmax(0,1fr)
  }
  /* Tables such as 項目 / 金額 / 条件: keep the narrow numeric column intact. */
  .material-table.material-table-three-compact{table-layout:fixed;width:100%;min-width:0}
  .material-table-three-compact thead th,.material-table-three-compact tbody td{
    font-size:14px;line-height:1.5
  }
  .material-table-three-compact th:first-child{
    width:40%!important;min-width:0!important;position:static!important;
    box-shadow:none!important
  }
  .material-table-three-compact th:nth-child(2),
  .material-table-three-compact td:nth-child(2){width:19%;white-space:nowrap}
  .material-table-three-compact th:nth-child(3),
  .material-table-three-compact td:nth-child(3){width:41%}
  .material-table-three-compact tbody :is(th,td){word-break:keep-all;overflow-wrap:anywhere}
  .material-table-three-compact thead :is(th,td){word-break:keep-all;overflow-wrap:anywhere}
}


/* Keep four yes/no judgments compact without reducing the touch target. */
@media(max-width:600px){
  #practicalExam .pr-binary-choice{
    min-width:0;margin:0 0 9px;padding:7px 9px 9px;
    border:1px solid #cfdae0;border-radius:9px;background:#fff
  }
  #practicalExam .pr-binary-choice legend{
    max-width:100%;padding:0 3px;margin:0;
    font-size:14px;line-height:1.6;font-weight:600;
    white-space:normal;overflow-wrap:break-word
  }
  #practicalExam .pr-binary-choice > button.wide{
    display:inline-flex;align-items:center;justify-content:center;
    vertical-align:top;width:calc(50% - 4px);margin:5px 0 0;
    padding:9px 5px;min-height:44px;min-width:0;
    text-align:center;font-size:15px;line-height:1.35
  }
  #practicalExam .pr-binary-choice > button.wide + button.wide{
    margin-left:8px
  }
  #practicalExam .pr-binary-choice > button.active{
    border-color:#147e78;background:#e7f6f4
  }
  #practicalExam #prMultiNumeric>.muted.small{margin:8px 0;line-height:1.55}
}


/* Mobile insurance benefit sheets: coverage + full amount together,
   eligibility and starting day on a separate full-width line. */
@media(max-width:600px){
  .material-table-wrap:has(> .material-table-benefit-rows){overflow-x:visible}
  .material-table.material-table-benefit-rows{
    display:block;width:100%;max-width:100%;min-width:0!important;
    table-layout:auto;font-size:14px
  }
  .material-table-benefit-rows caption{
    display:block;padding:0 0 7px;font-weight:750;text-align:left
  }
  .material-table-benefit-rows thead{
    position:absolute;width:1px;height:1px;margin:-1px;padding:0;
    overflow:hidden;white-space:nowrap;clip-path:inset(50%)
  }
  .material-table-benefit-rows tbody{display:block}
  .material-table-benefit-rows tbody tr{
    display:grid;grid-template-columns:minmax(0,1fr) max-content;
    align-items:start;column-gap:8px;margin:0 0 7px;
    border:1px solid #a9bdc8;border-radius:6px;overflow:hidden;
    background:#fff
  }
  .material-table-benefit-rows tbody :is(th,td){
    display:block;position:static!important;min-width:0!important;
    width:auto!important;box-shadow:none!important;
    padding:7px 8px;border:0;text-align:left;line-height:1.5;
    word-break:keep-all;overflow-wrap:break-word
  }
  .material-table-benefit-rows tbody th:first-child{
    background:transparent;font-weight:700
  }
  .material-table-benefit-rows tbody td:nth-child(2){
    font-variant-numeric:tabular-nums;font-weight:700;
    white-space:nowrap;text-align:right
  }
  .material-table-benefit-rows tbody td:nth-child(3){
    grid-column:1/-1;border-top:1px solid #dce5ea;
    background:#f7f9fa;color:#344e61
  }
  .material-table-benefit-rows tbody td:nth-child(3)::before{
    content:'支払条件';font-size:12px;font-weight:700;
    color:#587085;margin-right:.65em
  }
}


/* Structured FP academic materials (mobile-first, no mandatory scroll). */
.academic-stem{display:block;margin:0 0 10px;font-weight:700;line-height:1.75}
.academic-document{margin:9px 0 12px;line-height:1.6}
.academic-document .academic-mobile-table{width:100%;max-width:100%;table-layout:fixed;font-size:15px}
.academic-document .academic-mobile-table th,.academic-document .academic-mobile-table td{min-width:0;overflow-wrap:break-word;word-break:normal;line-height:1.55}
.academic-document .academic-mobile-table thead th:first-child{width:43%}
.academic-document .academic-material-notes{padding:6px 11px;background:#f9fbfc}
.academic-document .academic-material-note{margin:5px 0;font-size:14px;line-height:1.6;color:#526777;word-break:normal;overflow-wrap:break-word}
@media(max-width:600px){
  .academic-stem{margin-bottom:7px;line-height:1.7}
  .academic-document{margin:7px 0}
  .academic-document .material-table-wrap{overflow-x:visible;padding:8px 6px}
  .academic-document .academic-mobile-table{width:100%;min-width:0!important;font-size:14px;table-layout:fixed}
  .academic-document .academic-mobile-table th,.academic-document .academic-mobile-table td{padding:7px 5px;min-width:0;overflow-wrap:break-word;word-break:normal}
  .academic-document .academic-mobile-table:not(.academic-three-column) th:first-child{width:43%;position:static;box-shadow:none}
  .academic-document .academic-three-column th:first-child{width:36%;min-width:0;position:static;box-shadow:none}
  .academic-document .academic-three-column th:nth-child(2){width:28%}
  .academic-document .academic-three-column th:nth-child(3){width:36%}
  .academic-document .academic-material-notes{padding:4px 9px}
  .academic-document .academic-material-note{margin:4px 0}
}

/* Numeric-safe mobile source tables. The original table semantics and values
   remain available to assistive technology and on wider displays. */
.academic-document .academic-mobile-table .material-number{
  display:inline-block;max-width:100%;white-space:normal;
  overflow-wrap:anywhere;word-break:normal
}
.academic-document .academic-mobile-table .academic-amount{
  font-variant-numeric:tabular-nums;text-align:right
}
@media(max-width:600px){
  .academic-document .academic-mobile-table :is(th,td){
    max-width:100%;overflow-wrap:anywhere;box-sizing:border-box
  }
  .academic-document .academic-mobile-table:not(.academic-mobile-stacked) td{
    white-space:normal
  }
  /* A third column or a long number must not compete for a 60px wide cell.
     Each value gets the full row width with a visible source column heading. */
  .academic-document .material-table-wrap:has(> .academic-mobile-stacked){
    overflow-x:visible
  }
  .academic-document .academic-mobile-table.academic-mobile-stacked{
    display:block;width:100%;max-width:100%;min-width:0!important;
    table-layout:auto;font-size:14px
  }
  .academic-document .academic-mobile-stacked caption{
    display:block;text-align:left;padding:0 0 6px
  }
  .academic-document .academic-mobile-stacked thead{
    position:absolute;width:1px;height:1px;margin:-1px;padding:0;
    overflow:hidden;white-space:nowrap;clip-path:inset(50%)
  }
  .academic-document .academic-mobile-stacked tbody{display:block}
  .academic-document .academic-mobile-stacked tbody tr{
    display:block;min-width:0;margin:0 0 7px;
    border:1px solid #a9bdc8;border-radius:6px;overflow:hidden;
    background:#fff
  }
  .academic-document .academic-mobile-stacked tbody :is(th,td){
    position:static!important;display:block;min-width:0!important;
    width:100%!important;max-width:100%;box-shadow:none!important;
    border:0;border-bottom:1px solid #dce5ea;
    padding:7px 9px;line-height:1.55;text-align:left;
    word-break:normal;overflow-wrap:anywhere
  }
  .academic-document .academic-mobile-stacked tbody tr>:last-child{
    border-bottom:0
  }
  .academic-document .academic-mobile-stacked tbody th:first-child{
    background:#eaf0f4;font-weight:700
  }
  .academic-document .academic-mobile-stacked tbody td::before{
    content:attr(data-col-label);display:block;margin-bottom:2px;
    color:#506a7e;font-size:12px;font-weight:700;line-height:1.4
  }
  .academic-document .academic-mobile-stacked tbody td.academic-amount{
    font-size:15px;text-align:right
  }
}
