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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #17211b;
  background: #f7faf8;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.75;
}

a {
  color: #006b5a;
  text-underline-offset: 0.2em;
}

img {
  max-width: 100%;
  display: block;
}

.site-header,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 48px 0 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #8d174b;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: 2rem;
  line-height: 1.35;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.45;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

p {
  margin: 0;
}

.lead {
  max-width: 780px;
  margin-top: 16px;
  color: #435249;
  font-size: 1rem;
}

.section {
  margin: 28px 0;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #d9e5dd;
  border-radius: 8px;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 18px;
}

.section-heading p {
  margin-top: 8px;
  color: #4b5a51;
}

.intro-grid,
.two-column,
.data-model,
.choice-grid,
.check-grid,
.detail-grid {
  display: grid;
  gap: 18px;
}

.intro-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  align-items: start;
}

.reader-panel {
  padding: 18px;
  border: 1px solid #a9d8cb;
  border-radius: 8px;
  background: #f1fbf8;
}

.reader-panel ul,
.note-list,
.check-grid ul,
.compact-group ul {
  margin: 10px 0 0;
  padding-left: 1.2em;
}

.two-column,
.data-model,
.choice-grid,
.check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-model {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-column > div,
.data-model article,
.choice-grid article,
.check-grid article {
  padding: 18px;
  border: 1px solid #d9e5dd;
  border-radius: 8px;
  background: #fbfdfc;
}

.chip-row,
.tag-stack,
.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.mini-chip,
.status-tag,
.doc-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #a8c9bd;
  border-radius: 8px;
  background: #eef8f4;
  color: #173d36;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-tag,
.doc-type {
  min-height: 24px;
  padding: 2px 8px;
  border-color: #e2aac3;
  background: #fff1f6;
  color: #7d1644;
  white-space: nowrap;
}

.tag-stack {
  margin-top: 8px;
}

.origin-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.origin-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 188px;
  padding: 16px;
  border: 1px solid #d6e4de;
  border-radius: 8px;
  background: #fbfdfc;
}

.origin-code {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #006b5a;
  color: #ffffff;
  font-weight: 800;
}

.origin-card .status,
.brand-line,
.note {
  color: #4c5c53;
  font-size: 0.9rem;
}

.brand-line {
  margin-top: 10px;
  font-weight: 700;
}

.note {
  margin-top: 12px;
}

.table-tools {
  align-items: center;
  margin-bottom: 10px;
  color: #4b5a51;
  font-size: 0.92rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #cad8d0;
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1980px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.86rem;
}

caption {
  padding: 12px;
  color: #33443b;
  font-weight: 800;
  text-align: left;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #dfe9e3;
  border-right: 1px solid #edf2ef;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #173d36;
  color: #ffffff;
  font-size: 0.8rem;
  white-space: nowrap;
}

td {
  max-width: 230px;
}

tbody tr:nth-child(even) {
  background: #f9fcfa;
}

.definition-list {
  display: grid;
  gap: 14px;
}

.definition-list article {
  padding-left: 14px;
  border-left: 4px solid #2e8b76;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

details {
  border: 1px solid #d9e5dd;
  border-radius: 8px;
  background: #fbfdfc;
}

summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 800;
}

.compact-list {
  padding: 0 16px 16px;
}

.compact-group + .compact-group {
  margin-top: 14px;
}

.compact-list p + p {
  margin-top: 10px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.brand-card {
  overflow: hidden;
  border: 1px solid #d9e5dd;
  border-radius: 8px;
  background: #ffffff;
}

.brand-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f5f8f6;
  border-bottom: 1px solid #e4eee8;
}

.brand-card-body {
  padding: 16px;
}

.brand-card dl {
  margin: 12px 0 0;
}

.brand-card dt {
  margin-top: 10px;
  color: #8d174b;
  font-weight: 800;
}

.brand-card dd {
  margin: 4px 0 0;
  color: #33443b;
  font-size: 0.9rem;
}

.brand-card.high {
  border-color: #2e8b76;
}

.brand-card.low {
  border-color: #e2aac3;
}

.caution-block {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #e2aac3;
  border-radius: 8px;
  background: #fff8fb;
}

.source-differences {
  display: grid;
  gap: 12px;
}

.difference-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.7fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid #d9e5dd;
  border-radius: 8px;
  background: #fbfdfc;
}

.sources-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sources-list a {
  padding: 12px 14px;
  border: 1px solid #d9e5dd;
  border-radius: 8px;
  background: #fbfdfc;
  overflow-wrap: anywhere;
}

.changelog {
  margin-bottom: 48px;
}

@media (max-width: 980px) {
  .intro-grid,
  .two-column,
  .data-model,
  .choice-grid,
  .check-grid,
  .detail-grid,
  .sources-list {
    grid-template-columns: 1fr;
  }

  .origin-map,
  .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .difference-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  main {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    padding-top: 30px;
  }

  h1 {
    font-size: 1.55rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .section {
    padding: 20px;
  }

  .origin-map,
  .brand-grid {
    grid-template-columns: 1fr;
  }
}
