/* 資格の百科帳 — デザイン
   ノートと付せんのような、やわらかく落ち着いた学びの雰囲気。
   色: 紺（文字・見出し）／青緑（リンク・強調）／からし（アクセント）／生成り（背景） */
:root {
  --bg: #FBF8F2; --paper: #FFFFFF; --ink: #22324F; --muted: #5F6B80; --line: #E6E0D4;
  --accent: #2C7A92; --accent-d: #1F5E72; --accent-soft: #E4F1F3;
  --mustard: #E5A93C; --mustard-soft: #FBF0D9; --coral: #E07A5F; --coral-soft: #FBE7E1;
  --mint: #E8F3EC; --navy: #22324F; --shadow: 0 6px 24px rgba(34, 50, 79, .08);
  --r: 16px;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", var(--sans);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.9; letter-spacing: .02em; -webkit-text-size-adjust: 100%; background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-d); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: #fff; padding: 8px 12px; }
.ic { width: 1.25em; height: 1.25em; vertical-align: -.25em; }

/* ヘッダー */
header.site { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 242, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo b { display: block; font-family: var(--round); font-size: 20px; letter-spacing: .06em; line-height: 1.3; }
.logo small { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; letter-spacing: .04em; }
.gnav ul, .menu ul { list-style: none; margin: 0; padding: 0; }
.gnav ul { display: flex; gap: 4px; }
.gnav a, .menu a { display: block; text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 10px; text-align: center; line-height: 1.3; }
.gnav a:hover { background: var(--accent-soft); }
.gnav span, .menu span { display: block; font-size: 14px; font-weight: 700; }
.gnav small, .menu small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .12em; font-family: Georgia, serif; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: #fff; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary .ic { width: 24px; height: 24px; }
.menu nav { position: absolute; right: 0; top: 52px; width: min(80vw, 300px); background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; }
.menu a { text-align: left; display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-bottom: 1px dashed var(--line); }
.menu li:last-child a { border-bottom: 0; }
@media (max-width: 860px) { .gnav { display: none; } .menu { display: block; } .logo small { display: none; } }

/* ページの見出し帯 */
.pagehead { background: var(--accent-soft); position: relative; padding: 18px 0 44px; }
.pagehead .ph-wave { position: absolute; left: 0; right: 0; bottom: -1px; color: var(--bg); line-height: 0; }
.wave { width: 100%; height: 40px; display: block; }
.crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: #9AA3B2; }
.crumbs a { color: var(--muted); }
.ph-row { display: flex; gap: 16px; align-items: center; }
.ph-ic { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--paper); color: var(--accent); display: grid; place-items: center; box-shadow: var(--shadow); }
.ph-ic .ic { width: 30px; height: 30px; }
.en { margin: 0; font-family: Georgia, serif; font-size: 12px; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
h1 { font-family: var(--round); font-size: clamp(23px, 4.6vw, 34px); line-height: 1.45; margin: 2px 0 0; letter-spacing: .04em; }
.dateline { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.dateline .ic { margin-right: 4px; }

/* 本文 */
main { padding: 28px 0 56px; }
h2 { font-family: var(--round); font-size: clamp(20px, 3.6vw, 25px); line-height: 1.5; margin: 52px 0 16px; padding: 0 0 10px 0; position: relative; letter-spacing: .04em; scroll-margin-top: 84px; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) 0 60%, var(--mustard) 60% 100%); }
h3 { font-size: 18px; margin: 30px 0 8px; padding-left: 14px; border-left: 4px solid var(--mustard); line-height: 1.5; }
p { margin: 0 0 16px; }
.lead { font-size: 17px; color: var(--ink); background: var(--paper); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
ul, ol { padding-left: 1.4em; }
li { margin: 4px 0; }
strong { background: linear-gradient(transparent 62%, var(--mustard-soft) 62%); }
.note { font-size: 13.5px; color: var(--muted); }
.error { color: #B5432A; font-weight: 700; }
.meta { font-size: 13px; color: var(--muted); }
.ad { margin: 32px 0; min-height: 0; }

/* 目次 */
.toc { background: var(--paper); border: 2px solid var(--accent-soft); border-radius: var(--r); padding: 16px 20px; margin: 4px 0 28px; }
.toc-t { font-family: var(--round); font-weight: 700; margin: 0 0 6px; color: var(--accent-d); }
.toc-t .ic { margin-right: 6px; }
.toc ol { margin: 0; counter-reset: t; list-style: none; padding: 0; }
.toc li { counter-increment: t; margin: 2px 0; }
.toc li a { color: var(--ink); text-decoration: none; display: block; padding: 3px 0; font-size: 15px; }
.toc li a::before { content: counter(t, decimal-leading-zero); font-family: Georgia, serif; color: var(--mustard); margin-right: 10px; font-weight: 700; }
.toc li a:hover { color: var(--accent); }

/* カード・フォーム（計算ツール） */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin: 18px 0; box-shadow: var(--shadow); }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.form .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form input[type=number], .form input[type=text], .form input[type=date], .form select { width: 100%; max-width: 260px; font: inherit; font-size: 17px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #FFFEFB; color: var(--ink); }
.form select { max-width: 100%; }
.form input:focus, .form select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.form .unit { color: var(--muted); font-weight: 400; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.form legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.form fieldset label { display: flex; align-items: center; gap: 6px; font-weight: 500; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.form fieldset label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
button.calc { justify-self: start; font: inherit; font-size: 17px; font-weight: 700; background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 12px 34px; cursor: pointer; box-shadow: 0 4px 0 #13203A; letter-spacing: .08em; }
button.calc:hover { background: var(--accent-d); }
button.calc:active { transform: translateY(2px); box-shadow: 0 2px 0 #13203A; }
.result { margin-top: 20px; border-top: 2px dashed var(--line); padding-top: 16px; }
.big { font-family: var(--round); font-size: clamp(26px, 7vw, 38px); font-weight: 700; color: var(--accent-d); line-height: 1.35; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }

/* 表 */
.table-wrap { overflow-x: auto; margin: 16px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--navy); color: #fff; font-weight: 700; font-size: 13.5px; }
tbody tr:nth-child(even) { background: #FCFAF6; }
tbody tr:last-child td { border-bottom: 0; }
.wrap-cells td, .wrap-cells th { white-space: normal; text-align: left; }
.wrap-cells td:first-child { white-space: nowrap; font-weight: 700; color: var(--accent-d); width: 1%; }
@media (max-width: 600px) { .wrap-cells td:first-child { white-space: normal; width: 30%; } }

/* リンクのリスト（カード型） */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.list li { margin: 0; }
.list a { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; position: relative; }
.list a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.list a strong { color: var(--ink); background: none; font-size: 16px; display: block; line-height: 1.5; }
.list a span { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.list a::after { content: "→"; position: absolute; right: 16px; bottom: 12px; color: var(--accent); font-weight: 700; }

/* グラフ */
figure.card svg text { font-family: var(--sans); }
figure { margin: 18px 0; }
figcaption { margin-top: 6px; }
.fig { background: var(--paper); border-radius: var(--r); padding: 12px; border: 1px solid var(--line); text-align: center; }
.fig img { display: block; margin: 0 auto; height: auto; }

/* 囲み */
.point { background: var(--mustard-soft); border-radius: var(--r); padding: 16px 20px 6px; margin: 20px 0; position: relative; }
.point .pt { font-family: var(--round); font-weight: 700; color: #8A5B07; margin: 0 0 6px; }
.answer { background: var(--paper); border-left: 6px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; padding: 16px 20px 4px; margin: 0 0 24px; box-shadow: var(--shadow); }
.answer .a-t { font-family: var(--round); font-weight: 700; color: var(--accent-d); margin: 0 0 4px; font-size: 14px; letter-spacing: .1em; }
.related { margin-top: 48px; }
details.faq { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
details.faq summary::before { content: "Q"; font-family: Georgia, serif; color: var(--coral); margin-right: 10px; font-size: 18px; }
details.faq[open] summary { border-bottom: 1px dashed var(--line); }
details.faq > div { padding: 12px 0 2px; }

/* トップページ */
.t-home main { padding-top: 0; }
.hero { background: linear-gradient(180deg, var(--accent-soft), #F1F7F5); position: relative; padding: 40px 0 70px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; }
.hero .catch { font-family: var(--round); font-size: clamp(28px, 5.4vw, 46px); line-height: 1.45; margin: 6px 0 14px; letter-spacing: .06em; }
.nb { display: inline-block; }
.hero .catch em { font-style: normal; color: var(--accent-d); background: linear-gradient(transparent 66%, var(--mustard-soft) 66%); }
.hero p.sub { color: var(--muted); max-width: 34em; }
.hero .hero-ill { width: 100%; height: auto; }
.hero .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
.pill:hover { background: var(--navy); color: #fff; }
.hero .h-wave { position: absolute; left: 0; right: 0; bottom: -1px; color: var(--bg); line-height: 0; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } .hero .hero-ill { max-width: 360px; margin: 0 auto; order: -1; } }
.sec-h { text-align: center; margin: 56px 0 22px; }
.sec-h .en { display: block; }
.sec-h h2 { margin: 4px 0 0; display: inline-block; }
.sec-h h2::after { left: 50%; transform: translateX(-50%); }
.sec-h p { color: var(--muted); margin-top: 12px; }
.exam-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.exam-grid a { display: block; background: var(--paper); border-radius: 20px; text-decoration: none; color: var(--ink); overflow: hidden; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; height: 100%; }
.exam-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.exam-grid .thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.exam-grid .eg-b { padding: 12px 16px 16px; display: block; }
.exam-grid .eg-f { font-size: 11.5px; color: var(--accent); font-weight: 700; letter-spacing: .06em; }
.exam-grid b { display: block; font-size: 15.5px; font-family: var(--round); line-height: 1.5; }
.exam-grid .rate { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.exam-grid .rate em { font-style: normal; font-family: Georgia, serif; font-size: 20px; color: var(--coral); font-weight: 700; margin: 0 2px; }
.band { background: var(--navy); color: #fff; border-radius: 28px; padding: 30px 26px; margin: 48px 0; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.band h2 { color: #fff; margin: 0; }
.band h2::after { display: none; }
.band p { margin: 6px 0 0; color: #C9D3E4; }
.band .pill { background: var(--mustard); color: var(--navy); }
.band img { width: 110px; height: auto; }
@media (max-width: 700px) { .band { grid-template-columns: 1fr; text-align: center; } .band img { margin: 0 auto; } }
.qa-list { counter-reset: q; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.qa-list a { display: flex; gap: 12px; align-items: baseline; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.qa-list a:hover { border-color: var(--accent); }
.qa-list .qn { font-family: Georgia, serif; color: var(--coral); font-weight: 700; flex: none; min-width: 3.2em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; list-style: none; padding: 0; counter-reset: s; }
.steps li { background: var(--paper); border-radius: var(--r); padding: 18px; border: 1px solid var(--line); counter-increment: s; position: relative; margin: 0; }
.steps li::before { content: "STEP " counter(s); font-family: Georgia, serif; font-size: 12px; letter-spacing: .14em; color: var(--accent); font-weight: 700; display: block; }
.steps b { font-family: var(--round); font-size: 17px; display: block; margin: 2px 0 4px; }

/* フッター */
footer.site { background: var(--navy); color: #D5DDEA; margin-top: 40px; position: relative; padding: 36px 0 28px; font-size: 14px; }
footer.site .f-wave { position: absolute; left: 0; right: 0; top: -39px; color: var(--navy); line-height: 0; }
footer.site a { color: #fff; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
.f-top { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.f-logo b { color: #fff; }
.f-logo small { color: #AEB9CC; display: block !important; }
.f-about { margin: 0; color: #AEB9CC; font-size: 13px; }
.f-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0; }
.f-cols ul { list-style: none; padding: 0; margin: 0; }
.f-t { font-family: var(--round); color: var(--mustard); font-weight: 700; margin: 0 0 6px; }
.copy { font-size: 12px; color: #8E9AB0; margin: 0; }
@media (max-width: 700px) { .f-top, .f-cols { grid-template-columns: 1fr; } }

/* 年度別の棒グラフ */
.qa-fig{margin:28px 0;padding:18px 16px 12px;background:#fff;border:1px solid #e3ecef;border-radius:16px}
.qa-fig svg{width:100%;height:auto;display:block}
.qa-fig figcaption{font-size:.82rem;color:#5b6475;text-align:center;margin-top:6px}
.wrap h3{font-size:1.02rem;margin:22px 0 8px;color:#2C7A92}
