:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --bg-alt: #f2efe8;
  --fg: #1e2430;
  --fg-muted: #5b6472;
  --accent: #1f3a5f;
  --accent-2: #b9975b;
  --border: #e1ddd0;
  --card-bg: #ffffff;
  --link: #1f3a5f;
  --link-visited: #3a537a;
  --toc-bg: #f2efe8;
  --max-width: 40em;
  /* tone: 吉・中立・注意の3値。--*-line は罫用(対背景3:1以上)、--*-ink は文字用(4.5:1以上) */
  --tone-yoshi-line: #4a7a5c;
  --tone-yoshi-ink: #2f5c42;
  --tone-neutral-line: #7c828c;
  --tone-neutral-ink: #5b6472;
  --tone-chui-line: #a97b2e;
  --tone-chui-ink: #7a5410;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181f;
    --bg-alt: #1b212b;
    --fg: #e7e6e1;
    --fg-muted: #a7aebb;
    --accent: #cdd9ea;
    --accent-2: #d9b878;
    --border: #2b3341;
    --card-bg: #1b212b;
    --link: #9fc0ea;
    --link-visited: #b6a8de;
    --toc-bg: #1b212b;
    --tone-yoshi-line: #6f9c80;
    --tone-yoshi-ink: #8cc09b;
    --tone-neutral-line: #6f7887;
    --tone-neutral-ink: #a7aebb;
    --tone-chui-line: #a8813f;
    --tone-chui-ink: #d9b878;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI",
    "Yu Gothic", "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:visited {
  color: var(--link-visited);
}

img {
  max-width: 100%;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.2rem;
}

.site-header .wrap {
  max-width: 56em;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header a.brand {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--fg);
}

.site-header nav a {
  margin-left: 1rem;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--fg-muted);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.2rem 4rem;
}

main.wide {
  max-width: 56em;
}

h1, h2, h3 {
  color: var(--fg);
  line-height: 1.5;
  font-weight: 700;
}

h1 {
  font-size: 1.7rem;
  margin: 0.6rem 0 1rem;
}

h2 {
  font-size: 1.28rem;
  margin: 2.4rem 0 1rem;
  padding-top: 0.2rem;
}

h3 {
  font-size: 1.08rem;
  margin: 1.8rem 0 0.8rem;
}

p {
  margin: 0 0 1.3em;
}

.breadcrumb {
  font-size: 0.86rem;
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
}

.breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.dates {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 1.6rem;
}

.toc {
  background: var(--toc-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.3rem;
  margin: 1.6rem 0 2.2rem;
  font-size: 0.94rem;
}

.toc-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--fg-muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
}

.toc li {
  margin: 0.25em 0;
}

/* tone: 3値の色を --tone-line / --tone-ink に流し込む */
.tone-yoshi {
  --tone-line: var(--tone-yoshi-line);
  --tone-ink: var(--tone-yoshi-ink);
}

.tone-neutral {
  --tone-line: var(--tone-neutral-line);
  --tone-ink: var(--tone-neutral-ink);
}

.tone-chui {
  --tone-line: var(--tone-chui-line);
  --tone-ink: var(--tone-chui-ink);
}

/* A. 冒頭の結論カード */
.verdict {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tone-line);
  border-radius: 12px;
  padding: 1.4rem 1.3rem 1.3rem;
  margin: 1.4rem 0 1.6rem;
}

.verdict-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.verdict-eyebrow {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
}

.verdict-badge {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--tone-ink);
  white-space: nowrap;
}

.verdict-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0 0 0.9rem;
}

.verdict-tags span {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  padding: 0 0.85rem;
  color: var(--fg);
}

.verdict-tags span:first-child {
  padding-left: 0;
}

.verdict-tags span + span {
  border-left: 1px solid var(--border);
}

.verdict-line {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--fg);
}

@media (min-width: 480px) {
  .verdict-tags span {
    font-size: 1.55rem;
    padding: 0 1rem;
  }
  .verdict-tags span:first-child {
    padding-left: 0;
  }
}

/* B. 冒頭の状況タイル */
.quick {
  margin: 0 0 2rem;
}

.quick-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
  margin: 0 0 0.7rem;
  color: var(--fg-muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

a.quick-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tone-line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
  transition: background-color 150ms ease;
}

a.quick-item:visited {
  color: var(--fg);
}

a.quick-item:hover {
  background: var(--bg-alt);
}

a.quick-item:hover .quick-label {
  color: var(--link);
}

a.quick-item:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.quick-label {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--fg);
}

.quick-meaning {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--fg-muted);
}

.quick-legend {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--fg-muted);
}

.quick-legend span {
  white-space: nowrap;
}

.quick-legend .tone-key {
  display: inline-block;
  width: 0.9rem;
  height: 3px;
  border-radius: 2px;
  background: var(--tone-line);
  margin-right: 0.3rem;
  vertical-align: middle;
}

.quick-note {
  margin: 0.45rem 0 0;
  font-size: 0.76rem;
  line-height: 1.8;
  color: var(--fg-muted);
}

@media (prefers-reduced-motion: reduce) {
  a.quick-item {
    transition: none;
  }
}

.slot {
  margin: 1.6rem 0;
}

.slot[data-slot] {
  min-height: 0;
}

.related, .same-category {
  margin: 2.6rem 0;
}

.related h2, .same-category h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--fg);
  display: block;
}

.card:hover {
  border-color: var(--accent-2);
}

.card .card-name {
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.card .card-desc {
  font-size: 0.86rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.category-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  padding: 0.1em 0.7em;
  margin-bottom: 0.6em;
}

.sources {
  margin: 2rem 0;
  font-size: 0.86rem;
  color: var(--fg-muted);
}

.sources ol {
  padding-left: 1.2em;
}

.disclaimer {
  margin: 2.2rem 0;
  font-size: 0.82rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}

.bridge-card {
  margin: 2.4rem 0;
  background: var(--bg-alt);
  border: 1px solid var(--accent-2);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
}

.bridge-card a.bridge-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.6rem 1.2rem 3rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--fg-muted);
}

.site-footer a {
  color: var(--fg-muted);
  margin: 0 0.5em;
}

.hero {
  padding: 2.4rem 1.2rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 1.9rem;
}

.hero p {
  color: var(--fg-muted);
  max-width: 34em;
  margin: 0 auto 1.4rem;
}

.category-grid {
  max-width: 56em;
  margin: 1rem auto 2.4rem;
  padding: 0 1.2rem;
}

.section-title {
  max-width: 56em;
  margin: 2rem auto 1rem;
  padding: 0 1.2rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.all-list-wide {
  max-width: 56em;
  margin: 0 auto;
  padding: 0 1.2rem 3rem;
}

.az-list {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  padding: 0;
}

@media (max-width: 640px) {
  .az-list {
    columns: 1;
  }
}

.az-list li {
  break-inside: avoid;
  margin: 0.35em 0;
}

.az-list a {
  text-decoration: none;
}
