/* ものさしを、もうひとつ。｜Another Angle
   配色 C（動画の make_short_v9.py と同じ値）：ネイビー × オレンジ × シアン */

@font-face {
  font-family: "Noto Sans JP";
  src: url("fonts/NotoSansJP-Regular.subset.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans JP";
  src: url("fonts/NotoSansJP-Bold.subset.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0A1834;        /* navy  (10, 24, 52) */
  --bg2: #162A52;       /* card  (22, 42, 82) */
  --line: #283F6E;
  --fg: #FFFFFF;
  --sub: #D6E0F0;       /* (214, 224, 240) */
  --muted: #96A8C8;     /* (150, 168, 200) */
  --acc: #FF8C1E;       /* orange (255, 140, 30) */
  --ok: #50D2FF;        /* cyan  (80, 210, 255) */
  --max: 720px;
  --gutter: 20px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

/* 言語の切り替え：表示している言語でない方を隠す（JS なしのときは日本語） */
html:not([data-lang="en"]) [lang="en"]:not(html) { display: none !important; }
html[data-lang="en"] [lang="ja"]:not(html) { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
html[data-lang="en"] body { line-height: 1.65; }

a { color: var(--ok); text-underline-offset: 3px; }
a:hover { color: var(--fg); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--acc); color: var(--bg); padding: 8px 12px;
}
.skip:focus { left: 8px; top: 8px; z-index: 10; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 56px;
}
.brand {
  color: var(--fg); text-decoration: none; font-weight: 700;
  font-size: 15px; line-height: 1.3;
}
.brand small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.lang-btn {
  flex: none;
  font: inherit; font-size: 13px; line-height: 1;
  color: var(--sub); background: transparent;
  border: 1px solid var(--muted); border-radius: 999px;
  padding: 8px 14px; min-height: 36px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--fg); color: var(--fg); }

.site-nav ul {
  list-style: none; margin: 0; padding: 0 0 10px;
  display: flex; flex-wrap: wrap; gap: 4px 4px;
}
.site-nav a {
  display: inline-block; padding: 6px 10px; border-radius: 8px;
  color: var(--sub); text-decoration: none; font-size: 14px;
}
.site-nav a:hover { background: var(--bg2); color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--bg2); box-shadow: inset 0 -2px 0 var(--acc); }

/* 本文 */
main { padding: 32px 0 56px; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 12px; }
h1 { font-size: 26px; }
h2 { font-size: 20px; margin-top: 40px; }
h3 { font-size: 17px; }
p { margin: 0 0 14px; }
.lead { color: var(--sub); font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { color: var(--acc); font-size: 13px; font-weight: 700; letter-spacing: .04em; margin-bottom: 4px; }

/* トップの見出し */
.hero { padding: 16px 0 8px; }
.hero-title { font-size: 34px; line-height: 1.3; margin: 0 0 6px; }
.hero-title .acc { color: var(--acc); }
.hero-en { color: var(--muted); font-size: 15px; margin-bottom: 20px; }

/* 4つの手順 */
.steps { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative; padding: 0 0 22px 52px; counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--ok); color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; line-height: 1;
}
.steps li::after {
  content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px;
  width: 2px; background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps li:last-child::before { border-color: var(--acc); color: var(--acc); }
.steps strong { display: block; font-size: 17px; line-height: 1.5; }
.steps span.d { color: var(--sub); font-size: 15px; }

/* カード */
.card {
  background: var(--bg2); border-radius: 14px; padding: 18px 18px;
  margin: 14px 0;
}
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }

/* 時間軸のものさし（図形で描く） */
.ruler { margin: 18px 0 8px; }
.ruler svg { display: block; width: 100%; height: auto; }
.ruler-labels { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); }
.ruler-labels b { color: var(--fg); }

/* ボタン */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 18px; border-radius: 10px;
  font-weight: 700; text-decoration: none; font-size: 15px;
}
.btn-primary { background: var(--acc); color: var(--bg); }
.btn-primary:hover { background: #FFA650; color: var(--bg); }
.btn-ghost { border: 1px solid var(--muted); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); }

/* エピソード */
.episode { margin: 8px 0 40px; }
.episode h2 { margin-top: 0; font-size: 22px; }
.episode .en-title { color: var(--muted); font-size: 15px; margin: -6px 0 14px; }
.video {
  position: relative; width: 100%; max-width: 300px; margin: 12px auto 18px;
  aspect-ratio: 9 / 16; background: #05101E; border-radius: 12px; overflow: hidden;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.points { margin: 0; padding-left: 1.2em; }
.points li { margin-bottom: 8px; }
.points li::marker { color: var(--ok); }
.question { border-left: 3px solid var(--acc); padding: 4px 0 4px 14px; margin: 16px 0; font-weight: 700; }

details {
  background: var(--bg2); border-radius: 12px; margin: 10px 0; padding: 0 16px;
}
summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .15s;
}
details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
details > div { padding: 0 0 14px; }
details ul { margin: 0; padding-left: 1.2em; }
details li { margin-bottom: 10px; font-size: 15px; }
.note { font-size: 13px; color: var(--muted); }

.empty {
  border: 1px dashed var(--muted); border-radius: 14px; padding: 24px 18px; text-align: center;
}

/* プロフィール */
.profile { border-top: 3px solid var(--acc); }
.profile .profile-name { margin: 0 0 4px; font-size: 22px; }
.profile .profile-role { color: var(--ok); font-size: 15px; margin-bottom: 14px; }

/* テーマ一覧 */
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.topics li {
  background: var(--bg2); border-radius: 10px; padding: 12px 14px;
  display: flex; gap: 12px; align-items: baseline;
}
.topics .no { color: var(--acc); font-weight: 700; font-size: 13px; flex: none; min-width: 3.2em; }
@media (min-width: 640px) {
  .topics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.formats { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
@media (min-width: 640px) { .formats { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.formats .card { margin: 0; }
.formats h3 { color: var(--acc); }

.form-slot {
  border: 1px dashed var(--muted); border-radius: 14px; padding: 28px 18px;
  text-align: center; color: var(--sub); margin: 14px 0;
}
.form-frame { width: 100%; min-height: 900px; border: 0; border-radius: 12px; background: #fff; }

.policy h2 { font-size: 18px; margin-top: 32px; }
.policy ul { padding-left: 1.2em; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 36px; font-size: 13px; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--sub); }
.site-footer p { margin: 0 0 6px; }

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  h1 { font-size: 30px; }
  .hero-title { font-size: 44px; }
  main { padding-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
