/* Shared data/actions, three presentations; no viewport-driven DOM replacement. */
html { scroll-padding-top: 24px; }
body { overflow-x: visible; }
*, *::before, *::after { box-sizing: border-box; }
:where(button, a, input, select, summary):focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }
.landing-header, .landing-nav, .dashboard-header { flex-wrap: wrap; }
.landing-header > *, .projects-header > *, .toolbar > *, .dashboard-header > *, .user-profile > *, .app-card > * { min-width: 0; }
.user-profile, .projects-header, .admin-header { overflow-wrap: anywhere; }
.dashboard-section .app-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%,280px),1fr)); }
.beta-notification-banner > div { min-width: 0 !important; }
.dashboard-section .app-card { overflow-wrap: anywhere; }
.dashboard-section .app-card a, .dashboard-header a { white-space: normal; }
.projects-container .search-box { min-width: 0; width: 100%; flex-basis: 240px; }
.projects-container .file-link { min-width: 0; max-width: 100%; align-items: flex-start; }
.projects-container .file-name-text { overflow-wrap: anywhere; min-width: 0; }
.projects-container .file-link .file-icon { margin-right: 0; }
.projects-container .files-table { table-layout: fixed; }
.projects-container .files-table th:first-child { width: 34%; }
.projects-container .files-table th:last-child { width: 32%; }
.projects-container .files-table td { overflow-wrap: anywhere; }
.file-actions .action-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; white-space: normal; }
.file-actions [data-actions-toggle] { display: none; }
.file-select { display: flex; align-items: flex-start; gap: 10px; }
.file-select input { flex: 0 0 auto; width: 22px; height: 22px; margin: 4px 0; }
.selection-status { margin: 0 0 16px; color: var(--text-muted); }
.action-btn { min-height: 36px; justify-content: center; }
.admin-header { gap: 16px; flex-wrap: wrap; }
.admin-table-scroll { max-width: 100%; overflow-x: auto; }
.admin-table-scroll table { min-width: 680px; }
#nc7lab .nav { flex-wrap: wrap; }
#nc7lab .nav > * { min-width: 0; }
#nc7lab .nav .links { flex-wrap: wrap; }
#nc7lab [data-nav-toggle] { display: none; }
#nc7lab .nav-language button, #nc7lab .apps button { min-height: 44px; min-width: 44px; }
#nc7lab .nav .links a { display: inline-flex; align-items: center; min-height: 44px; }
#nc7lab .nav .brand { overflow-wrap: anywhere; }
#nc7lab .app-preview, #nc7lab .modelinfo > *, #nc7lab .hero > *, #nc7lab .modelhero > * { min-width: 0; }
#nc7lab .modelinfo dd, #nc7lab .modelinfo dt { overflow-wrap: anywhere; }
#nc7lab .software .eyebrow { overflow-wrap: anywhere; }
@media (600px <= width < 1100px) {
  .dashboard-section { padding: 32px 24px; }
  .dashboard-header { flex-direction: row; text-align: left; gap: 20px; padding: 24px; }
  .user-profile { flex-direction: row; gap: 16px; }
  .dashboard-section .app-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .projects-container { padding: 0 24px; }
  .projects-container .files-table th:last-child { width: 24%; }
  .projects-container .files-table th:first-child { width: 38%; }
  .projects-container .files-table td, .projects-container .files-table th { padding: 12px; }
  .file-actions [data-actions-toggle] { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 14px; }
  .file-actions .action-list { display: none; margin-top: 8px; }
  .file-actions.actions-open .action-list { display: flex; }
  #nc7lab .nav .links { width: 100%; justify-content: space-between; }
  #nc7lab .site .hero, #nc7lab .modelhero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  #nc7lab .site .familygrid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #nc7lab .site .product { display: block; }
  #nc7lab .modelinfo { grid-template-columns: minmax(0,1fr); }
}
@media (width < 600px) {
  .landing-header { position: relative; padding: 16px; gap: 12px; }
  .landing-nav { width: 100%; gap: 8px 14px; }
  .landing-nav a, .dashboard-header a, .dashboard-language-picker button { min-height: 44px; display: inline-flex; align-items: center; }
  .dashboard-section { padding: 24px 16px; }
  .dashboard-header { padding: 20px 16px; align-items: stretch; gap: 16px; }
  .user-profile { gap: 12px; }
  .dashboard-section .app-grid { grid-template-columns: minmax(0,1fr); }
  .dashboard-section .app-card { padding: 20px 16px; gap: 16px; }
  .projects-container { padding: 0 16px; margin: 24px auto; }
  .projects-header h1 { font-size: 1.6rem !important; }
  .projects-container .toolbar { padding: 14px; gap: 12px; }
  .projects-container .search-box { flex-basis: 100%; font-size: 16px; }
  .projects-container .filter-btn { min-height: 44px; }
  .projects-container .drop-zone { padding: 16px; }
  .projects-container .files-table, .projects-container .files-table tbody { display: block; width: 100%; border: 0; background: transparent; }
  .projects-container .files-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .projects-container .files-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 16px; padding: 14px; background: var(--surface-panel); border: 1px solid var(--line-subtle); border-radius: 10px; }
  .projects-container .files-table td { display: block; width: auto; padding: 8px 0; border: 0; text-align: left !important; white-space: normal !important; }
  .projects-container .files-table td:first-child, .projects-container .files-table td:nth-child(4), .projects-container .files-table td:last-child { grid-column: 1/-1; }
  .projects-container .files-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
  .file-actions [data-actions-toggle] { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 16px; }
  .file-actions .action-list { display: none; justify-content: flex-start; margin-top: 12px; padding: 12px 0 0; border-top: 1px solid var(--line-subtle); }
  .file-actions.actions-open .action-list { display: flex; }
  .projects-container .empty-state > div { flex-wrap: wrap; }
  #nc7lab .nav { gap: 10px; padding: 16px; }
  #nc7lab .nav .brand { font-size: 20px; gap: 7px; }
  #nc7lab .nav .brand img { width: 34px; height: 32px; }
  #nc7lab .nav-language { margin-right: 0; }
  #nc7lab [data-nav-toggle] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 5px; background: transparent; color: var(--ink); }
  #nc7lab .nav .links { display: none; width: 100%; flex-direction: column; gap: 4px; padding-top: 10px; }
  #nc7lab .nav.nav-open .links { display: flex; }
  #nc7lab .site .wrap { padding: 28px 16px; }
  #nc7lab .site .hero, #nc7lab .modelhero, #nc7lab .modelinfo, #nc7lab .site .familygrid { display: grid; grid-template-columns: minmax(0,1fr); }
  #nc7lab .site .product { display: block; }
  #nc7lab .modelinfo dl { grid-template-columns: minmax(0,1fr); }
  #nc7lab .modelinfo dt { font-weight: 700; padding-bottom: 0; }
  #nc7lab .app-image-grid.paired { grid-template-columns: minmax(0,1fr); max-width: 340px; }
  #nc7lab .app-image-grid.paired a { aspect-ratio: auto; }
  #nc7lab .app-image-grid.paired .software-shot img { height: auto; object-fit: contain; }
  #nc7lab .site .foot { flex-wrap: wrap; }
  .panel header { flex-wrap: wrap; }
  .panel .actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .panel .primary, .panel .cancel { text-align: center; min-height: 44px; }
}
@media (pointer: coarse) {
  .action-btn, .status-btn, .filter-btn, .upload-btn { min-height: 44px; min-width: 44px; }
  .file-select { min-height: 44px; align-items: center; }
}
@supports (padding: env(safe-area-inset-bottom)) {
  .overlay { padding: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
}
.file-selector { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.suite-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); }
.support-grid, .kb-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.learning-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); }
#recentProjectsContainer { grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)) !important; }
@media (width < 600px) {
  .suite-grid, .support-grid, .kb-grid, .learning-grid, .how-to-buy-grid, .software-guide-grid { grid-template-columns: minmax(0,1fr) !important; }
  .suite-card, .support-card, .kb-item, .learning-item { min-width: 0; overflow-wrap: anywhere; }
  .software-hero-section, .suite-section, .how-to-buy-section, .support-section { padding-left: 16px; padding-right: 16px; }
  .kb-section { padding: 24px 16px; }
}
@media (width < 600px) {
  #nc7lab .app-image-grid.paired .software-shot a { aspect-ratio: auto; }
}
