:root {
  --ink: #17211f;
  --muted: #5e6864;
  --paper: #fbfaf5;
  --line: #d9ddd4;
  --green: #1f6f55;
  --green-dark: #134536;
  --blue: #235d80;
  --gold: #d39b32;
  --surface: #ffffff;
  --shadow: 0 18px 45px rgba(23, 33, 31, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--green), var(--gold), var(--blue), var(--green));
  box-shadow: inset 0 0 0 6px #fff;
}

nav {
  display: flex;
  gap: 18px;
  font-size: 0.94rem;
  color: var(--muted);
}

nav a {
  text-decoration: none;
}

.intro {
  position: relative;
  min-height: min(620px, calc(100vh - 64px));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.intro img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 22, 19, 0.74), rgba(9, 22, 19, 0.48) 44%, rgba(9, 22, 19, 0.1)),
    linear-gradient(0deg, rgba(251, 250, 245, 0.78), rgba(251, 250, 245, 0) 32%);
}

.intro-content {
  position: relative;
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0 118px;
  color: #fff;
}

.kicker {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro .kicker {
  color: #e4c06b;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.55rem, 6vw, 5.2rem);
}

h2 {
  font-size: 1.55rem;
}

.lede {
  max-width: 620px;
  margin: 22px 0 28px;
  font-size: 1.13rem;
  color: rgba(255, 255, 255, 0.92);
}

.intro-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}

.intro-action,
.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.intro-action:hover,
.button.primary:hover {
  background: var(--green-dark);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  max-width: 1180px;
  margin: -64px auto 0;
  padding: 0 24px 36px;
  position: relative;
}

.composer,
.actions,
.letter-paper {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.composer,
.actions {
  border-radius: 8px;
  padding: 24px;
}

.actions {
  align-self: start;
  position: sticky;
  top: 84px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.signer-form {
  display: grid;
  gap: 16px;
}

.composer-note {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
}

.signer-panel {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.signer-heading {
  margin-top: 0;
  margin-bottom: 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.signer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 8px;
  font-weight: 780;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 680;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c9d0c7;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  background: #fff;
}

input:focus {
  outline: 3px solid rgba(31, 111, 85, 0.18);
  border-color: var(--green);
}

.send-details {
  margin: 0 0 18px;
}

.send-details div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.send-details div:last-child {
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr 46px;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
}

.letter-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 64px;
}

.letter-paper {
  position: relative;
  border-radius: 8px;
  padding: clamp(20px, 4vw, 46px);
  padding-bottom: clamp(70px, 7vw, 86px);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #26302d;
  font: 1rem/1.6 ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

.letter-copy-button {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(23, 33, 31, 0.12);
  cursor: pointer;
}

.letter-copy-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.letter-copy-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 880px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 86px;
    padding: 12px 18px;
  }

  .intro {
    min-height: 570px;
  }

  .intro-content {
    width: min(100% - 36px, 720px);
    padding: 76px 0 104px;
  }

  .workspace {
    grid-template-columns: 1fr;
    margin-top: -46px;
    padding-inline: 18px;
  }

  .actions {
    position: static;
  }

  .letter-section {
    padding-inline: 18px;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 0.96rem;
  }

  nav {
    gap: 14px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .signer {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 100%;
  }

  .letter-copy-button {
    right: 16px;
    bottom: 16px;
  }
}

@media print {
  .site-header,
  .intro,
  .workspace,
  .section-heading {
    display: none;
  }

  body {
    background: #fff;
  }

  .letter-section {
    padding: 0;
  }

  .letter-paper {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
