/* Sadowa 7: brand book, laid out like the "Massive" brand guidelines template (Typefool).
   Each page is a 16:9 sheet on a dark desk. Inside a sheet everything is measured from the template's
   1920 × 1080 page in cqi of the sheet (1 cqi = 19.2 px there): 30 px margin, a 273 px side column with
   the section number and the contents, a hairline at 322 px, the header down to 217 px, content below.
   Type: Riforma LL where installed, else Instrument Sans; Bricolage Grotesque only in the wordmark.
   The page is standalone on purpose, so changes to the site stylesheet do not shift it. */
:root {
  --white: #FFFFFF;
  --mist: #F5F3EF;
  --beige: #E8E3DA;
  --sand: #D5D0C6;
  --brown: #816241;
  --brand: #1F5A3A;     /* Zieleń sadu: Sadowa means orchard */
  --brand-2: #2C7550;
  --leaf: #C9E3B8;
  --leaf-2: #E7F2DF;
  --ink: #141511;
  --ink-2: #3F403B;
  --muted: #6B6C66;
  --red: #B42318;
  --desk: #0F2A1D;
  --font: "Riforma LL", "Riforma", "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mark-font: "Bricolage Grotesque", "Instrument Sans", Arial, sans-serif;   /* the wordmark only */
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--desk); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 400; }
ol, ul { list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
b, strong { font-weight: 500; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; }
.pg :focus-visible { outline-color: var(--brand-2); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--leaf); color: var(--brand); font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- The wordmark: "sadowa7" over "OSIEDLE Z OGRODAMI" ---------- */
.lk { display: inline-flex; flex-direction: column; align-items: flex-start; font-size: var(--s, 48px); line-height: .9; white-space: nowrap; }
.lk-1, .lk1, .fav { font-family: var(--mark-font); font-weight: 700; font-variation-settings: "opsz" 96; letter-spacing: -0.05em; }
.lk-2 { margin-top: .13em; color: var(--lk2, currentColor); font-family: var(--font); font-size: .3em; font-weight: 500; line-height: 1.2; letter-spacing: .24em; text-transform: uppercase; }
.lk.on-green { color: var(--white); --lk2: var(--leaf); }
.lk.on-white { color: var(--brand); --lk2: var(--brown); }
.lk.on-brown { color: var(--beige); --lk2: var(--beige); }
.lk.on-photo { color: var(--white); --lk2: rgba(255, 255, 255, .9); }
.lk1 { font-size: var(--s, 24px); line-height: 1; white-space: nowrap; }

/* ---------- Top bar on the desk ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 12px 32px; background: rgba(15, 42, 29, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: rgba(255, 255, 255, .78); font-size: 14px; }
.top a { text-decoration: none; }
.top-logo { display: flex; align-items: baseline; gap: 14px; color: var(--white); }
.top-t { color: rgba(255, 255, 255, .7); }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { padding: 7px 12px; border-radius: 999px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.top-nav a span { margin-right: 8px; color: var(--leaf); font-variant-numeric: tabular-nums; }
.top-nav a:hover { color: var(--white); background: rgba(255, 255, 255, .08); }
.top-nav a[aria-current] { color: var(--brand); background: var(--leaf); }
.top-nav a[aria-current] span { color: var(--brand); }
.top-site { color: var(--leaf); font-weight: 500; }
.top-site:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Book and pages ---------- */
.book { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 1680px; margin: 0 auto; padding: 8px 32px 32px; }
.pg { position: relative; container-type: inline-size; display: grid; aspect-ratio: 16 / 9; background: var(--white); color: var(--ink); scroll-margin-top: 72px; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); --line: #1C1D19; --hair: #D9D5CC; }
.pg.green { background: var(--brand); color: var(--white); --line: rgba(255, 255, 255, .55); --hair: rgba(255, 255, 255, .3); }
.pg.leaf { background: var(--leaf); color: var(--brand); --line: rgba(31, 90, 58, .55); --hair: rgba(31, 90, 58, .3); }

.pg-in { display: grid; grid-template-columns: 14.22cqi minmax(0, 1fr); grid-template-rows: minmax(9.74cqi, auto) 1fr; column-gap: .99cqi; padding: 1.5625cqi; min-width: 0; }
.pg-no { grid-area: 1 / 1; padding-bottom: 1.2cqi; border-bottom: 1px solid var(--line); font-size: max(20px, 2.75cqi); line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pg-side { grid-area: 2 / 1; display: flex; flex-direction: column; padding-top: 1.85cqi; min-height: 0; }
.pg-hd { grid-area: 1 / 2; position: relative; display: grid; grid-template-columns: 31.55cqi minmax(0, 1fr); column-gap: 1.04cqi; align-items: start; padding: 0 0 1.2cqi 1.09cqi; border-left: 1px solid var(--line); }
.pg-hd::after { content: ""; position: absolute; left: 1.09cqi; right: 0; bottom: 0; height: 1px; background: var(--line); }
.pg-hd h2 { font-size: max(22px, 2.8cqi); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.pg-hd p { width: 23.4cqi; font-size: max(12px, .885cqi); line-height: 1.65; }
.pg-bd { grid-area: 2 / 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 1.09cqi 0 0 1.09cqi; border-left: 1px solid var(--line); }

/* the side column: contents with the current chapter open, page number at the bottom */
.pg-toc { font-size: max(10px, .885cqi); line-height: 1.65; }
.pg-toc b { display: block; font-weight: 600; }
.pg-toc a { text-decoration: none; }
.pg-toc a:hover { text-decoration: underline; text-underline-offset: 2px; }
.pg-toc li.on > a { font-weight: 600; }
.pg-toc ul ul { padding-left: 1.25cqi; }
.pg-pn { margin-top: auto; font-size: max(10px, .78cqi); font-variant-numeric: tabular-nums; }

.lbl { color: var(--muted); font-size: max(11px, .78cqi); font-weight: 500; line-height: 1.35; }

/* ---------- Cover and closing ---------- */
.cover { background: var(--brand); color: var(--white); }
.cv { display: grid; grid-template-columns: minmax(0, 1fr) 21cqi; grid-template-rows: 1fr auto; padding: 1.5625cqi 2.6cqi 2.6cqi; }
.cv h1, .cv h2 { font-size: 9cqi; line-height: .96; letter-spacing: -0.045em; }
.cv-who { padding-top: .9cqi; font-size: 1.45cqi; line-height: 1.2; letter-spacing: -0.01em; }
.cv-lk { align-self: end; --s: 11cqi; color: var(--leaf); --lk2: var(--leaf); }
.cv-ver { align-self: end; font-size: max(11px, .9cqi); line-height: 1.55; }
.end h2 { font-size: 7cqi; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; background: var(--white); color: var(--brand); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color .2s var(--ease); }
.pill:hover { background: var(--leaf); }

/* ---------- Contents page ---------- */
.toc-full { display: grid; grid-template-columns: 1fr 3fr; gap: 2cqi; flex: 1; }
.intro { display: grid; align-content: start; gap: 1cqi; max-width: 19cqi; font-size: max(12px, .885cqi); line-height: 1.65; }
.toc-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2cqi; font-size: max(11px, .885cqi); line-height: 1.65; }
.toc-cols a { display: flex; gap: .6em; text-decoration: none; }
.toc-cols a:hover { text-decoration: underline; text-underline-offset: 2px; }
.toc-cols a i { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; }
.toc-cols p { margin-bottom: .4cqi; color: var(--brand); font-weight: 600; }
.toc-cols li span { min-width: 2em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Chapter dividers ---------- */
.dv .pg-hd h2 { font-size: max(28px, 3.4cqi); font-weight: 400; letter-spacing: -0.035em; }
.dv-bd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); flex: 1; min-height: 0; }
.dv-no { align-self: end; margin: 0 0 -.3cqi 1.2cqi; font-size: 31cqi; line-height: .72; letter-spacing: -0.06em; }
.green .dv-no { color: var(--leaf); }
.dv-list { padding-left: 1.6cqi; border-left: 1px solid var(--line); font-size: max(14px, 1.3cqi); line-height: 1.6; }
.dv-list li span { display: inline-block; min-width: 2.6em; font-variant-numeric: tabular-nums; }

/* ---------- 1.1 Idea ---------- */
.idea { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.04cqi; flex: 1; min-height: 0; }
.idea-l { display: flex; flex-direction: column; justify-content: space-between; gap: 2cqi; padding-right: 2cqi; }
.st { font-size: max(26px, 3.6cqi); line-height: 1.02; letter-spacing: -0.04em; }
.st b { color: var(--brand); }
.words li { display: grid; grid-template-columns: 9cqi 1fr; gap: 1cqi; align-items: baseline; padding: .8cqi 0; border-top: 1px solid var(--hair); font-size: max(12px, .885cqi); }
.words b { font-size: max(16px, 1.45cqi); font-weight: 500; letter-spacing: -0.02em; }
.ph { position: relative; min-height: 0; overflow: hidden; background: var(--leaf-2); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 0; left: 0; padding: .55cqi 1.2cqi .65cqi .9cqi; border-bottom-right-radius: .9cqi; background: var(--white); color: var(--ink-2); font-size: max(11px, .78cqi); font-weight: 500; }
.tag::before, .tag::after { content: ""; position: absolute; width: .9cqi; height: .9cqi; background: radial-gradient(circle at 100% 100%, transparent calc(.9cqi - .5px), var(--white) .9cqi); }
.tag::before { top: 0; right: -.9cqi; }
.tag::after { bottom: -.9cqi; left: 0; }

/* ---------- 1.2 Logo ---------- */
.cells { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1.35fr 1fr; column-gap: 1.04cqi; row-gap: 1.6cqi; flex: 1; min-height: 0; }
.cell { display: flex; flex-direction: column; min-height: 0; padding-top: .55cqi; border-top: 1px solid var(--hair); }
.cell-c { display: grid; place-items: center; flex: 1; min-height: 0; }
.c-main .lk { --s: 6.4cqi; }
.logo-short { --s: 4.4cqi; color: var(--brand); }
.favs { display: flex; align-items: end; justify-content: center; gap: 1.2cqi; }
.fav { display: flex; align-items: center; justify-content: center; padding-bottom: .08em; border-radius: 22%; background: var(--brand); color: var(--white); line-height: 1; }
.fav.f1 { width: 5cqi; height: 5cqi; font-size: 2.7cqi; }
.fav.f2 { width: 3.2cqi; height: 3.2cqi; font-size: 1.75cqi; }
.fav.f3 { width: 1.7cqi; height: 1.7cqi; font-size: .95cqi; }
.spec { display: grid; align-content: center; flex: 1; font-size: max(12px, .885cqi); }
.spec div { display: grid; grid-template-columns: 9cqi 1fr; gap: 1cqi; padding: .6cqi 0; border-bottom: 1px solid var(--hair); }
.spec div:last-child { border-bottom: 0; }
.spec dt { font-weight: 600; }

/* ---------- 1.3 Colour versions: flush tiles, rounded, like the template's monogram usage ---------- */
.lk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; flex: 1; min-height: 0; }
.lk-grid li { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; border-radius: .83cqi; }
.lk-grid .lk { position: relative; z-index: 1; --s: 4.6cqi; }
.lk-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.t-green { background: var(--brand); }
.t-leaf { background: var(--leaf); }
.t-beige { background: var(--beige); }
.t-white { background: var(--white); }
.t-brown { background: var(--brown); }
.t-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 38, 24, .72), rgba(11, 38, 24, .42)); }

/* ---------- 1.4 Logo misuse ---------- */
.donts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.04cqi; flex: 1; min-height: 0; }
.donts li { position: relative; display: grid; place-items: center; min-height: 0; padding: 1cqi; overflow: hidden; border-radius: .83cqi; background: var(--mist); }
.donts .lk { --s: 3.1cqi; color: var(--brand); --lk2: var(--ink-2); }
.donts p { position: absolute; left: 1.2cqi; right: 1.2cqi; bottom: 1cqi; font-size: max(12px, .885cqi); font-weight: 500; }
.donts li::before { content: "Nie"; position: absolute; top: 1cqi; left: 1cqi; padding: 2px 9px; border-radius: 999px; background: var(--red); color: var(--white); font-size: max(11px, .72cqi); font-weight: 500; }
.bad-caps .lk-1 { text-transform: uppercase; letter-spacing: -0.02em; }
.bad-font .lk-1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-variation-settings: normal; letter-spacing: -0.02em; }
.bad-wide { transform: scaleX(1.18); }
.donts .bad-low { color: var(--leaf); --lk2: var(--leaf-2); }

/* ---------- 1.5 Colours: the template's proportion page ---------- */
.pal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr 1fr .5fr; flex: 1; min-height: 0; }
.pal li { display: flex; flex-direction: column; min-height: 0; padding: 1.1cqi 1.25cqi; border-radius: .83cqi; color: var(--brand); font-size: max(11px, .885cqi); line-height: 1.5; }
.pal li b { margin-bottom: auto; font-size: max(20px, 2.9cqi); font-weight: 400; line-height: 1; letter-spacing: -0.035em; }
.pal li.dk { color: var(--white); }
.c-brand { grid-area: 1 / 1 / 3 / 2; background: var(--brand); }
.c-brand2 { grid-area: 1 / 2 / 3 / 3; background: var(--brand-2); }
.c-leaf { grid-area: 1 / 3 / 2 / 4; background: var(--leaf); }
.c-leaf2 { grid-area: 2 / 3 / 3 / 4; background: var(--leaf-2); }
.c-brown { grid-area: 1 / 4 / 3 / 5; background: var(--brown); }
.c-beige { grid-area: 3 / 1; background: var(--beige); }
.c-mist { grid-area: 3 / 2; background: var(--mist); }
.c-white { grid-area: 3 / 3; background: var(--white); }
.c-ink { grid-area: 3 / 4; background: var(--ink); }

/* ---------- 1.6 Type: four columns, giant cropped letters at the foot ---------- */
.faces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 1; min-height: 0; }
.faces li { position: relative; display: flex; flex-direction: column; gap: 1.6cqi; min-width: 0; padding: 0 1.04cqi; overflow: hidden; border-left: 1px solid rgba(44, 117, 80, .55); }
.faces li:first-child { padding-left: 0; border-left: 0; }
.f-name { font-size: max(15px, 1.85cqi); line-height: 1.15; letter-spacing: -0.02em; }
.f-set { font-size: max(13px, 1.5cqi); line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.faces .is .f-set, .faces .bg .f-set { font-size: max(12px, .885cqi); line-height: 1.6; }
.faces .w5 { font-weight: 500; }
.faces .is { font-family: "Instrument Sans", Arial, sans-serif; }
.f-big { margin-top: auto; margin-bottom: -4.6cqi; font-size: 21cqi; line-height: 1; letter-spacing: -0.05em; white-space: nowrap; }
.faces .bg .f-big { font-family: var(--mark-font); font-weight: 700; color: var(--brand); }

/* ---------- 1.7 Text hierarchy ---------- */
.hier { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3cqi; flex: 1; min-height: 0; }
.hier-l { display: flex; flex-direction: column; justify-content: center; gap: 1.4cqi; padding: 3cqi; background: var(--brand); color: var(--white); }
.h-cap { color: var(--leaf); font-size: max(11px, .9cqi); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.h-big { font-size: max(28px, 4.6cqi); line-height: 1; letter-spacing: -0.04em; }
.h-sub { font-size: max(13px, 1.5cqi); opacity: .9; }
.hier-r { display: grid; align-content: start; font-size: max(12px, .885cqi); line-height: 1.6; }
.hier-r div { display: grid; grid-template-columns: 8cqi 1fr; gap: 1cqi; padding: .9cqi 0; border-top: 1px solid var(--hair); }
.hier-r dt { font-weight: 600; }

/* ---------- 1.8 Folder bands ---------- */
.bands-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.bands-big { position: absolute; inset: 0; width: 100%; height: 100%; }
.rules3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.04cqi; padding-top: 1.2cqi; }
.rules3 li { padding-top: .7cqi; border-top: 1px solid var(--hair); font-size: max(12px, .885cqi); line-height: 1.55; }
.rules3 b { display: block; font-weight: 600; }

/* ---------- 1.9 Photography: the template's mosaic ---------- */
.mosaic { display: grid; grid-template-columns: 450fr 607fr 450fr; grid-template-rows: minmax(0, 291fr) minmax(0, 187fr) minmax(0, 292fr); gap: 1.09cqi 1.04cqi; flex: 1; min-height: 0; }
.mosaic li { position: relative; min-height: 0; overflow: hidden; background: var(--leaf-2); }
.mosaic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m1 { grid-area: 1 / 1; }
.m2 { grid-area: 2 / 1 / 4 / 2; }
.m3 { grid-area: 1 / 2; }
.m4 { grid-area: 2 / 2; }
.m5 { grid-area: 3 / 2; }
.m6 { grid-area: 1 / 3 / 3 / 4; }
.m7 { grid-area: 3 / 3; }

/* ---------- Banners, built from the brand parts. Inside a banner, sizes are in cq units of the banner ---------- */
.bn { position: relative; container-type: size; display: grid; aspect-ratio: var(--ar); overflow: hidden; background: var(--brand); color: var(--white); font-family: var(--font); --bh: 17cqh; }
.bn.h { grid-template-columns: 46% minmax(0, 1fr); }
.bn.v, .bn.story, .bn.sq, .bn.mr { grid-template-rows: 54% minmax(0, 1fr); }
.bn.sq { grid-template-rows: 58% minmax(0, 1fr); }
.bn.story { grid-template-rows: 50% minmax(0, 1fr); }
.bn.mr { grid-template-rows: 46% minmax(0, 1fr); }
.bn.lb { grid-template-columns: 17% minmax(0, 1fr); --bh: 16cqh; }
.bn.mesh { grid-template-columns: 1fr; }
.bn-ph { position: relative; min-height: 0; overflow: hidden; }
.bn-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bn-tag { position: absolute; top: 0; left: 0; padding: .9cqmin 2.4cqmin 1.1cqmin 1.8cqmin; border-bottom-right-radius: 2cqmin; background: var(--white); color: var(--ink-2); font-size: max(5px, 2.6cqmin); font-weight: 500; line-height: 1.2; }
.bn-tx { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 0; padding: var(--tp, 8cqmin) 6cqmin calc(var(--bh) + 4.5cqmin); }
.bn-h { max-width: 100%; font-size: var(--hs, 10cqmin); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.bn-h b { font-weight: 500; }
.bn-s { margin-top: 3.4cqmin; font-size: var(--ss, 3.8cqmin); line-height: 1.3; opacity: .92; }
.bn-lk { margin-top: auto; align-self: flex-end; --s: var(--ls, 10cqmin); }
.bn-cta { margin-top: 5cqmin; padding: 1.8cqmin 3.6cqmin; border-radius: 999px; background: var(--white); color: var(--brand); font-size: var(--cs, 3.6cqmin); font-weight: 500; line-height: 1.2; white-space: nowrap; }
.bn-bands { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; width: 100%; height: var(--bh); }
.bn.v { --hs: 10.5cqmin; --ls: 12cqmin; --tp: 7cqmin; --bh: 9cqh; }
.bn.story { --hs: 11cqmin; --ls: 14cqmin; --tp: 9cqmin; --bh: 8cqh; --cs: 5cqmin; }
.bn.sq { --hs: 8cqmin; --ls: 9cqmin; --tp: 6cqmin; --bh: 12cqh; }
.bn.mr { --hs: 9cqmin; --ls: 9cqmin; --tp: 6cqmin; --bh: 12cqh; --cs: 4.6cqmin; }
.bn.mr .bn-cta { margin-top: 3.5cqmin; }
.bn.lb .bn-tx { flex-direction: row; align-items: center; gap: 5cqh; padding: 0 5cqh calc(var(--bh) + 2cqh) 9cqh; }
.bn.lb .bn-h { font-size: 24cqh; white-space: nowrap; }
.bn.lb .bn-cta { margin: 0 0 0 auto; font-size: 15cqh; padding: 6cqh 13cqh; }
.bn.lb .bn-lk { margin: 0; align-self: center; --s: 30cqh; }
.bn.wide { --hs: 13cqmin; --ls: 13cqmin; --bh: 16cqh; grid-template-columns: 38% minmax(0, 1fr); }
.bn.mesh .bn-tx { justify-content: center; padding: 6cqmin 8cqmin calc(var(--bh) + 6cqmin); }
.bn.mesh .bn-lk { margin: 0; align-self: flex-start; --s: 22cqmin; }
.bn.mesh .bn-s { margin-top: 8cqmin; font-size: 5.5cqmin; }
@container (max-width: 160px) { .bn-tag { display: none; } }

/* ---------- 2.1 Banner anatomy: one billboard as large as the page allows ---------- */
.anat { position: relative; flex: 1; min-height: 0; }
.anat .ad { position: absolute; top: 0; left: 0; width: auto; height: 100%; max-width: 100%; }

/* ---------- 2.2 Formats ---------- */
.fmts { display: grid; align-content: start; gap: 1.6cqi; flex: 1; min-height: 0; }
.fmt-row { display: flex; align-items: flex-start; gap: 1.6cqi; }
.fmt-row figure { display: flex; flex-direction: column; gap: .5cqi; }
.fmt-row .ad { height: 17cqi; width: calc(17cqi * var(--ar)); }
.fmts figcaption, .web figcaption { display: flex; gap: .7em; font-size: max(11px, .78cqi); line-height: 1.3; color: var(--muted); white-space: nowrap; }
.fmts figcaption b, .web figcaption b { color: var(--ink); font-weight: 600; }

/* ---------- Mockup photos fill the content area ---------- */
.shot { position: relative; container-type: inline-size; flex: 1; min-height: 0; background: var(--sand); }
.shot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* ---------- 2.8 Online formats. Column widths are solved so the leaderboard ends level with the story ---------- */
.web { display: grid; grid-template-columns: 16.5cqi 14.66cqi minmax(0, 1fr); gap: 1.6cqi; align-items: start; flex: 1; min-height: 0; }
.web figure { display: flex; flex-direction: column; gap: .5cqi; min-width: 0; }
.web figcaption { height: 1.6cqi; }
.w-r { display: grid; gap: 1.6cqi; min-width: 0; }
.w-r1 { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.04cqi; align-items: start; }

/* ---------- Ad artboards: inline SVG at the real pixel size of each format, scaled as a whole ---------- */
.ad { display: block; width: 100%; height: auto; }
.ad text { font-family: var(--font); fill: var(--white); }
.ad .ad-h { letter-spacing: -0.035em; }
.ad .ad-b, .ad .ad-m { font-weight: 500; }
.ad .ad-s { opacity: .88; }
.ad .ad-w { font-family: var(--mark-font); font-weight: 700; font-variation-settings: "opsz" 96; letter-spacing: -0.05em; }
.ad .ad-p { fill: var(--leaf); font-weight: 500; letter-spacing: .24em; }
.ad .ad-tagbg { fill: var(--white); }
.ad .ad-tag { fill: var(--ink-2); font-weight: 500; }
.ad .ad-cta rect { fill: var(--white); }
.ad .ad-cta text { fill: var(--brand); font-weight: 500; }

/* ---------- 2.9 Advertising don'ts ---------- */
.bn-donts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4cqi 1.6cqi; flex: 1; min-height: 0; align-content: start; }
.bn-donts > li { position: relative; display: grid; gap: .6cqi; }
.bn-donts > li::before { content: "Nie"; position: absolute; top: .8cqi; right: .8cqi; z-index: 4; padding: 2px 9px; border-radius: 999px; background: var(--red); color: var(--white); font-size: max(11px, .72cqi); font-weight: 500; }
.bn-donts > li > p { display: flex; gap: .7em; font-size: max(11px, .8cqi); color: var(--muted); }
.bn-donts > li > p b { color: var(--ink); font-weight: 600; }
.bn-donts .bn { width: 100%; }
.bad-onphoto { grid-template-columns: 1fr !important; }
.bad-onphoto .bn-ph { grid-area: 1 / 1; }
.bad-onphoto .bn-tx { grid-area: 1 / 1; z-index: 1; align-items: flex-end; text-align: right; padding-bottom: 8cqmin; }
.bad-onphoto .bn-h { max-width: 60%; }
.bad-much .bn-h { --hs: 7.5cqmin; }
.bn-list { margin-top: 2cqmin; padding-left: 1em; list-style: disc; font-size: 3.4cqmin; line-height: 1.3; }
.bad-much .bn-s { margin-top: 2cqmin; font-size: 3cqmin; }
.bad-much .bn-lk { --s: 6cqmin; }
.bad-shout .bn-h { --hs: 8.4cqmin; font-weight: 600; letter-spacing: 0; }
.bad-logo .bn-lk { margin: 0 0 4cqmin; align-self: flex-start; --s: 13cqmin; }

/* ---------- Foot on the desk ---------- */
.foot { padding: 4px 4px 0; color: rgba(255, 255, 255, .62); font-size: 13.5px; }
.foot a { color: var(--leaf); }

/* ---------- Tablets: pages keep 16:9, the side contents go ---------- */
@media (max-width: 1099px) {
  .top { padding: 10px 16px; gap: 12px; }
  .top-t { display: none; }
  .book { padding: 8px 16px 24px; gap: 18px; }
  .pg-toc { display: none; }
  .pg-in { grid-template-columns: 9cqi minmax(0, 1fr); }
  .pg-hd { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .pg-hd p { width: auto; }
}

/* ---------- Phones: pages become plain sections ---------- */
@media (max-width: 699px) {
  .top-site { display: none; }
  .top-nav { overflow-x: auto; scrollbar-width: none; }
  .top-nav a span { display: none; }
  .book { padding: 6px 10px 20px; gap: 12px; }
  .pg { aspect-ratio: auto; }
  .pg-in { display: block; padding: 20px 16px 22px; }
  .pg-no { padding-bottom: 6px; border-bottom: 0; font-size: 15px; color: var(--muted); }
  .green .pg-no, .leaf .pg-no { color: inherit; opacity: .8; }
  .pg-side { display: none; }
  .pg-hd { display: block; padding: 0 0 14px; border-left: 0; }
  .pg-hd::after { left: 0; }
  .pg-hd h2 { font-size: 26px; }
  .pg-hd p { margin-top: 10px; font-size: 14px; }
  .pg-bd { padding: 16px 0 0; border-left: 0; }
  .cv { display: flex; flex-direction: column; gap: 16px; min-height: 480px; padding: 24px 18px; }
  .cv h1, .cv h2 { font-size: 15cqi; }
  .end h2 { font-size: 12cqi; }
  .cv-who { font-size: 16px; }
  .cv-lk { --s: 17cqi; margin-top: auto; align-self: flex-start; }
  .cv-ver { font-size: 13px; }
  .toc-full, .toc-cols { grid-template-columns: 1fr; gap: 20px; }
  .intro { max-width: none; font-size: 14px; }
  .toc-cols { font-size: 14px; }
  .dv-bd { grid-template-columns: 1fr; gap: 20px; }
  .dv-no { order: 2; margin: 0; font-size: 46cqi; }
  .dv-list { padding-left: 0; border-left: 0; font-size: 16px; }
  .idea, .cells, .hier, .bn-donts { grid-template-columns: 1fr; }
  .idea-l { padding-right: 0; }
  .st { font-size: 30px; }
  .words li { grid-template-columns: 110px 1fr; padding: 10px 0; }
  .ph { aspect-ratio: 16 / 10; }
  .cells { grid-template-rows: none; row-gap: 20px; }
  .cell-c { min-height: 140px; }
  .c-main .lk { --s: 16cqi; }
  .logo-short { --s: 11cqi; }
  .fav.f1 { width: 48px; height: 48px; font-size: 26px; }
  .fav.f2 { width: 32px; height: 32px; font-size: 17px; }
  .fav.f3 { width: 16px; height: 16px; font-size: 9px; }
  .spec div { grid-template-columns: 110px 1fr; padding: 8px 0; }
  .lk-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .lk-grid li { aspect-ratio: 1; }
  .lk-grid .lk { --s: 9cqi; }
  .donts { grid-template-columns: 1fr 1fr; }
  .donts li { aspect-ratio: 1; }
  .donts .lk { --s: 7cqi; }
  .pal { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 104px; }
  .pal li { grid-area: auto !important; }
  .pal li.c-brand { grid-column: 1 / -1 !important; }
  .pal li b { font-size: 22px; }
  .faces { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .faces li:nth-child(3) { padding-left: 0; border-left: 0; }
  .f-big { font-size: 26cqi; margin-bottom: -6cqi; }
  .hier-l { padding: 22px 18px; }
  .h-big { font-size: 30px; }
  .hier-r div { grid-template-columns: 90px 1fr; padding: 10px 0; }
  .bands-wrap { aspect-ratio: 16 / 9; }
  .rules3 { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 120px; }
  .mosaic li { grid-area: auto !important; }
  .mosaic .m1, .mosaic .m5 { grid-column: 1 / -1 !important; grid-row: span 2; }
  .anat { flex: none; }
  .anat .ad { position: static; width: 100%; height: auto; }
  .fmts { display: grid; grid-template-rows: none; gap: 18px; }
  .fmt-row { flex-direction: column; align-items: stretch; gap: 18px; }
  .fmt-row .ad { height: auto; width: 100%; }
  .fmt-row figure[style*=".677"] .ad, .fmt-row figure[style*="ar:1"] .ad { width: 62%; }
  .shot { flex: none; aspect-ratio: 16 / 9; }
  .web { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .web figcaption { height: auto; }
  .w-r { grid-column: 1 / -1; gap: 18px; }
  .w-r1 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .bn-donts .bn { max-height: none; width: 100%; }
  .foot { padding: 0 4px; }
}
