:root {
  --bp-ink: #15261e;
  --bp-green: #234836;
  --bp-leaf: #3a6b4f;
  --bp-mist: #e8efe9;
  --bp-paper: #f6f8f6;
  --bp-white: #ffffff;
  --bp-line: #c5d2c9;
  --bp-muted: #5a6b61;
  --bp-danger: #8b2e2e;
  --bp-ok: #1f6b45;
  --bp-radius: 6px;
  --bp-shadow: 0 12px 40px rgba(21, 38, 30, 0.08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bp-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #dce8df 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #d2e0d6 0%, transparent 50%),
    var(--bp-paper);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--bp-leaf);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: none;
  background: #ffffff;
  border-bottom: 1px solid var(--bp-line);
}

.site-header__inner,
.site-footer__inner,
.wrap {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand__logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand__place {
  font-size: 0.8rem;
  color: var(--bp-muted);
}

.nav {
  display: flex;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  color: var(--bp-ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a[aria-current="page"] {
  color: var(--bp-green);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.hero {
  padding: 3.5rem 0 2.5rem;
  animation: rise 0.7s ease both;
}

.hero__kicker {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bp-leaf);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 38rem;
  color: var(--bp-muted);
  font-size: 1.15rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--bp-radius);
  padding: 0.75rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--bp-green);
  color: var(--bp-white);
}

.btn-primary:hover {
  background: var(--bp-ink);
  color: var(--bp-white);
}

.btn-ghost {
  background: transparent;
  border-color: var(--bp-line);
  color: var(--bp-ink);
}

.btn-ghost:hover {
  border-color: var(--bp-green);
  color: var(--bp-green);
}

.panel {
  background: var(--bp-white);
  border: 1px solid var(--bp-line);
  border-radius: calc(var(--bp-radius) + 4px);
  box-shadow: var(--bp-shadow);
  padding: 1.35rem 1.4rem;
  margin: 0 0 1.5rem;
  animation: rise 0.8s ease 0.08s both;
}

.panel#contact {
  scroll-margin-top: 5rem;
}

@media print {
  .site-header,
  .site-footer,
  .sign-card .hint,
  .declaration-execution .hint,
  .sig-mode,
  .form-actions,
  .btn,
  .nav,
  #form_status,
  .checkboxes,
  #declaration-form {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  body {
    background: #fff;
  }

  .declaration,
  .receipt-card {
    box-shadow: none;
    border: none;
  }
}

.print-only {
  display: none;
}

.receipt-card {
  background: var(--bp-white);
  border: 1px solid var(--bp-line);
  border-radius: calc(var(--bp-radius) + 4px);
  box-shadow: var(--bp-shadow);
  padding: 1.5rem 1.35rem 1.75rem;
  margin-bottom: 2.5rem;
}

.receipt-card[hidden] {
  display: none !important;
}

.receipt-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.panel p {
  margin: 0 0 0.75rem;
  color: var(--bp-muted);
}

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

.page-title {
  padding: 2.25rem 0 1rem;
  animation: rise 0.6s ease both;
}

.page-title h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-title p {
  margin: 0;
  color: var(--bp-muted);
  max-width: 42rem;
}

.declaration {
  background: var(--bp-white);
  border: 1px solid var(--bp-line);
  border-radius: calc(var(--bp-radius) + 4px);
  box-shadow: var(--bp-shadow);
  padding: 1.5rem 1.35rem 1.75rem;
  margin-bottom: 2.5rem;
  animation: rise 0.7s ease 0.05s both;
}

.declaration h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.declaration ol {
  margin: 0;
  padding-left: 1.25rem;
}

.declaration li {
  margin-bottom: 0.85rem;
}

.declaration li ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.declaration-execution {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bp-line);
}

.declaration-execution > .hint {
  margin: 0 0 1.25rem;
  color: var(--bp-muted);
}

.tally-list {
  list-style: none;
  padding: 0.65rem 0.85rem;
  margin: 0.5rem 0 0;
  background: var(--bp-mist);
  border-radius: var(--bp-radius);
  border: 1px solid var(--bp-line);
}

.tally-list li {
  margin: 0.2rem 0;
  font-variant-numeric: tabular-nums;
}

.exhibit {
  margin-top: 1.25rem;
}

.exhibit img {
  border-radius: var(--bp-radius);
  border: 1px solid var(--bp-line);
}

.exhibit figcaption {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--bp-muted);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.field .req {
  color: var(--bp-danger);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="datetime-local"],
.field textarea {
  width: 100%;
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius);
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: var(--bp-white);
  color: var(--bp-ink);
}

.field input:focus,
.field textarea:focus,
.sig-canvas:focus {
  outline: 2px solid rgba(58, 107, 79, 0.35);
  outline-offset: 1px;
  border-color: var(--bp-leaf);
}

.field .help {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--bp-muted);
}

.checkboxes {
  display: grid;
  gap: 0.55rem;
  margin: 0.25rem 0 0.5rem;
}

.check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius);
  background: var(--bp-mist);
}

.check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.check span {
  font-size: 0.95rem;
}

.sig-mode {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.sig-mode button {
  appearance: none;
  border: 1px solid var(--bp-line);
  background: var(--bp-white);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.sig-mode button[aria-pressed="true"] {
  background: var(--bp-green);
  border-color: var(--bp-green);
  color: var(--bp-white);
}

.sig-panel[hidden],
.typed-sig[hidden] {
  display: none !important;
}

.typed-sig {
  font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 1.8rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--bp-line);
  border-radius: var(--bp-radius);
  min-height: 3rem;
  margin-top: 0.65rem;
  background: #fcfdfc;
}

.sig-canvas-wrap {
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius);
  background: #fcfdfc;
  overflow: hidden;
  touch-action: none;
}

.sig-canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
}

.sig-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.meta-box {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bp-mist);
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius);
}

.meta-box strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bp-muted);
  margin-bottom: 0.15rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.status {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--bp-radius);
  display: none;
}

.status.is-visible {
  display: block;
}

.status.is-ok {
  background: #e5f4eb;
  color: var(--bp-ok);
  border: 1px solid #b9dbc7;
}

.status.is-err {
  background: #f8e8e8;
  color: var(--bp-danger);
  border: 1px solid #e2bcbc;
}

.site-footer {
  border-top: 1px solid var(--bp-line);
  padding: 1.5rem 0 2rem;
  color: var(--bp-muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 2.25rem;
  }

  .declaration,
  .receipt-card {
    padding-inline: 1rem;
  }
}
