:root {
  --paper: #e7eeea;
  --ink: #152028;
  --muted: #24343a;
  --rule: #c5d2cb;
  --ruling: #1b4a42;
  --field: #102824;
  --field-ink: #f3f7f5;
  --field-muted: #d0e0da;
  --serif: Georgia, "Liberation Serif", "Times New Roman", Times, serif;
  --sans: "Segoe UI", Cantarell, "Liberation Sans", "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--field);
  color: var(--field-ink);
}

:focus-visible {
  outline: 2px solid var(--ruling);
  outline-offset: 3px;
}

html {
  scrollbar-color: var(--ruling) var(--paper);
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--field);
  color: var(--field-ink);
  padding: 8px 12px;
  z-index: 2;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.rules {
  height: 7px;
  background:
    linear-gradient(var(--ruling), var(--ruling)) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1px no-repeat;
}

.top { padding: 22px 0 18px; }

.top .wrap,
.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
}

.nav { justify-content: flex-end; flex-wrap: wrap; }

.brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 0;
}

.nav a:hover { color: var(--ink); }

.hero { padding: 64px 0 24px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.72fr);
  gap: 40px 72px;
  align-items: end;
}

h1, h2, .address, .who {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0 0 18px;
  max-width: 11em;
  font-size: clamp(2.7rem, 5.6vw, 4.75rem);
  line-height: 1.02;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
}

.signature {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}

.who {
  margin: 0 0 10px;
  font-size: 1.28rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.place { margin: 0 0 16px; color: var(--muted); }

.mail-text {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

section { padding: 64px 0 8px; }

h2 {
  margin: 0 0 12px;
  max-width: 16em;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  line-height: 1.12;
  text-wrap: balance;
}

.intro {
  margin: 0 0 28px;
  max-width: 40rem;
  color: var(--muted);
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
}

.fee-table th {
  padding: 0 28px 10px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}

.fee-table td {
  padding: 22px 28px 22px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.fee-table th:last-child,
.fee-table td:last-child { padding-right: 0; }

.service {
  font-weight: 600;
  width: 26%;
}

.num {
  width: 7.5rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.steps li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 40rem);
  gap: 12px 32px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.steps li:last-child { border-bottom: 1px solid var(--rule); }

.step {
  margin: 0;
  font-weight: 600;
}

.steps p { margin: 0; color: var(--muted); max-width: 62ch; }

.template-list { margin: 8px 0 0; padding-left: 1.1rem; }

.template-list li { margin: 8px 0; }

.contact {
  margin-top: 72px;
  background: var(--field);
  color: var(--field-ink);
  padding: 76px 0 32px;
}

.contact.slim {
  margin-top: 48px;
  padding: 28px 0 32px;
}

.contact.slim .legal { margin-top: 0; }

.contact h2 { max-width: 10em; }

.contact .intro { color: var(--field-muted); max-width: 40rem; }

.address {
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .address {
    transition: background-size 320ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .address:hover,
  .address:focus-visible { background-size: 100% 3px; }
}

.legal {
  margin-top: 72px;
  padding-top: 18px;
  border-top: 1px solid rgba(243, 247, 245, 0.35);
  color: var(--field-muted);
  font-size: 0.98rem;
}

.legal p { margin: 0 0 8px; max-width: 68ch; }

.legal a { color: var(--field-ink); }

.prose { max-width: 68ch; padding-bottom: 24px; }

.prose p { margin: 0 0 1em; }

@media (max-width: 800px) {
  .hero { padding-top: 40px; }

  .hero-grid,
  .steps li { grid-template-columns: 1fr; }

  .steps li { gap: 4px; }

  h1 { font-size: 2.55rem; }
}

@media (max-width: 680px) {
  .wrap { width: min(1080px, calc(100% - 32px)); }

  .top .wrap { align-items: flex-start; flex-direction: column; }

  .fee-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .fee-table,
  .fee-table tbody,
  .fee-table tr,
  .fee-table td {
    display: block;
    width: auto;
  }

  .fee-table tr {
    padding: 18px 0 8px;
    border-bottom: 1px solid var(--rule);
  }

  .fee-table td {
    border: 0;
    padding: 0 0 8px;
  }

  .num {
    width: auto;
    text-align: left;
    font-size: 1.35rem;
    padding-top: 4px;
  }
}

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