@media (min-width: 1440px) {
  .workspace {
    max-width: 1360px;
  }
}

@media (max-width: 1280px) {
  .workspace {
    max-width: 1120px;
  }

  .workspace-header {
    gap: var(--rf-space-4);
  }

  h1 {
    max-width: 640px;
  }

  .validation-report-link,
  .manual-link,
  .theme-toggle,
  .language-control {
    font-size: var(--rf-text-sm);
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 16px;
  }

  .workspace-header {
    align-items: start;
    flex-direction: column;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-bottom: 0;
    width: 100%;
  }

  .header-control-group,
  .header-link-group {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  h1 {
    font-size: 30px;
  }

  .stepper,
  .form-grid,
  .csv-tools,
  .technique-groups,
  .technique-grid,
  .method-guide-grid,
  .preview-grid,
  .result-metrics,
  .audit-strip,
  .security-mode-panel,
  .local-data-panel,
  .local-data-metrics,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .csv-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .method-assistant,
  .family-heading,
  .csv-preview-header,
  .method-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .technique-family[data-method-family="stratified"] {
    grid-column: auto;
  }

  .method-filter {
    width: 100%;
  }

  .technique-card {
    min-height: auto;
  }

  .technique-card small {
    min-height: 0;
  }

  .participant-strata-tools {
    max-width: none;
  }

  .csv-preview-actions {
    justify-content: stretch;
  }

  .local-data-actions {
    justify-content: stretch;
  }

  .mode-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stepper span {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 0;
  }

  .panel {
    padding: 20px;
  }

  .actions {
    justify-content: stretch;
  }

  .button {
    flex: 1 1 160px;
  }
}

@media (max-width: 520px) {
  .inline-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell {
    padding: 10px;
  }

  .panel {
    padding: 16px;
  }

  .method-guide,
  .method-preview,
  .technique-family,
  .method-assistant {
    border-radius: 18px;
  }

  .icon-button {
    width: 100%;
  }

  th,
  td {
    padding: 8px;
  }
}
