/* Propozycja prezentacji mobilnej katalogu i roboczych szablonów.
   Referencja: audyt Dealyo / typography.css (treść 16/24, monospace 12/16).
   Ten arkusz nie jest dołączany do komponentów źródłowych ani grafik social. */
.catalog-mobile-preview { display: none; }
.home-type-glyphs,
.ed-type-alphabet { height: auto; min-height: 0; overflow-wrap: anywhere; white-space: normal; }

/* Presentation controls remain readable beside the full-section graphics. */
.home-page :is(.section-field-toggle, .home-background-toggle) {
  font-size: 13px;
  line-height: 20px;
}
@media screen and (min-width: 769px) {
  .home-page .lab-output-cta { font-size: 13px; line-height: 20px; }
  .home-page .lab-output-description { font-size: 13px; line-height: 20px; }
}

@media screen and (max-width: 768px) {
  /* Readable labels are a presentation minimum, including local small overrides. */
  .home-page .home-label {
    font-size: 14px !important;
    line-height: 22px !important;
    overflow-wrap: anywhere;
  }
  :is(.catalog-page, .templates-catalog, .social-catalog, .proposals-page, .report-page, .landing-template)
  :is(.home-label, .ds-label, .catalog-label, .pg-label, .pg-proposal) {
    font-size: 12px !important;
    line-height: 18px !important;
    overflow-wrap: anywhere;
  }
  :is(.home-page, .catalog-page, .templates-catalog, .social-catalog, .proposals-page, .report-page, .landing-template)
  :is(header nav a, footer nav a, .ds-footer > a, .home-button, .home-link, .home-small-link,
  .ds-button, .catalog-button, .catalog-link, .catalog-instruction, .catalog-download,
  .pg-button, .pg-text-link, .pg-control, .filters button, .gallery-links a,
  .download-block > a, .component-tools > a, .component-tools button) {
    min-height: 44px;
    font-size: 16px;
    line-height: 24px;
  }
  :is(.home-page, .catalog-page, .templates-catalog, .social-catalog, .proposals-page, .report-page, .landing-template)
  :is(header nav a, footer nav a, .ds-footer > a, .home-small-link, .catalog-instruction,
  .catalog-download, .pg-text-link, .gallery-links a, .download-block > a) {
    display: inline-flex;
    align-items: center;
    padding-block: 10px;
  }
  :is(.home-page, .catalog-page, .templates-catalog, .social-catalog, .proposals-page)
  :is(header nav, footer nav) { gap: 0 20px; }

  /* Home: give each catalog entry enough room for real screen-size text. */
  .home-page :is(.home-library-grid, .home-template-grid, .home-featured-projects,
  .home-moodboard, .home-direction-card, .home-section-head, .home-template-head,
  .home-roadmap, .ed-endcap) { grid-template-columns: minmax(0, 1fr); }
  .home-page :is(.home-assets-card, .home-featured-projects > .home-project:nth-child(2)) { margin-top: 0; }
  .home-page #main :is(.home-card-copy p, .home-template-copy p, .home-section-head > p,
  .home-template-head p, .home-section-foot > p, .home-note, .home-moodboard figcaption p,
  .home-type-bottom p, .home-rules li, .home-rules > p, .home-project > p,
  .home-workflow p, .home-roadmap p, .ed-endcap-action p, .lab-hero-lead, .home-disclosure summary small,
  .section-field-copy > p) {
    font-size: 16px;
    line-height: 24px;
  }
  .home-page :is(.home-card-count, .home-status, .home-swatch > span, .home-swatch > code,
  .home-asset-samples small, .home-orange-sample > span, .ed-plate-number,
  .ed-board-note > span:last-child, .ed-project-plate-note, .ed-workflow-art > span,
  .home-type-bottom code, .home-mini-files, .home-flow-caption, .home-mini-cta,
  .home-footer, .home-catalog-bar) { font-size: 14px !important; line-height: 22px; }
  .home-page :is(.home-catalog-bar, .home-card-meta, .ed-preview-meta) { flex-wrap: wrap; }
  .home-page .home-card-meta { gap: 12px; }
  .home-page .home-card-count { white-space: normal; }
  .home-page .lab-hero-baseline { font-size: 12px; line-height: 18px; gap: 12px; }
  .home-page #main :is(.home-link, .home-small-link, .home-button) { font-size: 16px; line-height: 24px; }
  .home-page .home-swatch:first-child > code { font-size: clamp(27px, 5vw, 34px) !important; line-height: 1.2; }
  .home-page .home-component-preview { min-height: 365px; }
  .home-page .ed-preview-meta { align-items: start; }
  .home-page .ed-preview-meta > :last-child { flex-shrink: 0; }
  .home-page .home-preview-tools { flex-wrap: wrap; }
  .home-page .home-asset-samples > div { min-width: 0; padding-inline: 8px; }
  .home-page .home-asset-samples small { text-align: center; }
  .home-page .home-mini-files { display: none; }
  .home-page :is(.ed-paper-top > .home-label, .home-report-fields, .ed-report-conclusion,
  .home-mini-browser, .home-landing-inside > .home-label, .home-landing-inside > .home-mini-cta) { display: none; }
  .home-page .home-report-preview { min-height: 260px; }
  .home-page .home-report-chart { font-size: 16px; line-height: 24px; padding: 16px; }
  .home-page .home-report-chart small { font-size: 12px; line-height: 18px; }
  .home-page .home-landing-inside { display: block; min-height: 260px; }
  .home-page .home-landing-inside > strong { display: block; }
  .home-page .home-landing-inside > img { bottom: 0; }
  .home-page .home-flow-preview { padding: 74px 16px 64px; }
  .home-page .home-flow-node { max-width: 30%; padding: 16px 8px; min-width: 0; }
  .home-page .home-flow-node strong { font-size: clamp(16px, 3.5vw, 23px); line-height: 1.3; overflow-wrap: anywhere; }
  .home-page .home-flow-node .home-label { font-size: 12px !important; }
  .home-page .home-flow-connector { min-width: 8px; max-width: 20px; }
  .home-page .home-flow-caption { right: 16px; }
  .home-page .home-social-card .home-card-copy { grid-column: 1; grid-row: 2; }
  .home-page .home-social-preview {
    grid-column: 1; grid-row: 1; display: flex; justify-content: center; align-items: center;
    gap: 12px; min-height: 0; padding: 72px 20px 28px;
    border-left: 0; border-right: 0; border-bottom: 1px solid var(--dealyo-line);
  }
  .home-page .home-social-preview img {
    position: static; width: calc((100% - 24px) / 3); max-width: 190px; height: auto;
    transform: none; object-fit: contain;
  }
  .home-page .home-board-stack { grid-column: 1; grid-row: 3; }
  .home-page .home-board-landing { grid-column: 1; grid-row: 2; }
  .home-page .ed-board-note { grid-column: 1; grid-row: 1; }
  .home-page .home-type-specimen > strong {
    height: auto; min-height: 0; font-size: clamp(34px, 7.8vw, 60px);
    line-height: 1.1; overflow-wrap: anywhere; margin-block: 28px;
  }
  .home-page :is(.home-type-glyphs, .ed-type-alphabet) { font-size: 16px; line-height: 28px; margin-block: 0 28px; }
  .home-page .ed-type-controls button { min-width: 44px; min-height: 44px; font-size: 14px; }
  .home-page .ed-project-plate-note { position: static; display: block; margin-top: 24px; }
  .home-page .ed-report-map i { font-size: 12px; line-height: 18px; }
  .home-page .ed-report-map > span { font-size: 16px; line-height: 24px; }
  .home-page .home-workflow > li { min-width: 0; }
  .home-page .home-footer { gap: 20px; }

  /* Keep the source, insertion and completed CTA readable at the same scale. */
  .home-page :is(.lab-source-name, .lab-source-specimen > span,
  .lab-measure, .lab-paper-nav > span, .lab-output-eyebrow, .lab-output-description,
  .lab-paper-bottom, .lab-construction, .lab-scan,
  .lab-transfer, .lab-art-caption, .lab-art-cross, .lab-routing) { display: none !important; }
  .home-page .lab-topline { flex-wrap: wrap; gap: 8px; }
  .home-page .lab-topline > .home-label:last-child { max-width: none; text-align: left; }
  .home-page .lab-stage { display: grid; gap: 24px; height: auto; padding: 20px; }
  .home-page .lab-sources { position: relative; inset: auto; width: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .home-page .lab-source-heading { grid-column: 1 / -1; margin: 0; }
  .home-page .lab-source { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; height: 108px; margin: 0; padding: 12px 8px; }
  .home-page .lab-source-index { display: block; font-size: 14px; line-height: 22px; letter-spacing: 0; white-space: normal; text-align: center; }
  .home-page .lab-source-desktop { display: none; }
  .home-page .lab-source-mobile { display: inline; }
  .home-page .lab-source-check { display: block; font-size: 13px; right: 5px; top: 5px; }
  .home-page .lab-source-logo img { width: 100%; max-width: 118px; height: auto; margin: 0; }
  .home-page .lab-source-specimen { font-size: 36px; line-height: 1; margin: 0; }
  .home-page .lab-source-swatch { width: 100%; height: 28px; margin: 0; }
  .home-page .lab-paper-wrap { position: relative; inset: auto; width: auto; }
  .home-page .lab-paper { min-height: 0; }
  .home-page .lab-paper-meta { margin-bottom: 12px; }
  .home-page .lab-paper-nav { height: 48px; padding-inline: 20px; }
  .home-page .lab-paper-content { display: block; min-height: 0; padding: 20px; }
  .home-page .lab-paper-copy { max-width: none; }
  .home-page .lab-output-title { font-size: clamp(30px, 7.5vw, 50px); line-height: 1.08; margin-top: 0; }
  .home-page .lab-output-cta { display: inline-flex; min-height: 44px; margin-top: 20px; padding: 10px 12px; font-size: 16px; line-height: 24px; }
  .home-page .lab-output-cta > .home-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .home-page .lab-output-art { position: relative; inset: auto; width: 100%; height: 130px; margin: 16px 0 0; }
  .home-page .lab-output-art img { width: 100%; height: 100%; object-fit: contain; }
  .home-page .lab-paper-under { display: flex; margin-top: 14px; min-height: 22px; font-size: 14px; line-height: 22px; }
  .home-page .lab-approved-note { display: none; }
  .home-page .lab-controls { flex-direction: column; }
  .home-page .lab-steps { flex-direction: column; }
  .home-page .lab-step { min-height: 44px; justify-content: flex-start; gap: 8px; padding: 12px 8px; font-size: 16px; line-height: 24px; border-right: 0; border-bottom: 1px solid var(--dealyo-line); }
  .home-page .lab-step > span { font-size: 12px; }
  .home-page :is(.lab-replay, .home-motion-control) { min-height: 44px; font-size: 16px; line-height: 24px; }
  .home-page .lab-caption { font-size: 16px; line-height: 24px; }

  /* Source components remain isolated. Only their outer presentation changes. */
  .catalog-page :is(.catalog-hero, .catalog-section-heading, .catalog-component-head) { grid-template-columns: minmax(0, 1fr); }
  .catalog-page .component-nav { grid-template-columns: minmax(0, 1fr); }
  .catalog-page :is(.catalog-hero-copy > p, .catalog-package dd, .catalog-context p,
  .catalog-section-heading p, .catalog-nav-description, .component-note, .component-code .ds-note,
  .catalog-closing p, .catalog-plate-note, .asset-note, .asset-section-head > p, .asset-meta dd, .asset-end p, .asset-evidence) {
    font-size: 16px; line-height: 24px;
  }
  .catalog-page :is(.catalog-filetype, .catalog-package dt,
  .catalog-item-number, .source-meta, .source-meta > span, .component-status,
  .asset-filename, .asset-meta dt, .asset-meta dd a, .asset-font-name, .ds-footer,
  .catalog-template-links) { font-size: 12px; line-height: 18px; }
  .catalog-page .source-meta { margin-top: 20px; }
  .catalog-page .source-meta > a { min-height: 44px; font-size: 16px; line-height: 24px; }
  .catalog-page .source-preview { width: 100%; min-width: 0; }
  .catalog-page .source-preview iframe { width: 100%; max-width: 100%; min-width: 0; }
  .catalog-page .catalog-preview-label { flex-wrap: wrap; gap: 8px; }
  .catalog-page .catalog-nav-links a { grid-template-columns: 24px minmax(0, 1fr) 16px; font-size: 16px; line-height: 24px; }
  .catalog-page .component-code summary { min-height: 44px; font-size: 16px; line-height: 24px; }
  .catalog-page .component-code pre { max-width: 100%; font-size: 12px; line-height: 20px; }
  .catalog-assets :is(.asset-grid, #diagramy .asset-grid, .asset-grid--portrait .asset-card) { grid-template-columns: minmax(0, 1fr); }
  .catalog-assets .asset-meta dd a { overflow-wrap: anywhere; }
  .catalog-assets .asset-actions > a { min-height: 44px; font-size: 16px; line-height: 24px; }
  .catalog-assets .asset-preview--portrait { border-right: 0; border-bottom: 1px solid var(--dealyo-line); }
  .catalog-assets .asset-preview--font { min-height: 0; }
  .catalog-assets .asset-glyphs { overflow-wrap: anywhere; }

  /* Template hub: the full documents are available via their original links. */
  .templates-catalog :is(.catalog-hero, .catalog-template, .catalog-start-heading, .catalog-start-grid) { grid-template-columns: minmax(0, 1fr); }
  .templates-catalog :is(.catalog-context, .catalog-template-copy > p:not(.catalog-label),
  .catalog-facts dd, .catalog-template-source p, .catalog-start-heading > p, .catalog-start-grid p) { font-size: 16px; line-height: 24px; }
  .templates-catalog :is(.catalog-selection-number, .catalog-selection small, .catalog-facts dt,
  .catalog-preview figcaption, .catalog-code pre, .catalog-start-grid p code,
  .catalog-start-grid .catalog-small, .catalog-footer > p) { font-size: 12px; line-height: 18px; }
  .templates-catalog .catalog-template-top { flex-wrap: wrap; }
  .templates-catalog .catalog-preview { border-right: 0; border-bottom: 1px solid var(--dealyo-line); }
  .templates-catalog .catalog-preview-stage { display: none; }
  .templates-catalog .catalog-mobile-preview { display: block; margin: 0; }
  .templates-catalog .catalog-mobile-preview img { display: block; width: 100%; height: auto; }
  .templates-catalog .catalog-preview figcaption > span:last-child { display: none; }
  .templates-catalog .catalog-preview figcaption::after { content: "Ilustracja Dealyo / pełny szablon poniżej"; }
  .templates-catalog .catalog-template-source { grid-template-columns: minmax(0, 1fr); }
  .templates-catalog .catalog-command { border-right: 0; border-bottom: 1px solid var(--dealyo-line); }
  .templates-catalog .catalog-button { width: 100%; }
  .templates-catalog .catalog-facts > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }

  /* Social exports stay untouched; gallery copy and actions remain readable. */
  .social-catalog .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .social-catalog :is(.gallery-lead p, .gallery-meta p, .gallery-next p, .ds-note) { font-size: 16px; line-height: 24px; }
  .social-catalog .gallery-tools { align-items: flex-start; flex-direction: column; gap: 16px; }
  .social-catalog .gallery-next { grid-template-columns: minmax(0, 1fr); }
  .social-catalog .gallery-links { gap: 12px; }
  .social-catalog .ds-footer { font-size: 12px; line-height: 18px; }

  /* Proposals: separate explanatory text from the smaller illustrative scenes. */
  .proposals-page :is(.pg-review-note p, .pg-design-note, .pg-card-copy p, .pg-flow-list > li > p,
  .pg-tab-copy > p, .pg-deliverables, .pg-example-note, .pg-state-card-head p,
  .pg-sources p, .pg-sources .pg-source-note) { font-size: 16px; line-height: 24px; }
  .proposals-page :is(.pg-hero-foot, .pg-scene-caption, .pg-demo-bottom, .pg-demo-kind,
  .pg-handoff-tag, .pg-browser-bar, .pg-site-annotation, .pg-ad-top small,
  .pg-ad-bottom, .pg-message-card > span:last-child, .pg-inquiry-card > span:last-child,
  .pg-event-log small, .pg-progress-list small, .pg-state-card-foot > span,
  .pg-transform-bridge, .pg-output-row, .pg-output-header, .pg-offer-row,
  .pg-chat-foot > span, .pg-fake-field, .pg-flow-chat > span, .pg-footer) { font-size: 12px; line-height: 18px; }
  .proposals-page :is(.pg-tab-list button, .pg-file-links a) { min-height: 44px; font-size: 16px; line-height: 24px; }
  .proposals-page .pg-section-meta { flex-wrap: wrap; }
  .proposals-page .pg-flow-list > li { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .proposals-page .pg-flow-visual { grid-row: auto; min-height: 154px; height: auto; padding: 18px; }
  .proposals-page .pg-flow-visual strong { font-size: 22px; line-height: 26px; }
  .proposals-page .pg-flow-list > li > p { max-width: none; }
  .proposals-page .pg-flow-chat > span { white-space: normal; font-size: 14px; line-height: 20px; padding: 7px 8px; }
  .proposals-page .pg-flow-site .pg-browser-bar { margin: -18px -18px 16px; padding: 10px 18px; font-size: 12px; line-height: 18px; }
  .proposals-page .pg-fake-field { font-size: 16px; line-height: 24px; }
  .proposals-page .pg-ambient svg { right: 0; }

  /* Working client templates use the same mobile type minimum. */
  .report-page :is(.report-template-notice, .report-meta dd, .report-method dd,
  .report-section-intro, .report-summary-next > p:last-child, .report-metric h3,
  .report-section .report-data-note, .report-chart-message p, .report-chart > .ds-note,
  .report-account-next p, .report-findings .ds-card > p:last-child, .report-next-review p,
  .report-table, .report-toc, .report-library-nav, .report-metric-comparison) { font-size: 16px; line-height: 24px; }
  .report-page :is(.report-section-number, .report-action-priority, .report-metric-unit,
  .report-table caption, .report-account-status) { font-size: 12px; line-height: 18px; }
  .report-page .report-chart-empty { grid-template-rows: auto 1fr auto; gap: 12px; padding: 0 8px 8px; }
  .report-page :is(.report-chart-unit, .report-chart-period) {
    position: static;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 20px;
  }
  .report-page .report-chart-unit { justify-self: start; }
  .report-page .report-chart-period { justify-self: end; }
  .report-page :is(.report-toc a, .report-template-notice > a, .report-method summary) { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; line-height: 24px; }
  .report-page .report-method summary { display: list-item; }
  .report-page .report-footer { font-size: 12px; line-height: 18px; }
  .landing-template :is(.landing-banner-inner, .landing-hero-note, .landing-terms dt,
  .landing-field label, .landing-text-link, .landing-nav, .landing-footer nav, .ds-note) { font-size: 16px; line-height: 24px; }
  .landing-template :is(.landing-nav a, .landing-text-link, .landing-banner a, .landing-footer a) { display: inline-flex; align-items: center; min-height: 44px; }
}

@media screen and (max-width: 480px) {
  .templates-catalog .catalog-mobile-preview img { aspect-ratio: 8 / 5; object-fit: cover; }
  .home-page .lab-steps { grid-template-columns: minmax(0, 1fr); }
  .proposals-page .pg-tab-list { grid-template-columns: minmax(0, 1fr); }
  .proposals-page .pg-tab-list button { border-right: 0; border-bottom: 1px solid var(--pg-line); padding-inline: 18px; }
  .proposals-page .pg-tab-list button:last-child { border-bottom: 0; }
}

@media screen and (max-width: 359px) {
  .home-page .lab-stage { padding: 16px; }
  .home-page .home-workflow > li { grid-template-columns: minmax(0, 1fr); }
  .home-page .home-workflow :is(h3, p, li > .home-label) { grid-column: 1; }
  .home-page .ed-workflow-art { display: none; }
}

@media screen and (max-width: 768px) {
  .home-page :is(.section-field-toggle, .home-background-toggle) {
    font-size: 14px;
    line-height: 20px;
  }
}
