
  /* ── Shared navigation bar (Perficient brand) ── */

  .app-nav {
    display: flex;
    align-items: center;
    gap: 0;
    background: #102a2b;
    box-shadow: 0 5px 0 #a9d8c8;
    padding: 0 20px;
    font-family: Arial, Helvetica, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.88rem;
    line-height: 1;
  }

  .app-nav-brand {
    font-weight: 800;
    font-size: 0.92rem;
    color: #a9d8c8;
    text-decoration: none;
    padding: 12px 16px 12px 0;
    margin-right: 8px;
    border-right: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
    letter-spacing: 0.04em;
  }

  .app-nav-brand:hover {
    color: #ffffff;
  }

  .app-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 14px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: color 0.12s, border-color 0.12s;
  }

  .app-nav-link:hover {
    color: #ffffff;
  }

  .app-nav-link[aria-current="page"] {
    color: #ffffff;
    border-bottom-color: #a9d8c8;
  }

  @media (max-width: 500px) {
    .app-nav {
      flex-wrap: wrap;
      padding: 0 12px;
    }

    .app-nav-brand {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      padding: 10px 0;
      margin-right: 0;
    }

    .app-nav-link {
      padding: 10px 10px;
      font-size: 0.82rem;
    }
  }

:root {
    --background: #f4f6f8;
    --surface: #ffffff;
    --text: #17202a;
    --muted: #5d6875;
    --border: #d8dee5;
    --accent: #005ea8;
    --accent-dark: #004579;
    --focus: #ffbf47;
    --shadow: 0 8px 24px rgba(20, 34, 48, 0.1);
    --radius: 12px;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
  }

  a { color: var(--accent); }
  a:hover { color: var(--accent-dark); }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease;
  }

  .site-header.header-compact .header-top,
  .site-header.header-compact .toolbar {
    display: none;
  }

  .site-header.header-compact .header-content {
    padding: 8px 24px;
  }

  .site-header.header-compact .filter-row {
    margin-top: 0;
  }

  .site-header.header-hidden {
    transform: translateY(-100%);
    pointer-events: none;
  }

  .header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 18px 24px;
  }

  .header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
  }

  .header-title { margin: 0; font-size: 1.4rem; }
  .header-meta { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

  .summary-count {
    flex: none;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef1f4;
    font-weight: 700;
  }

  .toolbar {
    margin-top: 18px;
  }

  .search-field {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
  }

  .filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 14px;
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  .filter-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .filter-group select {
    min-height: 40px;
    min-width: 160px;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235d6875' d='M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
  }

  .filter-group select:hover {
    border-color: var(--accent);
  }

  main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 24px 80px;
  }

  .gallery-section {
    margin-bottom: 56px;
    scroll-margin-top: 190px;
  }

  .section-heading {
    /* Styles now handled by .accordion-toggle */
  }

  .section-heading h2 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.35rem);
  }

  .device-panel { margin-top: 28px; }

  .device-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
  }

  .device-heading h2 { margin: 0; font-size: 1.2rem; }

  .heading-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--muted);
    white-space: nowrap;
  }

  .screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
  }

  .screenshot-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  }

  .screenshot-card:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(20, 34, 48, 0.16);
    transform: translateY(-2px);
  }

  .image-link {
    display: block;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: #eef1f4;
    cursor: pointer;
  }

  .image-link img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
  }

  .card-content { padding: 16px; }
  .card-content h3 { margin: 0; font-size: 1rem; }

  .card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--muted);
  }

  .card-meta time {
    white-space: nowrap;
  }

  .change-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.6;
    white-space: nowrap;
  }

  .badge-changed {
    background: #e8f5e9;
    color: #2e7d32;
  }

  .badge-unchanged {
    background: #f3f4f6;
    color: #8b95a5;
  }

  /* ── Full-page modal ── */

  .fullpage-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
  }

  .fullpage-overlay.active {
    display: flex;
    flex-direction: column;
  }

  .fullpage-modal {
    display: flex;
    flex-direction: column;
    width: 94vw;
    max-width: 1400px;
    height: 92vh;
    margin: auto;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    overflow: hidden;
  }

  .fullpage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex: none;
  }

  .fullpage-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .fullpage-close {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    flex: none;
  }

  .fullpage-close:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .fullpage-zoom-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #eef1f4;
    border-bottom: 1px solid var(--border);
    flex: none;
  }

  .zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    user-select: none;
  }

  .zoom-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .zoom-btn:disabled {
    opacity: 0.35;
    cursor: default;
  }

  .zoom-btn:disabled:hover {
    border-color: var(--border);
    color: var(--text);
  }

  .zoom-select {
    height: 28px;
    min-width: 72px;
    padding: 0 22px 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235d6875' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
  }

  .zoom-select:hover {
    border-color: var(--accent);
  }

  .zoom-separator {
    width: 1px;
    height: 20px;
    margin: 0 4px;
    background: var(--border);
  }

  .zoom-open {
    margin-left: auto;
    gap: 4px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .zoom-open-label {
    font-weight: 600;
  }

  /* ── Fullscreen toggle ── */

  .fullscreen-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    flex: none;
  }

  .fullscreen-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .fullscreen-toggle .icon-restore { display: none; }

  .fullpage-modal.maximized .fullscreen-toggle .icon-expand { display: none; }
  .fullpage-modal.maximized .fullscreen-toggle .icon-restore { display: inline; }

  .fullpage-modal.maximized {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .fullpage-zoom-range {
    display: block;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0 12px;
    background: #eef1f4;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    accent-color: var(--accent);
    appearance: auto;
    flex: none;
  }

  .fullpage-viewport {
    flex: 1 1 0;
    overflow: auto;
    background: #d0d4da;
    background-image:
      linear-gradient(45deg, #c4c8ce 25%, transparent 25%),
      linear-gradient(-45deg, #c4c8ce 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #c4c8ce 75%),
      linear-gradient(-45deg, transparent 75%, #c4c8ce 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
  }

  .fullpage-viewport img {
    display: block;
    height: auto;
    max-width: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  }

  .file-path {
    overflow-wrap: anywhere;
    margin: 8px 0 0;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.76rem;
  }

  .file-path.hidden {
    display: none;
  }

  .file-path.visible {
    display: block;
  }

  /* ── Info toggle button ── */

  .title-group {
    display: flex;
    align-items: flex-start;
    gap: 6px;
  }

  .title-group h3 {
    flex: 1;
    min-width: 0;
  }

  .info-toggle {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-top: 1px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
  }

  .info-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
  }

  .info-toggle[aria-expanded="true"] {
    color: var(--accent);
    background: #eef4fb;
    border-color: var(--accent);
  }

  /* ── Section accordion ── */

  .accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 14px;
    padding: 0 0 14px;
    border: none;
    border-bottom: 2px solid var(--text);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
  }

  .accordion-toggle:hover .accordion-icon {
    border-color: var(--accent);
    color: var(--accent);
  }

  .accordion-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    transition: transform 0.25s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .accordion-icon::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-135deg) translate(-1px, -1px);
    transition: transform 0.25s ease;
  }

  .accordion-toggle[aria-expanded="false"] .accordion-icon::before {
    transform: rotate(45deg) translate(-1px, -1px);
  }

  .section-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }

  .section-body.collapsed {
    max-height: 0 !important;
    opacity: 0;
    pointer-events: none;
  }

  .full-size-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
  }

  /* ── View toggle & tile-size controls ── */

  .view-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
  }

  .control-group {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .control-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 8px;
    white-space: nowrap;
  }

  .toggle-btn {
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .toggle-btn:first-of-type {
    border-radius: 8px 0 0 8px;
  }

  .toggle-btn:last-of-type {
    border-radius: 0 8px 8px 0;
  }

  .toggle-btn + .toggle-btn {
    margin-left: -1px;
  }

  .toggle-btn[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    z-index: 1;
    position: relative;
  }

  .toggle-btn:hover:not([aria-pressed="true"]) {
    border-color: var(--accent);
    color: var(--accent);
    z-index: 1;
    position: relative;
  }

  /* ── Clear filters button ── */

  .clear-filters-btn {
    display: none;
    align-items: center;
    gap: 4px;
    align-self: flex-end;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease;
  }

  .clear-filters-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .clear-filters-btn.visible {
    display: inline-flex;
  }

  /* ── Download buttons ── */

  .download-controls {
    display: flex;
    gap: 6px;
    align-self: flex-end;
  }

  .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  }

  .download-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
  }

  .download-btn svg {
    flex-shrink: 0;
  }

  /* ── Modal prev/next navigation ── */

  .fullpage-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    flex: none;
  }

  .fullpage-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    flex: none;
    user-select: none;
  }

  .fullpage-nav-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
  }

  .fullpage-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
  }

  .fullpage-counter {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    min-width: 48px;
    text-align: center;
  }

  /* ── Tile sizes ── */

  .tile-size-sm .screenshot-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }

  .tile-size-sm .image-link {
    height: 180px;
  }

  .tile-size-sm .card-content h3 {
    font-size: 0.82rem;
  }

  .tile-size-sm .file-path {
    font-size: 0.68rem;
  }

  .tile-size-sm .card-meta {
    font-size: 0.7rem;
  }

  .tile-size-sm .change-badge {
    font-size: 0.62rem;
    padding: 0 5px;
  }

  .tile-size-sm .full-size-link {
    font-size: 0.78rem;
  }

  /* medium is the default — no extra class needed */

  .tile-size-lg .screenshot-grid {
    grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    gap: 28px;
  }

  .tile-size-lg .image-link {
    height: 340px;
  }

  .tile-size-lg .card-content h3 {
    font-size: 1.1rem;
  }

  /* ── List view ── */

  .list-view .screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--border);
  }

  .list-view .screenshot-card {
    display: flex;
    flex-direction: row;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: var(--surface);
    cursor: pointer;
    transition: background 0.15s ease;
    transform: none;
  }

  .list-view .screenshot-card:hover {
    background: #edf1f6;
    border-color: transparent;
    box-shadow: none;
    transform: none;
  }

  .list-view .image-link {
    flex: none;
    width: 120px;
    height: 80px;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }

  .list-view .image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
  }

  .list-view .card-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    min-width: 0;
  }

  .list-view .card-content h3 {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .list-view .file-path {
    display: none;
  }

  .list-view .card-meta {
    margin: 0;
    flex-shrink: 0;
    font-size: 0.75rem;
  }

  .list-view .card-content .title-group {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .list-view .card-content .title-group h3 {
    flex: none;
  }

  .list-view .card-content .title-group .file-path.visible {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .list-view .full-size-link {
    flex: none;
    margin: 0;
    white-space: nowrap;
    font-size: 0.82rem;
  }

  /* Spacer cells to fill incomplete last row */
  .list-view .grid-spacer {
    background: var(--surface);
  }

  /* List view with small tiles */
  .list-view.tile-size-sm .image-link {
    width: 80px;
    height: 52px;
  }

  /* List view with large tiles */
  .list-view.tile-size-lg .image-link {
    width: 180px;
    height: 112px;
  }

  /* On wider screens, allow 3 columns */
  @media (min-width: 1400px) {
    .list-view .screenshot-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .empty-state,
  .no-results {
    padding: 40px 24px;
    color: var(--muted);
    text-align: center;
  }

  .hidden { display: none !important; }

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  @media (max-width: 760px) {
    .header-top { display: block; }
    .summary-count { display: inline-block; margin-top: 10px; }
    .filter-row { flex-direction: column; }
    .filter-group select { width: 100%; }
    .view-controls { flex-wrap: wrap; margin-left: 0; }
    .screenshot-grid { grid-template-columns: 1fr; }
    .image-link { height: 280px; }
    .fullpage-modal { width: 98vw; height: 96vh; }
    .list-view .screenshot-grid { grid-template-columns: 1fr; }
    .list-view .screenshot-card { border-right: none; }
    .list-view .card-content { flex-wrap: wrap; gap: 4px 12px; }
  }
