/* Wave 6 layout fixes. Documented in FIXES.md.
   Dark slate page (#1e293b). Light reading sheets. 44px controls.
   Legal-bar color #ffffff59 failed WCAG AA; raised to #e2e8f0. */

.table-scroll,
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.table-scroll:focus,
.table-wrap:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

main table {
  border-collapse: collapse;
}

@media (max-width: 780px) {
  body {
    font-size: 17px;
  }

  main p,
  main li,
  main td,
  main th,
  main blockquote,
  main .callout,
  main .item-card,
  main .item-card p,
  main .item-card li {
    font-size: 17px;
    line-height: 1.65;
  }
}

main p,
main li {
  max-width: 68ch;
}

main .wave-hero p,
main .wave-sheet p,
main .wave-sheet li {
  max-width: 65ch;
}

.v2-mobile-link,
.v2-mobile-home,
.v2-hamburger,
.v2-mobile-close,
footer a,
nav[aria-label="Legal pages"] a,
.cookie-consent__btn,
.cookie-consent__links a,
main a.wave-cta,
main a.wave-card {
  min-height: 44px;
}
@media (max-width: 1023px) {
  .v2-nav-flat,
  .v2-nav-flat > span {
    min-height: 44px;
  }
}

.v2-hamburger,
.v2-mobile-close {
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v2-nav-flat {
  font-size: 16px !important;
  padding: 0.5rem 0.75rem !important;
  color: #e2e8f0 !important;
  white-space: normal !important;
}
@media (min-width: 1024px) {
  .v2-nav-flat {
    min-height: 0 !important;
    padding: 0.375rem 0.55rem !important;
  }
}

.v2-nav-flat > span {
  white-space: normal !important;
}

.v2-mobile-link,
.v2-mobile-home {
  display: flex;
  align-items: center;
  font-size: 17px;
  padding: 0.65rem 0.9rem;
}

footer a,
nav[aria-label="Legal pages"] a,
.cookie-consent__links a {
  display: inline-flex;
  align-items: center;
  font-size: 16px !important;
  padding: 0.35rem 0.45rem;
}

.footer-legal-integrated.dark,
nav[aria-label="Legal pages"].dark {
  color: #e2e8f0 !important;
  background: #0f172a !important;
}

.footer-legal-integrated.dark a,
nav[aria-label="Legal pages"] a {
  color: #e2e8f0 !important;
}

footer p {
  color: #cbd5e1 !important;
  font-size: 16px;
}

main a[style*="2563eb"] {
  color: #93c5fd !important;
}

.cookie-consent__text p {
  font-size: 16px;
  line-height: 1.45;
}

.cookie-consent__btn {
  font-size: 16px !important;
  padding: 0.55rem 1rem !important;
}

/* Home toolkit heading was #1e293b on the #1e293b page background. */
main section > h2[style*="1e293b"] {
  color: #f8fafc !important;
}

.wave-hero {
  color: #f8fafc;
  padding: 2.5rem 1.25rem 2rem;
}

.wave-hero h1 {
  color: #f8fafc;
  font-size: clamp(1.9rem, 7vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
  max-width: 18ch;
}

.wave-kicker {
  color: #93c5fd;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}

.wave-sheet {
  background: #f8fafc;
  color: #0f172a;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.wave-sheet-inner {
  max-width: 42rem;
  margin: 0 auto;
}

.wave-sheet h2,
.wave-sheet h3 {
  color: #0f172a;
  line-height: 1.25;
  margin: 1.6rem 0 0.6rem;
}

.wave-sheet h2:first-child,
.wave-hero + .wave-sheet h2:first-child {
  margin-top: 0;
}

.wave-sheet p,
.wave-sheet li {
  color: #1e293b;
}

.wave-sheet a {
  color: #1d4ed8 !important;
}

.wave-sheet strong {
  color: #0f172a;
}

.wave-cards {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}

.wave-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-height: 44px;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0f172a !important;
  text-decoration: none;
  border: 1px solid #cbd5e1;
}

.wave-card strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.wave-card span {
  color: #334155;
  font-size: 16px;
  max-width: 65ch;
}

.wave-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  background: #1d4ed8;
  color: #ffffff !important;
  font-weight: 650;
  text-decoration: none;
}

.wave-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.wave-cta-ghost {
  background: transparent !important;
  color: #f8fafc !important;
  border: 1px solid #93c5fd;
}

.wave-quote {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid #1d4ed8;
  background: #e8eef7;
  color: #0f172a;
}

.wave-quote p {
  margin: 0.35rem 0;
  color: #0f172a;
}

.wave-figure {
  margin: 1.25rem 0;
}

.wave-figure img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.wave-endnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #cbd5e1;
}

.wave-endnav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 650;
}

/* Wave 6 QA: reading-sheet rhythm. The base theme zeroes paragraph margins and
   heading sizes, so the essays ran together. */
main .wave-sheet h2 { font-size: clamp(1.45rem, 4.6vw, 1.95rem); font-weight: 700; letter-spacing: -0.01em; }
main .wave-sheet h3 { font-size: clamp(1.15rem, 3.6vw, 1.35rem); font-weight: 700; }
main .wave-sheet p { margin: 0 0 1.05em; }
main .wave-sheet ul, main .wave-sheet ol { margin: 0 0 1.1em; padding-left: 1.3em; }
main .wave-sheet li { margin: 0 0 0.45em; }
main .wave-sheet + .wave-sheet { border-top: 1px solid #e2e8f0; }

/* Prism Nov 17: home reading column sits on the site's own surface, under the live brand hero. */
.wave-sheet.wave-sheet--site { background: transparent; color: #e2e8f0; }
.wave-sheet--site h2, .wave-sheet--site h3, .wave-sheet--site strong { color: #f8fafc; }
.wave-sheet--site p, .wave-sheet--site li { color: #e2e8f0; }
.wave-sheet--site a { color: #bfdbfe !important; }
.wave-sheet--site .wave-card { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); color: #f8fafc !important; }
.wave-sheet--site .wave-card strong { color: #f8fafc; }
.wave-sheet--site .wave-card span { color: #cbd5e1; }
.wave-sheet--site .wave-quote { color: #e2e8f0; }
