/* Bivrost — 読みもの（/articles）。site.css の色・書体・ボタン・ヘッダー・フッターをそのまま使い、本文の組みだけを足す。 */

.ar-page { background: var(--paper); }

/* 読んだ分だけ伸びる棒 */
.ar-progress { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 4px; padding: 6px 8px 0; pointer-events: none; box-sizing: content-box; }
.ar-progress b { display: block; height: 4px; border-radius: 4px; background: var(--verm); transform: scaleX(0); transform-origin: 0 50%; }

.ar { padding: calc(var(--hd) + 74px) 0 clamp(72px, 10vw, 120px); }
.ar-wrap { --max: 760px; }
.ar-wrap-wide { --max: 1080px; }

.ar-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 700; color: rgba(21, 19, 15, .62); margin-bottom: 26px; }
.ar-crumbs a { text-decoration: none; }
.ar-crumbs a:hover { text-decoration: underline; }

.ar-hd { margin-bottom: 36px; }
.ar-h1 { margin-top: 22px; font-family: var(--f-d); font-weight: 900; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.3; letter-spacing: -.01em; word-break: auto-phrase; text-wrap: balance; }
.ar-lead { margin-top: 20px; font-size: clamp(1rem, 1.6vw, 1.12rem); font-weight: 500; line-height: 1.9; word-break: auto-phrase; text-wrap: pretty; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 13px; color: rgba(21, 19, 15, .66); }

/* 目次 */
.ar-toc { margin: 0 0 44px; padding: 22px 26px; background: var(--paper2); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
.ar-toc p { font-family: var(--f-d); font-weight: 900; font-size: 15px; margin-bottom: 8px; }
.ar-toc ol { list-style: decimal; padding-left: 1.4em; display: grid; gap: 4px; font-size: 15px; }
.ar-toc a { text-decoration: none; background: linear-gradient(var(--verm), var(--verm)) 0 100% / 0 2px no-repeat; transition: background-size .3s var(--ease); }
.ar-toc a:hover { background-size: 100% 2px; }

/* 本文 */
.ar-body { font-size: 17px; line-height: 2; }
.ar-body > * + * { margin-top: 1.25em; }
.ar-body p, .ar-body li, .ar-body td, .ar-body th { word-break: auto-phrase; text-wrap: pretty; }
.ar-body h2 { margin-top: 2.6em; padding-top: .4em; font-family: var(--f-d); font-weight: 900; font-size: clamp(1.45rem, 3.2vw, 1.9rem); line-height: 1.4; scroll-margin-top: calc(var(--hd) + 40px); text-wrap: balance; }
.ar-body h2::before { content: ""; display: block; width: 44px; height: 6px; margin-bottom: 16px; border-radius: 6px; background: var(--verm); }
.ar-body h3 { margin-top: 2em; font-family: var(--f-d); font-weight: 900; font-size: 1.2rem; line-height: 1.5; }
.ar-body h2 + *, .ar-body h3 + * { margin-top: .7em; }
.ar-body a { color: var(--cobalt); text-underline-offset: 3px; }
.ar-body strong { font-weight: 800; background: linear-gradient(transparent 62%, rgba(255, 210, 63, .7) 62%); }
.ar-body ul, .ar-body ol { padding-left: 1.3em; }
.ar-body ul { list-style: disc; }
.ar-body ol { list-style: decimal; }
.ar-body li + li { margin-top: .4em; }
.ar-body li::marker { color: var(--verm); font-weight: 800; }

/* 要点の箱 */
.ar-sum { padding: 24px 26px; background: var(--butter); border: 3px solid var(--ink); border-radius: 22px; }
.ar-sum > p:first-child { font-family: var(--f-d); font-weight: 900; font-size: 15px; margin-bottom: 6px; }
.ar-sum ul { margin: 0; }
.ar-sum li::marker { color: var(--ink); }

/* 補足 */
.ar-note { padding: 18px 22px; border-left: 6px solid var(--cobalt); background: var(--paper2); border-radius: 0 16px 16px 0; font-size: 15px; line-height: 1.9; }
.ar-note b { font-weight: 800; }

/* 表 */
.ar-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 3px solid var(--ink); border-radius: 18px; background: var(--paper2); }
.ar-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14.5px; line-height: 1.7; }
.ar-table th, .ar-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.ar-table thead th { background: var(--ink); color: var(--paper2); font-weight: 800; white-space: nowrap; }
.ar-table tbody th { font-weight: 800; min-width: 7.5em; width: 22%; }
.ar-table tr:last-child td, .ar-table tr:last-child th { border-bottom: 0; }
.ar-table .is-us { background: rgba(255, 210, 63, .28); }

/* チェックリスト */
.ar-check { list-style: none !important; padding: 0 !important; display: grid; gap: 10px; }
.ar-check li { position: relative; margin: 0 !important; padding: 12px 16px 12px 48px; background: var(--paper2); border: 2px solid var(--ink); border-radius: 14px; line-height: 1.8; }
.ar-check li::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border: 3px solid var(--ink); border-radius: 5px; background: var(--paper); }

/* よくある質問 */
.ar-body .faq details { border: 2px solid var(--ink); border-radius: 16px; background: var(--paper2); }
.ar-body .faq details + details { margin-top: 10px; }
.ar-body .faq summary { cursor: pointer; padding: 14px 18px; font-weight: 800; line-height: 1.7; list-style: none; position: relative; padding-right: 44px; }
.ar-body .faq summary::-webkit-details-marker { display: none; }
.ar-body .faq summary::after { content: "+"; position: absolute; right: 18px; top: 10px; font-family: var(--f-l); font-size: 22px; transition: transform .25s var(--ease); }
.ar-body .faq details[open] summary::after { transform: rotate(45deg); }
.ar-body .faq details p { padding: 0 18px 16px; font-size: 15.5px; line-height: 1.9; }

/* 出典 */
.ar-src { font-size: 13.5px; line-height: 1.8; color: rgba(21, 19, 15, .8); }
.ar-src h2 { font-size: 1.15rem !important; }
.ar-src ol { padding-left: 1.4em; }
.ar-src li { word-break: break-all; }
.ar-disc { font-size: 13px; line-height: 1.8; color: rgba(21, 19, 15, .7); }

/* 記事の終わりの相談 */
.ar-cta { margin-top: 64px; padding: clamp(26px, 4vw, 40px); background: var(--ink); color: var(--paper); border-radius: 28px; box-shadow: 8px 8px 0 var(--verm); }
.ar-cta-k { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .06em; padding: 5px 12px; border-radius: 999px; background: var(--butter); color: var(--ink); }
.ar-cta-h { margin-top: 16px; font-family: var(--f-d); font-weight: 900; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.45; word-break: auto-phrase; }
.ar-cta ul { margin-top: 16px; display: grid; gap: 6px; font-size: 15px; }
.ar-cta li { padding-left: 22px; position: relative; }
.ar-cta li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--verm); }
.ar-cta li b { font-size: 1.15em; margin: 0 2px; }
.ar-cta-b { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.ar-cta .btn-ghost { color: var(--paper); border-color: var(--paper); }
.ar-cta .btn-ghost:hover { color: var(--ink); background: var(--paper); box-shadow: none; }

/* 記事の札 */
.ar-rel { margin-top: 64px; }
.ar-rel-h { font-family: var(--f-d); font-weight: 900; font-size: 1.3rem; margin-bottom: 18px; }
.ar-cards { display: grid; gap: 16px; }
.ar-cards-index { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.ar-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px 24px; text-decoration: none; background: var(--paper2); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 5px 5px 0 var(--ink); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.ar-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.ar-card-k { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--butter); border: 2px solid var(--ink); }
.ar-card-h { font-family: var(--f-d); font-weight: 900; font-size: 1.15rem; line-height: 1.5; word-break: auto-phrase; text-wrap: pretty; }
.ar-card-p { font-size: 14px; line-height: 1.8; color: rgba(21, 19, 15, .78); word-break: auto-phrase; }
.ar-card-d { margin-top: auto; font-size: 12px; color: rgba(21, 19, 15, .6); }

/* トップの「読みもの」 */
.reads { margin-top: 56px; }
.reads-h { font-family: var(--f-d); font-weight: 900; font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin-bottom: 16px; }
.reads .ar-cards-index { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.reads .ar-card { padding: 18px 20px; }
.reads .ar-card-h { font-size: 1rem; }
.reads .ar-card-p { display: none; }
.reads-more { margin-top: 18px; font-weight: 800; }
.reads-more a { text-decoration: none; display: inline-flex; gap: 8px; border-bottom: 3px solid var(--verm); padding-bottom: 2px; }

@media (max-width: 900px) {
  .ar { padding-top: calc(52px + 62px); }
  .ar-body { font-size: 16px; }
  .ar-toc { padding: 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ar-card, .ar-toc a { transition: none; }
}
