/* 白・灰・濃紺を基調に、山吹色をアクセントにする。外部のフォントや画像は使わない。 */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f2f5f8;
  --text: #20262d;
  --muted: #5a6672;
  --border: #dde3e9;
  --navy: #1b365d;
  --on-navy: #ffffff;
  --link: #1b4a8a;
  --focus: #1b4a8a;
  --accent: #b45309;
  --accent-bg: #faf0dd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151b;
    --surface: #1a222c;
    --text: #e3e8ed;
    --muted: #a3aeb9;
    --border: #2c3844;
    --navy: #a9c2e6;
    --on-navy: #0d1621;
    --link: #a9c2e6;
    --focus: #a9c2e6;
    --accent: #dfa04e;
    --accent-bg: #2c2317;
  }
}

::selection {
  background: var(--accent-bg);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.wrap {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--link);
  z-index: 10;
}

.skip:focus {
  left: 8px;
  top: 8px;
}

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

section[id] {
  scroll-margin-top: 4.5rem;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--navy);
  text-decoration: none;
}

.site-name::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin-left: auto;
}

.site-header nav a {
  padding: 0.25rem 0;
  font-size: 0.93rem;
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* セクションと見出し */
main {
  counter-reset: sec;
}

main section {
  counter-increment: sec;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

main section#top {
  counter-increment: none;
}

main section:last-child {
  border-bottom: 0;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.45;
}

h1 {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
}

main section > h2 {
  position: relative;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 1.4rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

main section > h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

main section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3.4rem;
  height: 2px;
  background: var(--accent);
}

h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

section > p,
section > ul,
section > ol {
  max-width: 46rem;
}

li {
  margin-bottom: 0.4rem;
}

.notice {
  padding: 0.85rem 1.05rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  font-size: 0.94rem;
  max-width: 46rem;
}

.section-meta {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* 冒頭 */
#top {
  padding-top: 3.25rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 44rem;
  margin-bottom: 2rem;
}

.top-sub {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--navy);
  margin: 2.1rem 0 0.6rem;
  padding-left: 0.65rem;
  border-left: 3px solid var(--accent);
  line-height: 1.45;
}

/* 要点の数字 */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0 0 2.25rem;
}

.stat {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.15rem 1.2rem 1rem;
}

.stat-num {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.stat-num.accent {
  color: var(--accent);
  font-size: 2.6rem;
}

.stat-cap {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
}

.stat-main {
  padding: 1.4rem 1.5rem 1.15rem;
}

.stat-compare {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.stat-side {
  flex: 1 1 0;
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.stat-main .stat-num {
  font-size: 2.6rem;
}

.stat-arrow {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--muted);
  flex: none;
}

.dots {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 4px;
  margin-top: 1.15rem;
}

.dot {
  aspect-ratio: 1 / 1;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
  opacity: 0.55;
}

.dot.on {
  background: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.dots-cap {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* 出典ラベル */
.refs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3em;
  margin-left: 0.35em;
  vertical-align: 0.1em;
}

.ref {
  display: inline-block;
  padding: 0 0.5em;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy);
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none;
  white-space: nowrap;
}

a.ref:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* 更新情報 */
.updates {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.05rem 1.25rem 0.6rem;
  margin-bottom: 2.25rem;
  max-width: 52rem;
}

.updates-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.55rem;
}

.updates ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.updates li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.9rem;
  padding: 0.35rem 0;
  margin: 0;
  font-size: 0.95rem;
}

.upd-date {
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  min-width: 5.6rem;
}

.upd-text {
  flex: 1 1 18rem;
}

/* ボタン風のリンク */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin: 1.8rem 0 1.4rem;
  list-style: none;
}

.actions li {
  margin: 0;
}

.btn {
  display: inline-block;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--navy);
  border-radius: 8px;
  background: var(--navy);
  color: var(--on-navy);
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.btn:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.btn.secondary {
  background: transparent;
  color: var(--navy);
}

.btn.is-pending {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
  border-color: var(--muted);
}

/* 年表 */
.tl-legend {
  font-size: 0.88rem;
  color: var(--muted);
}

.timeline {
  list-style: none;
  margin: 1.25rem 0 0.5rem;
  padding: 0 0 0 1.05rem;
  border-left: 2px solid var(--border);
  max-width: 48rem;
}

.tl-year {
  position: relative;
  margin: 1.4rem 0 0.6rem -1.05rem;
  padding-left: 1.05rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.06em;
}

.tl-year:first-child {
  margin-top: 0.25rem;
}

.tl-item {
  position: relative;
  padding: 0 0 1.5rem 0.55rem;
  margin: 0;
}

.tl-item:last-child {
  padding-bottom: 0.25rem;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -1.05rem;
  top: 0.48rem;
  width: 0.6rem;
  height: 0.6rem;
  margin-left: -0.36rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--muted);
}

.tl-item.plan::before {
  background: var(--navy);
  border-color: var(--navy);
}

.tl-item.delay {
  background: var(--accent-bg);
  border-radius: 10px;
  padding: 0.7rem 0.85rem 0.85rem;
  margin-bottom: 1.1rem;
}

.tl-item.delay::before {
  left: -1.35rem;
  background: var(--accent);
  border-color: var(--accent);
}

.tl-date {
  font-weight: 800;
  color: var(--navy);
  margin-right: 0.55rem;
}

.tl-chip {
  display: inline-block;
  padding: 0.02rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 0.12em;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tl-item.plan .tl-chip {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-navy);
}

.tl-item.delay .tl-chip {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

.tl-text {
  margin: 0.25rem 0 0;
}

/* 提供状況のカード */
.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem 1.5rem 1.45rem;
  margin-bottom: 1.1rem;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-bottom: 0.65rem;
  margin-bottom: 1.05rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.12rem;
  margin: 0;
}

.card-checked {
  font-size: 0.83rem;
  color: var(--muted);
  white-space: nowrap;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.3rem;
}

.card-cell h4 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.45rem;
}

.card-cell div {
  font-size: 0.95rem;
  line-height: 1.75;
}

.card-cell.is-current {
  background: var(--surface);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  margin: -0.85rem -0.95rem;
}

.card-cell.is-current h4 {
  color: var(--accent);
}

/* 出典リスト */
.src {
  padding: 1.05rem 0 1.15rem;
  border-bottom: 1px solid var(--border);
  max-width: 52rem;
}

.src-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.src-id {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--on-navy);
  background: var(--navy);
  border-radius: 6px;
  padding: 0.08rem 0.55rem;
}

.src-type {
  font-size: 0.8rem;
  color: var(--muted);
}

.src-title {
  font-weight: 700;
  margin: 0.5rem 0 0.15rem;
}

.src-meta {
  font-size: 0.87rem;
  color: var(--muted);
  margin: 0 0 0.3rem;
}

.src-url {
  font-size: 0.9rem;
  word-break: break-all;
  margin: 0 0 0.3rem;
}

.src-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* 参加案内 */
.join-panel {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.6rem 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: flex-start;
  max-width: 52rem;
}

.join-main {
  flex: 1 1 20rem;
}

.join-main h3 {
  margin-top: 0;
}

.join-panel .btn {
  font-size: 1.02rem;
  padding: 0.7rem 1.5rem;
}

/* QRコード */
.qr {
  margin: 0;
  padding: 0.8rem 0.8rem 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.qr img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #ffffff;
}

.qr figcaption {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.official-site {
  font-size: 0.94rem;
  color: var(--muted);
  word-break: break-all;
}

/* 会社概要の表 */
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.75;
}

table.company {
  min-width: 0;
}

th,
td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

table.company tbody th[scope="row"] {
  width: 6rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--surface);
}

/* 更新履歴 */
.history {
  padding-left: 0;
  list-style: none;
}

.history li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
}

.history li:last-child {
  border-bottom: 0;
}

.history time {
  min-width: 9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* 下書きのときだけ出る表示 */
.draft-banner {
  margin: 0;
  padding: 0.5rem 16px;
  background: var(--surface);
  color: var(--muted);
  border-bottom: 1px dashed var(--muted);
  font-size: 0.875rem;
}

.draft-mark,
.placeholder {
  display: inline-block;
  padding: 0 0.4em;
  border: 1px dashed var(--muted);
  border-radius: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

/* 狭い画面 */
@media (max-width: 820px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-cell.is-current {
    margin: 0;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.75rem;
  }

  main section > h2 {
    font-size: 1.28rem;
  }

  main section {
    padding: 2.3rem 0 2rem;
  }

  #top {
    padding-top: 2.4rem;
  }

  .site-header nav {
    margin-left: 0;
  }

  .stat-compare {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  .dots {
    grid-template-columns: repeat(10, 1fr);
  }

  .card {
    padding: 1.1rem 1.05rem 1.2rem;
  }

  .join-panel {
    padding: 1.25rem 1.1rem;
  }
}

/* 印刷用 */
@page {
  margin: 16mm;
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --muted: #333333;
    --border: #888888;
    --navy: #000000;
    --on-navy: #ffffff;
    --link: #000000;
    --accent: #000000;
    --accent-bg: #ffffff;
  }

  body {
    font-size: 11pt;
    line-height: 1.6;
  }

  .wrap {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .site-header {
    border-bottom: 1px solid #000000;
  }

  .btn {
    border: 1px solid #000000;
    background: #ffffff;
    color: #000000;
  }

  .card,
  .stat,
  .join-panel,
  .tl-item.delay {
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }

  tr,
  figure {
    break-inside: avoid;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  main section {
    break-inside: auto;
  }
}
