*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --surface: #f4f7fb;
  --border: rgba(0, 74, 173, 0.12);
  --text: #004aad;
  --muted: #5a7291;
  --accent: #004aad;
  --accent-dim: rgba(0, 74, 173, 0.08);
  --accent-glow: rgba(0, 74, 173, 0.15);
}

html,
body {
  height: 100%;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.page {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1.25rem 2rem;
  background: var(--bg);
  overflow: hidden;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0.5rem;
}

.logo-text {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(260px, 28rem) minmax(0, 54rem);
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.hero-content {
  max-width: none;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.signup {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.signup input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.signup input::placeholder {
  color: #8fa3bc;
}

.signup input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.signup button {
  padding: 0.85rem 1.25rem;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 0.6rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, filter 0.2s;
}

.signup button:hover {
  filter: brightness(1.08);
}

.signup button:active {
  transform: scale(0.98);
}

.signup button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Report table */
.preview {
  min-width: 0;
  width: 100%;
}

.preview-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 54rem;
  min-width: 0;
}

.preview-disclaimer {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
  font-style: italic;
}

.report-table-wrap {
  width: 100%;
  background: #ffffff;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.65rem, 0.85vw, 0.78rem);
  line-height: 1.35;
  color: #1a1a1a;
  table-layout: auto;
}

.report-table th,
.report-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #e8ecf0;
  vertical-align: top;
}

.report-table th {
  font-weight: 700;
  color: #1a1a1a;
  border-bottom-color: #d8dee6;
}

.report-table tbody tr:last-child td {
  border-bottom: none;
}

.report-table td.empty {
  color: #9aa5b4;
}

.report-table .maps-ver {
  color: var(--accent);
  font-weight: 500;
}

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 0.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-sep {
  opacity: 0.4;
}

/* Legal pages */
html:has(body.legal-body),
body.legal-body {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.legal-page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.25rem 2rem 3rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  width: fit-content;
}

.legal-content {
  margin-top: 2.5rem;
}

.legal-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--accent);
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 1.75rem 0 0.75rem;
}

.legal-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2b3c;
  margin: 1.25rem 0 0.5rem;
}

.legal-content ul {
  margin: 0 0 0.85rem 1.25rem;
  padding: 0;
}

.legal-content li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1a2b3c;
  margin-bottom: 0.35rem;
}

.legal-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1a2b3c;
  margin-bottom: 0.85rem;
}

.legal-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-updated {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.legal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.legal-placeholder {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.legal-back {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.legal-back:hover {
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive — still single screen, no scroll */
@media (max-width: 768px) {
  .page {
    padding: 1rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-content: center;
  }

  .preview {
    display: none;
  }

  h1 {
    font-size: 1.6rem;
  }

  .lead {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .signup {
    flex-direction: column;
  }

  .signup button {
    width: 100%;
  }

  .footer {
    justify-content: center;
  }
}
