/* Mobile-first refinements layered over the desktop design. */
.mobile-actions {
  display: none;
}

@media (max-width: 600px) {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
  }

  body {
    overflow-x: hidden;
  }

  body.with-mobile-actions {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .section-shell,
  .site-header {
    width: calc(100% - 28px);
  }

  .site-header {
    gap: 8px;
  }

  .brand {
    min-width: 0;
    font-size: 15px;
  }

  .brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero h1 {
    font-size: clamp(42px, 13.5vw, 50px);
    overflow-wrap: anywhere;
  }

  .hero-actions .button,
  .expertise-section .button,
  .network .button,
  .contact form > .button {
    width: 100%;
  }

  .hero-card {
    margin: 0 0 34px;
    padding: 22px 18px 28px;
    box-shadow: 10px 10px 0 #dce7df;
  }

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

  .request-summary strong {
    font-size: 27px;
  }

  .experience-stamp {
    position: static;
    width: 100%;
    margin-top: 16px;
  }

  .problem h2,
  .section-heading h2,
  .network h2,
  .contact h2 {
    font-size: clamp(34px, 10.5vw, 42px);
  }

  .signal-row article {
    padding-right: 0;
  }

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

  .discipline {
    min-height: 108px;
  }

  .network-grid > div:last-child {
    padding-top: 8px;
  }

  .contact-panel {
    padding: 26px 18px;
  }

  .contact input,
  .contact select,
  .contact textarea,
  .portal-form input,
  .portal-form select,
  .portal-form textarea,
  .filter-bar select {
    min-height: 48px;
    font-size: 16px;
  }

  .consent-line {
    min-height: 44px;
    padding: 4px 0;
  }

  .consent-line input,
  .check-grid input {
    width: 20px !important;
    height: 20px;
    flex: 0 0 20px;
  }

  .footer-grid {
    gap: 18px;
  }

  .footer-meta nav {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0;
  }

  .footer-meta nav a {
    display: flex;
    align-items: center;
    min-height: 40px;
  }

  .legal-main {
    padding-top: 42px;
  }

  .legal-hero {
    margin-bottom: 38px;
    padding-bottom: 32px;
  }

  .legal-hero h1 {
    font-size: clamp(40px, 13vw, 52px);
    overflow-wrap: anywhere;
  }

  .legal-content h2 {
    font-size: 26px;
  }

  .legal-note {
    padding: 18px;
  }

  .portal-main {
    padding: 38px 0 84px;
  }

  .portal-intro h1 {
    font-size: clamp(40px, 12.5vw, 50px);
    overflow-wrap: anywhere;
  }

  .portal-card {
    padding: 23px 18px;
  }

  .portal-card h2 {
    font-size: 28px;
  }

  .portal-form .button,
  .filter-bar .button,
  .job-card .button {
    width: 100%;
    justify-content: center;
  }

  .portal-form fieldset {
    min-width: 0;
    margin-inline: 0;
    padding: 12px;
  }

  .check-grid label {
    min-height: 42px;
    line-height: 1.3;
  }

  .portal-topbar,
  .job-card,
  .admin-row,
  .empty-state {
    padding: 20px 18px;
  }

  .portal-topbar .button,
  .admin-actions .button {
    min-height: 44px;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-actions .button {
    width: 100%;
  }

  .mobile-actions {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(23, 56, 45, .96);
    box-shadow: 0 -8px 28px rgba(18, 37, 31, .18);
    backdrop-filter: blur(12px);
  }

  .mobile-actions a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .04em;
    text-align: center;
  }

  .mobile-actions a:first-child {
    background: var(--sand);
    color: var(--green);
  }
}

@media (max-width: 360px) {
  .section-shell,
  .site-header {
    width: calc(100% - 24px);
  }

  .hero h1 {
    font-size: 41px;
  }

  .eyebrow {
    letter-spacing: .12em;
  }

  .card-topline .card-number {
    display: none;
  }
}
