/* Creative edition. Every source paragraph is visible before JavaScript runs. */
:root{--paper:#f7f6f2;--accent:#a77b38;--teal:#236c68;--ink:#172e3c;--surface:#f1f5f4;--line:#dce4e2;--shadow:0 14px 42px #172e3c0b}
::selection{background:#d8ebe4;color:#172e3c}
a:focus-visible,button:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #b8842f;outline-offset:5px;border-radius:4px}
.site-header{border-bottom:1px solid var(--line)}
.subpage{background:var(--paper)}
.subpage .pagehead{min-height:320px;border-bottom:5px solid var(--accent)}
.subpage .pagehead:after{background:linear-gradient(100deg,#122e39f5 15%,#173c40cf 65%,#123e4270)}
.subpage .pagehead h2{letter-spacing:.035em;line-height:1.55;max-width:950px}
.pagehead>.eyebrow{letter-spacing:.22em}
.breadcrumbs{background:#fff;font-variant-numeric:tabular-nums}
.subpage #hpb-main{max-width:1180px;padding-top:56px;line-height:2.15}
.subpage #hpb-main h3{letter-spacing:.015em;text-wrap:pretty}
.subpage #hpb-main p{line-height:2.2;text-wrap:pretty}
.subpage #hpb-main p.large{background:linear-gradient(120deg,#e8f0ec,#fff);border:1px solid #dce6df;border-left:4px solid var(--teal);border-radius:0 18px 18px 0;padding:32px}
.subpage #hpb-main hr{height:1px;border:0;background:linear-gradient(90deg,var(--accent),var(--line) 20%,transparent);margin:36px 0}
.subpage #hpb-main hr+hr{display:none}
.subpage #hpb-main a:not(.document-link):not(.application-link){text-decoration-thickness:1px}
.subpage #hpb-nav,.subpage #banner{border-top:1px solid var(--line)}
#hpb-nav a:hover,#banner a:hover{border-color:#a4bcb1;box-shadow:0 12px 24px #172e3c10}
.reading-progress{position:fixed;inset:0 0 auto;height:3px;background:linear-gradient(90deg,#55ac9b,#d1a35c);z-index:300;transform-origin:left;pointer-events:none}
.chapter-index{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 30px;margin:0 0 36px;border-bottom:1px solid var(--line)}
.chapter-index a{display:block;font-size:12px;line-height:1.6;padding:10px 14px;background:#fff;border:1px solid var(--line);border-radius:6px;text-decoration:none;color:var(--ink)}
.chapter-index a:hover{background:var(--ink);color:#fff!important;border-color:var(--ink)}
.editorial-section{position:relative;margin:0 0 32px;padding:34px 38px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 6px 20px #172e3c03;min-width:0}
.editorial-section>h3{margin:0 0 25px!important;font-size:24px!important}
.editorial-section>p:last-child{margin-bottom:0!important}
.editorial-section>hr:first-child,.editorial-section>hr:last-child{display:none}
.editorial-section:before{content:attr(data-number);display:block;color:var(--accent);font:600 12px/1.2 var(--font);letter-spacing:.18em;margin-bottom:16px}
/* Reading a history: a quiet continuous rail, with dates drawn from the text. */
body[data-page=greeting] #hpb-main{max-width:1060px}
.history-section{margin-left:40px;padding:32px 38px;border-radius:0 18px 18px 18px}
.history-section:before{position:absolute;left:-47px;top:36px;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;margin:0;background:var(--paper);border:1px solid var(--accent);color:#805d28;z-index:1;font-size:10px;letter-spacing:0}
.history-section:after{content:'';position:absolute;left:-32px;top:0;bottom:-34px;width:1px;background:#cbbda4}
.history-section:last-of-type:after{bottom:calc(100% - 52px)}
.history-dates{display:flex;flex-wrap:wrap;gap:8px;margin:-8px 0 26px}
.date-chip{display:inline-flex;background:#f3eee4;color:#735628;border-radius:4px;padding:4px 10px;font-size:11px;font-weight:700;letter-spacing:.04em}
/* Process chapters retain qualifications and exceptions in the same block. */
.process-section{border-top:3px solid var(--teal);padding-left:88px}
.process-section:before{position:absolute;left:26px;top:33px;width:40px;height:40px;display:grid;place-items:center;background:#e8f2ed;border-radius:12px;color:var(--teal);font-size:15px;letter-spacing:0}
.process-section:not(:last-of-type):after{content:'';position:absolute;bottom:-25px;left:44px;width:10px;height:10px;border-right:2px solid var(--teal);border-bottom:2px solid var(--teal);transform:rotate(45deg)}
body[data-page=processing] .process-section p{padding:18px 0!important;border-top:1px solid #edf0ee;margin-bottom:12px!important}
/* Fees are full-width cards so conditions and large tables stay together. */
.rate-section{border-radius:12px;border-left:4px solid var(--teal)}
.rate-section:before{display:none}
.rate-section .table-scroll{box-shadow:none;border-radius:8px;margin-bottom:8px}
.rate-section>h3{font-size:21px!important}
.membership-card{display:block;padding:30px 32px;margin:22px 0;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}
.membership-card>.legacy-symbol:first-child{margin-right:10px;color:var(--teal)}
.membership-price{background:linear-gradient(120deg,#eaf3ee,#fff);border-top:3px solid var(--teal);font-weight:600}
.price-amount{display:inline-block;font-size:clamp(25px,3.2vw,38px);line-height:1.8;color:var(--teal);letter-spacing:-.045em;margin:0 10px;font-variant-numeric:tabular-nums}
.membership-application{border-top:3px solid var(--accent)}
.application-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;counter-reset:application;list-style:none;margin:0 0 24px;padding:0}
.application-steps li{counter-increment:application;padding:16px 12px;background:#f3efe6;border-radius:8px;font-size:12px;line-height:1.7}
.application-steps li:before{content:'0' counter(application);display:block;font-size:18px;color:#87662e;margin-bottom:8px;letter-spacing:.08em}
.document-link{display:inline-flex;align-items:center;gap:14px;max-width:100%;padding:15px 18px;border:1px solid #cddcd5;border-radius:9px;background:#fff;text-decoration:none;line-height:1.7;color:#24564c!important;vertical-align:middle}
.document-link:before{content:attr(data-format);display:grid;place-items:center;flex-shrink:0;width:43px;height:49px;clip-path:polygon(0 0,72% 0,100% 24%,100% 100%,0 100%);background:#e6f0eb;color:#315f52;font-size:10px;font-weight:800;letter-spacing:.02em}
.document-link:after{content:'↗';font-size:20px;margin-left:auto;color:var(--teal)}
.document-link:hover{background:#edf5ef;transform:translateY(-2px);box-shadow:var(--shadow);border-color:#7b9f8f}
.application-link{display:inline-flex;background:var(--teal);color:white!important;border-color:var(--teal);margin:12px 0}
.application-link:after{color:inherit}
.application-link:hover{background:#174f4b}
body[data-page=data] #hpb-main>.table-scroll,body[data-page=data] #hpb-main .table-scroll{border:0;box-shadow:none;background:transparent;overflow:visible}
body[data-page=data] #hpb-main table{min-width:0;background:transparent}
body[data-page=data] #hpb-main tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body[data-page=data] #hpb-main tr{display:block;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px}
body[data-page=data] #hpb-main tr:first-child{grid-column:1/-1;padding:14px 20px}
body[data-page=data] #hpb-main td,body[data-page=data] #hpb-main th{display:block;min-width:0;padding:8px}
body[data-page=data] .document-link{width:100%;border:0;padding:10px 4px}
/* Dated records, alongside the existing fix11 accordion controls. */
.dated-entry:before{content:attr(data-date);display:table;background:#e8efea;color:#315d50;border-radius:4px;font:700 11px/1.6 var(--font);letter-spacing:.04em;padding:5px 10px;margin:0 0 14px}
body[data-page=news] #schedule-cont>h4{border-radius:10px;border-left:3px solid var(--teal);padding:24px 54px 24px 24px}
body[data-page=news] #schedule-cont>h4[aria-expanded=true]{background:#eaf1ed;border-bottom-left-radius:0;border-bottom-right-radius:0;box-shadow:none}
body[data-page=news] .article-panel.is-open{background:white;border:1px solid var(--line);border-top:0;border-radius:0 0 10px 10px;padding:28px}
body[data-page=zakki] #hpb-main{max-width:1000px}
body[data-page=zakki] #hpb-main p.MsoNormal{padding:32px!important;background:#fff;border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:12px}
body[data-page=seminar] .table-scroll{padding-top:18px;background:white;border-top:3px solid var(--teal)}
body[data-page=seminar] .dated-entry:before{margin-left:18px}
/* Comparison tables have an explicit internal scroll viewport for sticky axes. */
.comparison-scroll{max-height:70vh;max-height:70svh;scrollbar-color:#8fa99f #edf1ed;scrollbar-width:thin}
.comparison-scroll .comparison-heading>th,.comparison-scroll .comparison-heading>td{position:sticky;top:0!important;z-index:4;background:var(--ink)!important;color:#fff!important;border-right:1px solid #ffffff25}
.comparison-scroll tr>:first-child{position:sticky;left:0;z-index:2;background:#eff3ef;box-shadow:1px 0 #d9e3db;font-weight:600}
.comparison-scroll .comparison-heading>:first-child{z-index:5}
body[data-page=newspaper] .comparison-scroll{border-radius:12px}
body[data-page=newspaper] .comparison-heading>*{min-width:170px;padding-top:24px;padding-bottom:24px}
.table-scroll td,.table-scroll th{line-height:1.85}
.table-scroll tr:not(.table-heading):nth-child(even){background:#fff}
body[data-page^=bungei-] .pagehead{min-height:230px}
body[data-page^=bungei-] .table-scroll{border-top:3px solid var(--teal)}
body[data-page^=bungei-] .kana-nav{background:#fafbf8}
.kana-row a[aria-current=page]{background:var(--teal);color:white}
body[data-page=bungei] .table-scroll a{display:inline-flex;align-items:center;justify-content:center;min-height:48px;min-width:64px;background:#e9f1ec;border-radius:7px;text-decoration:none}
.region-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:32px 0}
.region-group{border:1px solid var(--line);border-radius:12px;background:#fff;padding:22px}
.region-group h4{font-size:14px;margin:0 0 15px;color:var(--teal);letter-spacing:.06em}
.region-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.region-links a{position:relative;display:block;padding:10px 8px 14px;border:1px solid #e4eae5;border-radius:5px;color:var(--ink);font-size:12px;text-decoration:none;background:#fbfcfa}
.region-links a:after{content:'';position:absolute;bottom:0;left:0;height:3px;width:var(--member-share);min-width:2px;background:#669984;border-radius:0 2px 2px 0}
.region-links a:hover{background:#e7f0e9}
.region-source{display:none}
.school-accordion{border-radius:12px;box-shadow:none}
.school-section>table th{background:#eaf1ec;color:var(--ink)}
.school-section>table th[aria-expanded=true]{background:var(--teal);color:white}
.school-panel td{border-bottom:1px solid var(--line)}
body[data-page=profile] .chapter-section .table-scroll{box-shadow:none}
body[data-page=profile] .table-scroll td:first-child{color:var(--teal);font-weight:700;width:35%}
body[data-page=information] .chapter-section{border-top:4px solid var(--teal)}
body[data-page=information] #hpb-main img{box-shadow:var(--shadow);border:8px solid white}
body[data-page=asahi-weekly] .chapter-section{border-top:4px solid var(--accent);max-width:900px;margin-inline:auto}
body[data-page=report] .chapter-section{padding-left:90px}
body[data-page=report] .chapter-section:before{position:absolute;left:28px;top:34px;font-size:27px;font-weight:400;letter-spacing:0}
/* Home: a more editorial cover with warm paper and numbered service entrances. */
body[data-page=index] .hero:after{background:linear-gradient(90deg,#102c37ed,#183d42a8 65%,#123a4155)}
body[data-page=index] .hero h1{letter-spacing:.015em}
body[data-page=index] .intro{background:var(--paper)}
body[data-page=index] .service-grid{counter-reset:service;align-items:stretch}
body[data-page=index] .service-card{position:relative;border-radius:12px;border-top:3px solid var(--teal);box-shadow:0 6px 20px #172e3c06}
body[data-page=index] .service-card:after{counter-increment:service;content:'0' counter(service);position:absolute;right:24px;top:22px;font-size:12px;color:var(--accent);letter-spacing:.12em}
body[data-page=index] #toppage-news{background:#fff}
body[data-page=index] #toppage-news dt{color:var(--teal)}
body[data-page=index] .join-section{background:#193d40}
.back-to-top{bottom:100px}
@media(min-width:761px){.back-to-top{bottom:28px}}
@media(max-width:760px){
 .subpage .pagehead{min-height:260px;padding-top:32px;padding-bottom:32px}
 .subpage .pagehead h2{font-size:26px}.subpage #hpb-main{padding:32px 20px 60px}
 .editorial-section{padding:24px 20px;margin-bottom:24px;border-radius:10px}
 .editorial-section>h3{font-size:21px!important;line-height:1.7}
 .history-section{margin-left:23px;padding:24px 17px}
 .history-section:before{left:-37px;top:28px;width:26px;height:26px}
 .history-section:after{left:-25px;bottom:-26px}
 .history-section:last-of-type:after{bottom:calc(100% - 41px)}
 .process-section{padding-left:20px;padding-top:78px}.process-section:before{left:20px;top:22px}
 .process-section:not(:last-of-type):after{bottom:-19px;left:34px}
 .membership-card{padding:22px 18px}.price-amount{margin:4px 6px}
 .application-steps{grid-template-columns:1fr}.application-steps li{display:flex;align-items:center;gap:12px;padding:12px}.application-steps li:before{margin:0;font-size:14px}
 .document-link{padding:12px;gap:10px;font-size:13px}.document-link:before{width:34px;height:43px;font-size:9px}
 body[data-page=data] #hpb-main tbody{grid-template-columns:1fr}
 .chapter-index{gap:7px;margin-bottom:24px;padding-bottom:22px}.chapter-index a{font-size:11px;padding:8px 10px}
 .region-navigation{grid-template-columns:1fr;gap:12px}.region-group{padding:18px}
 .region-links{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-page=zakki] #hpb-main p.MsoNormal{padding:22px 18px!important}
 body[data-page=news] .article-panel.is-open{padding:20px 12px}
 body[data-page=report] .chapter-section{padding-left:20px;padding-top:70px}
 body[data-page=report] .chapter-section:before{left:20px;top:20px}
 .comparison-scroll{max-height:65svh}.subpage #hpb-main p.large{padding:24px 20px}
}
@media(prefers-reduced-motion:reduce){.document-link:hover{transform:none}}
@media print{
 @page{margin:16mm}
 html,body{background:white!important;color:#000!important;font-size:10pt!important}
 .site-header,.mobile-cta,.back-to-top,.reading-progress,.chapter-index,.breadcrumbs,.kana-nav,#hpb-nav,#banner,#hpb-skip,#pagetop,.hero-actions,.scroll-hint{display:none!important}
 .pagehead,.hero{min-height:0!important;padding:12px 0!important;background:white!important;color:black!important;border-bottom:2px solid black!important}
 .pagehead-photo,.pagehead:after,.hero:before,.hero:after{display:none!important}
 .pagehead h2,.hero h1{font-size:24pt!important}.pagehead>.eyebrow{color:#333!important}
 .subpage #hpb-main{max-width:none!important;padding:18px 0!important;font-size:10pt!important}
 .editorial-section,.membership-card{box-shadow:none!important;border:1px solid #bbb!important;padding:16px!important;margin:12px 0!important;background:white!important}
 .editorial-section:before,.editorial-section:after{display:none!important}
 .school-panel,.article-panel,.school-panel.is-open,.article-panel.is-open{max-height:none!important;height:auto!important;overflow:visible!important;visibility:visible!important;transform:none!important;padding:8px 0!important}
 .table-scroll,.comparison-scroll{max-height:none!important;overflow:visible!important;box-shadow:none!important;border-radius:0!important}
 .table-scroll table,.school-panel>table{width:100%!important;min-width:0!important;font-size:8pt!important}
 .table-scroll td,.table-scroll th,.school-section td,.school-section th{position:static!important;min-width:0!important;padding:6px!important;font-size:8pt!important}
 .table-heading>*,.comparison-heading>*,.school-section>table th{background:#eee!important;color:#000!important}
 h3,h4,thead{break-after:avoid}tr,img{break-inside:avoid}
 .enhance-trigger:after{display:none!important}.document-link{box-shadow:none!important;background:white!important;color:black!important}
 #associationinfo{padding:16px 0!important;background:white!important}#associationinfo:after{display:none!important}
 #associationinfo p,#associationinfo h3{max-width:none!important}#hpb-footer{padding:16px 0!important;background:white!important;color:black!important}
 details:not([open])>*{display:block!important}
}
