:root {
  --bg-top: #12353a;
  --bg-base: #091a1d;
  --surface: rgba(13, 41, 45, 0.78);
  --surface-strong: #0d292d;
  --border: #244c50;
  --border-accent: rgba(113, 230, 212, 0.42);
  --text: #e9f5f1;
  --text-muted: #a6c0ba;
  --text-dim: #7c9a94;
  --accent: #71e6d4;
  --accent-warm: #ffd89b;
  --accent-ink: #062022;
  --radius: 12px;
  --measure: 740px;
}

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

html {
  color-scheme: dark;
  background-color: var(--bg-base);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  min-width: 320px;
  color: var(--text);
  background: radial-gradient(circle at 50% 0%, var(--bg-top), var(--bg-base) 520px) no-repeat var(--bg-base);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.015em;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #a8f4e8;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 22, 25, 0.78);
  backdrop-filter: blur(8px);
}

.site-header-inner,
.page-shell,
.site-footer-inner {
  width: min(calc(100% - 32px), var(--measure));
  margin-inline: auto;
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 0;
}

.site-brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  font-size: 14px;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav .nav-play {
  padding: 6px 14px;
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(19, 63, 67, 0.55);
  font-weight: 600;
}

.site-nav .nav-play:hover {
  background: #133f43;
  color: #e9f5f1;
}

.page-shell {
  flex: 1;
  padding: 28px 0 64px;
}

.breadcrumb {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--text-dim);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-dim);
}

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

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(24px, 4.5vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

.lead {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.85;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-dim);
  font-size: 13px;
}

.article-meta time,
.article-meta span {
  color: var(--text-muted);
}

.article-body h2 {
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(20px, 3.2vw, 24px);
  line-height: 1.45;
  color: var(--text);
}

.article-body h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--accent-warm);
}

.article-body p {
  margin: 0 0 1.25em;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.35em;
  padding-left: 1.4em;
}

.article-body li {
  margin-bottom: 0.55em;
}

.article-body strong {
  color: #f4fbf9;
}

.article-body code {
  padding: 0.12em 0.42em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(8, 28, 31, 0.85);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
}

.callout {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.callout p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
  min-width: 480px;
}

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

th {
  color: var(--accent);
  background: rgba(19, 63, 67, 0.45);
  font-weight: 600;
  white-space: nowrap;
}

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

.article-list {
  display: grid;
  gap: 16px;
  margin: 28px 0 40px;
  padding: 0;
  list-style: none;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.article-card:hover {
  border-color: var(--border-accent);
  background: rgba(18, 56, 61, 0.85);
}

.article-card a {
  display: block;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
}

.article-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--accent);
}

.article-card p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
}

.article-card .card-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.stage-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0 28px;
}

.stage-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.stage-link span {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 400;
}

.stage-link:hover {
  border-color: var(--accent);
  background: #133f43;
  color: var(--text);
}

.cta-box {
  margin: 44px 0 36px;
  padding: 24px 22px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 72, 74, 0.72), rgba(13, 41, 45, 0.92));
}

.cta-box h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 20px;
  color: var(--text);
}

.cta-box p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 15px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.btn-primary {
  color: var(--accent-ink);
  background: var(--accent);
}

.btn-primary:hover {
  color: var(--accent-ink);
  background: #9bf1e4;
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--border-accent);
  background: rgba(9, 26, 29, 0.55);
}

.btn-secondary:hover {
  color: var(--accent);
  background: rgba(19, 63, 67, 0.75);
}

.related-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-size: 18px;
  color: var(--text);
}

.related-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-list a {
  display: block;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
}

.related-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.references {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

.references h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 15px;
  color: var(--text-muted);
}

.references ul {
  margin: 0;
  padding-left: 1.3em;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(6, 18, 20, 0.82);
  padding: 24px 0 36px;
  color: var(--text-dim);
  font-size: 13px;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  body {
    font-size: 15.5px;
    line-height: 1.85;
  }

  .page-shell {
    padding: 20px 0 48px;
  }

  .article-card a {
    padding: 16px 16px;
  }

  .cta-box {
    padding: 18px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-card,
  .stage-link {
    transition: none;
  }
}
