.secondary-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.secondary-page main { flex: 1; }
.secondary-page .site-footer { border-top: 1px solid var(--border); margin-top: 0; }

.secondary-page h1 {
  margin: 0;
  font-size: var(--page-title-size);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.contact-layout, .legal-layout { padding-block: clamp(42px, 6vw, 86px); }
.page-lead {
  max-width: 52ch;
  margin: 18px 0 0;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.secondary-page main a {
  color: var(--primary-active);
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

.secondary-page main a:hover { text-decoration-thickness: .14em; }
.secondary-page .footer-links [aria-current="page"] {
  color: var(--primary-active);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .25em;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  align-items: start;
  column-gap: clamp(32px, 7.5vw, 116px);
  max-width: 1110px;
}

.contact-details {
  max-width: 400px;
  margin-top: 38px;
  padding: 22px clamp(18px, 3vw, 28px);
  border-radius: 18px;
  background: var(--privacy-background);
}

.contact-details h2 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.4; }
.contact-details a { font-weight: 700; overflow-wrap: anywhere; }
.contact-details hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

.contact-panel, .legal-panel {
  padding: clamp(22px, 3.8vw, 44px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fffefa;
}

.contact-panel h2, .legal-panel h2 {
  margin: 0 0 22px;
  font-size: clamp(1.38rem, 2.1vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.contact-field { display: grid; gap: 7px; margin-bottom: 17px; }
.contact-field label { font-weight: 700; }
.field-optional { color: #5e594b; font-size: .875rem; font-weight: 400; }
.contact-field :is(input, textarea) {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #918d7c;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

.contact-field textarea { min-height: 132px; resize: vertical; }
.contact-field :is(input, textarea):focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.contact-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.contact-note { margin: 12px 0; color: #5e594b; font-size: .875rem; line-height: 1.6; }
.contact-panel .button { margin-top: 10px; white-space: normal; }
.contact-panel .button:disabled { opacity: .7; cursor: default; transform: none; }
.contact-status { margin: 0; font-size: .95rem; line-height: 1.5; }
.contact-status:not(:empty) { margin-top: 14px; }
.contact-status[data-state="error"] { color: #8e382d; }
.contact-status[data-state="success"] { color: var(--primary-active); }

.legal-layout { max-width: 850px; }
.legal-layout .page-lead { max-width: 65ch; }
.legal-draft { margin: 16px 0 0; color: #5e594b; font-size: .9rem; }
.legal-panel { margin-top: 28px; }
.legal-panel section + section { margin-top: 25px; padding-top: 25px; border-top: 1px solid var(--border); }
.legal-panel h2 { margin-bottom: 10px; font-size: clamp(1.25rem, 2.1vw, 1.54rem); }
.legal-panel p, .legal-panel dl { margin: 0; line-height: 1.72; }
.legal-panel p + p { margin-top: 8px; }
.legal-panel dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 18px; }
.legal-panel dt { font-weight: 700; }
.legal-panel dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 780px) {
  .contact-layout { grid-template-columns: 1fr; row-gap: 24px; }
  .contact-details { margin-top: 22px; }
}

@media (max-width: 480px) {
  .contact-panel .button { width: 100%; }
  .legal-panel dl { grid-template-columns: 1fr; gap: 3px; }
  .legal-panel dd + dt { margin-top: 8px; }
}
