/* App pages share Meridian's typography, colours and controls. */
@layer components {
  .apps-header { border-bottom: 1px solid #dce2dc; }
  .footer a[href^="mailto:"] { overflow-wrap: anywhere; }
  .language-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: var(--small); }
  .language-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .language-nav [aria-current] { text-decoration: underline; text-underline-offset: 6px; }
  .app-eyebrow { margin-bottom: 1rem; font-size: var(--small); color: var(--muted); }
  .apps-intro { padding-block: clamp(3rem, 6vw, 6rem); }
  .apps-intro h1 { font-size: clamp(2rem, 6.5vw, 7rem); }
  .apps-intro .body-copy { margin-top: 2rem; max-width: 47ch; }
  .apps-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; padding-top: 0; }
  .app-card-art { position: relative; height: 390px; background: #dfe6e0; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; padding: 2rem 2rem 0; }
  .app-card .app-card-screen { width: 205px; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 14px 14px 0 0; box-shadow: 0 12px 32px #082b361c; }
  .app-card .app-card-icon { position: absolute; bottom: 1.25rem; left: 1.25rem; width: 76px; height: 76px; aspect-ratio: 1; border-radius: 18px; box-shadow: 0 4px 16px #082b3620; }
  .app-card .sector-caption h2 { font-size: var(--sub); }
  .app-category { display: block; margin-top: .8rem; font-size: var(--small); color: var(--muted); }
  .app-detail { padding-top: 1.5rem; }
  .app-back { margin-bottom: 2.5rem; }
  .app-detail-grid { display: grid; grid-template-columns: .9fr 1.2fr; gap: 5vw; align-items: center; }
  .app-detail-grid.no-screenshots { grid-template-columns: minmax(0, 700px); }
  .app-introduction { min-width: 0; }
  .app-icon { width: 100px; height: 100px; border-radius: 23px; margin-bottom: 2rem; }
  .app-introduction h1 { font-size: clamp(3rem, 5.2vw, 6rem); }
  .app-tagline { font-size: clamp(1.3rem, 2vw, 1.75rem); margin-block: 1.5rem 1rem; }
  .app-actions { display: flex; align-items: center; gap: .75rem 1.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
  .app-languages { margin-top: 1.5rem; font-size: var(--small); color: var(--muted); }
  .app-gallery { min-width: 0; background: #dfe6e0; padding: 2rem; }
  .app-gallery h2 { font-size: 1rem; letter-spacing: 0; margin-bottom: 1.5rem; }
  .app-screenshots { display: flex; align-items: flex-start; gap: 1.25rem; overflow-x: auto; padding: .5rem .5rem 1.25rem; scroll-snap-type: x proximity; scrollbar-color: #728d82 #dfe6e0; }
  .app-screenshots img { flex: 0 0 auto; width: 210px; max-width: 80%; height: auto; border-radius: 12px; scroll-snap-align: start; }
  .app-help { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; background: #e7ece6; }
  .app-help h2 { font-size: clamp(2rem, 3vw, 3.5rem); }
  .app-help .text-link { margin-top: 1rem; }
  .support-intro { padding-block: 1.25rem 2rem; border-bottom: 1px solid #dce2dc; }
  .support-identity { display: flex; gap: 1rem; align-items: center; margin-block: 1rem; font-size: 1.25rem; }
  .support-identity img { border-radius: 15px; }
  .support-intro h1 { font-size: clamp(2rem, 4.5vw, 4.5rem); line-height: 1.1; }
  .support-email { font-size: clamp(1.25rem, 2.5vw, 2rem); margin-top: 1rem; }
  .support-response { margin-top: .5rem; }
  .support-jumps { display: flex; flex-wrap: wrap; gap: .25rem 2rem; margin-top: 1rem; }
  .support-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 7vw; padding-top: 3rem; }
  .support-body h2 { font-size: clamp(1.8rem, 2.6vw, 2.6rem); margin-bottom: 1.5rem; }
  .support-faq article { border-top: 1px solid #dce2dc; padding-block: 1.5rem; }
  .support-faq h3 { font-size: 1.2rem; letter-spacing: -.015em; margin-bottom: .75rem; }
  .support-body p { line-height: 1.7; }
  .support-body.privacy-body { display: block; }
  .privacy-body > * { max-width: 75ch; }
  .privacy-body h2 { margin-top: 2rem; }
  .privacy-body p { margin-bottom: 1rem; }
  .privacy-body a { text-decoration: underline; text-underline-offset: 3px; }
  .data-deletion { padding: 2rem; background: #e7ece6; }
  .data-deletion .text-link, .support-publisher .text-link { margin-top: 1rem; }
  .support-publisher { padding: 2rem; }
}

@layer responsive {
  @media (max-width: 1000px) {
    .apps-list { gap: 1.5rem; }
    .app-card-art { height: 320px; padding: 1.5rem 1rem 0; }
    .app-detail-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .app-gallery { padding: 1.25rem; }
    .support-body { gap: 2rem; }
  }
  @media (max-width: 680px) {
    .apps-header { gap: .75rem; flex-wrap: wrap; }
    .apps-header .language-nav { margin-left: auto; gap: 0; }
    .apps-header .menu-toggle span { margin-left: .35rem; }
    .apps-list, .app-detail-grid, .app-help, .support-body { grid-template-columns: 1fr; }
    .apps-list { gap: 3rem; }
    .app-card-art { height: 380px; }
    .app-card .app-card-screen { width: 220px; }
    .app-back { margin-bottom: 1.5rem; }
    .app-icon { width: 80px; height: 80px; border-radius: 19px; margin-bottom: 1.5rem; }
    .app-detail-grid { gap: 2.5rem; }
    .app-gallery { padding: 1.25rem 1rem; }
    .app-screenshots img { width: 190px; }
    .support-intro { padding-block: 1rem 1.5rem; }
    .support-body { padding-block: 2rem 3rem; }
    .data-deletion, .support-publisher { padding: 1.5rem; }
    .apps-page .footer { grid-template-columns: 1fr; }
  }
}

@layer components {
  .wigglo-public [hidden] { display: none !important; }
  .wigglo-public section { margin-block: 2rem; }
  .wigglo-public code { overflow-wrap: anywhere; }
  .wigglo-public nav, .wigglo-public .links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
  .wigglo-public a, .wigglo-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .wigglo-public .notice, .wigglo-public .warning, .wigglo-public .error { padding: 1rem; background: #e7ece6; border-left: 4px solid #082b36; }
  .wigglo-public .warning, .wigglo-public .error { background: #fff2f5; color: #7d1734; border-color: #7d1734; }
  .wigglo-public .web-delete { padding: 1.5rem; border: 1px solid #728d82; }
  .wigglo-public form { display: grid; gap: .75rem; margin-block: 1.5rem; }
  .wigglo-public label { font-weight: 700; }
  .wigglo-public input { width: 100%; min-height: 44px; padding: .75rem; border: 1px solid #728d82; border-radius: 4px; background: #fff; color: #082b36; }
  .wigglo-public button { min-height: 44px; padding: .75rem 1rem; background: #082b36; color: #fff; border: 0; border-radius: 4px; justify-self: start; cursor: pointer; }
  .wigglo-public button.danger { background: #7d1734; }
  .wigglo-public button:disabled { opacity: .65; cursor: progress; }
  .wigglo-public :focus-visible { outline: 3px solid #287d91; outline-offset: 3px; }
}
