:root {
  --bg: #eef2f5;
  --ink: #192431;
  --muted: #607080;
  --line: rgba(25, 36, 49, 0.12);
  --accent: #17324f;
  --accent-soft: #e5edf5;
  --paper: #ffffff;
  --surface: rgba(255, 255, 255, 0.78);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(20, 31, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f6f8fb 0%, #e8edf2 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 50, 79, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 50, 79, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.site-shell {
  position: relative;
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.site-shell-inner {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #17324f 0%, #274f7a 100%);
  color: #ffffff;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 700;
}

.site-nav a[data-active="true"],
.site-nav a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  background: rgba(255, 255, 255, 0.8);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(19rem, 0.92fr);
  gap: 1.5rem;
  align-items: center;
  min-height: calc(100svh - 5rem);
  padding: 1.6rem 0 3rem;
}

.hero-copy,
.hero-stage,
.generator-layout,
.section,
.faq-section,
.page-hero,
.article-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 380ms ease, transform 460ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.page-hero h1,
.article-card h2,
.template-card h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.7rem);
  max-width: 10ch;
}

.hero-text,
.section-heading p,
.page-hero p,
.article-card p,
.template-card p,
.faq-card p,
.callout-card p,
.section-heading-tight p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.ad-banner-section {
  margin: 0 0 1.5rem;
}

.ad-banner-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 0.9rem;
}

.ad-label {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.button-primary {
  background: linear-gradient(135deg, #17324f 0%, #274f7a 100%);
  color: #ffffff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--line);
  color: var(--ink);
}

.hero-stage,
.tool-panel,
.preview-panel,
.template-card,
.faq-card,
.callout-card,
.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-stage {
  padding: 1.5rem;
  min-height: 36rem;
  display: grid;
  align-content: space-between;
}

.doc-stack {
  position: relative;
  min-height: 15rem;
}

.doc-stack span {
  position: absolute;
  width: 72%;
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
  border: 1px solid rgba(23, 50, 79, 0.08);
  box-shadow: 0 18px 30px rgba(20, 31, 42, 0.08);
}

.doc-stack span:nth-child(1) {
  top: 2rem;
  left: 9%;
  transform: rotate(-8deg);
}

.doc-stack span:nth-child(2) {
  top: 1rem;
  left: 18%;
  transform: rotate(3deg);
}

.doc-stack span:nth-child(3) {
  top: 3.6rem;
  left: 24%;
  transform: rotate(10deg);
}

.hero-note {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: rgba(23, 50, 79, 0.06);
}

.hero-list,
.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.hero-list li,
.detail-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
}

.hero-list li::before,
.detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  background: var(--accent);
}

.generator-layout,
.article-shell,
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(20rem, 0.82fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.tool-panel,
.preview-panel,
.article-card,
.template-card,
.callout-card {
  padding: 1.5rem;
}

.section {
  padding: 3rem 0;
}

.section-heading {
  max-width: 50rem;
  margin-bottom: 1.5rem;
}

.section-heading-tight {
  margin-bottom: 1rem;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.tool-form {
  display: grid;
  gap: 1rem;
}

.field-grid,
.template-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field span {
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.82rem 0.95rem;
  background: var(--paper);
  color: var(--ink);
}

.field-checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem;
}

.field-checkbox input {
  width: auto;
  margin: 0;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.chip {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.chip.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.fax-preview {
  position: sticky;
  top: 6rem;
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(23, 50, 79, 0.1);
  box-shadow: 0 16px 24px rgba(20, 31, 42, 0.06);
}

.fax-preview-standard {
  --sheet-accent: #17324f;
}

.fax-preview-confidential {
  --sheet-accent: #8d2e2e;
}

.fax-preview-medical {
  --sheet-accent: #266a70;
}

.fax-preview-legal {
  --sheet-accent: #4f365d;
}

.fax-preview-vendor {
  --sheet-accent: #6d4c1b;
}

.fax-preview-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--sheet-accent);
}

.fax-kicker {
  margin: 0 0 0.35rem;
  color: var(--sheet-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fax-preview-top h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
}

.fax-badge {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sheet-accent) 13%, white);
  color: var(--sheet-accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.fax-grid {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.fax-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(23, 50, 79, 0.08);
}

.fax-row strong {
  color: var(--sheet-accent);
}

.fax-message-block {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #f6f8fb;
}

.fax-message-block strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--sheet-accent);
}

.fax-message-block p,
.fax-disclaimer {
  margin: 0;
  line-height: 1.65;
  color: #44505c;
}

.fax-disclaimer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(23, 50, 79, 0.16);
  font-size: 0.92rem;
}

.template-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-grid-page {
  margin-top: 1.5rem;
}

.template-card h3,
.template-card h2,
.faq-card h3,
.article-card h3 {
  margin: 0 0 0.7rem;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.06;
}

.template-card-rich {
  min-height: 14rem;
}

.split-callouts {
  display: grid;
  gap: 1rem;
}

.callout-card strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--accent);
}

.faq-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-shell {
  align-items: start;
}

.article-sidebar {
  display: grid;
  gap: 1rem;
}

.article-card section + section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.stack-link-list {
  display: grid;
  gap: 0.8rem;
}

.stack-link {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.92rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.stack-link strong {
  display: block;
}

.stack-link span span {
  color: var(--muted);
}

.stack-link em {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.small-muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.page-main {
  padding: 2.5rem 0 3rem;
}

.page-hero {
  max-width: 54rem;
  margin-bottom: 2rem;
}

.inline-link {
  color: var(--accent);
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media print {
  body {
    background: #ffffff;
  }

  .site-header,
  .hero,
  .tool-panel,
  .section,
  .site-footer,
  .page-hero,
  .article-card,
  .article-sidebar {
    display: none !important;
  }

  .site-shell,
  .site-shell-inner,
  .preview-panel {
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
  }

  .fax-preview {
    position: static;
    top: auto;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}

@media (max-width: 1100px) {
  .hero,
  .generator-layout,
  .article-shell,
  .split-section,
  .template-grid,
  .faq-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 1rem, 100%);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 15rem;
    padding: 0.82rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .button {
    width: 100%;
  }

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

  .fax-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
