:root {
  --ink: #07214a;
  --muted: #566476;
  --line: #dbe3ea;
  --green: #087a4e;
  --blue: #174f91;
  --amber: #c87308;
  --red: #cc2323;
  --soft: #f5f8fb;
  --paper: #fffdf8;
  --white: #fff;
  --shadow: 0 18px 42px rgba(7,33,74,.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #f5f8fb 50%, #fffdf8);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  letter-spacing: 0;
}
a { color: inherit; }

.site-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: #061d40;
  color: #fff;
}

.brand {
  font-weight: 950;
  text-decoration: none;
}

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

.top-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
}

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

.hero-main,
.side-start { min-width: 0; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-weight: 950;
  font-size: 1.22rem;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 5.9vw, 5.55rem);
  line-height: 1.06;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.lead {
  margin: 16px 0 0;
  font-size: clamp(1.28rem, 2.5vw, 1.9rem);
  font-weight: 950;
  line-height: 1.45;
}

.summary {
  max-width: 900px;
  margin: 18px 0 0;
  color: #243650;
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-actions a {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(8,122,78,.45);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 950;
  box-shadow: 0 10px 25px rgba(7,33,74,.06);
}

.hero-actions a:nth-child(2) {
  border-color: rgba(23,79,145,.38);
  color: var(--blue);
}

.hero-actions a:nth-child(3) {
  border-color: rgba(200,115,8,.42);
  color: var(--amber);
}

.side-start {
  border: 2px solid rgba(23,79,145,.48);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 20px;
}

.side-start h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.side-start label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.side-start input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.category-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px 28px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.category-bar a {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid #cad7e4;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 950;
}

.content-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  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,.97);
  box-shadow: 0 10px 25px rgba(7,33,74,.06);
}

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

.answer-card {
  border-color: rgba(8,122,78,.36);
  background: linear-gradient(135deg, #eefaf4, #fff);
}

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

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

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

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

.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 #d9e3ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

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

.template-card p {
  margin: 0;
  padding: 14px 16px 0;
  color: var(--muted);
  font-weight: 800;
}

pre {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--paper);
  color: #162a45;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: .99rem;
  line-height: 1.75;
}

button[data-copy] {
  min-height: 46px;
  margin: auto 16px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

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

.line-card {
  border: 2px solid rgba(8,122,78,.35);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.line-card pre {
  background: #f4fff8;
}

.line-card button {
  width: calc(100% - 32px);
}

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

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

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

.privacy {
  border-color: rgba(204,35,35,.36);
  background: linear-gradient(135deg, #fff7f4, #fff);
}

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

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

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

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

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

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

.source-links a {
  min-height: 66px;
  display: flex;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #dbe3ea;
  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.22rem;
  margin-bottom: 10px;
}

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

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

.warning {
  border-color: rgba(204,35,35,.35);
}

.warning h2,
.warning li {
  color: var(--red);
}

.side-card a {
  display: block;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.45;
}

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

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

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

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

  .side-column {
    position: static;
  }

  .category-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

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

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

  .hero,
  .category-bar,
  .content-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .hero-actions,
  .category-bar,
  .template-grid,
  .check-grid,
  .source-links {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

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