/* bridgethegap.jp — OOCSS：構造のクラス（frame, stack, cluster, box, card, media, prose）と
   見た目のクラス（skin-*）を重ねて使う */

@font-face {
  font-family: "Plex JP";
  src: url("/tone/plex-jp-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --stone: #f5f4f0;
  --paper: #ffffff;
  --ink: #232838;
  --ink-sub: #5d6274;
  --line: #dcdbe3;
  --indigo: #35407a;
  --indigo-deep: #283063;
  --mist: #e3e7f3;
  --bamboo: #4f8a72;
  --radius: 16px;
  --head: "Plex JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "YuGothic", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.92;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; padding: 6px 12px; background: var(--paper); border-radius: 8px; }

/* ---- 構造 ---- */

.frame { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.frame-narrow { max-width: 732px; }
.stack { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; }
.box { border-radius: var(--radius); padding: 24px; }
@media (min-width: 760px) { .box { padding: 32px 36px; } }

/* ---- 見た目 ---- */

.skin-paper { background: var(--paper); }
.skin-mist { background: var(--mist); }
.skin-indigo { background: var(--indigo); color: #fff; }
.skin-deep { background: var(--indigo-deep); color: #e6e8f2; }

/* 橋の印：アーチ1本と水平線 */
.mark { position: relative; display: inline-block; width: 26px; height: 15px; flex: none; }
.mark::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: 0; height: 13px;
  border: 3px solid currentColor; border-bottom: 0; border-radius: 10px 10px 0 0;
}
.mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; opacity: .55; border-radius: 1px;
}

/* ---- ヘッダー ---- */

.bar-inner { padding-top: 18px; padding-bottom: 16px; position: relative; }
.bar-inner::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--indigo) 0 72px, var(--line) 72px);
}
.brand { gap: 4px 12px; color: var(--indigo); text-decoration: none; }
.brand-name { font-family: var(--head); font-weight: 600; font-size: 1.15rem; color: var(--ink); letter-spacing: .04em; }
.brand-sub { font-size: .8rem; color: var(--ink-sub); }
@media (max-width: 559px) { .brand-sub { flex-basis: 100%; padding-left: 38px; line-height: 1.5; } }

/* ---- TOP ---- */

.intro { gap: 10px; padding-top: 56px; padding-bottom: 48px; }
.intro-catch {
  font-family: var(--head); font-weight: 600; color: var(--indigo);
  font-size: clamp(1.55rem, 4.6vw, 2.4rem); line-height: 1.5; letter-spacing: .05em;
}
.intro-title { display: flex; flex-wrap: wrap; gap: 0 .6em; font-family: var(--head); font-weight: 600; font-size: 1.05rem; line-height: 1.7; }
.intro-title span + span { color: var(--ink-sub); }
.intro-meta { font-size: .85rem; color: var(--ink-sub); }

/* 段違いの2列 */
.stagger { display: flex; flex-direction: column; gap: 40px; padding-bottom: 80px; }
.stagger-col { display: contents; }
.order-1 { order: 1; } .order-2 { order: 2; } .order-3 { order: 3; } .order-4 { order: 4; } .order-5 { order: 5; }
@media (min-width: 760px) {
  .stagger { flex-direction: row; align-items: flex-start; gap: 48px; }
  .stagger-col { display: flex; flex-direction: column; gap: 56px; flex: 1 1 0; min-width: 0; }
  .stagger-col-low { padding-top: 160px; }
}

.card-link { gap: 10px; color: inherit; text-decoration: none; }
.card-title { display: flex; flex-direction: column; font-family: var(--head); font-weight: 600; line-height: 1.55; }
.card-title .t-main { font-size: 1.3rem; }
.card-title .t-sub { font-size: .92rem; color: var(--ink-sub); margin-top: 2px; }
.card-link:hover .t-main { color: var(--indigo); text-decoration: underline; text-underline-offset: .22em; }
.card-link .photo { margin-bottom: 6px; }

/* 写真：角丸と内側の淡い線 */
.photo { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--mist); }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(35, 40, 56, .12); pointer-events: none;
}

.meta { gap: 4px 14px; font-size: .82rem; color: var(--ink-sub); }
.read { display: inline-flex; align-items: center; gap: 6px; }
.read::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bamboo); }

/* ---- 記事 ---- */

main > .frame-narrow { gap: 28px; padding-top: 28px; padding-bottom: 56px; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: .8rem; color: var(--ink-sub); line-height: 1.6; }
.crumbs li + li::before { content: "◦"; margin: 0 .7em; color: var(--indigo); }
.crumbs a { color: var(--ink-sub); }

.entry-head { gap: 14px; }
.entry-title { display: flex; flex-direction: column; font-family: var(--head); font-weight: 600; line-height: 1.5; letter-spacing: .03em; }
.entry-title .t-main { font-size: clamp(1.5rem, 4.4vw, 2rem); }
.entry-title .t-sub { font-size: clamp(1rem, 2.6vw, 1.15rem); color: var(--ink-sub); margin-top: 6px; }
.entry-head .meta time { color: var(--ink); }
.entry-head .meta time + span { margin-left: -10px; }

.eye { max-width: 640px; width: 100%; margin: 0 auto; }
.photo-note { margin-top: 6px; font-size: .75rem; color: var(--ink-sub); text-align: right; }

.toc { box-shadow: inset 6px 0 0 var(--indigo); padding-left: 32px; }
.toc-label { font-family: var(--head); font-weight: 600; color: var(--indigo); margin-bottom: 10px; }
.toc-label span { font-family: var(--body); font-weight: 400; font-size: .82rem; color: var(--ink-sub); }
.toc ol { display: flex; flex-direction: column; gap: 4px; line-height: 1.6; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--indigo); text-decoration: underline; }
.toc-h2 > a::before { content: "—"; color: var(--indigo); margin-right: .6em; }
.toc-h2 > ol { margin: 4px 0 6px 1.9em; gap: 2px; }
.toc-h3 { font-size: .88rem; }
.toc-h3 > a { color: var(--ink-sub); }
.toc-h3 > a::before { content: "·"; color: var(--indigo); margin-right: .55em; font-weight: 700; }

/* 本文 */
.prose { font-size: 1.02rem; }
.prose p { margin-top: 1.15em; }
.prose h2 {
  position: relative; margin-top: 2.6em; padding-left: 22px;
  font-family: var(--head); font-weight: 600; font-size: 1.38rem; line-height: 1.55;
}
.prose h2::before {
  content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 7px;
  border-radius: 999px; background: var(--indigo);
}
.prose h3 {
  display: flex; align-items: baseline; gap: 10px; margin-top: 1.9em;
  font-family: var(--head); font-weight: 600; font-size: 1.12rem; line-height: 1.6; color: var(--indigo);
}
.prose h3::before {
  content: ""; flex: none; width: 11px; height: 11px; border: 2px solid var(--indigo); border-radius: 3px;
  transform: translateY(-1px);
}
.prose > :first-child { margin-top: 0; }
.prose h2 + p, .prose h3 + p { margin-top: .8em; }

/* 関連記事 */
.related { margin-bottom: 64px; }
.related-label { font-family: var(--head); font-weight: 600; font-size: 1.2rem; margin-bottom: 18px; }
.related-label::before { content: ""; display: inline-block; width: 22px; height: 2px; background: #fff; opacity: .6; vertical-align: middle; margin-right: 12px; }
.related-list { display: grid; gap: 18px 32px; }
@media (min-width: 760px) { .related-list { grid-template-columns: 1fr 1fr; } }
.media { display: flex; gap: 14px; align-items: center; color: #fff; text-decoration: none; }
.media .photo { flex: none; width: 112px; border-radius: 10px; }
.media .photo::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.media-body { display: flex; flex-direction: column; line-height: 1.5; }
.media-body .t-main { font-family: var(--head); font-weight: 600; }
.media-body .t-sub { font-size: .8rem; opacity: .78; margin-top: 2px; }
.media:hover .t-main { text-decoration: underline; text-underline-offset: .2em; }
.media:focus-visible { outline-color: #fff; }

/* プライバシーポリシー */
.paper-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 16px; margin-bottom: 20px; }
.badge { padding: 2px 12px; border-radius: 8px; background: var(--mist); color: var(--indigo); font-size: .8rem; }
.paper .prose h2 { font-size: 1.15rem; margin-top: 2em; }

/* 404 */
.missing-list { display: flex; flex-direction: column; gap: 8px; }
.missing-list li { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.missing-list .read { font-size: .8rem; color: var(--ink-sub); }

/* ---- フッター ---- */

.foot-inner { align-items: center; gap: 16px; padding-top: 44px; padding-bottom: 36px; text-align: center; }
.foot .mark { color: #fff; }
.foot-note { max-width: 640px; font-size: .85rem; line-height: 1.85; text-wrap: pretty; }
.foot-links { justify-content: center; gap: 4px 24px; font-size: .88rem; }
.foot-links a { color: #fff; }
.foot-line { font-size: .75rem; opacity: .7; letter-spacing: .06em; }
