/* ==========================================================================
   Nikola Znaor Architects
   One colour (Klein Blue) on white. One type family (DIN Next LT Pro, Barlow as fallback).
   The page is a drawing sheet: thin border, numbered title rows, hairline tables.

   Contents
   1. Tokens          6. Home hero and page bands     11. Project page
   2. Base            7. Sections and title rows      12. Title block footer
   3. Sheet frame     8. Approach, studio, lists      13. Small screens
   4. Navigation      9. Work schedule and filter     14. Reduced motion
   5. Helpers        10. Airshade diagram
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --white: #FFFFFF;
  --klein: #002FA7;                       /* Yves Klein Blue: the only colour */
  --line: rgba(0, 47, 167, .3);           /* blue hairline on white */
  --line-light: rgba(255, 255, 255, .35); /* white hairline on blue */
  /* "NZA DIN" names only exist once licensed DIN Next web font files are added in fonts.css.
     Until then every visitor sees Barlow, so the site looks the same on every computer
     (a DIN installed on one Mac is deliberately not used). */
  --cond: "NZA DIN Condensed", "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "NZA DIN", "Barlow", Arial, sans-serif;
  --gutter: clamp(.5rem, 1.75vw, 1.5rem);   /* white margin around the sheet */
  --nav-h: 2.8rem;
  --no-col: 5.2rem;   /* number column: Fig. 01, 02.1, A … all share one vertical line */
}

/* 2. Base ------------------------------------------------------------------ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--white); color: var(--klein); font-family: var(--text); font-weight: 300; font-size: 1.0625rem; line-height: 1.55; }
a { color: var(--klein); text-decoration: none; }
/* Hover: links never get underlined; they flip to the opposite colour (blue field, white text) */
a:hover { text-decoration: none; background: var(--klein); color: var(--white); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }

/* 3. Sheet frame: like a drawing sheet with a thin blue border and a narrow white margin */
.sheet { margin: var(--gutter); border: 1px solid var(--klein); }

/* 4. Navigation: the top strip of the sheet -------------------------------- */
.nav { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto auto 1fr; background: var(--klein); border-bottom: 1px solid var(--line-light); font-family: var(--cond); font-size: 1.05rem; }
.nav a, .nav button { padding: .7rem 1rem; display: block; color: var(--white); }
.nav .brand { font-weight: 500; justify-self: start; border-right: 1px solid var(--line-light); }
.nav ul { list-style: none; display: flex; justify-self: end; }
.nav li { border-left: 1px solid var(--line-light); }
/* Menu cells invert on hover and for the current page: white cell, blue text, no underline */
.nav a:hover, .nav button:hover, .nav li a[aria-current], .nav .lang a[aria-current] { background: var(--white); color: var(--klein); text-decoration: none; }
.nav a:focus-visible, .nav button:focus-visible { outline-offset: -4px; }
/* Language switch, top left next to the name: EN / NL / HR. The current language is inverted. */
.nav .lang { display: flex; align-items: stretch; border-right: 1px solid var(--line-light); padding: 0 .5rem; }
.nav .lang a { padding-inline: .45rem; }
.nav .lang span { align-self: center; opacity: .6; }
.nav .menu-toggle { display: none; font: inherit; background: none; border: none; border-left: 1px solid var(--line-light); cursor: pointer; }

/* 5. Helpers --------------------------------------------------------------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: 0; z-index: 20; padding: .6rem 1rem; background: var(--white); color: var(--klein); font-family: var(--cond); transform: translateY(-120%); }
.skip:focus { transform: none; }
[hidden] { display: none !important; }

/* 6. Home hero and page bands: construction grid with the growing structure */
.hero, .band { position: relative; overflow: hidden; background: var(--klein); color: var(--white); }
.hero canvas, .band canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero { height: calc(100vh - 2 * var(--gutter) - var(--nav-h)); min-height: 520px; }
@supports (height: 100svh) { .hero { height: calc(100svh - 2 * var(--gutter) - var(--nav-h)); } }
.hero h1, .band h1 { position: absolute; left: 1rem; bottom: .5rem; font-family: var(--cond); font-weight: 300; line-height: .85; letter-spacing: -.01em; }
/* Home title: solid white letters with construction lines, like hand lettering on a plan.
   blueprint.js puts "Nikola Znaor" in the grid row between lines 2 and 3 and
   "Architects" in the row between 3 and 4, left-aligned, each line as large as its row allows.
   It first draws the guide lines (cap line, baseline, short verticals at the capitals),
   then fades the letters in. Without JavaScript the two lines simply sit in the middle on the left. */
.hero h1 { top: 50%; bottom: auto; transform: translateY(-50%); font-weight: 400; font-size: clamp(3rem, 9vw, 9rem); line-height: .95; }
.hero h1 > span { display: block; white-space: nowrap; }
.hero h1 .bl { display: inline-block; width: 0; height: 0; }   /* invisible marker on the baseline */
.hero h1.snapped { inset: 0; transform: none; }
.hero h1.snapped > span { position: absolute; left: 0; line-height: 1; }
/* Letters appear one by one when the page opens (blueprint.js adds .on to each letter) */
.hero h1 .ch { opacity: 0; transition: opacity .45s ease; }
.hero h1 .ch.on { opacity: 1; }

.hero p, .band-meta { position: absolute; right: 1rem; top: 1rem; max-width: 46ch; font-family: var(--cond); font-size: 1.15rem; line-height: 1.3; text-align: right; }
.hero p, .band-meta { top: 3rem; }
.hero p span { display: block; }                    /* one sentence per line */                            /* sits below the axis bubbles */

/* Page band: a short strip of the same blueprint, for Approach, Work, Studio, Contact */
/* One grid row high: the title stands on grid line 1, so the page below fits on one screen.
   --step is the same grid spacing that blueprint.js draws (sheet width / 8, at least 80px). */
.band { --step: max(80px, calc((100vw - 2 * var(--gutter)) / 8)); --below: 1.4rem; height: calc(var(--step) + var(--below)); }
.band h1 { font-size: calc(var(--step) * .62); line-height: 1; bottom: calc(var(--below) - .12em); left: 56px; }
/* Project band: taller, with the project's own growing structure */
/* Project page: just a blue strip with the title in bold and the sheet number */
.band--strip { border-bottom: 1px solid var(--line-light);   /* same fine line as under the menu */ height: auto; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding: 2.2rem 1rem .9rem; }
.band--strip h1, .band--strip .band-meta { position: static; }
.band--strip h1 { font-weight: 500; font-size: clamp(2.6rem, 6.5vw, 5.5rem); line-height: .95; }
.band--strip .band-meta { text-align: right; }

/* 7. Sections are sheets with a title row ---------------------------------- */
section { border-bottom: 1px solid var(--klein); }
main > section:last-child { border-bottom: none; }
.title-row { display: grid; grid-template-columns: var(--no-col) 1fr; border-bottom: 1px solid var(--line); font-family: var(--cond); }
.title-row span { padding: .6rem 1rem; border-right: 1px solid var(--line); font-weight: 500; }
.title-row h2 { padding: .6rem 1rem; font-weight: 400; font-size: 1.05rem; }
.body { padding: clamp(2.5rem, 7vh, 5rem) 1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > * { padding: clamp(2.5rem, 7vh, 5rem) 1rem; }
.split > * + * { border-left: 1px solid var(--line); }
.statement { font-family: var(--cond); font-weight: 300; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.05; max-width: 22ch; }
.small { margin-top: 1.5rem; max-width: 46ch; }
.split > div > .small:first-child { margin-top: 0; }

/* 8. Approach, studio, lists ----------------------------------------------- */
/* Principles (right half of Approach): a clean hairline grid that runs edge to edge.
   Each row: a square cell with the animated drawing | title and text. */
.approach-split > .principles { padding: 0; list-style: none; display: grid; grid-auto-rows: 1fr; }
.principles li { display: grid; grid-template-columns: 1fr 3fr; align-items: stretch; }   /* sketch column = 1/8 of the sheet: from axis D to axis E */
.principles li + li { border-top: 1px solid var(--line); }
.principle-text { padding: 1.75rem 1.25rem; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--line); }   /* the line at axis E runs through every row */
.principle-text p { max-width: 46ch; }
.principles h3 { font-family: var(--cond); font-weight: 500; font-size: 1.35rem; line-height: 1.2; margin-bottom: .35rem; }

/* The little drawings (partials/principle-sketch.njk) */
.sketch { display: block; width: 100%; height: 100%; max-height: 9.5rem; min-height: 7.5rem; padding: 1.4rem; align-self: center; stroke: var(--klein); stroke-width: 1.3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sketch .ground { stroke: var(--line); }
/* 1 Truth to material: stones appear course by course, then the lintel */
.sk-material .b { animation: sk-lay 7s var(--d, 0s) infinite both; }
.sk-material .grain { stroke-width: .8; }
@keyframes sk-lay { 0% { opacity: 0; transform: translateY(-4px); } 6%, 80% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }
/* 2 Structure as expression: the load flows down the branches */
.sk-structure .frame { stroke: var(--line); }
.sk-structure .flow { stroke-width: 2.4; stroke-dasharray: 14 140; animation: sk-flow 3.6s var(--d, 0s) linear infinite both; }
.sk-structure .arrow { animation: sk-press 3.6s ease-in-out infinite; }
@keyframes sk-flow { from { stroke-dashoffset: 14; } to { stroke-dashoffset: -100; } }
@keyframes sk-press { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
/* 3 Climate first: sun along its arc, fins turn with it, air moves through */
.sk-climate .orbit { stroke: var(--line); stroke-dasharray: 2 3; }
.sk-climate .sun { offset-path: path("M10 62 Q40 -4 70 22"); animation: sk-sun 8s ease-in-out infinite alternate; fill: var(--white); }
.sk-climate .fin { transform-box: fill-box; transform-origin: left center; animation: sk-fin 8s ease-in-out infinite alternate; }
.sk-climate .air { stroke-dasharray: 6 6; animation: sk-air 2s linear infinite; }
@keyframes sk-sun { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes sk-fin { from { transform: rotate(0deg); } to { transform: rotate(55deg); } }
@keyframes sk-air { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) {
  .sketch * { animation: none !important; }
  .sk-climate .sun { offset-distance: 50%; }
}

dl { display: grid; grid-template-columns: 8rem 1fr; font-family: var(--cond); font-size: 1.1rem; }
dt, dd { padding: .55rem 0; border-top: 1px solid var(--line); }
dt { font-weight: 500; }
.entries { list-style: none; font-family: var(--cond); font-size: 1.1rem; }
.entries li { display: grid; grid-template-columns: 5rem 1fr; padding: .55rem 0; border-top: 1px solid var(--line); }
.entries .when { font-weight: 500; }
h3.list-title { font-family: var(--cond); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.25rem; }

.contact .mail { font-family: var(--cond); font-weight: 300; font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1; overflow-wrap: anywhere; }

/* 9. Work as a drawing schedule -------------------------------------------- */
/* The first column (the wider "All" button and the little drawings below it) */
/* Columns follow the blueprint grid above: 8 equal columns, lines on axes A, D, E and G */
.filters button[data-filter="all"] { width: 12.5%; flex: none; text-align: left; }
.project summary .mini-cell { display: flex; align-items: center; justify-content: center; padding: .35rem .6rem; }
.mini { width: 100%; height: 2.6rem; stroke: var(--klein); stroke-width: 1.3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mini .g { stroke: var(--line); }
/* Hovering a row redraws its drawing, stroke by stroke */
.mini * { stroke-dasharray: 1; stroke-dashoffset: 0; }
.project summary:hover .mini * { animation: mini-draw 1.1s ease-out both; }
.project summary:hover .mini *:nth-child(3) { animation-delay: .2s; }
.project summary:hover .mini *:nth-child(4) { animation-delay: .4s; }
@keyframes mini-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.mini .vine { stroke-width: 1; }
/* Airshade: the air chamber inflates on hover */
.mini .bag { transform-box: fill-box; transform-origin: bottom center; }
.project summary:hover .mini .bag { animation: mini-inflate 1.4s ease-in-out both; stroke-dasharray: none; }
@keyframes mini-inflate { from { transform: scaleY(.35); } to { transform: scaleY(1.25); } }
@media (prefers-reduced-motion: reduce) { .project summary:hover .mini * { animation: none; } }

.filters { display: flex; border-bottom: 1px solid var(--line); font-family: var(--cond); overflow-x: auto; }
.filters button { font: inherit; font-size: 1.05rem; background: none; border: none; border-right: 1px solid var(--line); padding: .6rem 1rem; cursor: pointer; color: var(--klein); white-space: nowrap; }
.filters button[aria-pressed="true"] { background: var(--klein); color: var(--white); }
.filters button:focus-visible { outline-offset: -4px; }
.filters button[aria-pressed="true"]:focus-visible { outline-color: var(--white); }

.project summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 3fr 1fr 2fr 1fr; border-bottom: 1px solid var(--line); font-family: var(--cond); font-size: 1.15rem; }
.project summary::-webkit-details-marker { display: none; }
.project summary:focus-visible { outline-offset: -4px; }
.project summary span { padding: .8rem 1rem; }
.project summary span + span { border-left: 1px solid var(--line); }
.project summary .title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 400; }
/* Hover and open row: only the title cell inverts (blue field, white text), like the menu */
.project summary:hover .title, .project[open] summary .title { background: var(--klein); color: var(--white); }
.project summary:focus-visible { outline-color: var(--klein); }
.project-body { display: grid; grid-template-columns: 1fr 3fr 4fr; border-bottom: 1px solid var(--line); }
.project-text { padding: 1.5rem 1rem; border-left: 1px solid var(--line); }
.open-cell { padding: 1.5rem 1rem; }
.open-cell .more { margin-top: 0; }
.project-text p { max-width: 44ch; }
.more, .row-link { display: inline-block; margin-top: 1.25rem; font-family: var(--cond); font-size: 1.15rem; font-weight: 500; }
.row-link { display: block; margin: 0; padding: .8rem 1rem; text-align: right; }
/* Opened row: text up to axis D, then one image (usually the blue drawing) at a compact height */
.media { display: block; border-left: 1px solid var(--line); }
.media:hover { background: none; }
.media-cell { display: block; height: clamp(12rem, 22vw, 20rem); overflow: hidden; }
.media-cell + .media-cell { border-left: 1px solid var(--white); }
.media-cell picture, .media-cell .frame { display: block; height: 100%; aspect-ratio: auto; }
.media-cell img { width: 100%; height: 100%; object-fit: cover; }
.media-cell:only-child { grid-column: 1 / -1; }
/* Blue drawings show inverted in the list (blue lines on white) and flip back to white on blue on hover */
.media-cell.drawing img { filter: url(#klein-invert); }
.media:hover .media-cell.drawing img, .media:focus-visible .media-cell.drawing img { filter: none; }


/* Placeholder frame: crossed rectangle, like an empty field on a drawing */
.frame { aspect-ratio: 16 / 10; display: grid; place-items: center; font-family: var(--cond); color: var(--klein); background:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)),
    linear-gradient(to top left, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)); }
.frame span { background: var(--white); padding: .2rem .6rem; }

/* 10. Airshade diagram ----------------------------------------------------- */
.facts { list-style: none; margin-top: 1.5rem; font-family: var(--cond); font-size: 1.1rem; }
.facts li { padding: .5rem 0; border-top: 1px solid var(--line); }
.facade svg { width: 100%; height: auto; display: block; }
.facade text { font-family: var(--cond); }
.facade label { display: block; margin-top: 1rem; font-family: var(--cond); font-size: 1.05rem; }
.facade output { font-weight: 500; }
.facade input { width: 100%; margin-top: .4rem; accent-color: var(--klein); }
html:not(.js) .facade label { display: none; }

/* 11. Project page --------------------------------------------------------- */
/* Title block: one row of hairline cells, label above value */
.facts-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); font-size: 1rem; }
.facts-block div { padding: .9rem 1rem 1.1rem; border-right: 1px solid var(--line); }
.facts-block div:last-child { border-right: none; }
.facts-block dt, .facts-block dd { padding: 0; border: none; }
.facts-block dt { font-weight: 500; margin-bottom: .35rem; }
.facts-block dd { font-weight: 300; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.15; }

/* External link (e.g. a project website): inverts on hover like the other cells */
.facts-block a.ext:hover { background: var(--klein); color: var(--white); text-decoration: none; }

/* Project description: a compact box so the images come sooner.
   Lead sentence left, text right in a wider column that uses the full width. */
.project-sheet .split { grid-template-columns: 1fr 1.6fr; }
.project-sheet .split > * { padding: 1.5rem 1rem 2rem; }
.project-sheet .statement { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
.project-sheet .prose > * { max-width: 80ch; }

/* Text written in the project's Markdown file */
.prose { max-width: none; }
.prose > * { max-width: 52ch; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { font-family: var(--cond); font-weight: 500; font-size: 1.15rem; margin-top: 2em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.2em; }

/* Figures: first one full width, the rest in two columns, numbered like drawing details */
.figures { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); }
.figures figure { background: var(--white); display: flex; flex-direction: column; }
.figures .wide { grid-column: span 6; }      /* full width */
.figures .third { grid-column: span 2; }     /* three in a row */
.figures .half { grid-column: span 3; }      /* only used if two are left over */
.figures img { width: 100%; }
/* Smaller images fill equal 4:3 fields edge to edge (cropped), so every row lines up.
   Which part stays visible can be set per image with `position:` in the front matter. */
.figures figure:not(.wide) picture { display: block; position: relative; aspect-ratio: 4 / 3; }
.figures figure:not(.wide) img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.figures figcaption { margin-top: auto; }
.figures figcaption { display: grid; grid-template-columns: var(--no-col) 1fr; border-top: 1px solid var(--line); font-family: var(--cond); }
.figures figcaption > * { padding: .6rem 1rem; }
.figures .credit { opacity: .75; margin-left: .5rem; }   /* photographer, e.g. © Name */
.figures .fig-no { border-right: 1px solid var(--line); font-weight: 500; white-space: nowrap; }

/* Videos sit in the same fields as images */
.figures .vid { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--klein); }
.figures .wide .vid { aspect-ratio: 16 / 9; }
.figures .vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opening .figures .vid { aspect-ratio: auto; height: min(var(--open-h), 75vw); }

/* Opening row of a project: about half the screen high, so the first images are seen whole
   together with the start of the project information. Images are cropped to fit. */
/* White lines in the opening row: the gap between the images is white, so a blue drawing
   and a photo are separated like two sheets; the captions keep their blue hairline. */
.opening .figures { background: var(--white); }
.opening .figures figure + figure figcaption { box-shadow: -1px 0 0 var(--line); }
.opening { --open-h: clamp(240px, 50svh, 560px); }   /* about half the screen, so title block and text show too */
.opening .figures figure picture { aspect-ratio: auto; height: min(var(--open-h), 75vw); position: relative; display: block; }
.opening .figures figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opening .figures .third picture { height: min(var(--open-h), 25vw); }
@media (max-width: 760px) { .opening .figures figure picture { height: min(var(--open-h), 75vw); } }

/* Previous / All work / Next: three cells in the bottom row of the sheet */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; border-top: 1px solid var(--klein); font-family: var(--cond); font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.pager a { display: block; padding: .9rem 1rem 1.1rem; line-height: 1.15; }
.pager a + a { border-left: 1px solid var(--line); }
.pager a:hover .tb-label { color: var(--white); }
.pager a[rel="next"] { text-align: right; }
.pager .pager-index { font-size: 1.15rem; }

/* Small label above a value (pager, footer) */
.tb-label { display: block; font-size: 1rem; font-weight: 500; margin-bottom: .35rem; }

/* 12. Title block footer: the box in the corner of every drawing ----------- */
.titleblock { display: grid; grid-template-columns: 2fr 2fr 2fr 1fr 1fr; border-top: 1px solid var(--klein); font-family: var(--cond); font-size: 1.05rem; line-height: 1.25; }
.titleblock > div { padding: .45rem 1rem; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.titleblock .tb-label { display: inline; margin: 0 .5rem 0 0; font-size: inherit; }   /* label and value on one line */
.titleblock > div:last-child { border-right: none; }
.titleblock [aria-current] { background: var(--klein); color: var(--white); padding: 0 .2rem; }

/* 13. Small screens -------------------------------------------------------- */
@media (max-width: 760px) {
  .principles li { grid-template-columns: 6.5rem 1fr; }
  /* Menu: the links fold away behind a "Menu" cell. Without JavaScript they stay visible. */
  .js .nav .menu-toggle { display: block; }
  .nav { grid-template-columns: auto auto 1fr; }
  .nav .menu-toggle { justify-self: end; }
  .nav ul { grid-column: 1 / -1; flex-direction: column; justify-self: stretch; }
  .nav li { border-left: none; border-top: 1px solid var(--line-light); }
  .js .nav ul { display: none; }
  .js .nav.open ul { display: flex; }

  .split, .project-body, .project-sheet .split { grid-template-columns: 1fr; }   /* description: lead sentence above, text below */
  .project-sheet .split > * + * { padding-top: 0; }
  .open-cell { order: 2; padding-top: 0; }
  .project-text { border-left: none; }
  .media { order: 3; }
  .split > * + * { border-left: none; border-top: 1px solid var(--line); }
  .project summary { grid-template-columns: 4.5rem 1fr 4.5rem; }
  .filters button[data-filter="all"] { width: 4.5rem; }
  .project summary .place, .project summary .type { display: none; }
  .media { border-left: none; border-top: 1px solid var(--line); }
  .hero p { left: 3.5rem; right: 1rem; text-align: right; }   /* right-aligned, clear of the numbered axis bubbles */
  .band-meta { left: 1rem; text-align: left; }
  .band--strip { grid-template-columns: 1fr; padding-top: 1.6rem; }
  .band--strip .band-meta { text-align: left; }

  .facts-block { grid-template-columns: 1fr 1fr; }
  .facts-block div { border-bottom: 1px solid var(--line); }
  .facts-block div:nth-child(even) { border-right: none; }
  .figures .third, .figures .half { grid-column: span 6; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .pager-index { grid-column: 1 / -1; grid-row: 2; border-left: none; border-top: 1px solid var(--line); }
  .pager a[rel="next"] { border-left: 1px solid var(--line); }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div { border-bottom: 1px solid var(--line); }
  .titleblock > div:nth-child(even) { border-right: none; }
  .titleblock > div:first-child { grid-column: 1 / -1; border-right: none; }
}

/* 14. Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Phone: the sheet label of the Work/Studio bands sits right, so it never runs into the title;
   the filter buttons wrap onto a second line instead of being cut off at the edge. */
@media (max-width: 760px) {
  .band:not(.band--strip) .band-meta { left: auto; right: 1rem; text-align: right; }
  .filters { flex-wrap: wrap; overflow-x: visible; }
  .filters button { border-bottom: 1px solid var(--line); flex: 1 1 auto; }

  /* Sheet numbers are a desktop detail: hidden on the phone, in the bands and the footer */
  .sheet-no, .titleblock .tb-sheet { display: none; }
  .titleblock > div:nth-child(3) { grid-column: 1 / -1; border-right: none; }   /* contact gets the full width */
  .titleblock > div:nth-child(4) { border-right: 1px solid var(--line); }

  /* Only the first caption (Fig. 01, under the opening drawing) is a blue strip with white text;
     all other captions stay white with blue text, as on desktop */
  .opening .figures figure:first-child figcaption { background: var(--klein); color: var(--white); border-top: 1px solid var(--white); }
  .opening .figures figure:first-child .fig-no { border-right: 1px solid var(--line-light); }
  .opening .figures figure + figure figcaption { box-shadow: none; }
}
