/* 医学ライフノート / ライフステージ別の共通デザイン */
:root{--ml-green:#174f4c;--ml-ink:#203b38;--ml-muted:#536962;--ml-paper:#f6f5ed;--ml-line:#d6e0da}
body:has(.ml-header) #header,body:has(.ml-header) #fix_header,body:has(.ml-header) #sp_menu,body:has(.ml-header) .l-header__bar{display:none!important}
.ml-header,.ml-site{color:var(--ml-ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;line-height:1.75}
.ml-header *,.ml-site *{box-sizing:border-box;min-width:0}
.ml-header a,.ml-site a{color:inherit;text-decoration:none}
.ml-header a:focus-visible,.ml-header summary:focus-visible,.ml-header input:focus-visible,.ml-header button:focus-visible,.ml-site a:focus-visible{outline:3px solid #ae7339;outline-offset:4px}
.ml-header{background:#fff;border-bottom:1px solid var(--ml-line);position:relative;z-index:100;margin:0}
.ml-header-inner{max-width:1160px;margin:auto;min-height:90px;display:flex;align-items:center;gap:28px;padding:18px 24px}
.ml-logo{flex:0 0 210px;display:flex;align-items:center;min-height:44px}.ml-logo img{width:210px;height:auto;display:block;object-fit:contain}
.ml-nav{margin-left:auto;display:flex;align-items:center;gap:25px;font-size:13px;font-weight:700}.ml-nav a{padding:10px 0;white-space:nowrap;border-bottom:2px solid transparent}.ml-nav a:hover{border-color:var(--ml-green)}
.ml-search summary,.ml-menu summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font-size:13px;font-weight:700;gap:7px}.ml-header summary::-webkit-details-marker{display:none}.ml-header summary svg{width:21px;height:21px;flex:none}
.ml-search form{position:absolute;right:max(24px,calc((100vw - 1112px)/2));top:100%;margin:0;padding:18px;background:#fff;border:1px solid var(--ml-line);box-shadow:0 12px 24px #173f3414;width:min(440px,calc(100vw - 32px));display:flex;gap:8px;z-index:5}
.ml-search input{width:100%;min-width:0;border:1px solid #a4b9ad;padding:10px;font-size:16px;border-radius:0}.ml-search button{background:var(--ml-green);color:#fff;padding:10px 17px;white-space:nowrap;border:0;font-weight:700}
.ml-menu{display:none}.ml-menu nav{position:absolute;top:100%;left:0;right:0;background:#fff;padding:12px 24px 24px;border-bottom:1px solid var(--ml-line);box-shadow:0 12px 24px #173f3414;z-index:6}.ml-menu nav a{display:block;padding:15px 2px;border-bottom:1px solid var(--ml-line);font-size:15px;font-weight:700}.ml-menu nav a:last-child{font-size:13px;font-weight:400;border:0}.ml-menu[open] summary{color:var(--ml-green)}
.ml-skip{position:absolute;left:20px;top:-100px;background:#fff;padding:10px;z-index:1000}.ml-skip:focus{top:8px}
body:has(.ml-site) #content{padding-top:0}body:has(.ml-site) #sidebar,body:has(.ml-site) #post_slider,body:has(.ml-site) .p-breadcrumb,body:has(.ml-site) .l-mainContent__inner>.c-pageTitle,body:has(.ml-site) .p-articleMetas{display:none}
body:has(.ml-site) .l-content{max-width:1160px;padding-left:24px;padding-right:24px}body:has(.ml-site) .l-mainContent{width:100%;float:none}body:has(.ml-site) .l-mainContent__inner{padding:0}body:has(.ml-site) .post_content{margin-top:0}
.ml-site{padding-bottom:24px}.ml-site h1,.ml-site h2,.ml-site h3,.ml-site p{margin:0;padding:0;border:0;background:none;box-shadow:none;color:inherit}.ml-site h1:before,.ml-site h1:after,.ml-site h2:before,.ml-site h2:after,.ml-site h3:before,.ml-site h3:after{display:none}
.ml-site section{margin:0}.ml-site .ml-kicker{font-size:12px;letter-spacing:.08em;font-weight:700;color:var(--ml-green);margin-bottom:13px}.ml-site h1{font-size:clamp(28px,3.3vw,45px);font-weight:800;line-height:1.55;letter-spacing:.01em;overflow-wrap:anywhere}.ml-site h2{font-size:27px;line-height:1.5;font-weight:800}.ml-site h3{font-size:18px;line-height:1.65;font-weight:700}.ml-site .ml-lead{font-size:14px;color:var(--ml-muted);line-height:2;margin-top:22px}
.ml-hero{padding:55px 40px 42px;background:var(--ml-paper);display:grid;grid-template-columns:1fr 1.08fr;gap:42px;align-items:center;border-bottom:3px solid var(--ml-green)}
.ml-stages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ml-stage{padding:21px 18px;background:#fff;border:1px solid var(--ml-line);display:flex;flex-direction:column;position:relative;transition:background .15s}.ml-stage:hover{background:#eef4ed}.ml-stage strong{font-size:17px;line-height:1.65;display:block}.ml-stage small{font-size:12px;color:var(--ml-muted);display:block;margin-top:8px}.ml-stage .ml-stage-top{font-size:10px;font-weight:700;letter-spacing:.12em;color:#63766b;margin-bottom:9px}.ml-stage .ml-stage-link{font-size:12px;color:var(--ml-green);margin-top:18px;font-weight:700}
.ml-site .ml-section{margin-top:58px}.ml-section-head{display:flex;gap:24px;justify-content:space-between;align-items:end;margin-bottom:24px}.ml-section-head>p{font-size:13px;color:var(--ml-muted)}
.ml-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}.ml-card{display:flex;flex-direction:column;gap:0}.ml-card img{display:block;width:100%;height:auto;aspect-ratio:1200/630;object-fit:contain;border:1px solid #e3e8e0;background:#f8f8f4}.ml-card .ml-label{font-size:11px;color:var(--ml-green);font-weight:700;display:block;margin:14px 0 7px}.ml-card h3{font-size:16px}.ml-card p{font-size:13px;line-height:1.85;color:var(--ml-muted);margin-top:10px}.ml-card:hover h3{text-decoration:underline;text-underline-offset:4px}.ml-card time{font-size:11px;color:var(--ml-muted);margin-top:10px;display:block}
.ml-site .ml-latest{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;list-style:none;margin:0;padding:0}.ml-site .ml-latest li{width:100%!important;margin:0!important;padding:0!important;list-style:none;border:0}.ml-site .ml-latest li:before{display:none}.ml-latest img{display:block;width:100%;height:auto;aspect-ratio:1200/630;object-fit:contain;border:1px solid #e3e8e0}.ml-latest .wp-block-latest-posts__featured-image{margin:0 0 12px}.ml-latest a.wp-block-latest-posts__post-title{font-size:14px;font-weight:700;line-height:1.8;display:block}.ml-latest time{font-size:11px;color:var(--ml-muted);margin-top:8px}
.ml-all-articles{margin-top:28px!important;text-align:center}.ml-all-articles a,.ml-stage-archive-link a{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 24px;background:var(--ml-green);color:#fff!important;font-size:14px;font-weight:700}.ml-all-articles a:hover,.ml-stage-archive-link a:hover{background:#0e3d3a}
.ml-site .ml-about{margin-top:60px;padding:34px 36px;border-top:1px solid var(--ml-line);border-bottom:1px solid var(--ml-line);display:grid;grid-template-columns:1fr 1fr;gap:38px}.ml-about p{font-size:13px;line-height:2;color:var(--ml-muted)}.ml-about a{display:inline-block;margin-top:15px;font-size:13px;font-weight:700;text-decoration:underline;text-underline-offset:5px}
.ml-crumb{padding:20px 0;font-size:12px;color:var(--ml-muted)}.ml-crumb a{text-decoration:underline;text-underline-offset:3px}.ml-stage-hero{padding:44px 40px;background:var(--ml-paper);border-left:4px solid var(--ml-green)}.ml-stage-hero h1{font-size:36px}.ml-stage-hero .ml-lead{max-width:700px;margin-top:16px}.ml-stage-archive-link{margin-top:24px!important}.ml-stage-articles{grid-template-columns:repeat(3,minmax(0,1fr))}.ml-stage-articles .ml-card h3{font-size:19px}.ml-site .ml-related-stage{margin-top:50px;padding:24px 0;border-top:1px solid var(--ml-line);font-size:14px}.ml-related-stage a{display:inline-block;border-bottom:1px solid var(--ml-green);margin:8px 22px 0 0}.ml-related-stage p{font-size:13px;color:var(--ml-muted)}
body:has(.ml-header) #footer{background:var(--ml-paper);border-top:1px solid var(--ml-line);margin-top:60px}body:has(.ml-header) .l-footer__nav{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 22px;padding:0 20px}body:has(.ml-header) .l-footer__nav a{padding:10px 0}
@media(max-width:1050px){.ml-nav{gap:14px;font-size:12px}.ml-header-inner{gap:15px}.ml-logo{flex-basis:180px}.ml-logo img{width:180px}.ml-hero{gap:26px;padding:40px 28px}.ml-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 24px}.ml-stage-articles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.ml-nav{display:none}.ml-menu{display:block}.ml-header-inner{min-height:72px;padding:12px 20px;gap:8px}.ml-logo{margin-right:auto}.ml-search .ml-search-word{display:none}.ml-hero{grid-template-columns:1fr;gap:27px}.ml-hero h1 br{display:block}.ml-hero h1{max-width:620px;font-size:32px}.ml-hero .ml-lead{margin-top:14px}.ml-site .ml-latest{grid-template-columns:repeat(2,minmax(0,1fr))}.ml-stage{padding:18px}.ml-section-head{display:block}.ml-section-head>p{margin-top:10px}.ml-site .ml-about{grid-template-columns:1fr;gap:18px}.ml-about h2 br{display:none}}
@media(max-width:480px){body:has(.ml-site) .l-content{padding-left:16px;padding-right:16px}.ml-header-inner{padding:9px 16px;min-height:64px}.ml-logo{flex-basis:160px}.ml-logo img{width:160px;max-width:100%}.ml-menu summary{font-size:11px;flex-direction:column;gap:0}.ml-hero{padding:26px 17px;gap:22px}.ml-hero h1{font-size:27px}.ml-site .ml-kicker{font-size:10px;margin-bottom:10px}.ml-hero .ml-lead{font-size:12px;line-height:1.9}.ml-stage{padding:14px 12px}.ml-stage strong{font-size:14px}.ml-stage small{font-size:11px}.ml-stage .ml-stage-top{font-size:9px}.ml-stage .ml-stage-link{margin-top:12px;font-size:11px}.ml-stages{gap:9px}.ml-site .ml-section{margin-top:38px}.ml-site h2{font-size:23px}.ml-cards{gap:26px 16px}.ml-card h3{font-size:14px}.ml-card .ml-label{font-size:10px}.ml-card p{display:none}.ml-site .ml-latest{gap:24px 16px}.ml-latest a.wp-block-latest-posts__post-title{font-size:13px}.ml-site .ml-about{margin-top:40px;padding:25px 0}.ml-stage-hero{padding:28px 22px}.ml-stage-hero h1{font-size:28px}.ml-stage-hero .ml-lead{font-size:13px}.ml-stage-articles{grid-template-columns:1fr;gap:32px}.ml-stage-articles .ml-card h3{font-size:19px}.ml-stage-articles .ml-card p{display:block}.ml-stage-articles .ml-card .ml-label{font-size:12px}.ml-crumb{font-size:11px;padding:16px 0}}
@media(prefers-reduced-motion:reduce){.ml-stage{transition:none}}

/* 医学部数学 過去問DB — igakulife.jp/math/
   One hue per subject drives every data mark; statements are set in mincho like an exam booklet. */
:root{
  --brand:#174f4c;--brand-deep:#0e3634;--brand-soft:#e7f0ed;
  --ink:#17231f;--ink-2:#34443f;--muted:#5f6f6a;--line:#dfe6e2;--line-2:#cfd9d4;
  --paper:#f8f6ef;--ivory:#fcfbf7;--bg:#fff;--amber:#a8672f;--focus:#c98a3c;
  --r:14px;--r-sm:9px;--shadow:0 1px 2px #12302b0d,0 8px 28px #12302b12;--shadow-lg:0 2px 6px #12302b10,0 22px 48px #12302b1c;
  --sans:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Yu Gothic",Meiryo,sans-serif;
  --mincho:"Hiragino Mincho ProN","Hiragino Mincho Pro","Yu Mincho","YuMincho","Noto Serif JP","Noto Serif CJK JP",serif;
  --display:"Fraunces",Georgia,"Times New Roman",serif;
  --bar:52px;
}
.s1{--c:#2f6ea6}.sa{--c:#7454a8}.s2{--c:#1d8770}.sb{--c:#bd7520}.sc{--c:#c1465c}.s3{--c:#33408f}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--bar) + 16px)}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body.mdb{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.85;font-feature-settings:"palt" 0;-webkit-font-smoothing:antialiased}
.mdb a{color:inherit}
.mdb :focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:6px}
.mdb svg{width:1.15em;height:1.15em;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.num{font-family:var(--display);font-variant-numeric:lining-nums tabular-nums;font-optical-sizing:auto;letter-spacing:0}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.wrap{max-width:1160px;margin:0 auto;padding:0 20px}
.mdb-main{padding-bottom:72px}
.mdb h1,.mdb h2,.mdb h3{color:var(--ink);letter-spacing:.01em}

/* db bar */
.db-bar{position:sticky;top:0;z-index:60;background:#fcfbf7e6;-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid var(--line)}
.db-bar-inner{max-width:1160px;margin:0 auto;padding:0 20px;height:var(--bar);display:flex;align-items:center;justify-content:space-between;gap:12px}
.db-brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:14px;letter-spacing:.04em;text-decoration:none}
.db-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--brand);color:#fff;font-family:var(--display);font-size:19px;font-style:italic;line-height:1}
.db-find{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line-2);background:#fff;font-size:13px;font-weight:700;text-decoration:none;color:var(--ink-2);transition:border-color .2s,box-shadow .2s}
.db-find:hover{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}

/* breadcrumb */
.crumb ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:18px 0 0;font-size:12px;color:var(--muted)}
.crumb li{display:flex;align-items:center}
.crumb li+li::before{content:"";width:5px;height:5px;margin:0 9px;border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:rotate(45deg);opacity:.55}
.crumb a{text-decoration:none}.crumb a:hover{text-decoration:underline;text-underline-offset:3px}
.crumb [aria-current]{color:var(--ink-2);font-weight:700}

/* common */
.eyebrow{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:0 0 10px;font-size:13px;font-weight:700;color:var(--muted);letter-spacing:.04em}
.eyebrow .sep{margin:0 6px;color:var(--line-2)}
.sw{width:10px;height:10px;border-radius:3px;background:var(--c,var(--brand));margin-right:8px;display:inline-block}
.sec-title{font-size:clamp(20px,2.4vw,26px);font-weight:800;margin:0 0 6px;line-height:1.4}
.sec-row{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:8px 20px;margin-bottom:14px}
.sec-row .sec-title{margin:0}
.sec-note{font-size:13px;color:var(--muted);margin:4px 0 14px}
.h1-sub{display:block;font-size:.5em;font-weight:700;color:var(--muted);letter-spacing:.06em;margin-top:6px}
.lead{color:var(--ink-2);max-width:46em}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--c,var(--brand));flex:none}
.legend{display:flex;flex-wrap:wrap;gap:4px 14px;list-style:none;margin:0;padding:0;font-size:12px;color:var(--muted)}
.legend li{display:flex;align-items:center;gap:6px}
.tag{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:999px;font-size:12.5px;font-weight:700;text-decoration:none;color:color-mix(in srgb,var(--c) 82%,#000);background:color-mix(in srgb,var(--c) 11%,#fff);border:1px solid color-mix(in srgb,var(--c) 22%,#fff);transition:background .2s}
a.tag:hover{background:color-mix(in srgb,var(--c) 18%,#fff)}
.fp{display:flex;height:6px;border-radius:99px;overflow:hidden;background:var(--line);gap:2px}
.fp>span{background:var(--c);min-width:3px}
.fp-lg{height:12px;gap:3px}
.cross{display:flex;flex-wrap:wrap;gap:10px 22px;font-size:14px;font-weight:700;margin:28px 0 0}
.cross a{display:inline-flex;align-items:center;gap:6px;color:var(--brand);text-decoration:none}
.cross a:hover{text-decoration:underline;text-underline-offset:4px}

/* ===== home ===== */
.hero{position:relative;overflow:hidden;padding:34px 0 30px;background:
  linear-gradient(var(--bg),#fff0 30%),
  repeating-linear-gradient(0deg,#174f4c0a 0 1px,#0000 1px 28px),repeating-linear-gradient(90deg,#174f4c0a 0 1px,#0000 1px 28px),var(--ivory)}
.mdb .hero-art{position:absolute;right:max(0px,calc((100vw - 1160px)/2));top:216px;width:min(470px,36vw);height:auto;pointer-events:none}
.ha-grid line{stroke:#174f4c14;stroke-width:1}
.ha-axis{stroke:#174f4c40;stroke-width:1.2}
.ha-env{fill:none;stroke:#a8672f59;stroke-width:1.2;stroke-dasharray:3 5}
.ha-curve{fill:none;stroke:var(--brand);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.ha-label{font-family:var(--display);font-style:italic;font-size:20px;fill:#174f4c99}
@media (prefers-reduced-motion:no-preference){.ha-curve{stroke-dasharray:1;stroke-dashoffset:1;animation:draw 2.4s cubic-bezier(.65,0,.35,1) .2s forwards}@keyframes draw{to{stroke-dashoffset:0}}}
.finder,.hero-lead{position:relative}
.hero-inner{position:relative;z-index:1}
.hero-eyebrow{color:var(--brand);text-transform:none}
.hero-title{font-size:clamp(34px,6.4vw,68px);line-height:1.18;font-weight:800;margin:0;letter-spacing:-.01em}
.hero-count{color:var(--brand);white-space:nowrap}
.hero-count .num{font-weight:600;letter-spacing:-.02em}
.br-sp{display:none}
.hero-lead{font-size:clamp(15px,1.6vw,18px);color:var(--ink-2);margin:16px 0 26px;max-width:40em}
.finder{max-width:680px}
.finder-q{display:flex;align-items:center;gap:12px;height:64px;padding:0 20px;background:#fff;border:1.5px solid var(--line-2);border-radius:18px;box-shadow:var(--shadow-lg);transition:border-color .2s,box-shadow .2s;color:var(--muted)}
.finder-q:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft),var(--shadow-lg)}
.finder-q svg{width:22px;height:22px}
.finder-q input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:17px;color:var(--ink)}
.finder-q input::placeholder{color:#8a9893}
.finder-quick{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 4px}
.chip{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--line-2);background:#fff;font:inherit;font-size:13px;font-weight:700;color:var(--ink-2);cursor:pointer;transition:all .18s}
.chip::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--c)}
.chip:hover{border-color:var(--c)}
.chip[aria-pressed="true"]{background:var(--c);border-color:var(--c);color:#fff}
.chip[aria-pressed="true"]::before{background:#fff}
.filters{margin-top:10px;border:1px solid var(--line);border-radius:var(--r);background:#ffffffd9}
.filters>summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;padding:12px 16px;font-size:14px;font-weight:800;color:var(--ink-2)}
.filters>summary::-webkit-details-marker{display:none}
.filters>summary::after{content:"";width:8px;height:8px;margin-left:auto;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s}
.filters[open]>summary::after{transform:rotate(-135deg)}
.filters-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:99px;background:var(--brand);color:#fff;font-size:12px}
.filters-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;padding:4px 16px 16px;align-items:end}
.field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:var(--muted);margin:0}
.field select{height:44px;padding:0 34px 0 12px;font:inherit;font-size:15px;font-weight:600;color:var(--ink);border:1px solid var(--line-2);border-radius:var(--r-sm);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6f6a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/16px;-webkit-appearance:none;appearance:none;min-width:0}
.field-range>div{display:flex;align-items:center;gap:6px}.field-range select{flex:1}
.seg{display:flex;border:0;margin:0;padding:0;gap:0;grid-column:1/-1;flex-wrap:wrap}
.seg legend{font-size:12px;font-weight:800;color:var(--muted);margin-bottom:6px;padding:0}
.seg label{position:relative}
.seg input{position:absolute;opacity:0;inset:0}
.seg span{display:grid;place-items:center;height:44px;padding:0 16px;border:1px solid var(--line-2);margin-left:-1px;font-size:14px;font-weight:700;background:#fff;cursor:pointer;transition:background .15s,color .15s}
.seg label:first-of-type span{border-radius:var(--r-sm) 0 0 var(--r-sm);margin-left:0}
.seg label:last-of-type span{border-radius:0 var(--r-sm) var(--r-sm) 0}
.seg input:checked+span{background:var(--brand);border-color:var(--brand);color:#fff;position:relative}
.seg input:focus-visible+span{outline:3px solid var(--focus);outline-offset:2px}
.toggle{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:700;color:var(--ink-2);cursor:pointer;height:44px;position:relative}
.toggle input{position:absolute;opacity:0;width:1px;height:1px}
.toggle-ui{width:42px;height:24px;border-radius:99px;background:var(--line-2);position:relative;transition:background .2s;flex:none}
.toggle-ui::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .2s}
.toggle input:checked+.toggle-ui{background:var(--brand)}
.toggle input:checked+.toggle-ui::after{transform:translateX(18px)}
.toggle input:focus-visible+.toggle-ui{outline:3px solid var(--focus);outline-offset:2px}
.reset{justify-self:start;height:44px;padding:0 4px;border:0;background:none;font:inherit;font-size:13px;font-weight:700;color:var(--muted);text-decoration:underline;text-underline-offset:4px;cursor:pointer}

.results{padding-top:30px}
.results-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:2px solid var(--ink)}
.results-title{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;margin:0;font-size:16px;font-weight:800}
.results-title .num{font-size:clamp(34px,4vw,44px);line-height:1;color:var(--brand);font-weight:600}
.results-scope{font-size:13px;font-weight:700;color:var(--muted);margin-left:10px}
.sort select{height:38px;padding:0 32px 0 12px;font:inherit;font-size:13px;font-weight:700;border:1px solid var(--line-2);border-radius:99px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6f6a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/14px;-webkit-appearance:none;appearance:none;color:var(--ink-2)}
.results-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}
.res{border-bottom:1px solid var(--line)}
.res a{display:grid;grid-template-columns:4px 1fr auto;gap:0 16px;padding:16px 4px 16px 0;text-decoration:none;align-items:start}
.res-bar{align-self:stretch;border-radius:4px;background:linear-gradient(var(--c1,var(--brand)),var(--c2,var(--c1,var(--brand))))}
.res-title{font-weight:800;font-size:15.5px;line-height:1.5;display:block}
.res a:hover .res-title{color:var(--brand);text-decoration:underline;text-underline-offset:4px}
.res-tags{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:4px;font-size:12px;color:var(--muted);font-weight:700}
.res-tags span{display:inline-flex;align-items:center;gap:5px}
.res-tags i{width:7px;height:7px;border-radius:50%;background:var(--c);display:inline-block}
.res-ex{display:block;margin-top:6px;font-size:13px;line-height:1.7;color:var(--ink-2);font-family:var(--mincho)}
.res-ex mark{background:#f4d9a5;color:inherit;padding:0 1px;border-radius:2px}
.res-year{font-family:var(--display);font-size:22px;color:var(--line-2);font-weight:600;line-height:1.2}
.res-empty{grid-column:1/-1;padding:40px 0;text-align:center;color:var(--muted)}
.more-wrap{text-align:center;margin:24px 0 0}
.more{height:46px;padding:0 28px;border-radius:99px;border:1.5px solid var(--brand);background:#fff;color:var(--brand);font:inherit;font-weight:800;font-size:14px;cursor:pointer;transition:background .2s,color .2s}
.more:hover{background:var(--brand);color:#fff}

.years-chart{padding-top:64px}
.ychart{display:flex;align-items:flex-end;gap:clamp(2px,.6vw,8px);height:190px;padding:28px 0 0;border-bottom:1px solid var(--line-2)}
.ybar{position:relative;flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;border:0;padding:0;background:none;cursor:pointer;min-width:0}
.ystack{display:flex;flex-direction:column-reverse;border-radius:5px 5px 1px 1px;overflow:hidden;gap:1px;transition:transform .2s,filter .2s;transform-origin:bottom}
.ystack>span{background:var(--c);min-height:1px}
.ylabel{position:absolute;bottom:-24px;left:0;right:0;text-align:center;font-size:11px;color:var(--muted)}
.ytip{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%,4px);padding:5px 9px;border-radius:8px;background:var(--ink);color:#fff;font-size:12px;line-height:1.4;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;z-index:2;font-weight:700}
.ybar:hover .ytip,.ybar:focus-visible .ytip{opacity:1;transform:translate(-50%,0)}
.ybar:hover .ystack,.ybar[aria-pressed="true"] .ystack{filter:saturate(1.15) brightness(1.04);transform:scaleY(1.03)}
.ybar[aria-pressed="true"] .ylabel{color:var(--ink);font-weight:700}
.ybar[aria-pressed="true"]::after{content:"";position:absolute;left:15%;right:15%;bottom:-4px;height:3px;border-radius:2px;background:var(--ink)}
.years-chart .sec-note{margin-top:34px}

.region{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:800;color:var(--muted);margin:28px 0 10px;letter-spacing:.06em}
.region .num{font-size:13px;color:var(--line-2)}
.unis{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.uni{display:flex;flex-direction:column;gap:6px;height:100%;padding:14px 16px 16px;border:1px solid var(--line);border-radius:var(--r);background:#fff;text-decoration:none;transition:border-color .2s,box-shadow .2s,transform .2s}
.uni:hover{border-color:var(--line-2);box-shadow:var(--shadow);transform:translateY(-2px)}
.uni-name{font-weight:800;font-size:15px;line-height:1.45}
.uni-meta{font-size:12px;color:var(--muted)}
.uni .fp{margin-top:auto}
section.wrap{margin-top:56px}
.subjects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.subject{border:1px solid var(--line);border-top:4px solid var(--c);border-radius:var(--r);padding:12px 16px 10px;background:#fff}
.subject-name{display:flex;align-items:center;gap:8px;font-size:15px;margin:0 0 4px}
.subject ul{list-style:none;margin:0;padding:0}
.subject a{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px solid var(--line);text-decoration:none;font-size:14px;font-weight:600}
.subject li:first-child a{border-top:0}
.subject a:hover{color:color-mix(in srgb,var(--c) 85%,#000)}
.subject .num{color:var(--muted);font-size:15px}
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;font-size:14px;color:var(--ink-2)}
.about-grid a{color:var(--brand)}

/* ===== university ===== */
.uni-head{padding:22px 0 8px}
.uni-head h1{font-size:clamp(32px,5.4vw,56px);line-height:1.15;margin:0;font-weight:800;letter-spacing:-.005em}
.uni-head .h1-sub{font-size:clamp(14px,1.6vw,17px)}
.former{font-size:13px;color:var(--muted);margin:8px 0 0}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:26px 0 22px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.stats>div{padding:14px 18px;border-left:1px solid var(--line)}
.stats>div:first-child{border-left:0;padding-left:0}
.stats dt{font-size:12px;font-weight:800;color:var(--muted);letter-spacing:.06em}
.stats dd{margin:2px 0 0;font-size:16px;font-weight:700;display:flex;align-items:baseline;gap:3px}
.stats dd .num{font-size:clamp(28px,3.4vw,38px);font-weight:600;color:var(--ink);line-height:1.15}
.stats dd small{font-size:13px;color:var(--muted)}
.stat-topic{align-items:center!important;gap:8px!important;font-size:17px!important;padding-top:10px}
.uni-fp{display:flex;flex-direction:column;gap:10px}
.grid-sec{margin-top:44px}
.qgrid-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r);background:#fff;-webkit-overflow-scrolling:touch}
.qgrid{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}
.qgrid th,.qgrid td{padding:5px;border-bottom:1px solid var(--line)}
.qgrid tbody tr:last-child>*{border-bottom:0}
.qgrid thead th{position:sticky;top:0;background:var(--ivory);font-size:12px;color:var(--muted);font-weight:700;padding:8px 5px;text-align:center}
.qgrid th[scope=row]{position:sticky;left:0;z-index:1;background:#fff;text-align:left;padding:5px 10px 5px 14px;border-right:1px solid var(--line);white-space:nowrap}
.qgrid thead th:first-child{left:0;z-index:2;text-align:left;padding-left:14px}
.qgrid th[scope=row] a{text-decoration:none;display:flex;flex-direction:column;line-height:1.2}
.qgrid th[scope=row] .num{font-size:18px;font-weight:600}
.qgrid th[scope=row] small{font-size:10.5px;color:var(--muted)}
.qgrid th[scope=row] a:hover .num{color:var(--brand)}
.cell{display:flex;flex-direction:column;justify-content:center;min-width:84px;height:52px;padding:4px 9px;border-radius:8px;text-decoration:none;background:color-mix(in srgb,var(--c,#999) 10%,#fff);border-left:3px solid var(--c,#999);transition:transform .15s,box-shadow .15s,background .15s}
.cell:hover{background:color-mix(in srgb,var(--c) 18%,#fff);transform:translateY(-1px);box-shadow:0 4px 12px color-mix(in srgb,var(--c) 22%,#0000)}
.cell-q{font-size:15px;font-weight:600;line-height:1.1;color:color-mix(in srgb,var(--c) 80%,#000)}
.cell-topic{font-size:11px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:9em;line-height:1.5}
.rank-sec{margin-top:52px}
.rank-more>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:8px;margin:14px 0 4px;font-size:13px;font-weight:800;color:var(--brand)}
.rank-more>summary::-webkit-details-marker{display:none}
.rank-more>summary::after{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px)}
.rank-more[open]>summary{display:none}
.rank{list-style:none;margin:8px 0 0;padding:0;counter-reset:r}
.rank a{display:grid;grid-template-columns:2.2em minmax(8em,13em) 1fr 6.5em;align-items:center;gap:14px;padding:10px 4px;border-bottom:1px solid var(--line);text-decoration:none;transition:background .15s}
.rank a:hover{background:var(--ivory)}
.rank-no{font-size:18px;color:var(--line-2);font-weight:600}
.rank li:nth-child(-n+3) .rank-no{color:var(--ink)}
.rank-name{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14.5px}
.rank-bar{height:10px;background:var(--paper);border-radius:99px;overflow:hidden}
.rank-bar>span{display:block;height:100%;border-radius:99px;background:var(--c);transition:width .6s cubic-bezier(.2,.8,.2,1)}
.rank-val{text-align:right;font-size:13px;font-weight:700;white-space:nowrap}
.rank-val .num{font-size:17px}
.rank-val small{margin-left:6px;color:var(--muted);font-weight:600}
.cross-sec{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:44px}
.cross-card{position:relative;display:flex;flex-direction:column;gap:2px;padding:20px 52px 20px 22px;border-radius:var(--r);background:var(--brand);color:#fff!important;text-decoration:none;transition:background .2s,transform .2s}
.cross-card:nth-child(2){background:var(--ivory);color:var(--ink)!important;border:1px solid var(--line)}
.cross-card:hover{transform:translateY(-2px)}
.cross-card svg{position:absolute;right:20px;top:50%;transform:translateY(-50%);width:22px;height:22px}
.cross-kicker{font-size:12px;font-weight:800;opacity:.75;letter-spacing:.08em}
.cross-title{font-size:16px;font-weight:800;line-height:1.5}

/* ===== exam / topic ===== */
.page-head{padding:22px 0 18px}
.page-head h1{margin:0;font-size:clamp(28px,4.4vw,44px);line-height:1.25;font-weight:800}
.year-h1{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.big-year{font-size:clamp(56px,9vw,104px);font-weight:600;line-height:.95;color:var(--brand);letter-spacing:-.02em}
.year-h1 small{display:block;font-size:14px;font-weight:700;color:var(--muted);margin-top:4px}
.page-head .fp-lg{max-width:560px;margin-top:18px}
.exam-list{list-style:none;margin:10px 0 0;padding:0;border-top:2px solid var(--ink)}
.exam-item{display:grid;grid-template-columns:72px 1fr 28px;gap:18px;align-items:center;padding:20px 4px;border-bottom:1px solid var(--line);text-decoration:none;transition:background .15s}
.exam-item:hover{background:var(--ivory)}
.exam-q{display:grid;place-items:center;width:60px;height:60px;border-radius:16px;background:var(--paper);border:1px solid var(--line)}
.exam-q .num{font-size:30px;font-weight:600;line-height:1}
.exam-tags{display:flex;flex-wrap:wrap;gap:6px}
.exam-tags .tag{height:24px;font-size:12px}
.exam-excerpt{display:block;margin-top:8px;font-family:var(--mincho);font-size:14.5px;line-height:1.8;color:var(--ink-2)}
.exam-go{color:var(--muted)}
.exam-item:hover .exam-go{color:var(--brand);transform:translateX(3px)}
.exam-go svg{width:22px;height:22px;transition:transform .2s}
.years-sec{margin-top:44px}
.years{display:flex;flex-wrap:wrap;gap:8px}
.years a,.years span[aria-current]{display:inline-flex;align-items:baseline;gap:6px;padding:7px 13px;border:1px solid var(--line);border-radius:10px;text-decoration:none;background:#fff;font-size:13px;transition:border-color .15s,background .15s}
.years a:hover{border-color:var(--brand);background:var(--brand-soft)}
.years .num{font-size:16px;font-weight:600}
.years small{font-size:11.5px;color:var(--muted)}
.years span[aria-current]{background:var(--ink);border-color:var(--ink);color:#fff}
.years span[aria-current] small{color:#ffffffb3}
.topic-head h1 .h1-sub{font-size:16px}
.tgroup{padding:18px 0;border-bottom:1px solid var(--line)}
.tgroup-title{display:flex;align-items:baseline;gap:10px;margin:0 0 10px;font-size:17px}
.tgroup-title a{text-decoration:none}.tgroup-title a:hover{color:var(--brand)}
.tgroup-title .num{font-size:15px;color:var(--muted);font-weight:600}

/* ===== problem ===== */
.problem-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:56px;align-items:start;margin-top:18px}
.problem{min-width:0;max-width:760px}
.problem-head h1{display:flex;align-items:center;gap:18px;margin:0;font-size:clamp(20px,2.6vw,27px);line-height:1.4;font-weight:800}
.h1-q{flex:none;display:grid;place-items:center;width:clamp(64px,8vw,84px);aspect-ratio:1;border-radius:22px;background:var(--brand);color:#fff;box-shadow:0 10px 24px #174f4c33}
.h1-q .num{font-size:clamp(36px,4.6vw,48px);font-weight:600;line-height:1}
.h1-text .h1-sub{font-size:13px;margin-top:4px}
.problem-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.pr-note{font-size:11.5px;color:var(--muted);margin:12px 0 0}
.steps{margin:26px 0 8px}
.steps ol{display:flex;gap:6px;list-style:none;margin:0;padding:0;counter-reset:s;overflow-x:auto;scrollbar-width:none}
.steps a{display:flex;align-items:center;gap:8px;height:38px;padding:0 14px 0 6px;border-radius:99px;background:var(--paper);font-size:13px;font-weight:800;text-decoration:none;color:var(--ink-2);white-space:nowrap;transition:background .2s,color .2s}
.steps a:hover{background:var(--brand-soft)}
.step-dot{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#fff;font-size:12px;border:1px solid var(--line-2);transition:background .2s,color .2s,border-color .2s}
.steps a.is-done{background:var(--brand-soft);color:var(--brand)}
.steps a.is-done .step-dot{background:var(--brand);border-color:var(--brand);color:#fff}
.step{margin-top:40px}
.step-title{display:flex;align-items:center;gap:12px;font-size:20px;font-weight:800;margin:0 0 14px}
.step-no{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--ink);color:#fff;font-family:var(--display);font-size:17px;font-weight:600}
.sheet{position:relative;background:var(--ivory);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:0;overflow:hidden}
.sheet-tab{display:flex;gap:14px;align-items:center;padding:11px clamp(20px,4vw,40px);border-bottom:1px dashed var(--line-2);font-size:12px;font-weight:800;color:var(--muted);letter-spacing:.06em}
.sheet-tab span+span::before{content:"";display:inline-block;width:1px;height:10px;background:var(--line-2);margin-right:14px;vertical-align:-1px}
.sheet-tab .num{font-size:13px;color:var(--ink)}
.sheet-body{padding:30px clamp(20px,4vw,40px) 22px}
.statement{font-family:var(--mincho);font-size:17px;line-height:2.05;color:#1a1a18;font-feature-settings:"palt" 0}
.statement p{margin:0 0 1em;overflow-x:auto}
.statement p:last-child{margin-bottom:0}
.sheet .fig{margin:0 clamp(20px,4vw,40px) 26px}
.fig{margin:18px 0;text-align:center}
.fig img{max-width:100%;height:auto;border-radius:8px;background:#fff;border:1px solid var(--line)}
.fig-page img{max-height:780px;object-fit:contain}
.fig figcaption{margin-top:8px;font-size:12px;color:var(--muted);font-family:var(--sans)}
.display{display:block;overflow-x:auto;overflow-y:hidden;padding:6px 0;margin:4px 0}
.tbl{overflow-x:auto;margin:6px 0 1.2em;-webkit-overflow-scrolling:touch}
.tbl table{border-collapse:collapse;font-size:.92em;line-height:1.6;background:#fff;min-width:max-content}
.tbl th,.tbl td{border:1px solid var(--line-2);padding:4px 10px;text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap}
.tbl th{background:var(--paper);font-weight:700}
.try{display:flex;gap:10px;align-items:flex-start;margin:18px 2px 0;font-size:14px;color:var(--ink-2)}
.try svg{color:var(--amber);margin-top:4px}
.reveal{border:1px solid var(--line);border-radius:var(--r);background:#fff;overflow:hidden;transition:box-shadow .2s,border-color .2s}
.reveal:hover{border-color:var(--line-2)}
.reveal[open]{box-shadow:var(--shadow)}
.reveal>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;user-select:none}
.reveal>summary::-webkit-details-marker{display:none}
.reveal-cta{display:inline-flex;align-items:center;gap:10px;font-weight:800;font-size:16px;color:var(--brand)}
.reveal-cta svg{width:22px;height:22px;padding:4px;border-radius:8px;background:var(--brand-soft);box-sizing:content-box}
.reveal-sub{font-size:12.5px;color:var(--muted)}
.reveal>summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:0 4px 4px 0;transition:transform .25s;flex:none}
.reveal[open]>summary::after{transform:rotate(-135deg);margin:4px 4px 0 0}
.reveal[open]>summary{border-bottom:1px dashed var(--line-2)}
.reveal[open]>summary .reveal-sub{display:none}
.reveal>*:not(summary){padding:6px 22px 22px}
@media (prefers-reduced-motion:no-preference){.reveal[open]>*:not(summary){animation:rise .35s cubic-bezier(.2,.8,.2,1)}@keyframes rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}}
.prose{font-size:16px;line-height:1.95;overflow-wrap:anywhere}
.prose p{margin:14px 0 0;overflow-x:auto}
.answers{list-style:none;margin:0;padding:6px 22px 22px}
.answers li{display:flex;gap:14px;align-items:baseline;padding:12px 0;border-bottom:1px solid var(--line);overflow-x:auto;font-size:17px}
.answers li:last-child{border-bottom:0}
.answer-label{flex:none;font-weight:800;font-size:13px;color:var(--brand);background:var(--brand-soft);border-radius:6px;padding:1px 8px}
.note{margin:0 0 14px;padding:14px 18px;border-radius:var(--r);background:#fbf3e7;border:1px solid #efdcc0}
.note-title{margin:0;font-size:13px;font-weight:800;color:var(--amber)}
.note .prose{font-size:14.5px}
.note .prose p{margin-top:6px}
.methods{margin-top:20px}
.methods-title{font-size:12px;font-weight:800;color:var(--muted);margin:0 0 8px;letter-spacing:.06em}
.methods ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.methods li{font-size:12.5px;padding:3px 10px;border-radius:7px;background:var(--paper);color:var(--ink-2)}
.pr{margin-top:48px;padding:18px;border-radius:18px;background:var(--paper);border:1px solid var(--line)}
.pr-label{display:inline-block;margin:0 0 12px;padding:1px 9px;border-radius:5px;background:var(--ink-2);color:#fff;font-size:11px;font-weight:800;letter-spacing:.12em}
.pr-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pr-card{display:flex;flex-direction:column;gap:8px;padding:18px;border-radius:var(--r);background:#fff;border:1px solid var(--line)}
.pr-head{margin:0;font-weight:800;font-size:15px;line-height:1.5}
.pr-body{margin:0;font-size:13px;line-height:1.75;color:var(--ink-2)}
.pr-cta{margin-top:auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 16px;border-radius:12px;background:var(--brand);color:#fff!important;font-weight:800;font-size:13.5px;line-height:1.45;text-decoration:none;text-align:center;transition:background .2s}
.pr-cta:hover{background:var(--brand-deep)}
.px{position:absolute;width:1px;height:1px;border:0;opacity:0}
.similar{margin-top:52px}
.cards{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.card{display:flex;flex-direction:column;gap:2px;height:100%;padding:14px 16px;border-radius:var(--r);border:1px solid var(--line);border-top:4px solid var(--c,var(--brand));background:#fff;text-decoration:none;transition:box-shadow .2s,transform .2s}
.card:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.card-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12px;font-weight:700;color:var(--muted)}
.card-year{font-size:16px;color:var(--ink);font-weight:600}
.card-title{font-size:16px;font-weight:800}
.card-exam{font-size:12px;color:var(--muted);margin-left:6px}
.card-topics{font-size:12px;color:color-mix(in srgb,var(--c,var(--brand)) 80%,#000);font-weight:700}
.report{margin-top:36px;font-size:13px;color:var(--muted)}
.report a{color:var(--brand)}
.rail{position:sticky;top:calc(var(--bar) + 20px)}
.rail-card{border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow);padding:20px}
.rail-kicker{margin:0 0 10px;font-size:11.5px;font-weight:800;color:var(--muted);letter-spacing:.1em}
.facts{margin:0 0 18px}
.facts>div{display:grid;grid-template-columns:3.4em 1fr;gap:10px;padding:9px 0;border-top:1px solid var(--line);font-size:14px}
.facts>div:first-child{border-top:0;padding-top:0}
.facts dt{color:var(--muted);font-size:12px;font-weight:800;padding-top:3px}
.facts dd{margin:0;font-weight:700}
.facts dd a{text-decoration:none;color:var(--brand)}.facts dd a:hover{text-decoration:underline;text-underline-offset:3px}
.facts small{display:block;font-size:11.5px;color:var(--muted);font-weight:600}
.rail-tags{display:flex;flex-wrap:wrap;gap:5px}.rail-tags .tag{height:24px;font-size:11.5px;padding:0 9px}
.rail-set{padding-top:16px;border-top:1px solid var(--line)}
.qnav{display:flex;flex-wrap:wrap;gap:7px;list-style:none;margin:0;padding:0}
.qnav a{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;border:1.5px solid color-mix(in srgb,var(--c,var(--brand)) 40%,#fff);color:color-mix(in srgb,var(--c,var(--brand)) 85%,#000);font-family:var(--display);font-weight:600;font-size:17px;text-decoration:none;transition:background .15s}
.qnav a:hover{background:color-mix(in srgb,var(--c,var(--brand)) 12%,#fff)}
.qnav a[aria-current]{background:var(--c,var(--brand));border-color:var(--c,var(--brand));color:#fff}
.rail-link{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:18px;padding:12px 14px;border-radius:12px;background:var(--paper);font-size:13px;font-weight:800;text-decoration:none;color:var(--ink-2);transition:background .2s}
.rail-link:hover{background:var(--brand-soft);color:var(--brand)}
.pager{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;margin-top:48px;padding-top:22px;border-top:1px solid var(--line)}
.pager a{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:800;font-size:15px}
.pager a small{display:block;font-size:11.5px;color:var(--muted);font-weight:700}
.pager-next{justify-content:flex-end;text-align:right}
.pager-prev svg,.pager-next svg{width:40px;height:40px;padding:9px;border-radius:50%;border:1.5px solid var(--line-2);box-sizing:border-box;transition:background .2s,border-color .2s,color .2s}
.pager a:hover svg{background:var(--brand);border-color:var(--brand);color:#fff}
.pager-up{justify-content:center;font-size:13px!important;color:var(--brand);text-align:center;flex-direction:column;gap:0!important}
.actionbar{display:none}

/* footer */
.mdb-footer{background:var(--brand-deep);color:#d4e2dd;font-size:13px;margin-top:40px}
.mdb-footer-inner{max-width:1160px;margin:0 auto;padding:40px 20px 28px;display:grid;gap:18px}
.mdb-footer-title{margin:0 0 6px;font-weight:800;color:#fff;font-size:15px}
.mdb-footer-about p:last-child{margin:0;max-width:46em}
.mdb-footer a{color:#fff}
.mdb-footer nav{display:flex;flex-wrap:wrap;gap:6px 20px}
.mdb-footer nav a{text-decoration:none;opacity:.85}.mdb-footer nav a:hover{opacity:1;text-decoration:underline}
.mdb-copy{margin:0;opacity:.6;font-size:12px}

/* ===== responsive ===== */
@media (max-width:1023px){
  .mdb .hero-art{opacity:.35;top:auto;bottom:0;width:60vw}
  .problem-layout{grid-template-columns:1fr;gap:0}
  .rail{position:static;margin-top:40px}
  .problem{max-width:none}
  .actionbar{display:flex;position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:70;height:58px;align-items:stretch;gap:2px;padding:4px;border-radius:18px;background:#0e3634f2;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 12px 30px #0e363440;color:#fff}
  .actionbar>*{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:0;background:none;color:inherit;font:inherit;font-size:11px;font-weight:800;border-radius:14px;text-decoration:none;cursor:pointer;min-width:0}
  .actionbar a,.actionbar .is-off{flex:.7}
  .actionbar svg{width:20px;height:20px}
  .actionbar button:active,.actionbar a:active{background:#ffffff1f}
  .actionbar button.is-open{background:#ffffff26}
  .actionbar .is-off{opacity:.3}
  body.is-problem .mdb-footer{padding-bottom:84px}
  .subjects{grid-template-columns:1fr 1fr}
}
@media (max-width:720px){
  .wrap{padding:0 16px}
  .db-bar-inner{padding:0 16px}
  .db-find span{display:none}.db-find{width:40px;padding:0;justify-content:center}
  .br-sp{display:inline}
  .hero{padding:24px 0 22px}
  .finder-q{height:56px;border-radius:15px;padding:0 16px}
  .finder-q input{font-size:16px}
  .finder-quick{flex-wrap:nowrap;overflow-x:auto;margin-right:-16px;padding-right:16px;scrollbar-width:none}
  .finder-quick::-webkit-scrollbar{display:none}
  .chip{flex:none}
  .steps ol{gap:4px}
  .steps a{height:34px;padding:0 10px 0 4px;gap:5px;font-size:12px}
  .step-dot{width:24px;height:24px;font-size:11px}
  .results-head{align-items:center}
  .filters-grid{grid-template-columns:1fr}
  .seg{grid-column:auto}
  .seg span{padding:0 12px}
  .results-list{grid-template-columns:1fr}
  .ychart{height:140px;gap:2px}
  .ylabel{font-size:9px}
  .ybar:nth-child(odd) .ylabel{visibility:hidden}
  .subjects{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr;gap:0}
  .stats{grid-template-columns:1fr 1fr}
  .stats>div:nth-child(3){border-left:0;padding-left:0}
  .stats>div:nth-child(n+3){border-top:1px solid var(--line)}
  .rank a{grid-template-columns:1.8em 1fr 5.6em;gap:6px 10px}
  .rank-bar{grid-column:2/4;grid-row:2;height:7px}
  .cross-sec{grid-template-columns:1fr}
  .exam-item{grid-template-columns:52px 1fr;gap:14px;padding:16px 2px}
  .exam-q{width:48px;height:48px;border-radius:13px}.exam-q .num{font-size:24px}
  .exam-go{display:none}
  .problem-head h1{gap:14px}
  .h1-q{border-radius:18px}
  .sheet{border-radius:14px}
  .mdb .hero-art{display:none}
  .statement{font-size:16.5px;line-height:2}
  .reveal>summary{padding:16px}
  .reveal-sub{display:none}
  .reveal>*:not(summary),.answers{padding-left:16px;padding-right:16px}
  .pr-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr}
  .pager{grid-template-columns:1fr 1fr}
  .pager-up{grid-column:1/-1;grid-row:2}
  .cell{min-width:72px;height:48px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* print: the problem sheet alone, for solving on paper */
@media print{
  .hero-art,.ml-header,.db-bar,.crumb,.steps,.try,.rail,.pager,.actionbar,.pr,.similar,.report,.mdb-footer,#s-hint,#s-answer,#s-solution,.pr-note,.problem-tags{display:none!important}
  body.mdb{font-size:11pt}
  .problem-layout{display:block}
  .sheet{box-shadow:none;border:0;background:#fff}
  .sheet-tab{border:0;padding:0 0 8pt}
  .h1-q{box-shadow:none}
}
.qgrid td:empty::after{content:"";display:block;width:18px;height:2px;margin:0 auto;border-radius:2px;background:var(--line-2)}
.answer-body{overflow-x:auto;max-width:100%;padding-block:6px}.answer-body>.katex{white-space:nowrap;display:inline-block}

/* Answer values participate in the flex line; long math scrolls inside its own leaf. */
.answers .answer-body{display:block;min-width:0;flex:1;line-height:2.4;overflow-wrap:anywhere}
.answers .answer-label{max-width:45%;white-space:normal;overflow-wrap:anywhere}
.answer-body>.katex{vertical-align:middle}

.answer-cell{min-width:0;flex:1;max-width:100%}
.answers .answer-body .display{overflow:visible}
.answer-body>.katex{white-space:normal;display:inline}
.answer-scroll-help{font-size:12px;color:var(--muted);line-height:1.6;margin:6px 0 0}
.answer-body[tabindex="0"]:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
@media(max-width:600px){.answers li{display:block}.answers .answer-label{display:inline-block;max-width:100%;margin-bottom:6px}.answer-cell{width:100%}}
