:root {
  --ink: #151a1c;
  --muted: #606a6d;
  --teal: #006d80;
  --teal-dark: #00566a;
  --hero-teal: #026180;
  --charcoal: #1c1f20;
  --teal-soft: #e2f0f0;
  --cream: #f4eee4;
  --paper: #fffdf8;
  --white: #fff;
  --yellow: #edb31e;
  --line: #c8cfce;
  --content: 1248px;
  --article: 780px;
  --font: "M PLUS 1", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-latin: "Josefin Sans", Arial, sans-serif;
  --ease: 180ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  line-break: strict;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--cream);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 20;
  color: var(--white);
  background: var(--hero-teal);
}

.header-inner {
  width: min(var(--content), calc(100% - 96px));
  margin: 0 auto;
}

.footer-inner {
  width: min(var(--content), calc(100% - 96px));
  margin: 0 auto;
}

.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  flex-shrink: 0;
  color: var(--white);
  font-family: var(--font-latin);
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.global-nav a {
  color: var(--white);
  font-family: "M PLUS 1", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  text-decoration: none;
}

.header-cta {
  min-width: 242px;
  padding: 16px 24px;
  color: var(--white);
  background: var(--charcoal);
  text-align: center;
}

.header-link {
  padding-block: 6px;
  border-bottom: 1px solid rgba(255,255,255,.76);
}

.header-link span {
  margin-left: 20px;
  font-size: 20px;
}

@media (hover: hover) {
  .header-cta:hover {
    color: var(--ink);
    background: var(--white);
  }
}

.article-container {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 96px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.breadcrumb-sep { color: #9ba4a5; }

.knowledge-hero {
  position: relative;
  margin: 0 0 48px;
  padding: 54px 64px 58px;
  color: var(--white);
  background: var(--teal);
  overflow: hidden;
}

.knowledge-hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -105px;
  bottom: -190px;
  border: 2px solid rgba(255,255,255,.24);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.05), 0 0 0 76px rgba(255,255,255,.04);
}

.knowledge-kicker,
.aside-kicker {
  margin: 0 0 16px;
  color: var(--yellow);
  font-family: var(--font-latin);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

.knowledge-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.35;
  letter-spacing: -.04em;
  word-break: keep-all;
}

.knowledge-hero > p:last-child {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  font-size: 16px;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}

.tag-filter-item {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--teal);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}

.tag-filter-item:hover,
.tag-filter-item.is-active {
  color: var(--white);
  background: var(--teal);
}

.tag-filter-note {
  margin: -12px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.article-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 34px 30px 28px;
  background: var(--white);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}

.article-card:hover {
  background: var(--teal-soft);
  transform: translateY(-2px);
}

.article-card-category {
  margin-bottom: 34px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.article-card-title {
  margin: 0 0 16px;
  color: var(--teal-dark);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -.02em;
}

.article-card-desc {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  color: var(--muted);
  font-size: 11px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 11px;
  text-decoration: none;
}

.article-tag--cat { font-weight: 700; }

.article-header {
  width: min(var(--article), 100%);
  margin: 24px auto 44px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.article-title {
  margin: 0 0 24px;
  color: var(--teal-dark);
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.4;
  letter-spacing: -.04em;
  word-break: auto-phrase;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.md-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
}

.md-link svg { width: 14px; height: 14px; }

.article-body,
.official-sources,
.related-articles,
.related-tools,
.article-nav {
  width: min(var(--article), 100%);
  margin-left: auto;
  margin-right: auto;
}

.article-body {
  font-size: 17px;
  line-height: 2;
}

.article-body h2 {
  margin: 64px 0 20px;
  padding: 0 0 14px;
  color: var(--teal-dark);
  border-bottom: 2px solid var(--teal);
  font-size: 30px;
  line-height: 1.5;
  letter-spacing: -.03em;
}

.article-body h3 {
  margin: 42px 0 14px;
  color: var(--teal-dark);
  font-size: 22px;
  line-height: 1.6;
}

.article-body p { margin: 0 0 1.5em; }
.article-body ul,
.article-body ol { margin: 0 0 1.6em; padding-left: 1.5em; }
.article-body li { margin: .5em 0; }
.article-body a { color: var(--teal); }
.article-body strong { color: var(--teal-dark); }

.article-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-left: 4px solid var(--yellow);
}

.article-body img {
  max-width: 100%;
  height: auto;
}

.toc {
  margin: 32px 0 46px;
  padding: 24px 28px;
  color: var(--teal-dark);
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.toc-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; }
.toc-h3 { margin-left: 1.1em; font-size: 14px; }

.table-wrap {
  max-width: 100%;
  margin: 28px 0;
  overflow-x: auto;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.article-body th,
.article-body td {
  padding: 13px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.article-body code {
  padding: .1em .35em;
  background: var(--cream);
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: .9em;
}

.article-body pre {
  padding: 20px;
  background: #102f35;
  overflow-x: auto;
}

.article-body pre code { padding: 0; color: var(--white); background: transparent; }

.official-sources,
.related-articles,
.related-tools {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.aside-kicker,
.related-tools-title {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.official-sources h2,
.related-articles h2 {
  margin: 0 0 18px;
  color: var(--teal-dark);
  font-size: 24px;
}

.official-sources ul { margin: 0; padding-left: 1.2em; }
.official-sources a { color: var(--teal); }

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.related-articles-grid a {
  min-height: 150px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 8px 16px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.related-articles-grid small {
  grid-column: 1 / -1;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.related-articles-grid strong {
  color: var(--teal-dark);
  font-size: 16px;
  line-height: 1.65;
}

.related-tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-tool-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  color: var(--white);
  background: var(--teal);
  text-decoration: none;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  background: var(--cream);
  text-decoration: none;
}

.article-nav-label { color: var(--muted); font-size: 11px; }
.article-nav-title { color: var(--teal-dark); font-size: 14px; font-weight: 700; }
.article-nav .next { text-align: right; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination-button,
.pagination-select {
  height: 46px;
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--teal);
}

.pagination-button {
  width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-button svg { width: 18px; fill: none; stroke: currentColor; }
.pagination-button.is-disabled { opacity: .35; }
.pagination-select { min-width: 110px; padding: 0 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-footer {
  color: var(--white);
  background: var(--charcoal);
  font-family: "M PLUS 1", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: normal;
}

.footer-inner {
  padding-block: 20px 16px;
}

.footer-main {
  min-height: 60px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.footer-main nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 34px;
}

.footer-main nav a {
  color: var(--white);
  font-size: 14px;
  text-decoration: none;
}

.footer-legal {
  min-height: 42px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.footer-legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.footer-legal nav a,
.footer-legal small {
  color: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 400;
  text-decoration: none;
}

.footer-legal nav a:hover,
.footer-legal nav a:focus-visible {
  color: rgba(255,255,255,.88);
}

.footer-legal small { justify-self: end; }

@media (max-width: 1080px) {
  .header-inner {
    width: min(var(--content), calc(100% - 56px));
  }

  .footer-inner {
    width: min(var(--content), calc(100% - 56px));
  }

  .global-nav { gap: 18px; }
}

@media (max-width: 960px) {
  .header-inner { min-height: 70px; }
  .brand { font-size: 22px; }

  .global-nav {
    position: static;
    width: auto;
    display: flex;
    padding: 0;
    background: transparent;
  }

  .global-nav .header-link { display: none; }
  .header-cta {
    min-width: 160px;
    padding: 12px 20px;
  }
}

@media (max-width: 820px) {
  .footer-inner {
    width: min(var(--content), calc(100% - 40px));
    padding-block: 28px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-main nav {
    justify-content: flex-start;
  }

  .footer-legal {
    margin-top: 24px;
  }
}

@media (max-width: 900px) {
  .article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }

  .article-container {
    width: min(100% - 32px, var(--content));
  }

  .header-inner {
    width: min(100% - 32px, var(--content));
  }

  .header-inner { min-height: 64px; }

  .article-container { padding: 26px 0 64px; }
  .breadcrumb { margin-bottom: 22px; }

  .knowledge-hero { margin-bottom: 32px; padding: 36px 24px 40px; }
  .knowledge-hero h1 { font-size: 34px; }
  .knowledge-hero > p:last-child { font-size: 14px; }

  .article-list { grid-template-columns: 1fr; }
  .article-card { min-height: 0; padding: 26px 22px; }
  .article-card-category { margin-bottom: 20px; }
  .article-card-title { font-size: 21px; }

  .article-header { margin-top: 10px; }
  .article-title { font-size: 30px; }
  .article-body { font-size: 16px; line-height: 1.95; }
  .article-body h2 { margin-top: 48px; font-size: 26px; }
  .article-body h3 { font-size: 20px; }

  .table-wrap {
    overflow: visible;
  }

  .article-body table,
  .article-body thead,
  .article-body tbody,
  .article-body tr,
  .article-body td {
    display: block;
    width: 100%;
  }

  .article-body thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .article-body tbody {
    display: grid;
    gap: 14px;
  }

  .article-body tr {
    border: 1px solid var(--line);
  }

  .article-body td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .article-body td:last-child {
    border-bottom: 0;
  }

  .article-body td::before {
    content: attr(data-label);
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
  }

  .related-articles-grid,
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .next { text-align: left; }

}

@media (max-width: 620px) {
  .footer-main nav {
    flex-direction: column;
    gap: 12px;
  }

  .footer-legal {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    width: min(100% - 32px, var(--content));
  }
}

@media (max-width: 420px) {
  .brand { font-size: 20px; }

  .header-cta {
    min-width: 142px;
    padding: 11px 14px;
    font-size: 13px;
  }
}
