:root {
  --paper: #fffdf7;
  --paper-deep: #f7f0df;
  --ink: #09204a;
  --muted: #526070;
  --line: #d9dfd1;
  --green: #2f7d3c;
  --green-deep: #1f6330;
  --amber: #f39a18;
  --red: #d92d20;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(9, 32, 74, .11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.7)),
    repeating-linear-gradient(135deg, #fffdf7 0, #fffdf7 8px, #fbf5e7 8px, #fbf5e7 12px);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 10px;
}

.brand {
  color: var(--ink);
  font-weight: 900;
  font-size: 1.05rem;
  text-decoration: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  text-decoration: none;
  font-weight: 800;
}

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.hero-copy {
  padding: 8px 0 0;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--green-deep);
  background: #e7f4e8;
  font-weight: 900;
  margin: 0 0 8px;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 6.4vw, 5.35rem);
  line-height: 1.02;
  font-weight: 950;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: normal;
}

.lead {
  display: inline;
  margin: 8px 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.38;
  font-weight: 950;
  background: linear-gradient(transparent 62%, rgba(243,154,24,.45) 62%);
}

.summary {
  max-width: 850px;
  margin: 18px 0 0;
  font-size: 1.08rem;
  color: #26384d;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-action,
.secondary-action,
.copy-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.primary-action,
.copy-button {
  color: #fff;
  background: var(--ink);
}

.secondary-action {
  background: #fff;
}

.quick-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.quick-panel h2 {
  margin: 0;
  padding: 15px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 1.08rem;
}

.quick-panel a,
.side-card a {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quick-panel a {
  margin: 14px;
  padding: 14px 16px;
}

.quick-panel a span {
  display: block;
  font-size: 1.05rem;
  font-weight: 950;
}

.quick-panel a small {
  color: var(--muted);
  font-weight: 700;
}

.quick-panel .warn-link {
  border-color: rgba(217,45,32,.35);
  color: var(--red);
  background: #fff7f5;
}

.use-cases {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 30px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.use-cases a {
  min-height: 104px;
  padding: 16px 14px;
  border: 1px solid #bfc9bd;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(9,32,74,.06);
}

.use-cases strong,
.use-cases span {
  display: block;
}

.use-cases strong {
  font-size: 1.08rem;
  font-weight: 950;
  color: var(--green-deep);
}

.use-cases span {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.content-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.content-main,
.side-column {
  min-width: 0;
}

.section,
.answer-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 26px rgba(9,32,74,.06);
}

.section,
.answer-card {
  padding: 28px;
  margin-bottom: 18px;
}

.answer-card {
  border-color: rgba(47,125,60,.35);
  background: linear-gradient(120deg, rgba(232,246,232,.92), rgba(255,255,255,.96));
}

.answer-card h2,
.section h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.28;
}

.answer-card p,
.section p {
  margin: 14px 0 0;
  font-size: 1.04rem;
}

.answer-flow {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.answer-flow div {
  min-height: 128px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #cae1c8;
}

.answer-flow b {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}

.answer-flow strong,
.answer-flow span {
  display: block;
}

.answer-flow strong {
  font-size: 1.08rem;
  font-weight: 950;
}

.answer-flow span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
  border-bottom: 4px solid var(--ink);
  padding-bottom: 12px;
}

.section-head p {
  margin: 0;
  color: var(--green-deep);
  font-weight: 950;
}

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

.template-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #cfd7cd;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.template-card h3 {
  margin: 0;
  padding: 14px 16px;
  color: #fff;
  background: var(--ink);
  font-size: 1.12rem;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  margin: 0;
  padding: 18px;
  color: #17243a;
  background: #fffefa;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.76;
}

.copy-button {
  margin: auto 16px 16px;
  width: calc(100% - 32px);
  border: 0;
}

.copy-button.copied {
  background: var(--green);
}

.caution {
  border-color: rgba(217,45,32,.32);
}

.caution .section-head {
  border-color: var(--red);
}

.caution .section-head p {
  color: var(--red);
}

.check-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 8px;
}

.check-table th,
.check-table td {
  border: 1px solid #e0e5dc;
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.check-table th {
  color: #fff;
  background: var(--ink);
}

.line-box {
  border: 2px solid rgba(47,125,60,.35);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.line-box pre {
  background: #f7fff6;
}

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

.print-check-list label {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d6ddcf;
  border-radius: 8px;
  background: #fff;
  font-weight: 850;
}

.print-check-list input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

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

.replace-grid div {
  min-height: 150px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #d8dfd3;
  background: #fff;
}

.replace-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: .88rem;
  font-weight: 950;
}

.replace-grid div:nth-child(odd) span {
  background: var(--red);
}

.replace-grid strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.5;
}

.source-links {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-links a {
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #d6ddcf;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.45;
}

.side-column {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  font-size: 1.24rem;
  margin-bottom: 10px;
}

.side-card ul {
  padding-left: 1.1em;
  margin: 8px 0 0;
}

.side-card li {
  margin: 5px 0;
  font-weight: 800;
}

.side-card a {
  margin-top: 10px;
  padding: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.ad-slot {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #ccd4c9;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
}

.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 980px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .quick-panel,
  .side-column {
    position: static;
  }

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

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 14px 8px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-nav a {
    justify-content: center;
  }

  .hero,
  .content-grid,
  .use-cases {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.25rem);
  }

  .lead {
    font-size: 1.35rem;
  }

  .summary {
    font-size: 1rem;
  }

  .use-cases,
  .template-grid,
  .answer-flow,
  .print-check-list,
  .replace-grid,
  .source-links {
    grid-template-columns: 1fr;
  }

  .use-cases a {
    min-height: 82px;
  }

  .section,
  .answer-card {
    padding: 20px 16px;
  }

  .section-head {
    display: block;
  }

  pre {
    font-size: .96rem;
  }

  .check-table {
    display: block;
    overflow-x: auto;
  }
}
