/* Michihare foundation (preview): unified tokens and shared components.
   Pages opt in with body class "foundation". Loaded last. */
body.foundation{
  --fd-ink:#242b2c; --fd-muted:#636663; --fd-paper:#fff; --fd-soft:#f7f5f1;
  --fd-warm:#f6eee3; --fd-line:#e5e3df; --fd-accent:#a33135; --fd-accent-deep:#82262b;
  --fd-serif:'Noto Serif CJK JP','Yu Mincho','Hiragino Mincho ProN',serif;
  --fd-sans:'Noto Sans CJK JP','Yu Gothic','Meiryo',sans-serif;
}
/* header brand mark: same face on every page */
body.foundation .mark{color:#34484b}
body.foundation .mark span{color:var(--fd-accent)}
body.foundation a:hover{color:var(--fd-accent)}
/* article heading block */
body.foundation .article-heading h1{font-family:var(--fd-serif)}
body.foundation .eyebrow{color:var(--fd-accent)}
body.foundation .article-heading .meta{font-family:var(--fd-sans);color:var(--fd-muted);
  border-bottom:1px solid var(--fd-line);padding-bottom:14px}
/* section step labels */
body.foundation .step{color:var(--fd-accent)}
/* summary block */
body.foundation .course-summary{background:var(--fd-soft);border-top:3px solid var(--fd-accent)}
body.foundation .summary-grid>li{border-top:1px solid var(--fd-line)}
body.foundation .summary-grid>li>span{color:var(--fd-accent-deep)}
/* comparison tables */
body.foundation .comparison-feature .table-wrap{border:1px solid var(--fd-line);background:#fff}
body.foundation .comparison-feature th{background:var(--fd-soft)}
body.foundation .comparison-feature th:last-child,
body.foundation .comparison-feature td:last-child{background:var(--fd-warm)}
/* note blocks */
body.foundation article .note{background:var(--fd-soft);border-left:3px solid var(--fd-accent)}
body.foundation .sample-feature{background:var(--fd-soft);border-top:3px solid var(--fd-accent)}
/* ad slot: one fixed place and frame inside the article type */
body.foundation #onsuku-ad{background:#fff;border:1px solid var(--fd-line);
  border-left:3px solid var(--fd-accent);padding:20px 22px}
body.foundation #onsuku-ad-title{font-family:var(--fd-serif)}
body.foundation #onsuku-official-material a{color:var(--fd-accent);font-weight:600}
/* chart component: horizontal bars, values taken from the article's own table */
.fd-chart{margin:28px 0;padding:20px 22px;background:var(--fd-soft);border-top:3px solid var(--fd-accent)}
.fd-chart-title{font-family:var(--fd-serif);font-size:17px;margin-bottom:16px}
.fd-chart ul{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.fd-chart li{display:grid;grid-template-columns:150px 1fr 90px;align-items:center;gap:14px}
.fd-chart-name{font-size:14px}
.fd-bar{display:block;height:14px;background:var(--fd-accent)}
.fd-bar.w35{width:35%}.fd-bar.w98{width:98%}.fd-bar.w100{width:100%}
.fd-chart-value{font-family:var(--fd-sans);font-size:14px;text-align:right}
.fd-chart-note{font-size:12px;color:var(--fd-muted);margin:14px 0 0}
@media(max-width:600px){.fd-chart li{grid-template-columns:96px 1fr 76px;gap:10px}}
/* photo figure component */
.fd-figure{margin:28px 0}
.fd-figure img{display:block;width:100%;height:auto;object-fit:cover;border-radius:2px}
.fd-figure figcaption{font-size:12px;color:var(--fd-muted);margin-top:7px;text-align:right}
/* dialogue component */
.fd-talk{display:grid;gap:14px;margin:28px 0}
.fd-talk .fd-line{display:grid;grid-template-columns:86px 1fr;gap:14px;align-items:start}
.fd-talk .fd-who{font-size:12px;color:var(--fd-accent);letter-spacing:.08em;padding-top:10px}
.fd-talk .fd-say{background:var(--fd-soft);border-radius:3px;padding:12px 16px;font-size:15px;line-height:1.9}
/* manga component: framed panels in a row */
.fd-manga{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:28px 0}
.fd-manga figure{margin:0;border:2px solid var(--fd-ink);background:#fff}
.fd-manga img{display:block;width:100%;height:auto}
.fd-manga figcaption{font-size:12px;color:var(--fd-muted);padding:8px 10px}
/* chart bar widths (added in the expansion batch) */
.fd-bar.w11{width:11%}.fd-bar.w19{width:19%}.fd-bar.w28{width:28%}.fd-bar.w50{width:50%}.fd-bar.w60{width:60%}
/* timeline component: deadlines counted from a start day */
.fd-timeline{margin:28px 0;padding:20px 22px;background:var(--fd-soft);border-top:3px solid var(--fd-accent)}
.fd-timeline ol{list-style:none;margin:18px 0 0;padding:0;display:grid;grid-template-columns:repeat(5,1fr)}
.fd-timeline li{position:relative;padding:18px 12px 0 0;border-top:2px solid var(--fd-line)}
.fd-timeline li::before{content:"";position:absolute;top:-7px;left:0;width:12px;height:12px;border-radius:50%;background:var(--fd-accent)}
.fd-tl-day{display:block;font-family:var(--fd-serif);font-size:16px;color:var(--fd-accent-deep);margin-bottom:6px}
.fd-tl-text{display:block;font-size:12.5px;line-height:1.7}
@media(max-width:600px){.fd-timeline ol{grid-template-columns:1fr;gap:14px}.fd-timeline li{border-top:none;border-left:2px solid var(--fd-line);padding:0 0 0 16px}.fd-timeline li::before{top:4px;left:-7px}}
/* flow component: states or steps in a row */
.fd-flow{margin:28px 0}
.fd-flow ol{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.fd-flow li{background:var(--fd-soft);border-top:3px solid var(--fd-accent);padding:14px 16px}
.fd-flow li strong{display:block;font-size:14.5px;margin-bottom:6px}
.fd-flow li span{font-size:13px;line-height:1.8}
.fd-bar.w55{width:55%}
.fd-bar.w91{width:91%}
