/* Hallmark · macrostructure: Long Document · tone: editorial · anchor hue: gold
 * Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V4
 * 色・タイポは design.md（共同会計グループ）準拠。構造・反スロップは Hallmark。
 */
@import url("/assets/tokens.css");

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

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.75;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

/* --- リンク --- */
a { color: var(--color-gold); text-decoration: none; }
a:hover { color: var(--color-gold-light); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- レイアウト外枠 --- */
.wrap {
  width: 100%;
  max-width: var(--measure-read);
  margin: 0 auto;
  padding: 0 var(--space-l);
}
.wrap--hub { max-width: var(--measure-hub); }

/* --- サイトヘッダ（ミニマル） --- */
.site-head {
  padding: var(--space-l) 0;
  border-bottom: 1px solid var(--color-border-soft);
}
.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
}
.brand {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--color-ink-strong);
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 1, "kern" 1;
}
.brand__dot { color: var(--color-gold); }
.nav-back {
  font-size: var(--text-small);
  color: var(--color-ink-3);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.nav-back:hover { color: var(--color-gold-light); }

/* --- 記事ヘッダ --- */
.post-head { padding: var(--space-3xl) 0 var(--space-2xl); }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s) var(--space-m);
  margin-bottom: var(--space-l);
  font-size: var(--text-caption);
  color: var(--color-ink-3);
  letter-spacing: 0.05em;
}
.post-title {
  margin: 0;
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--color-ink-strong);
  font-feature-settings: "palt" 1, "kern" 1;
  overflow-wrap: anywhere;
  min-width: 0;
}
.post-lead {
  margin: var(--space-l) 0 0;
  font-size: var(--text-read);
  line-height: 1.9;
  color: var(--color-ink-2);
}

/* --- タグチップ --- */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.tags--head { margin-top: var(--space-m); }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-s);
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.12);
  color: var(--color-gold-light);
  font-size: var(--text-caption);
  letter-spacing: 0.05em;
}

/* --- 記事本文 --- */
.post-body { padding-bottom: var(--space-3xl); }
.post-body h2 {
  margin: var(--space-3xl) 0 var(--space-m);
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-ink-strong);
  font-feature-settings: "palt" 1, "kern" 1;
  overflow-wrap: anywhere;
}
.post-body h3 {
  margin: var(--space-xl) 0 var(--space-s);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-ink);
}
.post-body p {
  margin: 0 0 var(--space-l);
  font-size: var(--text-read);
  line-height: 2.0;
}
.post-body strong { color: var(--color-ink-strong); font-weight: 700; }
.post-body em {
  font-style: normal;
  text-decoration: underline dotted var(--color-gold-deep);
  text-underline-offset: 5px;
}
.post-body ul { margin: 0 0 var(--space-l); padding-left: 1.4em; }
.post-body li {
  margin-bottom: var(--space-s);
  font-size: var(--text-read);
  line-height: 1.9;
}
.post-body li::marker { color: var(--color-gold-deep); }

/* --- 引用・要点ブロック（左ボーダー禁止 → 背景面で表現） --- */
.callout {
  margin: var(--space-xl) 0;
  padding: var(--space-l);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.callout p:last-child { margin-bottom: 0; }
.callout__label {
  display: block;
  margin-bottom: var(--space-s);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  font-feature-settings: "palt" 1;
}

/* --- 出典 --- */
.sources {
  margin-top: var(--space-2xl);
  padding: var(--space-l) 0 0;
  border-top: 1px solid var(--color-border-soft);
}
.sources h2 {
  margin: 0 0 var(--space-m);
  font-size: var(--text-h2);
  font-weight: 600;
  color: var(--color-ink);
}
.sources ol { margin: 0; padding-left: 1.4em; }
.sources li {
  margin-bottom: var(--space-s);
  font-size: var(--text-small);
  line-height: 1.7;
  color: var(--color-ink-3);
  overflow-wrap: anywhere;
}

/* --- 一覧（index） --- */
.hub-head { padding: var(--space-3xl) 0 var(--space-xl); }
.hub-title {
  margin: 0 0 var(--space-s);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-ink-strong);
  font-feature-settings: "palt" 1, "kern" 1;
}
.hub-sub {
  margin: 0;
  font-size: var(--text-body);
  color: var(--color-ink-3);
}
.card-list {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.card {
  display: block;
  padding: var(--space-l);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  color: var(--color-ink);
  transition: background-color var(--dur-base) var(--ease-out);
}
.card:hover { background: var(--color-surface-2); text-decoration: none; }
.card:active { background: var(--color-surface-2); }
.card:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  margin-bottom: var(--space-s);
  font-size: var(--text-caption);
  color: var(--color-ink-3);
  letter-spacing: 0.05em;
}
.card__title {
  margin: 0 0 var(--space-s);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-ink-strong);
  font-feature-settings: "palt" 1, "kern" 1;
  overflow-wrap: anywhere;
}
.card__summary {
  margin: 0 0 var(--space-m);
  font-size: var(--text-small);
  line-height: 1.8;
  color: var(--color-ink-2);
}

/* --- フッタ --- */
.site-foot {
  padding: var(--space-xl) 0 var(--space-3xl);
  border-top: 1px solid var(--color-border-soft);
  font-size: var(--text-caption);
  color: var(--color-ink-3);
  line-height: 1.8;
}

/* --- タブレット以上で見出しを少し拡大 --- */
@media (min-width: 768px) {
  :root { --text-display: 2.25rem; } /* 36px */
  .wrap { padding: 0 var(--space-xl); }
}

/* --- 動きの抑制 --- */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
