/*
 * Candidate responsive layer.  At 832px and above this stylesheet deliberately
 * makes no layout, typography, colour, form, grid, container or logo change.
 * Legacy section styles therefore remain the desktop source of truth.
 */
:root {
  --cdr-bg: #000;
  --cdr-surface: #000;
  --cdr-focus: #ffcf4a;
  --cdr-space-1: .5rem;
  --cdr-space-2: .75rem;
  --cdr-space-3: 1rem;
}

/* Present in every template but removed from normal desktop flow until focused. */
.cdr-skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cdr-skip-link:focus { width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }

/* Theme values are configured by the fixed server allowlist; rules below are mobile-only. */
@media (max-width: 831px) {
  .cdr-site, .cdr-site *, .cdr-site *::before, .cdr-site *::after { box-sizing: border-box; }
  body.cdr-site {
    min-width: 0;
    background: #000 !important;
  }

  /* Legacy main/dyski headers place this link outside #container. */
  body.cdr-site > div[style*="position:absolute"]:not(#overDiv),
  body.cdr-site > div[style*="position: absolute"]:not(#overDiv) {
    position: static !important;
    left: auto !important;
    right: auto !important;
    max-width: 100% !important;
    text-align: center;
  }
  body.cdr-site > div[style*="position:absolute"]:not(#overDiv) .menugora,
  body.cdr-site > div[style*="position: absolute"]:not(#overDiv) .menugora { margin-left: 0 !important; }

  .cdr-site img, .cdr-site video, .cdr-site iframe, .cdr-site embed, .cdr-site object {
    max-width: 100%;
    height: auto;
  }
  .cdr-skip-link { left: var(--cdr-space-2); top: -4rem; z-index: 2000; padding: .5rem .75rem; background: #fff; color: #000; }
  .cdr-skip-link:focus { top: var(--cdr-space-2); }
  .cdr-site a:focus-visible, .cdr-site button:focus-visible, .cdr-site input:focus-visible,
  .cdr-site select:focus-visible, .cdr-site textarea:focus-visible { outline: 3px solid var(--cdr-focus); outline-offset: 2px; }
  .cdr-site input, .cdr-site select, .cdr-site textarea, .cdr-site button { max-width: 100%; min-height: 2.5rem; }

  /* Existing IDs are retained; only narrow viewports change their flow. */
  .cdr-site #container {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    min-width: 0;
    margin: 0;
    padding: 0 var(--cdr-space-2) var(--cdr-space-3);
    background: var(--cdr-surface);
  }
  .cdr-site #container > .center { order: 0; width: 100%; min-width: 0; }
  .cdr-site #top { display: flex; max-width: 100%; overflow: hidden; }
  .cdr-site #top h1, .cdr-site #top h2 { flex: 1 1 50%; min-width: 0; margin: 0; }
  .cdr-site #top h1 img, .cdr-site #top h2 img { width: 100%; height: auto; }
  .cdr-site #navcontainer, .cdr-site #navlist { width: auto !important; max-width: 100%; }
  .cdr-site #navlist { display: flex; flex-wrap: wrap; }
  .cdr-site #navlist li { float: none; }
  .cdr-site #navcontainer a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .25rem .5rem; }
  .cdr-site #text, .cdr-site #text2, .cdr-site #text3 {
    order: 1;
    float: none;
    width: 100% !important;
    min-width: 0;
    padding: var(--cdr-space-2);
    overflow-x: auto;
  }
  .cdr-site #text, .cdr-site #text2, .cdr-site #text3 { font-size: 14px; }
  .cdr-site #text p, .cdr-site #text li,
  .cdr-site #text2 p, .cdr-site #text2 li,
  .cdr-site #text3 p, .cdr-site #text3 li { font-size: 14px !important; }
  .cdr-site #text h1, .cdr-site #text h2, .cdr-site #text h3,
  .cdr-site #text2 h1, .cdr-site #text2 h2, .cdr-site #text2 h3,
  .cdr-site #text3 h1, .cdr-site #text3 h2, .cdr-site #text3 h3 { width: auto !important; max-width: 100%; overflow-wrap: anywhere; }
  .cdr-site #lewakolumna, .cdr-site #right {
    order: 2;
    float: none;
    width: 100% !important;
    min-width: 0;
    height: auto;
    margin: var(--cdr-space-2) 0 0;
    padding: var(--cdr-space-2);
  }
  .cdr-site .ramka { width: 100%; max-width: none; margin: 0; }
  .cdr-site #footer { width: 100% !important; margin: 0; padding: var(--cdr-space-3); }

  .cdr-table-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .cdr-table-scroll > table, table.cdr-data-table { min-width: 40rem; }
  .cdr-table-scroll th, .cdr-table-scroll td, table.cdr-data-table th, table.cdr-data-table td { padding: .45rem .6rem; }

  .cdr-site .cdr-brand-header { width: 100% !important; }
  .cdr-site .cdr-brand-header td:first-child, .cdr-site .cdr-brand-header td:last-child { display: none; }
  .cdr-site .cdr-brand-header td:nth-child(2) { display: table-cell !important; width: 100% !important; text-align: center; }
  .cdr-site .cdr-brand-header img { width: min(100%, 22rem); height: auto; }
  .cdr-site .cdr-primary-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem; margin: var(--cdr-space-2) auto; padding: 0 var(--cdr-space-2); font-size: 0; }
  .cdr-site .cdr-primary-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: .25rem .5rem; font-size: 12px; }
  .cdr-site .cdr-primary-nav br { display: none; }
  .cdr-site #container > .center:has(> table.nn) { order: 3; }
  .cdr-site #container > .center > table.nn, .cdr-site #container > .center > table.nn > tbody { display: block; width: 100% !important; }
  .cdr-site #container > .center > table.nn tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100% !important; }
  .cdr-site #container > .center > table.nn td { display: block; width: 100% !important; padding: var(--cdr-space-2); }

  @media (max-width: 360px) {
    .cdr-site #container { padding-inline: var(--cdr-space-1); }
    .cdr-site #text, .cdr-site #text2, .cdr-site #text3 { padding-inline: var(--cdr-space-1); }
  }
}
