/* Shared layout safeguards for public pages, forms, the case workspace and ADAM. */
html { scroll-padding-top: 96px; }
body { min-width: 320px; }
img, svg { max-width: 100%; }
.wrap, .hero-copy, .hero-art, .project-grid > *, .help-grid > *, .section-head > *, .card-grid > *, .field-grid > *, .footer-grid > * { min-width: 0; }
.section h2, .page-hero h1, .cta-grid h2, .page-section-title { overflow-wrap: break-word; }
.hero .eyebrow strong { display: inline-block; color: #ffe28a; font-size: .95rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; line-height: 1.4; }
.hero-art img { max-width: 100%; }
.adam-message.assistant strong { color: var(--forest); font-weight: 800; }
.form-card, .option-card, .opp, .help-card, .project-mark { min-width: 0; }
.success code { overflow-wrap: anywhere; white-space: pre-wrap; }
.field input[type="file"] { min-width: 0; }

@media (max-width: 1100px) {
  .header nav { gap: 15px; }
  .header nav a { font-size: .82rem; }
  .nav-wrap { gap: 18px; }
  .brand img { width: clamp(165px, 18vw, 205px); }
  .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { gap: 38px; }
}

@media (max-width: 980px) {
  .header nav { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 110px); overflow-y: auto; }
  .header nav a { font-size: 1rem; padding: 8px 4px; }
  .project-grid, .help-grid { gap: 38px; }
  .project-mark { min-height: 360px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
  .workspace { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 78px; }
  .safety-bar .wrap { height: auto; min-height: 36px; gap: 10px; padding-block: 5px; }
  .safety-bar .wrap > span { line-height: 1.25; }
  .quick-exit { flex: 0 0 auto; font-size: .7rem; white-space: nowrap; }
  .header { height: 70px; }
  .nav-wrap { gap: 12px; }
  .header nav { max-height: calc(100dvh - 70px); }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillar { min-height: 235px; }
  .project-mark { min-height: 330px; }
  .section, .page-shell { padding-block: 66px; }
  .page-hero { padding-block: 50px; }
  .cta-grid { align-items: stretch; }
  .cta-actions { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .workspace-nav { gap: 14px; justify-content: space-between; flex-wrap: wrap; }
  .workspace-nav nav { order: 3; flex: 1 0 100%; display: flex; gap: 8px; }
  .workspace-nav nav button, .workspace-nav nav a { padding: 8px 10px; }
  .workspace-nav > .btn { display: inline-flex; margin: 0; min-height: 38px; padding-inline: 14px; }
  .case-row { min-width: 0; gap: 10px; padding: 13px; }
  .case-row > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
  .adam-panel { max-width: 100vw; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 32px); }
  .brand img { width: min(44vw, 165px); }
  .menu-btn { white-space: nowrap; }
  .hero .eyebrow strong { font-size: .72rem; letter-spacing: .1em; }
  .hero h1 { font-size: clamp(2.45rem, 10.5vw, 2.9rem); line-height: .98; }
  .trust-grid, .pillars, .card-grid, .opportunity-grid, .field-grid, .footer-grid { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; border-bottom: 1px solid #dce5e0; min-height: 60px; }
  .trust-item:last-child { border-bottom: 0; }
  .pillar { min-height: 0; }
  .project-mark { padding: 26px; min-height: 300px; }
  .project-mark blockquote { font-size: 1.35rem; }
  .section h2, .page-hero h1 { font-size: clamp(2.15rem, 10vw, 3rem); }
  .section, .page-shell { padding-block: 56px; }
  .option-card, .form-card, .help-card { padding: 22px; }
  .cta-band { padding-block: 42px; }
  .cta-grid h2 { font-size: 1.9rem; }
  .cta-actions .btn { flex: 1 1 100%; }
  .footer-grid > :first-child { grid-column: auto; }
  .footer-logo { width: min(260px, 100%); }
  .footer-bottom { font-size: .75rem; }
  .adam-composer-note { font-size: .62rem; }
  .adam-message > div { max-width: 88%; }
}
