* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --blue: #1a73e8;
  --blue-dark: #174ea6;
  --ink: #223047;
  --muted: #667085;
  --line: #d8e2f0;
  --paper: #ffffff;
  --soft: #eef5ff;
  --yellow: #fbbc04;
}

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

a {
  color: var(--blue);
}

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

.legal-header,
.legal-main,
.legal-footer {
  width: min(100%, 920px);
  margin: 0 auto;
  padding-inline: 18px;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px max(18px, calc((100% - 920px) / 2 + 18px));
  border-bottom: 1px solid rgba(216, 226, 240, 0.8);
  background: rgba(245, 248, 253, 0.94);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--blue-dark);
  font-size: 1.08rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.header-links,
.legal-actions,
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.header-links a,
.legal-actions a,
.legal-nav a {
  font-weight: 900;
  text-underline-offset: 4px;
}

.header-links a {
  white-space: nowrap;
}

.header-links .app-trial-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
}

.header-links .app-trial-link:focus-visible,
.header-links .app-trial-link:hover {
  background: var(--blue-dark);
  outline: none;
}

.legal-main {
  padding-bottom: 34px;
}

.legal-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(24, 39, 75, 0.08);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.8rem, 7vw, 3rem);
  line-height: 1.2;
}

h2 {
  margin: 30px 0 10px;
  color: var(--blue-dark);
  font-size: 1.25rem;
  line-height: 1.35;
}

h3 {
  margin: 18px 0 8px;
  font-size: 1.02rem;
}

p,
ul,
ol {
  margin: 10px 0 0;
}

li + li {
  margin-top: 6px;
}

.template-note {
  margin-top: 20px;
  padding: 14px 16px;
  border: 2px solid rgba(251, 188, 4, 0.48);
  border-radius: 8px;
  background: #fff8df;
  font-weight: 850;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.info-list div {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.info-list dt {
  color: var(--muted);
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  font-weight: 850;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary-link {
  background: var(--blue);
  color: #ffffff;
}

.secondary-link {
  border: 1px solid rgba(26, 115, 232, 0.24);
  background: var(--soft);
  color: var(--blue);
}

.legal-nav {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.contact-copy {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.contact-copy p {
  margin: 0;
}

.contact-copy .contact-faq-lead {
  padding: 12px 14px;
  border: 1px solid rgba(26, 115, 232, 0.22);
  border-radius: 8px;
  background: var(--soft);
  color: var(--blue-dark);
  font-weight: 900;
}

.contact-copy .contact-faq-lead a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-copy code {
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.contact-field {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

.contact-field span {
  color: var(--blue-dark);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.contact-field input,
.contact-field select {
  min-height: 46px;
  padding: 9px 12px;
}

.contact-field textarea {
  min-height: 170px;
  padding: 12px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(26, 115, 232, 0.16);
}

.contact-required {
  color: #b42318;
  font-size: 0.82rem;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.contact-submit {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.contact-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.contact-status {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.contact-status[data-state="success"] {
  color: #147a3d;
}

.contact-status[data-state="error"] {
  color: #b42318;
}

.legal-footer {
  display: grid;
  gap: 10px;
  padding-block: 22px 30px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 640px) {
  .legal-header {
    align-items: center;
    flex-direction: row;
  }

  .legal-card {
    padding: 20px;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .legal-actions a {
    width: 100%;
  }
}
