@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .site-header {
    position: sticky;
    grid-template-columns: 1fr auto;
  }

  .mobile-nav {
    display: grid;
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 100;
    width: 100vw;
    background: var(--paper);
    transform: translate(-50%, -12px);
  }

  .site-header.is-open .mobile-nav {
    max-height: 520px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    padding-top: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 40px;
  }

  .hero-content {
    order: 1;
    max-width: 760px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(42px, 6vw, 58px);
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-aside {
    order: 2;
    max-width: 100%;
    margin-right: 0;
  }

  .route-grid,
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid,
  .compass-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 72px;
  }

  .site-header {
    min-height: 68px;
    padding: 10px 18px;
  }

  .brand img {
    width: 200px;
  }

  .brand span {
    display: none;
  }

  .prototype-pill {
    font-size: 0.64rem;
  }

  .welcome-dialog-card h2 {
    font-size: clamp(28px, 7vw, 38px);
    line-height: 1.08;
  }

  .welcome-dialog-card p {
    font-size: clamp(16px, 3vw, 16px);
  }

  .hero {
    padding: 76px 24px;
  }

  .hero-content {
    order: 1;
    max-width: 100%;
    text-align: left;
  }

  .hero h1 {
    margin-top: 0;
    font-size: clamp(36px, 8vw, 44px);
    line-height: 1.02;
  }

  .hero-copy {
    font-size: 17px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row {
    width: 100%;
    margin-top: 18px;
  }

  .btn-contact,
  .cta-row .button-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .btn-arrow {
    display: none;
  }

  .v3-hero-note {
    max-width: 100%;
    margin-top: 20px;
    font-size: 17px;
  }

  .hero-aside {
    width: 100%;
    max-width: 100%;
    order: 2;
  }

  /* Mobile: keep the tutorial after the text/buttons and contain its decorative shape. */
  .hero-video-aside {
    padding: 24px 0 8px;
    overflow: hidden;
  }

  .hero-video-shape {
    top: 50%;
    right: -6%;
    width: 108% !important;
    transform: translateY(-50%);
  }

  .hero-video-frame {
    width: 100%;
    border-radius: 10px;
  }

  .route-section {
    margin-top: 0;
    padding-top: 60px;
    background: var(--paper);
  }

  .compact-heading {
    padding: 0;
    background: transparent;
  }

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-card {
    width: 100%;
    padding: 14px 16px;
  }

  .progress-card > div {
    flex-basis: 100%;
    min-width: 0;
  }

  .progress-card > span,
  .progress-card p {
    white-space: normal;
  }

  .search-box {
    width: 100%;
  }

  .detail-header {
    flex-direction: column;
  }

  .level-stepper {
    grid-template-columns: repeat(2, 1fr);
  }

  .level-stepper::before {
    display: none;
  }

  .level-columns,
  .handoff-grid,
  .liaison-section {
    grid-template-columns: 1fr;
  }

  .level-columns article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .liaison-copy {
    position: static;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ircc-logo {
    width: min(100%, 460px);
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 60px 20px 48px;
  }

  .hero::before {
    width: 6px;
  }

  .hero h1 {
    margin-bottom: 18px;
    font-size: clamp(30px, 9vw, 38px);
  }

  .hero-copy {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
  }

  .cta-row {
    margin-top: 12px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    min-height: 86px;
  }

  .hero-stats div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
  }

  .hero-actions {
    flex-direction: column;
    gap: 8px;
  }

  .v3-hero-note {
    align-items: center;
  }

  .route-grid,
  .action-grid,
  .detail-grid,
  .compass-grid,
  .level-stepper,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .route-card {
    min-height: 210px;
  }

  .action-card {
    min-height: 150px;
  }

  .detail-tools {
    width: 100%;
  }

  .tool-button {
    flex: 1;
    justify-content: center;
  }

  .essential-quote {
    grid-template-columns: 1fr;
  }

  .essential-quote > span {
    height: 44px;
  }

  .compass-title {
    align-items: flex-start;
  }

  .level-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .liaison-form fieldset {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-actions,
  .form-actions .button {
    width: 100%;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

   .v3-license-card {
    padding: 22px;
  }

  .v3-license-badge {
    flex-wrap: wrap;
  }
}

@media (max-width: 1120px) {
  .desktop-nav a:nth-child(5),
  .desktop-nav a:nth-child(6) {
    display: none;
  }

  .v3-orientation-shell {
    grid-template-columns: 1fr;
  }

  .v3-results {
    position: static;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .v3-context-grid,
  .v3-orientation-intro,
  .v3-download-section,
  .v3-feedback-inner {
    grid-template-columns: 1fr;
  }

  .v3-feedback-inner {
    gap: 24px;
    padding-top: 52px;
    padding-bottom: 52px;
    overflow: hidden;
  }

  .heading-feedback,
  .v3-feedback-card {
    width: 100%;
    max-width: 100%;
  }

  .heading-feedback {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .v3-feedback-inner::after {
    right: 0;
    width: 100%;
    background-position: right center;
    opacity: 0.12;
  }

  .v3-feedback-card {
    max-width: 100%;
    justify-self: stretch;
    padding: 34px 18px 16px;
  }

  .v3-results-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .v3-results-count {
    padding: 4px 9px;
    font-size: 0.68rem;
  }

  .v3-feedback h2 {
    font-size: clamp(32px, 6vw, 42px);
  }

  .v3-principles {
    grid-template-columns: 1fr;
  }

  .v3-participants {
    columns: 1;
  }

  .v3-download-card {
    min-height: 420px;
  }

  .footer-top {
    padding-right: 24px;
    padding-left: 24px;
  }

  .footer-top-inner {
    align-items: flex-start;
  }

  .links-cta-block {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    padding: 0;
  }

  .footer-bottom {
    padding-right: 24px;
    padding-left: 24px;
  }

   .v3-license-grid {
    grid-template-columns: 1fr;
  }

  .v3-license-card {
    flex-direction: column;
  }

  .v3-license-heading h2 {
    font-size: 36px;
  }
}

@media (max-width: 700px) {
  .v3-choice-grid,
  .v3-profile-grid,
  .v3-stage-grid {
    grid-template-columns: 1fr;
  }

  .v3-profile-grid .v3-choice:last-child {
    grid-column: auto;
  }

  .v3-severity {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .v3-context {
    padding-right: 20px;
    padding-left: 20px;
  }

  .section-heading h2,
  .liaison-copy h2,
  .v3-context-copy h2,
  .v3-context-callout h3,
  .v3-download-copy h2,
  .v3-feedback h2 {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.08;
  }

  .v3-feedback-inner {
    padding-right: 20px;
    padding-left: 20px;
    gap: 18px;
  }

  .heading-feedback > img {
    width: 30px;
    padding-top: 18px;
  }

  .v3-feedback-card {
    padding: 24px 16px 14px;
  }

  .v3-feedback-inner::after {
    opacity: 0.08;
    background-size: auto 70%;
  }

  .v3-intersection,
  .v3-guide-pdf {
    grid-template-columns: 1fr;
  }

  .v3-guide-pdf {
    border-radius: 0px;
    padding: 18px;
  }

  .v3-guide-pdf > span {
    display: none;
  }

  .v3-guide-pdf .button {
    width: 100%;
  }

  .v3-intersection {
    position: relative;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 18px auto 26px;
    padding: 30px 16px 18px;
    text-align: center;
  }

  .v3-intersection > span {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  }

  .v3-intersection h3 {
    margin-top: 8px;
    font-size: 0.94rem;
  }

  .v3-intersection p {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .prototype-pill {
    display: none;
  }

  .headline {
    font-size: clamp(28px, 7vw, 36px);
    line-height: 1.12;
  }

  .links-cta-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .useful-links li {
    font-size: 15px;
  }

  .cta-row {
    margin-top: 0;
  }

  .footer-top-inner {
    gap: 26px;
  }

  .footer-bottom-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .hero,
  .route-section,
  .v3-context,
  .v3-orientation,
  .v3-about,
  .v3-feedback,
  .v3-download-section,
  footer {
    display: none !important;
  }
}
