:root {
  color-scheme: light;
  --ink: #15322a;
  --muted: #5c6d67;
  --paper: #fbfcf9;
  --surface: #ffffff;
  --line: #d9e1dc;
  --green: #176248;
  --green-dark: #0d4432;
  --green-soft: #e8f3ed;
  --amber: #8a4f00;
  --amber-soft: #fff5df;
  --red: #8b2525;
  --red-soft: #fff0ee;
  --shadow: 0 18px 50px rgba(16, 55, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.legal-archive-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  padding: 10px 20px;
  color: #fff;
  background: #7b3318;
  font-size: 0.82rem;
  text-align: center;
}

.legal-archive-banner strong {
  letter-spacing: 0.06em;
}

.legal-archive-banner span {
  color: #ffdfcc;
}

a {
  color: var(--green);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green-dark);
}

.contact-form { display: grid; gap: 18px; margin-top: 22px; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.contact-form label { display: grid; gap: 7px; font-weight: 700; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; min-height: 48px; border: 1px solid #9aaba3; border-radius: 8px; padding: 10px 12px; color: var(--ink); background: #fff; font: inherit; }
.contact-form textarea { min-height: 180px; resize: vertical; }
.contact-form fieldset { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.contact-form legend { padding: 0 7px; font-weight: 700; }
.contact-form .contact-consent { display: flex; grid-template-columns: auto 1fr; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; }
.contact-consent input { width: 22px; min-height: 22px; flex: 0 0 auto; margin-top: 2px; }
.contact-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-status { min-height: 1.8em; padding: 12px 14px; border-radius: 8px; color: var(--muted); background: var(--green-soft); }
.form-status:empty { display: none; }
.form-status.error { color: var(--red); background: var(--red-soft); }
.form-status.success { color: var(--green-dark); border: 1px solid #9ac3af; }

@media (max-width: 680px) {
  .contact-form-grid { grid-template-columns: 1fr; }
}

/* Matches the site-wide focus ring; #f0a62d measured 1.90-2.06:1 (WCAG 1.4.11
   requires 3:1 for a focus indicator). */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #a85a20;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 249, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner,
.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

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

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 0.9rem;
}

.legal-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.page-shell {
  padding-block: 58px 88px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 40px;
  align-items: end;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2,
h3 {
  line-height: 1.35;
  text-wrap: balance;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.55rem);
  letter-spacing: -0.04em;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

h3 {
  margin: 24px 0 8px;
  font-size: 1.08rem;
}

p,
ul,
ol,
dl {
  margin-top: 0;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.document-meta {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.document-meta div {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 10px;
}

.document-meta div + div {
  margin-top: 6px;
}

.document-meta dt {
  color: var(--muted);
}

.document-meta dd {
  margin: 0;
  font-weight: 700;
}

.notice {
  margin: 0 0 32px;
  padding: 20px 22px;
  border-left: 5px solid var(--amber);
  border-radius: 10px;
  background: var(--amber-soft);
}

.notice.danger {
  border-color: var(--red);
  background: var(--red-soft);
}

.notice strong {
  display: block;
  margin-bottom: 4px;
}

.contents {
  margin: 0 0 36px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--green-soft);
}

.contents ol {
  columns: 2;
  column-gap: 36px;
  margin-bottom: 0;
  padding-left: 1.4em;
}

.contents li {
  break-inside: avoid;
  margin-bottom: 5px;
}

.legal-section {
  margin-top: 18px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(16, 55, 42, 0.04);
}

.legal-section > :last-child {
  margin-bottom: 0;
}

.legal-section li + li {
  margin-top: 7px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.4em;
}

.source-note {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  margin-block: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: white;
  font-size: 0.92rem;
}

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

th {
  background: var(--green-soft);
}

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

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

.info-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.info-card h3 {
  margin-top: 0;
}

.template {
  padding: 16px;
  border-radius: 10px;
  background: #f1f4f2;
  color: #233a32;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87rem;
  white-space: pre-wrap;
}

.contact-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--green-dark);
  color: #eff8f3;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding-block: 34px;
}

.site-footer a {
  color: white;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.small {
  color: var(--muted);
  font-size: 0.88rem;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: #eef2ef;
  font-size: 0.9em;
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block: 14px;
  }

  .site-header {
    position: static;
  }

  .legal-nav {
    justify-content: flex-start;
  }

  .page-shell {
    width: min(100% - 28px, 1120px);
    padding-block: 36px 64px;
  }

  .page-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contents ol {
    columns: 1;
  }

  .legal-section {
    padding: 23px 19px;
  }

  .card-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
