/* ══ TEST2 project pages (2026-11-22) ══════════════════════════════
   Restyles the shared case-study template into the /?test2 study style
   approved on Klimabonus (projects/klimabonus/klimabonus-test2.html).
   Linked last in every generated page-test2.html (tools/make-test2.py),
   after the page's own <style>, so equal-specificity rules win here.
   Content, images and behaviour (galleries, hovers, lightbox, video)
   stay the page's own; only the look changes. */

:root {
  --bg:   #191919;
  --ink:  rgba(255,255,255,0.85);
  --mid:  rgba(255,255,255,0.75);
  --dim:  rgba(255,255,255,0.4);
  --hair: rgba(255,255,255,0.14);
  --card: #2a2a2a;
  --rule: rgba(255,255,255,0.35);
  --g: 10px;
  --nav-h: 36px;
  --body: clamp(15px, 1.25vw, 18px);
  --col: 75vw;
}
html, body { background: var(--bg) !important; }
body {
  color: var(--ink);
  font-size: 14.5px; line-height: 1.4;
  overflow-x: clip;
  padding-bottom: 0 !important;
}
/* one family throughout; Basetica only for the project title. Type
   specimens (.spec*, Atly brand) keep the typefaces they are showing. */
body, body *:not([class*="spec"]):not([class*="spec"] *) { font-family: 'Geist', system-ui, sans-serif !important; }
.proj-header h1, .proj-header h1 * { font-family: 'Basetica', 'Geist', system-ui, sans-serif !important; }

/* ── nav: identical to the /?test2 homepage ─────────────────────── */
nav.top.t2nav, nav.top.t2nav.scrolled {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); padding: 0 var(--g);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 0; pointer-events: auto;
  font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none;
}
nav.top.t2nav .name { display: block; line-height: 0; font-size: 0; color: var(--ink); position: relative; z-index: 112; }
nav.top.t2nav .name svg { display: block; width: 20px; height: 19px; margin: 0; }
nav.top.t2nav .links { display: flex; flex-direction: row; gap: 4px; position: static; transform: none; opacity: 1; visibility: visible; width: auto; }
nav.top.t2nav .links a { color: var(--mid); padding: 4px 7px 3px; line-height: 14px; font-size: 12px; letter-spacing: 0; transition: color 0.2s; }
nav.top.t2nav .links a:hover { color: #fff; }
nav.top.t2nav .burger { display: none; }
@media (max-width: 719px) {
  nav.top.t2nav .burger { display: block !important; }
  nav.top.t2nav .links {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; flex-direction: column; align-items: center; gap: 14px;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
  }
  nav.top.t2nav .links a { font-size: 18px; padding: 0; color: var(--ink); }
  nav.top.t2nav.open { height: 100dvh; bottom: auto; align-items: flex-start; padding-top: 8px; background: var(--bg); }
  nav.top.t2nav.open .name { position: relative; top: auto; left: auto; }
  nav.top.t2nav.open .burger { position: relative; top: auto; right: auto; }
  nav.top.t2nav.open .links { opacity: 1; visibility: visible; }
}

/* ── column: 75% of the viewport on desktop, 10px gutters below ─── */
.wrap { max-width: none !important; width: auto; padding: 0 var(--g) !important; margin: 0 auto; }
/* blocks the template sets edge to edge sit in the column instead */
.edge-img { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
body > :not(nav):not(footer):not(script):not(style):not(#lightbox):not(.wrap):not(.proj-nav):not([class^="sp-"]) {
  padding-left: var(--g); padding-right: var(--g);
}
/* edge-to-edge images placed straight in <body> join the column too */
body > .edge-img { padding-left: var(--g); padding-right: var(--g); }
@media (min-width: 1024px) {
  body > .edge-img { width: var(--col) !important; margin-left: auto !important; margin-right: auto !important; padding: 0; }
  .wrap { width: var(--col); padding: 0 !important; }
  body > :not(nav):not(footer):not(script):not(style):not(#lightbox):not(.wrap):not(.proj-nav):not([class^="sp-"]) {
    width: var(--col); max-width: none; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0;
  }
}

/* copy the case studies centred in a narrow box aligns to the column's
   left edge instead, like everything else (the box keeps its width) */
.centered, .narrow-text { margin-left: 0 !important; margin-right: 0 !important; }

/* ── header: details line above a large Basetica title ──────────── */
.proj-header {
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + 18vh) 0 28px !important;
  border: 0 !important;
}
.proj-header h1 {
  font-weight: 500 !important;
  font-size: clamp(44px, 7.4vw, 128px) !important;
  line-height: 0.95 !important; letter-spacing: -0.03em !important;
  color: var(--ink); text-wrap: balance; margin: 0 !important;
}
.proj-header .proj-meta, .proj-meta {
  order: -1;
  font-size: 12px !important; font-weight: 500; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--dim) !important; border: 0 !important; padding: 0 !important;
  margin: 0 0 14px !important;
}
@media (max-width: 719px) { .proj-header { padding-top: calc(var(--nav-h) + 12vh) !important; } }

/* ── lede and at-a-glance ───────────────────────────────────────── */
.lede, .lede p { font-size: var(--body) !important; line-height: 1.22 !important; color: var(--mid) !important; max-width: 46ch; }
.lede { margin-top: 28px !important; }
.lede strong { color: var(--ink); font-weight: 500; }
/* labels share one column sized to the longest ("Starting point") */
.glance {
  display: grid !important; grid-template-columns: max-content minmax(0, 1fr) !important;
  column-gap: 16px !important; row-gap: 10px !important;
  max-width: 560px; margin-top: 40px !important; border: 0 !important; padding: 0 !important;
}
.glance > div { display: contents !important; }
.glance > div > * { padding: 0 !important; border: 0 !important; background: none !important; }

/* intro row, as on Klimabonus: lede on the left, the details on the right */
.t2-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 40px; padding-top: 28px; }
.t2-intro > * { margin: 0 !important; }
.t2-intro .t2-lede { grid-column: 1 / span 7; }
.t2-intro .t2-lede .lede, .t2-intro .t2-lede > * { margin-top: 0 !important; }
.t2-intro .t2-lede p + p { margin-top: 0.8em; }
.t2-intro .glance { grid-column: 9 / -1; max-width: none; align-self: start; }
.t2-intro .glance:only-child { grid-column: 1 / span 7; }
@media (min-width: 720px) and (max-width: 1023px) { .t2-intro .glance { grid-column: 8 / -1; } }
@media (max-width: 719px) { .t2-intro .t2-lede, .t2-intro .glance { grid-column: 1 / -1; } }
.glance .k, .glance .v {
  font-size: 14.5px !important; font-weight: 400 !important; line-height: 1.4 !important;
  letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important; margin: 0 !important;
}

/* ── section heads: hairline + small title, like the homepage ───── */
.cs-label, .sec-label, .sec-title, h2.sec-title, .proj-sec-head, .wrap > h3, .results > h3:first-child {
  display: block; width: 100%;
  border-top: 1px solid var(--rule) !important; border-bottom: 0 !important;
  padding: 8px 0 0 !important; margin: 0 0 28px !important;
  font-size: clamp(18px, 1.45vw, 21px) !important; font-weight: 450 !important; line-height: 1.15 !important;
  letter-spacing: -0.005em !important; text-transform: none !important; color: var(--ink) !important;
  text-align: left;
}
/* label + headline merged into one head: headline on the rule, label at the end */
.t2-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  border-top: 1px solid var(--rule); padding-top: 8px; margin: 0 0 28px;
}
.t2-head h2 {
  font-size: clamp(18px, 1.45vw, 21px) !important; font-weight: 450 !important; line-height: 1.15 !important;
  letter-spacing: -0.005em !important; text-transform: none !important; color: var(--ink) !important; margin: 0 !important;
  border: 0 !important; padding: 0 !important;
}
.t2-head .n { flex: none; font-size: 12px !important; font-weight: 500; color: var(--dim) !important; letter-spacing: 0 !important; text-transform: none !important; }
.proj-sec-head * { font-size: inherit !important; font-weight: inherit !important; letter-spacing: inherit !important; text-transform: none !important; margin: 0 !important; color: inherit !important; }

/* ── text: two columns across two thirds of the width ───────────── */
.two-col {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  column-gap: var(--g) !important; row-gap: 28px !important;
}
.two-col h3, .decision h3, .results-block h3 {
  font-size: 12px !important; font-weight: 500 !important; line-height: 14px !important;
  letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important;
  margin: 0 0 8px !important;
}
.two-col p, .two-col li, .decision p, .results-block p, .results p, .logo-desc p, .logo-desc, .sec-intro, .note, .flow p {
  font-size: 14.5px !important; line-height: 1.45 !important; color: var(--mid) !important;
}
.two-col p + p { margin-top: 10px; }
.two-col a, .lede a, .src a, .results a, .decision a {
  color: var(--ink) !important; text-decoration: underline; text-decoration-color: var(--rule);
  text-underline-offset: 0.18em;
}
.logo-desc { max-width: 46ch !important; }
.src, .cap, .tag, .decision .tag, .n, .fig figcaption, figcaption {
  font-size: 12px !important; font-weight: 500 !important; letter-spacing: 0 !important;
  text-transform: none !important; color: var(--dim) !important;
}

/* labels the template set in mono capitals read as plain small type */
.k, .stat .l, .stats .l { text-transform: none !important; letter-spacing: 0 !important; }
.stat .l { font-size: 12px !important; font-weight: 500; color: var(--dim) !important; }
/* headline figures stay large (the generic .n label rule above must not shrink them) */
.stat .n {
  font-size: clamp(32px, 3.2vw, 52px) !important; font-weight: 500 !important; line-height: 1 !important;
  letter-spacing: -0.03em !important; color: var(--ink) !important;
}
/* call-to-action pills become the homepage's small dark tag */
.cta {
  border: 0 !important; border-radius: 3px !important; background: #2a2a2a !important;
  padding: 5px 8px 4px !important; font-size: 12px !important; font-weight: 500;
  letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important;
}
.cta:hover { background: #333 !important; color: #fff !important; }
@media (max-width: 1023px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 719px) { .two-col { grid-template-columns: 1fr !important; } }

/* ── typesetting rule (2026-11-24): a two-column text block is ONE text
   flow set in two balanced columns, so the columns end at about the same
   line, never a full column beside a one-liner. Applies to text-only
   blocks of exactly two column divs (images, figures, figures-of-merit
   and three-up grids keep the grid). Headings stay with what follows;
   no orphan or widow lines at a column break. Phones: one column. ── */
.two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) {
  display: block !important;
  columns: 2; column-gap: var(--g);
  /* the grid used two of its three tracks: keep that measure */
  max-width: calc((100% - 2 * var(--g)) * 2 / 3 + var(--g));
}
.two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) > * { display: contents; }
.two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) :is(h3, h4) { break-after: avoid; break-inside: avoid; }
.two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) :is(p, li) { orphans: 3; widows: 3; }
.two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) > * > :is(p, ul, ol) { margin: 0 0 10px !important; }
.two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) > * > :is(h3, h4) { margin-top: 22px !important; }
.two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) > :first-child > :first-child { margin-top: 0 !important; }
@media (max-width: 1023px) {
  .two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) { max-width: none; }
}
@media (max-width: 719px) {
  .two-col:has(> :nth-child(2):last-child):not(:has(img, figure, video, svg, picture, table, .stats, .stat, button)) { columns: 1; }
}

/* ── galleries: the identity grid keeps its masonry, 10px apart ─── */
.gallery .gallery-item { margin-bottom: var(--g) !important; }
@media (min-width: 720px) { .gallery { column-gap: var(--g) !important; } }

/* ── Back / Next: a hairline row at the end (not fixed) ─────────── */
.proj-nav {
  position: static !important; height: auto !important; width: auto !important;
  display: flex !important; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--rule); padding: 8px 0 0 !important;
  margin: 140px 0 0 !important;
}
.proj-nav .back-link {
  position: static !important;
  font-size: var(--body) !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--mid) !important; border: 0 !important; padding: 0 !important; background: none !important;
}
.proj-nav .back-link:hover { color: #fff !important; }
@media (max-width: 719px) { .proj-nav { margin-top: 96px !important; } }

/* ── footer: the homepage's line ─────────────────────────────────── */
footer.bot {
  display: flex !important; justify-content: space-between;
  border: 0 !important; padding: 80px var(--g) 10px !important; margin: 0 auto;
  font-size: 12px !important; font-weight: 500; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--dim) !important;
}
@media (min-width: 1024px) { footer.bot { width: var(--col); padding: 80px 0 10px !important; } }

/* swipe strips that bled out by the old 24px gutter now bleed by 10px */
@media (max-width: 719px) {
  .shots-row, .plate-scroll { margin-left: calc(-1 * var(--g)) !important; margin-right: calc(-1 * var(--g)) !important; padding-left: var(--g) !important; padding-right: var(--g) !important; }
}

/* the old mobile swipe hint toast reads as a foreign object here */
#sr-swipe-toast { display: none !important; }

/* fewer rules, as on Klimabonus: only section heads carry a hairline.
   Decision rows, say/don't-say pairs and sub-labels inside a section
   are separated by space alone. */
.decision, .decision:first-of-type, .decision:last-child { border-top: 0 !important; border-bottom: 0 !important; }
/* say / don't-say cards: a flat tile instead of an outline */
.say > div { border: 0 !important; background: #222; border-radius: 3px; }
.decision { padding: 0 0 28px !important; }
:has(> .t2-head) .sec-label {
  border-top: 0 !important; padding-top: 0 !important; margin: 0 0 10px !important;
  font-size: 12px !important; font-weight: 500 !important; color: var(--dim) !important;
}
.results-list li { border-top: 0 !important; padding: 0 0 14px !important; }
.feats, .feats li { border-top: 0 !important; border-bottom: 0 !important; }
.feats li { padding: 0 0 22px !important; }
.stats, .stat { border-top: 0 !important; border-bottom: 0 !important; }

/* ── no dividers at all (2026-11-22): sections are separated by space
   and the heading alone. Every hairline the template or this sheet
   drew between blocks is switched off here, in one place. */
.cs-label, .sec-label, .sec-title, h2.sec-title, .proj-sec-head, .wrap > h3, .results > h3:first-child,
.t2-head, .proj-nav, .proj-header, .glance, .glance *, .two-col, .two-col > *, .stat, .stats,
.decision, .results-list li, .feats, .feats li, hr {
  border-top: 0 !important; border-bottom: 0 !important;
}
hr { display: none !important; }
.cs-label, .sec-label, .sec-title, h2.sec-title, .proj-sec-head, .wrap > h3, .results > h3:first-child, .t2-head { padding-top: 0 !important; }

/* ── audit fixes (2026-11-22) ───────────────────────────────────── */
/* the title is Basetica: the Geist override above outranks a plain
   .proj-header h1, so this one carries an id-level weight */
html body .proj-header:not(#_) h1, html body .proj-header:not(#_) h1 * {
  font-family: 'Basetica', 'Geist', system-ui, sans-serif !important;
}
/* flow pages (Atly onboarding/website, Usersnap brand/migration) padded
   their text blocks 56px in from the column; text starts on its edge */
.blk { padding-inline: 0 !important; max-width: none !important; }

/* one type scale everywhere, as on Klimabonus:
   12px labels · 14.5px copy · var(--body) lede/prose · head size */
.ba-label, .ba-label span, .d-cap, .say .k, .sw span, .usage span,
.feats .n, .sets span, .tiles span + span { font-size: 12px !important; letter-spacing: 0 !important; text-transform: none !important; }
p.solo, .note p, .txt p, .shot-notes p, .shots .note p, .feats p, .tiles span, .sets p,
.persona span, .results-list span, .more a, .decision p, .lensflashman p { font-size: 14.5px !important; line-height: 1.45 !important; }
.prose, .prose p { font-size: var(--body) !important; line-height: 1.22 !important; }
.txt h3, .note h3, .shot-notes h3, .decision h3, .feats b, .tiles b, .sets h4, h4 {
  font-size: 12px !important; font-weight: 500 !important; line-height: 1.4 !important; color: var(--ink) !important;
}
.say p { font-size: 14.5px !important; }
.results-list b { font-family: 'Geist', system-ui, sans-serif !important; font-size: clamp(18px, 1.45vw, 21px) !important; font-weight: 450 !important; }
/* the swipe strips also bleed on tablets (Gravolo at 820px stuck out 10px) */
@media (max-width: 1023px) {
  .shots-row, .plate-scroll { margin-left: calc(-1 * var(--g)) !important; margin-right: calc(-1 * var(--g)) !important; padding-left: var(--g) !important; padding-right: var(--g) !important; }
}
/* flow pages inset every block by --gut (56px); the column is the inset now */
:root { --gut: 0px !important; }
.flow > .proj-nav { align-self: stretch !important; width: auto !important; }
/* the lede keeps its larger size inside flow pages too */
.t2-lede .lede, .t2-lede .lede p, .t2-lede p.lede { font-size: var(--body) !important; line-height: 1.22 !important; color: var(--mid) !important; }

/* figures under the big numbers read as ordinary copy, and the columns
   sit a quarter of the width apart instead of spreading across it */
.stats {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  column-gap: var(--g) !important; row-gap: 28px !important; max-width: none !important;
}
.stats .stat { width: auto !important; padding: 0 !important; margin: 0 !important; }
.stat .l, .stats .l {
  font-size: 14.5px !important; font-weight: 400 !important; line-height: 1.45 !important;
  color: var(--mid) !important; margin-top: 10px !important; max-width: 30ch;
}
@media (max-width: 1023px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
/* phones (2026-11-23): the three figures stay side by side, each label
   under its number, the numbers sized to fit a third of the width */
@media (max-width: 719px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: var(--g) !important; }
  .stats .stat { display: block !important; }
  .stats .stat .n { font-size: clamp(22px, 7.4vw, 32px) !important; white-space: nowrap; }
  .stats .stat .l { margin-top: 8px !important; font-size: 13px !important; line-height: 1.35 !important; max-width: none; text-wrap: balance; }
}

/* images that do not fill the column start on its left edge, never centred */
.fig figure, .fig-pair, .shot figure, .shot2 figure, .mockup-card, .logo-hover,
.personas, .phones, .card-subtle, .ba, .ba-pair, figure, .fig, .figs {
  margin-left: 0 !important; margin-right: auto !important;
}
.personas { padding: 0 !important; justify-content: start !important; }
.persona { align-items: flex-start !important; text-align: left !important; }
.phones { justify-content: flex-start !important; padding-inline: 0 !important; scroll-padding-inline: 0 !important; }
.logo-hover img { object-position: left center !important; }
figcaption, .shot2 figcaption, .fig figcaption { text-align: left !important; }
img, video { margin-left: 0; }
.phones.trio > :last-child { justify-self: start !important; }
.shot, .shot2, .fig { padding-inline: 0 !important; }
/* centred boxes span the column so section heads reach its right edge;
   running text inside them keeps a readable measure */
.centered { max-width: none !important; width: auto !important; text-align: left !important; }
.centered > p, .centered .solo, .centered .resp-list p { max-width: 62ch; }
.cap, .caption, [class*="caption"], .personas + p, .personas + div { text-align: left !important; }
.d-cap { text-align: left !important; }
/* intro with a heading above the lede (Atly): the details line up with
   the paragraph, not the heading; consecutive lede paragraphs keep a gap */
@media (min-width: 720px) {
  .t2-intro:has(.t2-lede > h2) .glance { margin-top: calc(clamp(18px, 1.45vw, 21px) * 1.15 + 28px) !important; }
}
.t2-intro .t2-lede .lede + .lede { margin-top: 0.8em !important; }

/* ── buttons (2026-11-24): one button across both sites. White, black
      text, an arrow after the label; on hover the plate dims to the
      hero cream and the arrow steps forward. ── */
.cta {
  display: inline-flex !important; align-items: center; gap: 8px;
  background: #ffffff !important; color: #191919 !important;
  border: 0 !important; border-radius: 3px !important;
  padding: 7px 12px 6px !important; min-height: 0 !important; height: auto !important; width: auto !important;
  font-family: 'Geist', system-ui, sans-serif !important; font-size: 15px !important; line-height: 1.3 !important;
  font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important;
  text-decoration: none !important; opacity: 1 !important; cursor: pointer;
  transition: background-color 0.2s ease;
}
.cta::after { content: '\2192'; display: inline-block; transition: transform 0.2s ease; }
.cta:hover { background: #dedede !important; color: #191919 !important; }
.cta:hover::after { transform: translateX(3px); }
.cta:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.cta > span[aria-hidden] { display: none !important; }  /* the old ↗ */


/* images carry width/height for layout stability (2026-11-25); at zero
   specificity this only stops the height attribute from fixing the height */
:where(img[width][height]) { height: auto; }
