:root {
  --ink: #1d1d1b;
  --muted: #617383;
  --line: #e6e9ed;
  --bg: #f7f8fa;
  --card: #ffffff;
  --brand: #e51652;
  --brand-dark: #8d1236;
  --brand-tint: #fde7ee;
  --ok: #1f8a5b;
  --ok-tint: #e7f6ee;
  --warn: #8a5c11;
  --warn-tint: #fcf2e1;
  --r: 14px;
  --tmh-navy: #2d455a;
  --tmh-heading: #2d455a;
  --tmh-secondary: #3f4c58;
  --tmh-control-border: #dce1e7;
  --tmh-row: #f2f4f7;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #ffffff;
  color: var(--tmh-navy);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  transform: translateY(0);
}

.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  display: block;
  margin: 0;
  border-bottom: 3px solid var(--brand);
  background: var(--tmh-navy);
  color: #ffffff;
}

.site-header__inner,
.site-footer__inner {
  width: min(100% - 40px, 960px);
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header img {
  display: block;
  width: 190px;
  height: auto;
}

.site-header__contact {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 700;
}

.site-header__contact a,
.site-footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 900px;
  flex: 1;
  padding: 40px 20px 72px;
}

.form-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.form-heading h1 {
  margin: 0;
  color: var(--tmh-heading);
  font-size: clamp(25px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.15;
}

.form-heading .sub {
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.steps {
  gap: 8px;
  margin-bottom: 28px;
}

.steps div {
  height: 4px;
  background: #dce1e7;
}

.steps div.now {
  opacity: 1;
  background: #ffb3c7;
}

.card,
.ask,
.rows,
.group,
.user,
.facts,
.who {
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(45, 69, 90, 0.05);
}

.card {
  padding: clamp(20px, 4vw, 28px);
}

h2 {
  color: var(--tmh-heading);
  font-size: 20px;
  font-weight: 800;
}

h3 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.lead,
.choice .h,
.ask .h,
.hint,
.row .m,
.group > .head .m,
.facts .k {
  color: var(--muted);
}

.signatory-choice input[type="radio"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.choice button,
.roles button,
.row,
.facts div.f,
.searchbar select,
.searchbar input,
.grid input,
.secondary,
button.ghost {
  border-color: var(--tmh-control-border);
}

.choice button:hover,
.roles button:hover,
button.ghost:hover,
.secondary:hover {
  border-color: #c8ced5;
  background: #fbfcfd;
}

.primary,
.searchbar button {
  min-height: 44px;
  border-radius: 9px;
  background: var(--brand);
  font-weight: 700;
  transition: background 150ms ease;
}

.primary:hover,
.searchbar button:hover {
  background: #c9134a;
}

.secondary,
button.ghost,
.choice button,
.roles button,
.searchbar select,
.searchbar input,
.grid input {
  min-height: 44px;
  border-radius: 9px;
}

.primary:disabled,
.searchbar button:disabled {
  background: #eef1f4;
  color: #96a2ac;
  opacity: 1;
}

a {
  color: var(--brand-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.site-header a:focus-visible,
.site-footer a:focus-visible {
  outline-color: #ffb3c7;
}

.secondary-action {
  margin: 10px 0 0 8px;
  color: var(--tmh-secondary);
}

.done-head {
  border-left-color: var(--ok);
}

.table-scroll {
  scrollbar-color: #c8ced5 transparent;
}

.site-footer {
  background: var(--tmh-navy);
  color: #c3d0da;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 36px;
  padding: 28px 0;
}

.site-footer img {
  display: block;
  width: 160px;
  height: auto;
  margin-bottom: 10px;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
}

.site-footer__details {
  display: grid;
  grid-template-columns: auto auto;
  gap: 28px;
}

@media (max-width: 640px) {
  .site-header__inner,
  .site-footer__inner {
    width: min(100% - 32px, 960px);
  }

  .site-header__inner {
    min-height: 68px;
    gap: 14px;
  }

  .site-header img {
    width: 146px;
  }

  .site-header__contact {
    align-items: flex-end;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
  }

  .wrap {
    padding: 30px 16px 56px;
  }

  .form-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .form-heading .sub {
    white-space: normal;
  }

  .nav {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .nav .right {
    align-items: stretch;
    flex-direction: column;
  }

  .nav button {
    width: 100%;
  }

  .saved {
    min-height: 20px;
    text-align: right;
  }

  .secondary-action {
    display: block;
    width: 100%;
    margin: 10px 0 0;
  }

  .done-head .primary {
    width: 100%;
  }

  .site-footer__inner,
  .site-footer__details {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    gap: 24px;
  }

  .site-footer__details {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .skip-link,
  .site-header,
  .site-footer {
    display: none;
  }

  .wrap {
    width: 100%;
  }
}
