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

:root {
  --background: #f5f6f7;
  --surface: #ffffff;
  --surface-soft: #eceff1;
  --text: #25282b;
  --text-soft: #5f666d;
  --border: #d7dce0;
  --dark: #111111;
  --dark-soft: #242424;
  --accent: #2f6f9f;
  --accent-dark: #24587f;
  --focus: #0b78d1;
  --shadow: 0 8px 28px rgba(17, 17, 17, 0.08);
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  background: var(--dark);
  color: #ffffff;
  padding: 22px 24px 18px;
}

.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  text-decoration: none;
}

.site-logo {
  width: auto;
  height: 60px;
  object-fit: contain;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  list-style: none;
  margin-top: 14px;
}

nav a {
  color: #ffffff;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 36px auto 64px;
}

.hero,
.content-section,
.sources-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 840px;
  margin: 0 auto;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.08;
}

.hero-copy {
  max-width: 840px;
  margin: 22px auto 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-actions,
.email-actions,
.source-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  justify-content: center;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-dark);
}

.button-secondary {
  background: #ffffff;
  border-color: #aeb5bb;
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--text);
  background: var(--surface-soft);
}

.button-text {
  background: transparent;
  border-color: transparent;
  color: var(--text-soft);
}

.button-text:hover,
.button-text:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
}

.content-section,
.sources-section {
  margin-top: 28px;
  padding: clamp(24px, 5vw, 48px);
}

.section-heading {
  max-width: 840px;
  margin-bottom: 24px;
}

.section-heading h2,
.sources-section h2 {
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.section-heading > p:last-child,
.sources-section > p {
  margin-top: 10px;
  color: var(--text-soft);
}

.risk-grid,
.lookup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.risk-card,
.lookup-card {
  padding: 22px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.risk-card h3,
.lookup-card h3,
.customize-panel h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.risk-card p,
.lookup-card p {
  color: var(--text-soft);
}

.template-section {
  scroll-margin-top: 20px;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 2fr);
  gap: 22px;
  align-items: start;
}

.customize-panel,
.email-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
}

.customize-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
  background: var(--surface-soft);
}

.email-panel {
  padding: 22px;
  background: #ffffff;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #aeb5bb;
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

input {
  padding: 10px 12px;
}

textarea {
  min-height: 700px;
  padding: 16px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
.button:focus-visible,
.text-link:focus-visible,
.source-links a:focus-visible {
  outline: 3px solid rgba(11, 120, 209, 0.28);
  outline-offset: 2px;
  border-color: var(--focus);
}

.subject-input {
  font-weight: 650;
}

.field-note {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.email-actions {
  margin-top: 18px;
}

.status-message {
  min-height: 1.6em;
  margin-top: 10px;
  font-weight: 650;
}

.text-link,
.source-links a {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent-dark);
  font-weight: 750;
  text-underline-offset: 3px;
}

.source-links {
  margin-top: 16px;
}

.source-links a {
  margin-top: 0;
}

footer {
  padding: 30px 24px;
  background: var(--dark);
  color: #b9b9b9;
  text-align: center;
}

.footer-logo {
  display: flex;
  justify-content: center;
  padding-bottom: 10px;
}

.footer-logo img {
  width: auto;
  height: 60px;
  opacity: 0.82;
}

.footer-note {
  max-width: 720px;
  margin: 8px auto 0;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .risk-grid,
  .lookup-grid {
    grid-template-columns: 1fr;
  }

  .template-layout {
    grid-template-columns: 1fr;
  }

  .customize-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand {
    flex-direction: column;
    gap: 6px;
  }

  nav ul {
    gap: 10px 16px;
    font-size: 0.95rem;
  }

  main {
    width: min(100% - 20px, 1160px);
    margin-top: 20px;
  }

  .hero,
  .content-section,
  .sources-section {
    border-radius: 9px;
  }

  .hero-actions,
  .email-actions {
    flex-direction: column;
  }

  .hero-actions .button,
  .email-actions .button {
    width: 100%;
  }

  textarea {
    min-height: 840px;
    font-size: 0.95rem;
  }
}
