* {
  box-sizing: border-box;
}

:root {
  --bg: #eef3fb;
  --surface: #ffffff;
  --soft: #f8fbff;
  --text: #203761;
  --muted: #667796;
  --line: #dbe6f6;
  --blue: #17459c;
  --blue-dark: #17459c;
  --blue-2: #5d91e6;
  --blue-soft: #e8f0fd;
  --green: #258344;
  --green-soft: #e8f6ee;
  --amber: #9a6700;
  --amber-soft: #fff5dc;
  --red: #b42318;
  --red-soft: #fef0f0;
  --purple: #5b5fc7;
  --purple-soft: #eef0ff;
  --shadow: 0 24px 70px rgba(35, 61, 112, 0.14);
  --shadow-soft: 0 12px 34px rgba(78, 110, 167, 0.09);
  --container: 1180px;
  --radius: 30px;
  --radius-sm: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, #dce9ff 0%, transparent 38%),
    linear-gradient(180deg, #eef3fb 0%, #f7faff 100%);
  color: var(--text);
}

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

code {
  font-family: Consolas, Monaco, monospace;
  font-size: 0.95em;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* HEADER */

.site-header,
header {
  padding: 22px 0 10px;
}

.header-shell,
.nav-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px 18px;
  box-shadow: 0 12px 34px rgba(78, 110, 167, 0.10);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 900;
  color: #3b6db4;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 28px;
  height: 34px;
  border: 2px solid #22345f;
  border-radius: 4px;
  background: #ffffff;
  position: relative;
  flex: 0 0 auto;
}

.brand-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 9px;
  height: 2px;
  background: #97a4bb;
  box-shadow: 0 6px 0 #97a4bb, 0 12px 0 #97a4bb;
}

.nav,
.main-nav,
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 800;
}

.nav a,
.main-nav a,
.nav-links a {
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav a:hover,
.main-nav a:hover,
.nav-links a:hover {
  background: var(--blue-soft);
  color: var(--blue);
  transform: translateY(-1px);
}

.nav-cta,
.nav-btn,
.nav-btn-light {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.nav-btn-ghost {
  background: #ffffff;
  border: 1px solid var(--line);
}


/* BUTTONS */

.btn,
.hero-cta-btn,
.bottom-cta-btn,
.nav-button,
.packet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, opacity 0.15s ease;
}

.btn:hover,
.hero-cta-btn:hover,
.bottom-cta-btn:hover,
.nav-button:hover,
.packet-btn:hover {
  transform: translateY(-1px);
}

.btn {
  min-height: 54px;
  padding: 15px 22px;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(23, 69, 156, 0.20);
  font-size: 16px;
}

.btn-primary,
.nav-button-primary,
.hero-cta-btn,
.bottom-cta-btn {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 69, 156, 0.20);
}

.btn-secondary,
.nav-button-secondary,
.btn.secondary {
  background: #ffffff;
  color: var(--blue);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero-cta-btn,
.bottom-cta-btn {
  min-height: 62px;
  padding: 18px 28px;
  border-radius: 18px;
  font-size: 18px;
}

.nav-button {
  min-height: 58px;
  padding: 16px 24px;
  border-radius: 18px;
  font-size: 17px;
}

.packet-btn {
  min-height: 76px;
  padding: 18px 26px;
  border-radius: 20px;
  font-size: clamp(20px, 2.2vw, 26px);
  text-align: center;
}

.packet-btn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.packet-btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(23, 69, 156, 0.20);
}

.packet-btn-secondary {
  background: #e8edf6;
  color: #22314d;
}

.packet-btn-muted {
  background: #eef2f7;
  color: #7f8ba0;
}

/* HERO */

.hero,
.page-hero,
.hero-section {
  padding: 56px 0 38px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 34px;
}

.hero-copy,
.hero-card {
  padding: 50px;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.90));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

h1,
.page-title,
.packet-title,
.application-header h1,
.page-header h1,
.page-hero h1,
.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  color: #1f3768;
  font-weight: 900;
}

.page-subtitle,
.packet-subtitle,
.application-header p,
.page-header p,
.page-hero p,
.hero-subtext,
.hero-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.trust-line,
.hero-note {
  margin-top: 22px;
  color: #60708d;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.hero-visual {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* DASHBOARD HERO VISUAL */

.dashboard-card {
  width: 100%;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  border: 1px solid #dbe6f6;
  border-radius: 32px;
  box-shadow: 0 34px 90px rgba(35,61,112,.17);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: -80px -80px auto auto;
  width: 220px;
  height: 220px;
  background: rgba(93,145,230,.18);
  border-radius: 50%;
}

.window-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c8d5ea;
}

.visual-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.eyebrow-mini {
  margin: 0 0 6px;
  color: #6d7fa3;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.visual-header h3 {
  margin: 0;
  color: #203761;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.status-chip {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #ccebd7;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef4ff;
  border: 1px solid #dce7f6;
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.progress-step {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 86px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.progress-step span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #cddbf2;
  color: #60708d;
  font-weight: 900;
}

.progress-step.active span {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.progress-step p {
  margin: 0;
  color: #40577e;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.progress-line {
  height: 2px;
  flex: 1;
  background: #c5d4ee;
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.data-panel {
  background: #fff;
  border: 1px solid #dce7f6;
  border-radius: 18px;
  padding: 15px;
}

.data-panel.wide {
  grid-column: 1 / -1;
}

.data-panel label {
  display: block;
  margin-bottom: 7px;
  color: #7a8ba8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.data-panel strong {
  color: #253858;
  font-size: 15px;
}

.document-preview {
  position: relative;
  background: linear-gradient(135deg, #dfeaff 0%, #f7fbff 100%);
  border: 1px solid #dce7f6;
  border-radius: 26px;
  padding: 28px;
  min-height: 244px;
  overflow: hidden;
}

.doc-page {
  width: 220px;
  min-height: 258px;
  background: #fff;
  border: 1px solid #d7e2f1;
  border-radius: 15px;
  box-shadow: 0 22px 52px rgba(35,61,112,.15);
  padding: 22px;
}

.doc-line {
  height: 8px;
  background: #dce6f6;
  border-radius: 999px;
  margin-bottom: 12px;
}

.doc-line.short {
  width: 45%;
}

.doc-line.medium {
  width: 70%;
}

.doc-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 24px 0;
}

.doc-box {
  height: 30px;
  border: 1px solid #dce6f6;
  border-radius: 8px;
  background: #f8fbff;
}

.signature-line {
  height: 2px;
  background: #aebbd0;
  width: 75%;
  margin-top: 34px;
}

.floating-card {
  position: absolute;
  right: 24px;
  bottom: 34px;
  width: 220px;
  background: #fff;
  border: 1px solid #dce7f6;
  border-radius: 22px;
  box-shadow: 0 22px 62px rgba(35,61,112,.19);
  padding: 18px;
}

.floating-card strong {
  display: block;
  color: var(--blue);
  font-size: 19px;
  margin-bottom: 6px;
}

.floating-card p {
  margin: 0;
  color: #60708d;
  font-size: 14px;
  line-height: 1.4;
}

/* SECTIONS */

section,
.page-section,
.application-section,
.form-section-wrap,
.steps-section,
.benefits-section,
.testimonial-section,
.bottom-cta-section,
.how-section,
.how-workflow {
  padding: 34px 0;
}

.section-card,
.page-card,
.form-card,
.packet-card,
.testimonial-card,
.how-card,
.step-card {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
}

.section-card,
.page-card,
.form-card,
.packet-card {
  padding: 36px;
}

.section-title,
.section-title-left,
h2 {
  margin: 0 0 20px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: #213b6f;
  font-weight: 900;
}

.section-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 20px;
}

.split,
.grid-3,
.grid-2,
.form-grid,
.record-grid,
.summary-grid,
.date-grid,
.benefits-grid,
.steps-grid,
.how-grid {
  display: grid;
  gap: 20px;
}

.split,
.form-grid,
.record-grid,
.summary-grid,
.grid-2 {
  grid-template-columns: 1fr 1fr;
}

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

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

.mini-card,
.benefit-item,
.step-card,
.how-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
}

h3 {
  margin: 0 0 10px;
  color: #26457a;
  font-size: 22px;
  font-weight: 900;
}

p,
li {
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.cta,
.cta-center {
  text-align: center;
}

.cta-center {
  display: flex;
  justify-content: center;
}

/* FOOTER */

.site-footer,
footer {
  padding: 28px 0 42px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.footer-shell {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  border-radius: 24px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 900;
  color: #3b6db4;
}

.footer-copy {
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.footer-links a:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

/* FORMS */

.form-field,
.field {
  display: block;
}

.form-field-full,
.field-full {
  grid-column: 1 / -1;
}

.form-field label,
.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  color: #3f5a87;
  font-size: 15px;
  line-height: 1.2;
}

.form-field input,
.form-field select,
.form-field textarea,
.field input,
.field select,
.field textarea,
.sig-input {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid #d5e0ef;
  border-radius: 14px;
  background: #ffffff;
  color: #243755;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea,
.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.sig-input:focus {
  border-color: #7eaef3;
  box-shadow: 0 0 0 4px rgba(126,174,243,0.15);
}

.form-actions,
.button-row,
.actions,
.bottom-actions,
.sig-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.form-note,
.helper,
.field-helper,
.autosave-note,
.note,
.meta-note,
.status-text {
  font-size: 14px;
  color: #60708d;
  line-height: 1.6;
}

/* STATUS / CALLOUTS */

.callout {
  background: #eef4ff;
  border: 1px solid #d8e3f4;
  border-left: 8px solid var(--blue);
  border-radius: 22px;
  padding: 24px;
  color: #23344f;
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 22px;
}

.callout.warning {
  background: #fff8e8;
  border-left-color: #d97706;
  border-color: #f1ddac;
}

.callout.success {
  background: var(--green-soft);
  border-left-color: var(--green);
  border-color: #cfe8d6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 14px;
}

.status-pill.eligible {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.error {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.review {
  background: var(--purple-soft);
  color: var(--purple);
}

/* SIGNATURE */

.sig-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.sig-small-btn {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #d5e0ef;
  background: #fff;
  color: #3c557d;
  font-weight: 800;
  cursor: pointer;
}

.sig-pad-wrap {
  background: #fbfdff;
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  padding: 14px;
}

.sig-pad-label {
  margin: 0 0 10px;
  font-size: 14px;
  color: #60708d;
  font-weight: 800;
}

#signaturePad {
  width: 100%;
  height: 180px;
  border: 1px solid #cfd9ea;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
  display: block;
}

/* RESPONSIVE */

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .grid-3,
  .grid-2,
  .steps-grid,
  .benefits-grid,
  .how-grid,
  .summary-grid,
  .record-grid,
  .date-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-card {
    padding: 34px 24px;
  }

  .hero-visual {
    order: -1;
  }

  .floating-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 16px;
    width: 100%;
  }

  .doc-page {
    width: 100%;
  }

  .sig-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
  }

  .nav,
  .main-nav,
  .nav-links {
    flex-wrap: nowrap;
    justify-content: center;
    min-width: 0;
    gap: 8px;
  }

  .nav a,
  .main-nav a,
  .nav-links a {
    white-space: nowrap;
  }

  .language-access {
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .site-header,
  header {
    padding-top: 14px;
  }

  .header-shell,
  .nav-shell,
  .header-inner,
  .nav-wrap,
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .nav,
  .main-nav,
  .nav-links {
    width: 100%;
    flex-direction: column;
  }

  .nav a,
  .main-nav a,
  .nav-links a,
  .btn,
  .nav-button,
  .packet-btn,
  .footer-links,
  .footer-links a {
    width: 100%;
    text-align: center;
  }

  h1,
  .page-title,
  .packet-title,
  .application-header h1,
  .page-header h1,
  .page-hero h1,
  .hero-copy h1 {
    font-size: 42px;
  }

  .page-subtitle,
  .packet-subtitle,
  .application-header p,
  .page-header p,
  .page-hero p,
  .hero-subtext,
  .hero-copy p,
  .callout {
    font-size: 16px;
  }

  .section-card,
  .hero-copy,
  .hero-card,
  .packet-card,
  .page-card,
  .form-card {
    padding: 24px 18px;
  }

  .progress-row {
    flex-direction: column;
    align-items: stretch;
  }

  .progress-line {
    display: none;
  }

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

  .document-preview {
    padding: 18px;
  }

  .form-actions,
  .button-row,
  .actions,
  .bottom-actions,
  .footer-shell {
    flex-direction: column;
    align-items: stretch;
  }
}

.site-footer {
  padding: 24px 0;
}

.footer-shell {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #dbe3f0;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(50, 78, 128, 0.08);
}

.footer-left {
  max-width: 560px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: #3b6db4;
  margin-bottom: 6px;
}

.footer-copy {
  margin: 0 0 10px;
  color: #667796;
  font-size: 14px;
}

.footer-disclaimer {
  margin: 0;
  color: #6a7894;
  font-size: 13px;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #233d70;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  background: #dfe9fb;
  color: #4f88e8;
}

@media (max-width: 760px) {
  .footer-shell {
    flex-direction: column;
  }

  .footer-links {
    width: 100%;
    justify-content: flex-start;
  }
}

/* BRAND (LOGO) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  color: #3b6db4;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-icon {
  width: 28px;
  height: 34px;
  border: 2px solid #22345f;
  border-radius: 4px;
  background: #ffffff;
  position: relative;
  flex: 0 0 auto;
}

.brand-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 9px;
  height: 2px;
  background: #97a4bb;
  box-shadow: 0 6px 0 #97a4bb, 0 12px 0 #97a4bb;
}

.language-access {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.language-access label {
  font-size: 13px;
  font-weight: 700;
  color: #233d70;
}

.language-access select {
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  background: #fff;
  color: #233d70;
  padding: 8px 10px;
  font-size: 14px;
}

.translation-disclaimer {
  margin: 8px auto 18px;
  color: #667796;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .header-inner {
    align-items: flex-start;
  }

  .language-access {
    width: 100%;
  }

  .language-access select {
    width: 100%;
  }
}

/* Homepage CTA card should stay readable on white background */
body.home-page .cta h2,
body.home-page .cta .section-card h2 {
  color: var(--text, #203761) !important;
}

/* Dark blue CTA sections should use white text */
.bottom-cta .cta-card h2,
.bottom-cta .cta-card p,
.bottom-cta h2,
.bottom-cta p {
  color: #ffffff !important;
}

/* CTA button text should stay white */
.bottom-cta .cta-card .btn,
.bottom-cta .btn,
body.home-page .cta .btn {
  color: #ffffff !important;
}

/* RECORDWATCH MODULE */
.recordwatch-page main,
.recordwatch-intake-page main,
.recordwatch-dashboard-page main,
.recordwatch-relief-page main {
  padding-bottom: 52px;
}

.recordwatch-section {
  padding: 26px 0;
}

.section-card,
.recordwatch-card,
.recordwatch-form-section,
.case-card,
.summary-card,
.action-card,
.empty-state {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.recordwatch-card h3,
.case-card h3,
.summary-card h3,
.action-card h3,
.recordwatch-form-section h2 {
  margin-top: 0;
  color: #203761;
}

.recordwatch-grid,
.recordwatch-grid-2,
.recordwatch-grid-3,
.recordwatch-grid-4,
.form-grid,
.summary-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.recordwatch-stack {
  display: grid;
  gap: 22px;
}

.recordwatch-actions,
.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label,
.checklist label {
  color: #40577e;
  font-weight: 900;
  font-size: 14px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid rgba(93,145,230,.22);
  border-color: var(--blue-2);
}

.charge-card {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
}

.charge-header,
.case-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.status-badge.not-started { background: #eef2f7; color: #4b5f7d; }
.status-badge.in-progress { background: var(--blue-soft); color: var(--blue); }
.status-badge.waiting { background: var(--amber-soft); color: var(--amber); }
.status-badge.eligible { background: var(--green-soft); color: var(--green); }
.status-badge.follow-up-needed { background: var(--red-soft); color: var(--red); }
.status-badge.verified-corrected { background: var(--purple-soft); color: var(--purple); }

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.checklist label {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row strong {
  color: #40577e;
}

.notice,
.disclaimer-box,
.success-message {
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 18px;
  line-height: 1.6;
}

.disclaimer-box {
  background: var(--amber-soft);
  color: #6f4d00;
  border-color: #efd88f;
  font-weight: 800;
}

.success-message {
  display: none;
  background: var(--green-soft);
  color: var(--green);
  border-color: #ccebd7;
  font-weight: 900;
}

.success-message.show {
  display: block;
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.btn.danger {
  background: var(--red);
  color: #ffffff;
}

.btn.small {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero-grid,
  .recordwatch-grid-2,
  .recordwatch-grid-3,
  .recordwatch-grid-4,
  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-card {
    padding: 34px 24px;
  }
}

@media (max-width: 640px) {
  .recordwatch-card,
  .recordwatch-form-section,
  .case-card,
  .summary-card,
  .action-card,
  .empty-state,
  .section-card {
    padding: 20px;
    border-radius: 22px;
  }

  .checklist,
  .detail-row {
    grid-template-columns: 1fr;
  }

  .recordwatch-actions,
  .case-actions {
    align-items: stretch;
  }

  .recordwatch-actions .btn,
  .case-actions .btn {
    width: 100%;
  }
}

/* Keep expanded navigation usable after adding RecordWatch. */
@media (max-width: 760px) {
  .nav,
  .main-nav,
  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav a,
  .main-nav a,
  .nav-links a {
    width: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
  }

  .nav .nav-cta,
  .main-nav .nav-btn,
  .nav-links .nav-cta {
    grid-column: 1 / -1;
  }
}

/* Modern homepage header layout */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header .container {
  width: min(1320px, calc(100% - 32px));
}

.header-shell-modern {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px 14px;
}

.header-shell-modern .header-utility {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 30px;
}

.header-shell-modern .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.header-shell-modern .brand {
  flex: 0 0 auto;
  white-space: nowrap;
}

.header-shell-modern .nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  margin-left: auto;
}

.header-shell-modern .nav a {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 10px 0;
}

.header-shell-modern .nav .nav-cta {
  flex: 0 0 auto;
  margin-left: 4px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(23, 69, 156, 0.18);
}

.header-shell-modern .nav .nav-cta:hover {
  background: var(--blue-dark);
  color: #ffffff;
}

.language-access-utility {
  flex: 0 0 auto;
  padding: 4px 6px 4px 10px;
  border: 1px solid rgba(219, 230, 246, 0.85);
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.78);
}

.language-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.language-access-utility label,
.language-access-mobile label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.language-access-utility select,
.language-access-mobile select {
  min-height: 32px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.language-access-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  flex: 0 0 auto;
  width: 46px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle-line {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

@media (max-width: 1240px) and (min-width: 981px) {
  .header-shell-modern .header-inner {
    gap: 18px;
  }

  .header-shell-modern .brand {
    font-size: 20px;
  }

  .header-shell-modern .nav {
    gap: 14px;
    font-size: 14px;
  }

  .header-shell-modern .nav .nav-cta {
    padding-inline: 14px;
  }
}

@media (max-width: 980px) {
  .header-shell-modern {
    gap: 0;
    padding: 14px;
  }

  .header-shell-modern .header-utility {
    display: none;
  }

  .header-shell-modern .header-inner {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
  }

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

  .header-shell-modern .nav {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    margin-left: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
    text-align: left;
  }

  .header-shell-modern.nav-open .nav {
    display: flex;
  }

  .header-shell-modern .nav a {
    width: 100%;
    padding: 12px 14px;
    text-align: left;
  }

  .header-shell-modern .nav .nav-cta {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    text-align: center;
  }

  .language-access-mobile {
    display: flex;
    width: 100%;
    margin-top: 4px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
  }

  .language-access-mobile select {
    width: auto;
    min-width: 150px;
  }
}

@media (max-width: 520px) {
  .site-header .container {
    width: min(100% - 20px, 1320px);
  }

  .header-shell-modern .brand {
    font-size: 19px;
  }
}

/* Progressive demo account flow */
.auth-card {
  max-width: 760px;
  margin: 0 auto 32px;
}

.account-cta,
.auth-demo-note {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid #d7e3fb;
  border-radius: 18px;
  background: #eef4ff;
  color: #355486;
  line-height: 1.55;
}

.account-cta strong,
.auth-demo-note strong { color: #233d70; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-grid .dashboard-card {
  min-height: 170px;
}

.dashboard-grid .dashboard-card.wide {
  grid-column: 1 / -1;
}

.dashboard-card .muted,
.muted {
  color: #667796;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
