:root {
  --ink: #14272d;
  --muted: #596b70;
  --green: #2f6b5a;
  --green-dark: #235242;
  --cream: #faf7ef;
  --paper: #fffdf8;
  --line: #ded4c2;
  --accent: #b8642b;
  --gold: #b8975a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf1 0%, #f7f2e8 48%, #fffdf8 100%);
  font-family: "Yu Gothic", "YuGothic", "Hiragino Sans", "Meiryo", sans-serif;
  line-height: 1.9;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 18px 5vw;
  background: rgba(255, 253, 248, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: var(--green);
  font-size: 22px;
  font-family: "Yu Mincho", "YuMincho", serif;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  font-weight: 700;
}

.site-header nav a { text-decoration: none; }

.blog-shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.blog-hero {
  padding: clamp(44px, 7vw, 82px) 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .08em;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.38;
  letter-spacing: 0;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
}

h1 {
  max-width: 920px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.article-main .article-title-compact {
  font-size: clamp(2.05rem, 3.6vw, 3rem);
}

h2 {
  margin: 44px 0 14px;
  padding-top: 10px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

h3 {
  margin: 26px 0 10px;
  font-size: 1.45rem;
}

p { margin: 0 0 1.05em; }

.lead {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.08rem;
}

.breadcrumbs {
  padding-top: 24px;
  color: var(--muted);
  font-size: .92rem;
}

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

.breadcrumbs li:not(:last-child)::after {
  content: ">";
  margin-left: 8px;
  color: #9b8d72;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  align-items: start;
  padding-bottom: 72px;
}

.article-main {
  min-width: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: .94rem;
}

.article-cover {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 24px 0 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-box,
.toc,
.note-box,
.cta-box,
.supervisor-box,
.related-box,
.side-card,
.article-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(55, 42, 23, .06);
}

.summary-box,
.toc,
.note-box,
.cta-box,
.supervisor-box,
.related-box {
  padding: clamp(18px, 3vw, 26px);
  margin: 24px 0;
}

.summary-box {
  border-left: 6px solid var(--green);
}

.toc ol {
  margin: 10px 0 0;
  padding-left: 1.4em;
}

.toc a { text-decoration-thickness: 1px; }

.article-main ul,
.article-main ol {
  padding-left: 1.35em;
}

.article-main li { margin: .35em 0; }

.table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

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

th {
  background: #f2eadc;
  font-weight: 800;
}

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

.cta-box {
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-color: var(--green-dark);
}

.cta-lead {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  font-family: "Yu Mincho", "YuMincho", serif;
}

.cta-sub { color: rgba(255,255,255,.9); }

.article-choice {
  margin: 42px 0;
}

.article-choice > p:not(.eyebrow):not(.article-choice-note) {
  color: var(--muted);
}

.cta-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.choice-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(55, 42, 23, .06);
}

.choice-card h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
}

.choice-card p {
  margin-top: 0;
  color: var(--muted);
}

.choice-card .button {
  width: 100%;
  margin-top: auto;
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.choice-card .button:hover { background: var(--green-dark); }

.choice-card .button.secondary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.article-choice-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.cta-btn,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.button.secondary {
  color: var(--ink);
  background: #f0eadf;
  border: 1px solid var(--line);
}

.supervisor-box p:last-child,
.related-box p:last-child,
.side-card p:last-child,
.article-card p:last-child {
  margin-bottom: 0;
}

.supervisor-title {
  margin-bottom: 8px;
  font-weight: 900;
}

.faq-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.faq-item:first-of-type { border-top: 0; }

.faq-item h3 {
  margin-top: 0;
  font-family: inherit;
  font-size: 1.12rem;
}

.article-sidebar {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 16px;
}

.side-card {
  padding: 18px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 10px;
  padding: 0;
  font-family: inherit;
  font-size: 1rem;
}

.side-card ul {
  margin: 0;
  padding-left: 1.15em;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 70px;
}

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

.article-card:hover {
  border-color: var(--green);
}

.article-card .label {
  color: var(--accent);
  font-size: .85rem;
  font-weight: 900;
}

.article-card h2 {
  margin: 8px 0 10px;
  padding: 0;
  font-size: 1.35rem;
}

.footer {
  margin-top: 72px;
  padding: 28px 5vw;
  color: var(--muted);
  background: #efe8dc;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: min(1120px, 92vw);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-layout,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .cta-dual {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 560px;
  }
}

@media (max-width: 560px) {
  .site-header nav {
    gap: 12px;
  }

  h1 {
    font-size: 2.05rem;
  }

  .long-title {
    font-size: 1.82rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .cta-btn,
  .button {
    width: 100%;
  }
}
