/* ════════════════════════════════════════════════════════════════════════════════
   DESKTOP 1440px POLISH PASS — Task #963017 (QA 5/15)
   Visual polish: alignment, whitespace, typography, card heights, focus states,
   hover states, green consistency, border-radius standardization.

   Scope: all pages at 1440px. Fixes things the audit files didn't cover.
   Load order: after desktop-1440-audit.css in the cascade.
   Created: 2026-04-19
   ════════════════════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════════════════════
   §1. EQUAL-HEIGHT CARD GRIDS
   ──────────────────────────────────────────────────────────────────────────────
   CSS grid with align-items: stretch ensures all cards in a row match height.
   This prevents ragged bottom edges where short cards float above tall ones.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Settlement/directory card grids */
.ctw-grid,
.npr-grid,
.exp-grid,
.dir-grid {
  align-items: stretch;
}

.ctw-grid > *,
.npr-grid > *,
.exp-grid > *,
.dir-grid > * {
  display: flex;
  flex-direction: column;
}

/* Guide cards grid */
.rs-guides-grid,
.guides-grid,
.guide-cards-grid {
  align-items: stretch;
}

.rs-guides-grid > *,
.guides-grid > *,
.guide-cards-grid > * {
  display: flex;
  flex-direction: column;
}

/* Generic feature card grids */
.rs-features-grid,
.rs-tools-grid,
.sp-cards-grid,
.lf-features-grid,
.emp-features-grid,
.biz-grid {
  align-items: stretch;
}

.rs-features-grid > *,
.rs-tools-grid > *,
.sp-cards-grid > *,
.lf-features-grid > *,
.emp-features-grid > *,
.biz-grid > * {
  display: flex;
  flex-direction: column;
}

/* Settlement cards: push CTA to bottom of card */
.settlement-card,
.dir-card,
.np-card {
  display: flex;
  flex-direction: column;
}

.settlement-card .card-footer,
.settlement-card .card-cta,
.dir-card .card-footer,
.dir-card .card-cta,
.np-card .card-footer,
.np-card .card-cta {
  margin-top: auto;
}


/* ══════════════════════════════════════════════════════════════════════════════
   §2. FORM FOCUS STATES — Accessibility
   ──────────────────────────────────────────────────────────────────────────────
   All form inputs must have a visible focus ring. WCAG 2.1 AA requires
   a visible focus indicator. Using #16a34a (brand green) with 3px offset.
   ══════════════════════════════════════════════════════════════════════════════ */

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.form-input:focus-visible,
.sp-input:focus-visible,
.auth-input:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12) !important;
}

/* Fallback for browsers not supporting :focus-visible */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

/* Email/search inputs on homepage and listings */
.rs-search-input:focus,
.dir-search-input:focus,
.email-input:focus {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12) !important;
}

/* Buttons: keyboard focus ring */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 3px;
  border-radius: 4px;
}


/* ══════════════════════════════════════════════════════════════════════════════
   §3. GREEN COLOR CONSISTENCY
   ──────────────────────────────────────────────────────────────────────────────
   The site uses #16a34a as the primary brand green (green-600 Tailwind equivalent).
   The design system uses #059669 (emerald-600). Multiple stray shades exist:
   #22c55e (too bright), #0D9F5F (teal), #14532d (too dark).
   Normalize: all CTA buttons → #16a34a | hover → #15803d.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Primary CTA buttons — normalize to #16a34a */
.btn-primary:not(.btn-outline):not(.btn-ghost),
.sp-btn-primary,
[class*="btn-primary"]:not(.btn-outline) {
  background-color: #16a34a;
  border-color: #16a34a;
}

.btn-primary:not(.btn-outline):not(.btn-ghost):hover,
.sp-btn-primary:hover,
[class*="btn-primary"]:not(.btn-outline):hover {
  background-color: #15803d;
  border-color: #15803d;
}

/* Accent text — ensure consistent green for links and highlights */
.text-green,
.text-accent,
.accent-green,
.price-highlight,
.savings-badge {
  color: #16a34a;
}

/* Green icon badges */
.check-icon,
.feat-check,
.prc-feat-icon--check {
  color: #16a34a;
}

/* Stray #22c55e overrides — replace with brand green where used */
[style*="color: #22c55e"],
[style*="color:#22c55e"] {
  color: #16a34a !important;
}


/* ══════════════════════════════════════════════════════════════════════════════
   §4. BORDER-RADIUS CONSISTENCY
   ──────────────────────────────────────────────────────────────────────────────
   Standardize card corner radii to match design system tokens:
   - Cards: 16px (--radius-lg)
   - Badges/chips: 8px (--radius)
   - Pills/tags: 100px (--radius-pill)
   This overrides stray values like 10px, 14px, 20px.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Card-level elements — 16px radius */
.settlement-card,
.dir-card,
.guide-card,
.tool-card,
.np-card,
.feature-card,
.sp-card,
.lf-feature-card,
.emp-feature-card,
.rs-hiw-step-card {
  border-radius: 16px;
}

/* Smaller UI elements — 8px radius */
.badge,
.tag,
.chip,
.filter-pill,
.category-pill:not(.filter-pill),
.alert,
.notification {
  border-radius: 8px;
}

/* Buttons — 12px (keep existing button radius) */
@media (min-width: 901px) {
  .btn:not(.btn-pill):not(.btn-circle) {
    border-radius: 10px;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §5. SHADOW CONSISTENCY
   ──────────────────────────────────────────────────────────────────────────────
   All interactive cards should use the same shadow scale. Normalize to
   design system values: --shadow-md for cards, --shadow-lg on hover.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Resting state: subtle shadow */
.settlement-card,
.dir-card,
.guide-card,
.tool-card,
.np-card,
.prc-card {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover state: elevated shadow with green tint */
.settlement-card:hover,
.dir-card:hover,
.guide-card:hover,
.tool-card:hover,
.np-card:hover {
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}


/* ══════════════════════════════════════════════════════════════════════════════
   §6. TYPOGRAPHY CONSISTENCY AT 1440px
   ──────────────────────────────────────────────────────────────────────────────
   Ensure Inter is used site-wide. Body text: 16px. Line height: 1.6.
   Force Inter even if a page accidentally inherits a different font.
   ══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 901px) {
  /* Body text: 16px base, 1.6 line height */
  body,
  p,
  li,
  td,
  th {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.625;
  }

  /* Section body paragraphs: slightly larger for readability */
  .sp-section p,
  .lf-section p,
  .emp-section p,
  .ab-section p {
    font-size: 1.0625rem; /* 17px */
    line-height: 1.7;
    color: #374151;
  }

  /* Lead text in hero areas */
  .sp-hero-sub,
  .sp-hero-lead,
  .hero-description {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.6;
    color: #4b5563;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §7. SECTION WHITESPACE — Consistent vertical rhythm at 1440px
   ──────────────────────────────────────────────────────────────────────────────
   At 1440px the clamp() functions in design-system.css hit their maximums.
   These overrides add a small top-up so sections breathe properly at wide widths.
   ══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  /* Standard page sections: 64px vertical padding */
  section.sp-section,
  section.lf-section,
  section.emp-section,
  section.ab-section,
  section.rs-section {
    padding-top: clamp(3.5rem, 5vw, 5rem);
    padding-bottom: clamp(3.5rem, 5vw, 5rem);
  }

  /* Hero sections: more breathing room */
  section.sp-hero,
  section.lf-hero,
  section.emp-hero,
  section.ab-hero {
    padding-top: clamp(4.5rem, 7vw, 6.5rem);
    padding-bottom: clamp(3rem, 5vw, 4.5rem);
  }

  /* Tighter sections (social proof bars, announcement strips) */
  section.rs-social-proof,
  section.sp-trust-bar,
  .trust-bar,
  .social-proof-bar {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §8. HOMEPAGE — Sections flow at 1440px
   ──────────────────────────────────────────────────────────────────────────────
   Homepage sections should use consistent vertical padding and max-widths.
   The homepage has its own block-based CSS; these are safe overrides.
   ══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  /* Category section (Browse by Type) grid: maintain 4-col at 1440px */
  .rs-cat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  /* How-it-Works section: center-constrain on wide screens */
  .rs-hiw-inner {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Featured section inner: consistent max-width */
  .rs-featured-inner,
  .rs-roundup-inner,
  .rs-recent-inner {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
  }

  /* Homepage section headings: left-align for scannability */
  .rs-section-header {
    text-align: left;
  }

  .rs-section-header h2 {
    font-size: clamp(1.625rem, 2.5vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #0f172a;
    line-height: 1.2;
  }

  .rs-section-header p {
    font-size: 1.0625rem;
    color: #4b5563;
    margin-top: 0.5rem;
    max-width: 560px;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §9. SETTLEMENT LISTING PAGE — Grid and filter polish at 1440px
   ──────────────────────────────────────────────────────────────────────────────
   /settlements: filter bar, category pills, and settlement grid should share
   a consistent 1100px column. Cards should be visually uniform.
   ══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  /* Filter bar inner: match card grid width */
  .dir-filters-inner,
  .dir-filter-bar-inner {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 4vw, 1.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
  }

  /* Settlement card padding: consistent */
  .settlement-card,
  .dir-card {
    padding: 1.25rem;
  }

  /* Settlement card deadline badge: consistent positioning */
  .settlement-card .deadline-badge,
  .dir-card .deadline-badge {
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
  }

  /* Category filter pills: consistently spaced */
  .dir-cat-pills {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §10. PRICING PAGE — Cards alignment at 1440px
   ──────────────────────────────────────────────────────────────────────────────
   Pricing cards use align-items: end (deliberate — pro card is taller/elevated).
   Ensure the CTA button always sits at the bottom of each card.
   ══════════════════════════════════════════════════════════════════════════════ */

.prc-card {
  display: flex;
  flex-direction: column;
}

/* Push CTA to card bottom */
.prc-card .prc-cta,
.prc-card .prc-cta-wrap,
.prc-card a[href*="stripe"],
.prc-card a[href*="pricing"],
.prc-card > a:last-of-type,
.prc-card > button:last-of-type {
  margin-top: auto;
}

/* Feature list: fill remaining space */
.prc-features {
  flex: 1;
  margin-bottom: 1.5rem;
}

/* Pricing section inner: consistent max-width */
.prc-section-wrap,
.pricing-section-inner {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

@media (min-width: 1280px) {
  /* Comparison table below pricing cards: constrained and neat */
  .prc-compare-section,
  .pricing-compare-wrap {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }

  /* FAQ section on pricing: narrow for readability */
  .pricing-faq-wrap,
  .prc-faq-inner {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §11. ABOUT PAGE — Professional layout at 1440px
   ──────────────────────────────────────────────────────────────────────────────
   About page should feel cohesive: consistent container, breathing sections.
   ══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  /* About container: consistent 1100px */
  .ab-container,
  .about-inner {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 4vw, 1.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
  }

  /* Stats grid: 4 columns with numbers visually prominent */
  .ab-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .ab-stat-number {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: #16a34a;
    letter-spacing: -0.03em;
  }

  /* Mission section: narrow prose width for readability */
  .ab-mission-text,
  .ab-about-prose {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §12. BUSINESS PAGES (LAW FIRMS / EMPLOYERS / AFFILIATES)
   ──────────────────────────────────────────────────────────────────────────────
   Consistent layout across all B2B pages. Same max-width, same section padding.
   ══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  /* All B2B containers: 1200px */
  .lf-container,
  .emp-container,
  .aff-container,
  .adv-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
  }

  /* Tier card grids: consistent gap */
  .lf-pricing-grid,
  .emp-pricing-grid,
  .aff-pricing-grid {
    gap: 1.5rem;
    align-items: stretch;
  }

  /* B2B hero stats row: consistent alignment */
  .lf-stats-row,
  .emp-stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
  }

  /* Testimonial/quote cards: equal height */
  .lf-testimonials-grid,
  .emp-testimonials-grid {
    align-items: stretch;
    gap: 1.5rem;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §13. HOVER STATES — All interactive elements
   ──────────────────────────────────────────────────────────────────────────────
   Ensure every interactive element has a visible hover state. Applies at
   all viewports but visually relevant only on desktop (pointer devices).
   ══════════════════════════════════════════════════════════════════════════════ */

@media (hover: hover) and (pointer: fine) {
  /* Navigation links */
  .nav-link:hover,
  .mega-btn:hover,
  .footer-nav a:hover {
    color: #16a34a;
    text-decoration: none;
  }

  /* Settlement/guide card: full card is clickable */
  .settlement-card:hover,
  .dir-card:hover,
  .guide-card:hover,
  .np-card:hover {
    cursor: pointer;
  }

  /* Table rows: hover highlight */
  .cmp-table tbody tr:hover td,
  .pricing-compare-table tbody tr:hover td {
    background: rgba(22, 163, 74, 0.04);
  }

  /* Outline buttons */
  .btn-outline:hover {
    background-color: rgba(22, 163, 74, 0.06);
    border-color: #16a34a;
    color: #15803d;
  }

  /* Ghost buttons */
  .btn-ghost:hover {
    background-color: rgba(22, 163, 74, 0.06);
    color: #15803d;
  }

  /* Category/filter pills */
  .dir-cat-pill:hover:not(.active),
  .filter-pill:hover:not(.active) {
    border-color: #16a34a;
    color: #16a34a;
    background: rgba(22, 163, 74, 0.06);
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   §14. CONTAINER MAX-WIDTH — Safety net for 1440px
   ──────────────────────────────────────────────────────────────────────────────
   Any container that escapes the standard max-width system should be caught here.
   Prevents content from stretching edge-to-edge on 1440px displays.
   ══════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  /* Global safety: no full-bleed containers inside main */
  #main-content > section > div:not([class*="full"]):not([class*="banner"]):not([class*="ticker"]) {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Ensure main content area doesn't stretch too wide */
  main#main-content {
    overflow-x: hidden;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   §15. VISUAL POLISH DETAILS — final touches
   ──────────────────────────────────────────────────────────────────────────────
   Small details that make the difference between "good" and "polished".
   ══════════════════════════════════════════════════════════════════════════════ */

/* Section heading accent line — consistent green left border on section labels */
.section-eyebrow,
.sp-section-eyebrow,
.lf-section-eyebrow,
.emp-section-eyebrow {
  color: #16a34a;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Dividers between sections: consistent subtle border */
.section-divider,
.sp-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0;
}

/* CTA band sections: consistent green background */
.cta-band,
.sp-cta-band,
.lf-cta-band,
.emp-cta-band {
  background: #16a34a;
  color: #ffffff;
}

/* Badge/pill color consistency on light backgrounds */
.badge--green,
.pill--green,
.tag--green {
  background: rgba(22, 163, 74, 0.10);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.20);
}

/* Card inner padding: uniform at 1280px+ */
@media (min-width: 1280px) {
  .guide-card,
  .tool-card,
  .feature-card,
  .sp-card {
    padding: 1.5rem;
  }
}

/* Skip link: always visible on focus */
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 99999;
  background: #16a34a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}


/* ══════════════════════════════════════════════════════════════════════════════
   §16. MOBILE SAFETY — Ensure 1440px fixes don't break smaller screens
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* Reset grid stretch on mobile — stacked layout handles this */
  .ctw-grid,
  .npr-grid,
  .exp-grid,
  .dir-grid,
  .rs-guides-grid,
  .guides-grid,
  .guide-cards-grid {
    align-items: start;
  }

  /* Container safety net: don't constrain on mobile */
  #main-content > section > div:not([class*="full"]):not([class*="banner"]):not([class*="ticker"]) {
    max-width: 100%;
  }

  /* B2B containers: full width on mobile */
  .lf-container,
  .emp-container,
  .aff-container,
  .adv-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* END desktop-1440-polish-963017.css — Task #963017 */
