.page-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.page-main {
  padding: 132px 0 104px;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.page-intro {
  position: sticky;
  top: 104px;
  min-width: 0;
}

.page-intro h1 {
  max-width: 720px;
  margin: 8px 0 0;
  font-family: Sora, "DM Sans", sans-serif;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.02;
}

.page-lede {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.75;
}

.page-meta {
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.page-content {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.content-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.content-section:first-child {
  padding-top: 26px;
}

.content-section h2 {
  margin: 0 0 14px;
  font-family: Sora, "DM Sans", sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.25;
}

.content-section h3 {
  margin: 24px 0 10px;
  font-family: Sora, "DM Sans", sans-serif;
  font-size: 17px;
}

.content-section p {
  margin: 0 0 14px;
  color: var(--text-muted);
}

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

.content-section a,
.page-meta a {
  color: var(--coral);
  font-weight: 700;
  text-underline-offset: 3px;
}

.stack {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.stack li + li {
  margin-top: 9px;
}

.feature-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-muted);
}

.feature-list li:last-child {
  border-bottom: 0;
}

.feature-list span {
  color: var(--coral);
  font-family: Sora, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.contact-link {
  display: inline-flex;
  margin-top: 4px;
  color: var(--text);
  font-family: Sora, sans-serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  text-decoration-color: var(--coral);
  text-underline-offset: 7px;
}

.legal-main .page-layout {
  grid-template-columns: minmax(250px, 0.3fr) minmax(0, 1fr);
}

.legal-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.legal-section:first-child {
  padding-top: 26px;
}

.legal-section h2 {
  margin: 0 0 14px;
  font-family: Sora, "DM Sans", sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.25;
}

.legal-section p {
  margin: 0 0 14px;
  color: var(--text-muted);
}

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

.legal-section a {
  color: var(--coral);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.legal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.legal-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-table th:last-child,
.legal-table td:last-child {
  border-right: 0;
}

.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-table th {
  background: var(--surface);
  color: var(--text);
  font-family: Sora, sans-serif;
  font-size: 12px;
}

.legal-table td {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-layout {
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
}

.auth-panel {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.auth-code-wrap {
  margin: 26px 0;
}

.auth-code-label {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.auth-code {
  display: block;
  width: 100%;
  min-height: 58px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.5;
  padding: 16px;
  text-align: center;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--coral);
  border-radius: 7px;
  background: var(--coral);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 0 18px;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  border-color: var(--coral-hover);
  background: var(--coral-hover);
  outline: none;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.small-note {
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.not-found {
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: center;
  padding: 112px 0 70px;
}

.not-found-copy {
  max-width: 760px;
}

.not-found-code {
  margin: 0 0 18px;
  color: var(--coral);
  font-family: Sora, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.not-found h1 {
  margin: 0;
  font-family: Sora, sans-serif;
  font-size: clamp(54px, 9vw, 112px);
  line-height: 0.96;
}

.not-found .page-lede {
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .page-layout,
  .legal-main .page-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .page-intro {
    position: static;
  }

  .page-intro h1 {
    max-width: 820px;
  }
}

@media (max-width: 720px) {
  .page-main {
    padding: 104px 0 72px;
  }

  .page-layout {
    gap: 32px;
  }

  .page-intro h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .page-lede {
    font-size: 16px;
  }

  .content-section,
  .legal-section {
    padding: 24px 0;
  }

  .auth-layout {
    width: min(100% - 32px, 620px);
  }

  .auth-actions {
    align-items: stretch;
  }

  .auth-actions .button {
    width: 100%;
  }
}
