/* 新デザインの解説記事(デザイン案 v1 の決まり)。色・書体・形の変数は /shell.css の --sp-*。
   従来の記事(/it-passport/ の articles.css)は、順にこちらへ移行する。 */
*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body.article-v2 { margin:0; color:var(--sp-text); font-family:var(--sp-font-body); line-height:1.9; font-variant-numeric:tabular-nums; }
body.article-v2 a { color:var(--sp-indigo); text-underline-offset:3px; }
body.article-v2 a:hover { color:var(--sp-indigo-dark); }
body.article-v2 :focus-visible { outline:3px solid var(--sp-indigo); outline-offset:2px; }
.article-v2 h1,.article-v2 h2,.article-v2 h3 { font-family:var(--sp-font-head); font-weight:900; color:var(--sp-heading); word-break:keep-all; overflow-wrap:anywhere; line-height:1.45; }
.article-v2 p,.article-v2 li { line-break:strict; overflow-wrap:anywhere; text-wrap:pretty; }

.av-shell { max-width:1100px; margin:0 auto; padding:36px 32px 64px; }
.av-crumbs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 20px; color:var(--sp-muted); font-size:.84rem; }
.av-crumbs a { color:var(--sp-muted) !important; }
.av-hero { max-width:760px; margin-bottom:28px; }
.av-hero h1 { margin:0 0 16px; font-size:clamp(1.7rem,3.6vw,2.4rem); }
.av-hero .lead { max-width:40em; margin:0 0 14px; color:#3A4A5C; font-size:1.04rem; }
.av-meta { display:flex; flex-wrap:wrap; gap:6px 10px; margin:0; padding:0; list-style:none; font-size:.82rem; color:var(--sp-muted); }
.av-meta li { padding:2px 12px; border:1px solid var(--sp-rule); border-radius:999px; background:#fff; }

.av-layout { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:40px; align-items:start; }
.av-body { min-width:0; max-width:760px; }
.av-body > section { margin-top:48px; scroll-margin-top:24px; }
.av-body > section:first-child { margin-top:0; }
.av-body h2 { margin:0 0 14px; font-size:1.5rem; }
.av-body h3 { margin:24px 0 8px; font-size:1.1rem; }
.av-body p { max-width:40em; margin:0 0 16px; }
.av-body ul,.av-body ol { max-width:40em; margin:0 0 18px; padding-left:1.4em; }

.av-answer { padding:20px 24px; border-radius:var(--sp-r-card); background:var(--sp-indigo-bg); border:2px solid #D5DEEC; }
.av-answer .av-label { margin:0 0 6px; color:var(--sp-indigo); font-size:.84rem; font-weight:700; }
.av-answer p:last-child { margin-bottom:0; }
.av-note { margin:18px 0; padding:14px 18px; border-radius:var(--sp-r-card); background:var(--sp-gray-bg); border:1px solid var(--sp-rule); font-size:.94rem; }
.av-note p:last-child { margin-bottom:0; }
.av-note.warn { background:var(--sp-yellow-bg-soft); border-color:#F0DC8A; }

.av-table-wrap { overflow-x:auto; margin:16px 0 22px; border:1px solid var(--sp-rule); border-radius:var(--sp-r-card); background:#fff; }
.av-table { width:100%; min-width:560px; border-collapse:collapse; font-size:.92rem; }
.av-table th,.av-table td { padding:10px 14px; border-bottom:1px solid var(--sp-rule); text-align:left; vertical-align:top; line-height:1.65; }
.av-table thead th { background:var(--sp-gray-bg); font-weight:700; }
.av-table tr:last-child td { border-bottom:0; }
.av-table td.num { font-weight:700; white-space:nowrap; }
.av-scroll-hint { margin:8px 0 -10px; color:var(--sp-muted); font-size:.78rem; }

.av-cta { padding:28px; border-radius:var(--sp-r-card-lg); background:var(--sp-indigo); color:#fff; }
.av-cta h2 { margin:0 0 8px; color:#fff !important; font-size:1.3rem; }
.av-cta p { max-width:40em; margin:0 0 16px; color:#E6ECF7; }
.av-btn { display:inline-flex; align-items:center; min-height:48px; padding:0 26px; border:0; border-radius:var(--sp-r-btn); background:var(--sp-indigo); color:#fff !important; font:inherit; font-weight:700; text-decoration:none; cursor:pointer; }
.av-btn:hover { background:var(--sp-indigo-dark); }
.av-cta .av-btn { background:var(--sp-highlight); color:var(--sp-text) !important; }
.av-cta .av-btn:hover { background:#FFD84D; }

/* 計算 */
.av-calc { padding:22px 24px; border-radius:var(--sp-r-card-lg); border:2px solid #D5DEEC; background:#fff; }
.av-calc-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 16px; margin-bottom:16px; }
.av-calc label { display:block; font-size:.86rem; font-weight:700; }
.av-calc label span { display:block; margin-bottom:5px; }
.av-calc input,.av-calc select { width:100%; min-height:44px; padding:8px 12px; border:1px solid #B9C4CF; border-radius:var(--sp-r-icon); background:#fff; color:var(--sp-text); font:inherit; font-weight:700; }
.av-calc-result { margin:16px 0 0; padding:14px 18px; border-radius:var(--sp-r-card); background:var(--sp-yellow-bg); }
.av-calc-result strong { font-size:1.2rem; }
.av-calc-result p { margin:4px 0 0; font-size:.88rem; color:var(--sp-muted); }
.av-calc-error { margin:12px 0 0; color:#A12820; font-weight:700; font-size:.9rem; }

.av-steps { list-style:none; padding:0 !important; counter-reset:s; }
.av-steps li { position:relative; padding:0 0 18px 48px; counter-increment:s; }
.av-steps li::before { content:counter(s); position:absolute; left:0; top:0; display:grid; width:34px; height:34px; place-items:center; border-radius:50%; background:var(--sp-indigo); color:#fff; font-weight:700; font-size:.9rem; }
.av-steps strong { display:block; }

.av-sources { padding-top:20px; border-top:1px solid var(--sp-rule); }
.av-sources h2 { font-size:1.2rem; }
.av-sources li { font-size:.86rem; }
.av-about { padding-top:20px; border-top:1px solid var(--sp-rule); }
.av-about p { font-size:.9rem; color:var(--sp-muted); }
.av-history { list-style:none; padding:0 !important; font-size:.88rem; }
.av-history li { display:flex; gap:14px; padding:6px 0; border-top:1px solid var(--sp-rule); }
.av-history time { flex:none; width:9em; color:var(--sp-muted); }

.av-toc { position:sticky; top:24px; padding:16px 18px; border:1px solid var(--sp-rule); border-radius:var(--sp-r-card); background:#fff; font-size:.86rem; }
.av-toc p { margin:0 0 8px; font-weight:700; color:var(--sp-heading); }
.av-toc ol { margin:0; padding-left:1.3em; line-height:1.6; }
.av-toc li + li { margin-top:6px; }
.av-toc a { color:var(--sp-muted) !important; }

.av-related { margin-top:48px; padding-top:28px; border-top:1px solid var(--sp-rule); }
.av-related h2 { margin:0 0 12px; font-size:1.2rem; }
.av-related-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.av-related-card { display:block; padding:14px 18px; border:1px solid var(--sp-rule); border-radius:var(--sp-r-card); background:#fff; text-decoration:none; color:var(--sp-text) !important; }
.av-related-card:hover { border-color:var(--sp-indigo); }
.av-related-card span { display:block; color:var(--sp-muted); font-size:.8rem; }
.av-related-card strong { color:var(--sp-indigo); }

@media (max-width:900px) {
  .av-layout { grid-template-columns:1fr; }
  .av-toc { display:none; }
}
@media (max-width:640px) {
  .av-shell { padding:24px 16px 48px; }
  .av-calc-grid { grid-template-columns:1fr; }
  .av-related-grid { grid-template-columns:1fr; }
  .av-cta { padding:22px 18px; }
  .av-history li { flex-direction:column; gap:0; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } * { transition:none !important; animation:none !important; } }
.av-scroll-hint { display:none; }
@media (max-width:640px) {
  .av-scroll-hint { display:block; }
  .av-table th:first-child,.av-table td:first-child { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 var(--sp-rule); }
  .av-table thead th:first-child { background:var(--sp-gray-bg); }
}
.av-calc [hidden],.av-calc-result[hidden] { display:none !important; }
.av-table-src td:first-child { white-space:nowrap; }

/* よくある質問(開閉。構造化データの FAQPage と同じ内容) */
.av-faq details { margin:0 0 10px; border:1px solid var(--sp-rule); border-radius:var(--sp-r-card); background:#fff; }
.av-faq summary { padding:14px 18px; font-weight:700; cursor:pointer; list-style:none; }
.av-faq summary::-webkit-details-marker { display:none; }
.av-faq summary::before { content:"Q"; display:inline-grid; place-items:center; width:26px; height:26px; margin-right:10px; border-radius:var(--sp-r-icon); background:var(--sp-icon-bg); color:var(--sp-indigo); font-family:var(--sp-font-head); font-weight:900; font-size:.85rem; }
.av-faq details[open] summary { border-bottom:1px solid var(--sp-rule); }
.av-faq p { margin:0; padding:12px 18px 14px; max-width:none; }
