/* 事例ページ共通スタイル（レーン W・自己完結・site.css のトークンを踏襲） */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --bg-alt: #f6f8fb; --surface: #ffffff;
  --text: #14171f; --text-2: #4a5361; --text-3: #5b6470; --line: #e5e9f0;
  --brand: #2457e6; --brand-ink: #ffffff; --brand-soft: #e9efff; --brand-line: #c5d3fb;
  --ok: #156a3e; --ok-soft: #e3f5ea; --warn: #8a5200; --warn-soft: #fff3df; --bad: #b3261e; --bad-soft: #fde8e6;
  --accent-3: #e0891f; --header-bg: rgba(255,255,255,.9);
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 30px rgba(16,24,40,.07);
  --section-space: clamp(48px, 7vw, 96px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --bg-alt: #131820; --surface: #161b23;
    --text: #e9edf2; --text-2: #c3cbd6; --text-3: #97a3b1; --line: #2a323d;
    --brand: #86a8ff; --brand-ink: #0b1430; --brand-soft: #1b2540; --brand-line: #33487e;
    --ok: #5fd394; --ok-soft: #14301f; --warn: #f2b45a; --warn-soft: #3a2a10; --bad: #ff8a80; --bad-soft: #3d1a17;
    --accent-3: #f2a94a; --header-bg: rgba(14,17,22,.9);
    --shadow: 0 1px 2px rgba(0,0,0,.18), 0 10px 30px rgba(0,0,0,.22);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif; font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-feature-settings: "palt"; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; }
h2 { font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
ul, ol { padding: 0; margin: 0; list-style: none; }
img, svg { max-width: 100%; height: auto; }
svg { display: block; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.skip-link { position: fixed; top: 10px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--brand); color: var(--brand-ink); border-radius: 999px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.section { padding-block: var(--section-space); }
.section-alt { background: var(--bg-alt); }
.eyebrow { display: block; color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.section-heading { margin-bottom: 28px; }
.section-heading h2 { margin-top: 10px; }
.section-heading p { margin-top: 10px; color: var(--text-2); max-width: 64ch; }
.lead { color: var(--text-2); font-size: 17px; max-width: 64ch; }
.muted { color: var(--text-3); font-size: 13px; }
.accent { color: var(--brand); }
/* header / footer */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font-weight: 900; letter-spacing: .02em; }
.site-nav { display: flex; gap: 18px; align-items: center; font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--brand); }
.site-footer { border-top: 1px solid var(--line); padding-block: 32px; color: var(--text-3); font-size: 13px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
/* buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px; border-radius: 999px; font-weight: 700; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease; }
.button-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); }
.button-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.button:hover { transform: translateY(-1px); }
.button-sm { min-height: 40px; padding: 6px 16px; font-size: 14px; }
/* hero */
.case-hero { padding-block: clamp(40px, 6vw, 72px) clamp(32px, 5vw, 56px); background: radial-gradient(900px 400px at 10% -10%, var(--brand-soft), transparent 70%); }
.case-hero .eyebrow { margin-bottom: 12px; }
.case-hero h1 { max-width: 22ch; }
.case-hero .lead { margin-top: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: var(--surface); }
.badge-brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 28px; }
.kpi { padding: 18px 18px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.kpi-value { font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: .45em; font-weight: 700; margin-left: 2px; color: var(--text-2); }
.kpi-label { margin-top: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi-src { margin-top: 6px; font-size: 11px; color: var(--text-3); }
/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card p, .card li { color: var(--text-2); font-size: 15px; }
.card .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 900; margin-bottom: 12px; }
.checklist li { position: relative; padding-left: 26px; margin-top: 8px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 14px; border-radius: 50%; background: var(--ok-soft); border: 2px solid var(--ok); }
/* flow diagram */
.flow { margin-top: 8px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow-x: auto; }
.flow svg { width: 100%; height: auto; }
.flow-caption { margin-top: 12px; font-size: 13px; color: var(--text-3); }
/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.src { color: var(--text-3); font-size: 12px; }
/* rules */
.rules { display: grid; gap: 12px; }
.rule { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.rule .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 900; }
.rule p { color: var(--text-2); font-size: 15px; }
/* verdict meter */
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 800; }
.verdict-ok { background: var(--ok-soft); color: var(--ok); }
.verdict-warn { background: var(--warn-soft); color: var(--warn); }
.verdict-bad { background: var(--bad-soft); color: var(--bad); }
/* note / honesty box */
.note { padding: 16px 20px; border-left: 4px solid var(--accent-3); background: var(--bg-alt); border-radius: 0 14px 14px 0; font-size: 14px; color: var(--text-2); }
.note strong { color: var(--text); }
/* CTA */
.cta { padding: clamp(28px, 4vw, 44px); border-radius: 24px; background: var(--brand); color: var(--brand-ink); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta h2 { color: inherit; }
.cta p { opacity: .9; margin-top: 6px; }
.cta .button-primary { background: var(--brand-ink); color: var(--brand); }
details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 0 18px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--brand); font-weight: 900; }
details[open] summary::after { content: "−"; }
details > :not(summary) { padding-bottom: 16px; color: var(--text-2); font-size: 15px; }
/* form controls (M0 calc) */
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.field small { color: var(--text-3); font-size: 12px; }
.field input, .field select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); width: 100%; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
@media (max-width: 720px) {
  .site-nav { gap: 12px; font-size: 13px; }
  .site-nav .button { display: none; }
  .cta { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
