/* Casa Joy – Manual de identidade visual (/brandbook/)
   Consumes tokens.css. Each .page is one A4-landscape sheet in print and one
   full-height screen on desktop. Layout: 12-column grid; chapter openers use the
   ad's text column (number → title → 64 × 1,5 divider → intro) on the left. */

:root {
  --nav-h: 60px;
  --m: clamp(16px, 4.4vw, 64px);          /* page side margin */
  --g: clamp(16px, 2.2vw, 32px);          /* column gutter */
  --pt: clamp(32px, 6vh, 64px);           /* page top padding */
  --pb: clamp(64px, 9vh, 92px);           /* page bottom padding (folio lives here) */
  --avail: calc(100svh - var(--nav-h) - var(--pt) - var(--pb));

  --fs-body: 16px;
  --fs-small: 14px;
  --fs-xs: 12.5px;
  --fs-lead: clamp(17px, 0.5vw + 12px, 20px);
  --fs-ch: clamp(52px, 6.2vw, 104px);
  --fs-h3: clamp(32px, 3vw, 46px);
  --fs-h4: clamp(22px, 1.7vw, 28px);

  --tile-r: var(--cj-radius-card);
  --ink: var(--cj-oliva);
  --hair: 1px solid var(--cj-divisor);

  /* translucent versions of the palette, derived from tokens.css */
  --divisor-70: color-mix(in srgb, var(--cj-divisor) 70%, transparent);
  --divisor-60: color-mix(in srgb, var(--cj-divisor) 60%, transparent);
  --divisor-28: color-mix(in srgb, var(--cj-divisor) 28%, transparent);
  --oliva-35: color-mix(in srgb, var(--cj-oliva) 35%, transparent);
  --rotulo-55: color-mix(in srgb, var(--cj-rotulo) 55%, transparent);
  --rotulo-45: color-mix(in srgb, var(--cj-rotulo) 45%, transparent);
  --rotulo-20: color-mix(in srgb, var(--cj-rotulo) 20%, transparent);
}

/* ---------------------------------------------------------------- base -- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--cj-papel);
  scroll-padding-top: var(--nav-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--cj-papel);
  color: var(--ink);
  font-family: var(--cj-font-text);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  counter-reset: folio;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
b, strong { font-weight: 500; }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; }

.num { font-family: var(--cj-font-num); font-variant-numeric: lining-nums; }
.note { font-size: var(--fs-small); max-width: 46ch; }
.print-only { display: none; }

/* no orphans or awkward breaks in titles; nicer rag in short texts */
.ch-title, .pg-title, h4 { text-wrap: balance; }
.ch-intro, .pg-intro, .note, figcaption { text-wrap: pretty; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 50;
  padding: 12px 18px; background: var(--cj-oliva); color: var(--cj-rotulo);
  border-radius: var(--cj-radius-pill); text-decoration: none; font-size: var(--fs-small);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.icon-x, .icon-ok {
  display: inline-block; width: 0.95em; height: 0.95em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.1em; margin-right: 0.45em;
}

/* --------------------------------------------------------------- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 30;
  height: var(--nav-h);
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  padding: 0 var(--m);
  background: color-mix(in srgb, var(--cj-papel) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: var(--hair);
}
.nav__brand { display: flex; align-items: center; min-height: 44px; flex: none; }
/* 34 px tall keeps the symbol at ≥ 32 px wide, the minimum on page 07 */
.nav__brand img { width: auto; height: 34px; }
.nav__chapters { margin-left: auto; }
.nav__list { display: flex; gap: clamp(10px, 1.15vw, 22px); }
.nav__list a {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 13.5px; letter-spacing: 0.01em; white-space: nowrap; text-decoration: none;
}
.nav__n { font-family: var(--cj-font-num); font-size: 11px; letter-spacing: 0.06em; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: 9px; width: 0; height: 1.5px;
  background: currentColor; transition: width 0.25s ease;
}
.nav__list a:hover::after,
.nav__list a[aria-current="true"]::after { width: 100%; }
.nav__site {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--cj-oliva); border-radius: var(--cj-radius-pill);
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.06em; text-decoration: none;
}
.nav__site:hover { background: var(--cj-oliva); color: var(--cj-rotulo); }
.nav__toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px 0 14px;
  margin-left: auto; background: none; border: 0; cursor: pointer;
  font-size: 14px; letter-spacing: 0.02em;
}
.nav__toggle-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.nav.is-open .nav__toggle-icon path { d: path("M3 3l10 10M13 3L3 13"); }

@media screen and (max-width: 1259px) {
  .js .nav__toggle { display: inline-flex; }
  .js .nav__chapters {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    padding: 8px var(--m) 20px; background: var(--cj-papel); border-bottom: var(--hair);
    max-height: calc(100svh - var(--nav-h)); overflow-y: auto;
  }
  .js .nav.is-open .nav__chapters { display: block; }
  .js .nav__list { flex-direction: column; gap: 0; }
  .js .nav__list li { border-bottom: var(--hair); }
  .js .nav__list li:last-child { border-bottom: 0; }
  .js .nav__list a { min-height: 52px; font-size: 16px; gap: 14px; }
  .js .nav__n { font-size: 13px; width: 2em; }
  .js .nav__list a::after { bottom: 12px; left: calc(2em + 14px); }
  .js .nav__list a:hover::after, .js .nav__list a[aria-current="true"]::after { width: 2.5em; }

  /* without JavaScript the chapter list stays visible, wrapped under the brand row */
  .no-js .nav { position: relative; height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 8px; padding-bottom: 8px; }
  .no-js .nav__chapters { order: 3; flex-basis: 100%; margin-left: 0; }
  .no-js .nav__site { margin-left: auto; }
  .no-js .nav__list { flex-wrap: wrap; column-gap: 18px; row-gap: 0; }
}
@media screen and (min-width: 640px) and (max-width: 1259px) {
  .js .nav__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--g); }
  .js .nav__list li:nth-last-child(2) { border-bottom: 0; }
}
/* phones: the symbol alone (32 px wide), the full lockup would not fit beside the buttons */
@media screen and (max-width: 479px) {
  .nav__brand img { height: auto; width: 32px; }
}
@media screen and (max-width: 420px) {
  .nav__site { padding: 0 14px; letter-spacing: 0.03em; }
  .nav__toggle { padding-left: 6px; }
}

/* ------------------------------------------------------------- pages ---- */
.chapter { position: relative; }
.page {
  position: relative;
  counter-increment: folio;
  min-height: calc(100svh - var(--nav-h));
  padding: var(--pt) var(--m) var(--pb);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--g);
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: clamp(24px, 4.5vh, 48px);
  border-top: var(--hair);
}
.page--opener { grid-template-rows: minmax(0, 1fr); }
#capa .page { border-top: 0; }

.folio {
  position: absolute; left: var(--m); right: var(--m); bottom: clamp(18px, 3.2vh, 30px);
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--cj-font-num); font-size: 12px; letter-spacing: 0.06em;
  pointer-events: none;
}
.folio__n::before { content: counter(folio, decimal-leading-zero); }
.page--cover .folio__n { visibility: hidden; }

/* chapter opener: the ad's text column */
.ch-head { grid-column: 1 / span 4; display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; }
.ch-body { grid-column: 6 / -1; min-width: 0; align-self: center; }
.page--wide-body .ch-head { grid-column: 1 / span 3; }
.page--wide-body .ch-body { grid-column: 4 / -1; }
.ch-num {
  font-family: var(--cj-font-num); font-size: 15px; letter-spacing: 0.06em;
  margin-bottom: clamp(20px, 4vh, 40px);
}
/* the title group sits in the middle of the column, as in the feed ad */
.ch-num + .ch-title { margin-top: auto; }
.ch-head > :last-child { margin-bottom: auto; }
.page--dark .ch-head > :last-child { margin-bottom: 0; }
.ch-title {
  font-family: var(--cj-font-display); font-weight: var(--cj-weight-display);
  font-size: var(--fs-ch); line-height: 0.98; letter-spacing: -0.005em;
}
.ch-rule { display: block; width: 64px; height: 1.5px; background: var(--cj-divisor); margin: clamp(22px, 4vh, 36px) 0; }
.ch-intro { font-size: var(--fs-lead); line-height: 1.5; max-width: 30ch; }
.ch-note { margin-top: clamp(16px, 3vh, 28px); font-size: var(--fs-small); max-width: 34ch; }

/* continuation page head */
.pg-head {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: subgrid; align-items: end;
  padding-bottom: clamp(16px, 2.6vh, 24px); border-bottom: var(--hair);
}
.pg-title {
  grid-column: 1 / span 5;
  font-family: var(--cj-font-display); font-weight: var(--cj-weight-display);
  font-size: var(--fs-h3); line-height: 1.05;
}
.pg-intro { grid-column: 6 / span 6; max-width: 62ch; }
.pg-body { grid-column: 1 / -1; min-width: 0; align-self: center; }

h4, .h4 {
  font-family: var(--cj-font-display); font-weight: var(--cj-weight-display);
  font-size: var(--fs-h4); line-height: 1.15;
}

/* ------------------------------------------------------------ 00 capa --- */
.page--cover {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center;
  padding-top: clamp(20px, 4vh, 44px);
}
.cover-label {
  position: relative;
  width: min(100%, calc((100svh - var(--nav-h) - var(--pt) - var(--pb)) * 0.786), 600px);
  aspect-ratio: 555 / 706;
  background: var(--cj-rotulo);
  border-radius: 4.3% / 3.38%;
  container-type: inline-size;
}
.cover-label > * { position: absolute; left: 7.2%; right: 7.2%; margin: 0; text-align: center; }
.cover-label__lockup { top: 15.156%; left: 15.775%; right: auto; width: 68.45%; }
.cover-label__line {
  top: 48.6%;
  font-family: var(--cj-font-text); font-weight: 400;
  font-size: 4.865cqw; line-height: 1.5;
  letter-spacing: var(--cj-track-caps); padding-left: var(--cj-track-caps);
  text-transform: uppercase;
}
.cover-label__rule { top: 62.46%; left: 24.32%; right: 24.32%; height: 1px; background: var(--cj-divisor); }
.cover-label__fragrance {
  top: 71.39%;
  font-family: var(--cj-font-text); font-weight: 500;
  font-size: 5.586cqw; line-height: 1;
  letter-spacing: var(--cj-track-fragrance); padding-left: var(--cj-track-fragrance);
  text-transform: uppercase;
}
.cover-label__fragrance .num { font-weight: 400; }
.cover-label__volume { top: 89.4%; font-family: var(--cj-font-num); font-size: 4.685cqw; line-height: 1; }

/* ----------------------------------------------------------- 01 sumário - */
.toc { border-top: var(--hair); }
.toc li { border-bottom: var(--hair); }
.toc a {
  display: grid; grid-template-columns: 3em minmax(0, 13.5rem) minmax(0, 1fr) auto;
  align-items: baseline; column-gap: clamp(12px, 1.6vw, 24px);
  padding: clamp(10px, 1.9vh, 18px) 0; text-decoration: none;
}
.toc__n { font-family: var(--cj-font-num); font-size: 14px; letter-spacing: 0.06em; }
.toc__name {
  font-family: var(--cj-font-display); font-weight: var(--cj-weight-display);
  font-size: clamp(24px, 2.3vw, 34px); line-height: 1.1;
}
.toc__desc { font-size: var(--fs-small); }
.toc__p { font-family: var(--cj-font-num); font-size: 12.5px; letter-spacing: 0.04em; }
.toc a:hover .toc__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }

/* ----------------------------------------------------------- 02 a marca - */
.page--photo-right {
  grid-template-columns: minmax(0, 4fr) minmax(0, 4.4fr) minmax(0, 4.6fr);
  grid-template-rows: 1fr;
  padding-right: 0;
}
.page--photo-right .ch-head { grid-column: 1; }
.page--photo-right .ch-body { grid-column: 2; align-self: center; }
.page--photo-right .folio { right: calc(34% + var(--g)); }
.bleed-photo {
  grid-column: 3; grid-row: 1; align-self: stretch; position: relative;
  margin: calc(-1 * var(--pt)) 0 calc(-1 * var(--pb)) 0;
  overflow: hidden; background: var(--cj-parede);
}
.bleed-photo picture, .bleed-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.bleed-photo img { object-fit: cover; object-position: 50% 58%; }

.brand-intro { display: flex; flex-direction: column; gap: clamp(28px, 5vh, 56px); }
.signature blockquote { margin: 0; }
.signature blockquote p {
  font-family: var(--cj-font-display); font-weight: var(--cj-weight-display);
  font-size: clamp(40px, 3.9vw, 66px); line-height: 1.02; letter-spacing: -0.005em;
  max-width: 9.5em;
}
.signature figcaption { margin-top: 18px; font-size: var(--fs-small); max-width: 34ch; }
.facts { border-top: var(--hair); }
.facts > div {
  display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px;
  padding: 11px 0; border-bottom: var(--hair); font-size: var(--fs-small);
}
.facts dt { font-weight: 500; }

.brand-traits {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  align-items: start;
}
.traits {
  grid-column: 1 / span 6;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vh, 52px) var(--g);
}
.traits li { border-top: var(--hair); padding-top: 16px; }
.traits h4 { font-size: clamp(28px, 2.5vw, 38px); margin-bottom: 8px; }
.traits p { max-width: 30ch; }
.symbol-meaning { grid-column: 8 / -1; }
.symbol-meaning__art { width: 100%; overflow: visible; }
.symbol-meaning figcaption { margin-top: clamp(16px, 3vh, 28px); display: grid; gap: 8px; max-width: 44ch; font-size: var(--fs-small); }
.symbol-meaning__sum {
  margin-top: 6px; font-family: var(--cj-font-display); font-weight: var(--cj-weight-display);
  font-size: var(--fs-h4); line-height: 1.2;
}

/* ------------------------------------------------------- diagram ink ---- */
.dg-guide path { fill: none; stroke: var(--cj-divisor); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.dg-axis { fill: none; stroke: var(--cj-divisor); stroke-width: 1; stroke-dasharray: 12 4 2 4; vector-effect: non-scaling-stroke; }
.dg-dim path { fill: none; stroke: var(--cj-oliva); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dg-dim circle { fill: var(--cj-oliva); }
.dg-radius { stroke-dasharray: 2 2; }
.dg-label { fill: var(--cj-oliva); font-family: var(--cj-font-num); font-size: 19px; letter-spacing: 0.02em; }
.dg-label--small { font-size: 15px; }
.dg-label--f, .dg-x, .dg-x text { fill: var(--cj-oliva); font-family: var(--cj-font-display); font-weight: 500; font-size: 28px; }
.dg-label--display { font-family: var(--cj-font-display); font-weight: 500; font-size: 30px; letter-spacing: 0; }
.diagram--v .dg-label { font-size: 22px; }
.diagram--v .dg-label--small { font-size: 17px; }
.diagram--h .dg-label { font-size: 36px; }
.diagram--h .dg-label--small { font-size: 26px; }
.diagram--h .dg-label--f { font-size: 44px; }
.diagram--x .dg-label { font-size: 22px; }
.dg-zone { fill: none; stroke: var(--cj-oliva); stroke-width: 1; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.dg-box { fill: none; stroke: var(--cj-divisor); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dg-module rect { fill: var(--divisor-28); stroke: var(--cj-divisor); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dg-lead path { fill: none; stroke: var(--cj-oliva); stroke-width: 1; stroke-dasharray: 1 3; vector-effect: non-scaling-stroke; }
.dg-key circle { fill: var(--cj-oliva); }
.dg-key-n text { fill: var(--cj-rotulo); font-family: var(--cj-font-num); font-size: 15px; }

/* ----------------------------------------------------------- tiles ------ */
.tile { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tile__art {
  flex: 1; display: grid; place-items: center; border-radius: var(--tile-r);
  padding: clamp(16px, 3vw, 40px); background: var(--tile-bg, var(--cj-rotulo)); min-height: 0;
}
.tile figcaption { font-size: var(--fs-small); max-width: 40ch; }
.tile--rotulo { --tile-bg: var(--cj-rotulo); }
.tile--papel .tile__art { background: var(--cj-papel); box-shadow: inset 0 0 0 1px var(--cj-divisor); }
.tile--oliva { --tile-bg: var(--cj-oliva); }
.tile--photo .tile__art { position: relative; background-color: var(--cj-parede); }

/* Photo crops: a real lazy <img> placed the way a background-image would be.
   For "background-size: Z% auto; background-position: X% Y%":
   width = Z%, left = (100% − Z%) × X, top = (box height − image height) × Y,
   where image height = Z × 1374/1145 of the box width (cqw). */
.photo-bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit;
  container-type: inline-size; pointer-events: none;
}
.photo-bg img { position: absolute; max-width: none; height: auto; }
.photo-bg ~ img { position: relative; z-index: 1; }
.photo-bg--wall img { width: 440%; left: -264%; top: 0; }                                   /* 440% auto, 77.6% 0%: flat wall only */
.photo-bg--busy img { width: 220%; left: -4.8%; top: calc((100% - 264cqw) * 0.3); }          /* 220% auto, 4% 30%  */
.photo-bg--bottle img { width: 210%; left: -55%; top: calc((100% - 252cqw) * 0.66); }       /* 210% auto, 50% 66% */
.photo-bg--cover img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }

/* 03 – lockups */
.lockups {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto; gap: clamp(20px, 3.4vh, 32px) var(--g);
  height: var(--avail); min-height: 520px;
}
.lockups__main { grid-column: 1 / -1; }
.lockups__main img { width: min(56%, 420px); }
.lockups .tile:not(.lockups__main) .tile__art { aspect-ratio: 4 / 3; padding: 14px; flex: none; }
.lockups__h img { width: 84%; }
.lockups__s img { width: 30%; }
.lockups__w img { width: 72%; }

/* 03 – construction */
.construction {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(20px, 3vh, 32px);
  align-items: start;
}
.diagram { min-width: 0; }
.diagram svg { width: 100%; height: auto; overflow: visible; }
.diagram figcaption { margin-top: 10px; font-size: var(--fs-small); }
.diagram--v { grid-column: 1 / span 7; grid-row: 1 / span 2; background: var(--cj-rotulo); border-radius: var(--tile-r); padding: clamp(20px, 3vw, 44px) clamp(16px, 2.4vw, 36px) clamp(14px, 2vw, 24px); }
.diagram--v svg { max-height: calc(var(--avail) - 160px); }
.diagram--h { grid-column: 8 / -1; background: var(--cj-rotulo); border-radius: var(--tile-r); padding: clamp(18px, 2vw, 28px) clamp(14px, 1.8vw, 24px) 14px; }
.legend { grid-column: 8 / -1; display: grid; gap: 0; border-top: var(--hair); }
.legend > div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: var(--hair); font-size: var(--fs-small); }
.legend dt { font-weight: 500; }
.f { font-family: var(--cj-font-display); font-weight: 500; font-size: 1.15em; }

/* 03 – protection + minimum size */
.protection {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(20px, 3vh, 32px);
  align-items: start;
}
.diagram--clear { grid-column: 1 / span 7; grid-row: 1 / span 2; background: var(--cj-rotulo); border-radius: var(--tile-r); padding: clamp(24px, 3.4vw, 52px) clamp(20px, 3vw, 44px); }
.diagram--clear svg { max-height: calc(var(--avail) - 200px); margin: 0 auto; }
.diagram--x { grid-column: 9 / -1; }
.diagram--x svg { max-width: 290px; }
.diagram--x figcaption { max-width: 38ch; }
.minsize { grid-column: 9 / -1; border-top: var(--hair); padding-top: 14px; }
.minsize h4 { margin-bottom: 14px; }
.minsize__row { display: flex; gap: clamp(24px, 3vw, 48px); align-items: flex-end; }
.minsize__item { display: flex; flex-direction: column; gap: 10px; }
.minsize__art { display: inline-flex; flex-direction: column; gap: 6px; align-self: flex-start; }
.minsize__art::before { content: ""; height: 6px; border: 1px solid var(--cj-oliva); border-bottom: 0; }
.minsize__v { width: 96px; }
.minsize__s { width: 32px; }
.minsize figcaption { font-size: var(--fs-xs); line-height: 1.45; }
.minsize .note { margin-top: 14px; font-size: var(--fs-xs); }

/* 03 – colour versions */
.versions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--g); }
.versions .tile__art { aspect-ratio: 4 / 5; padding: 12%; }
.versions .tile__art > img { width: 100%; }

/* 03 – misuse */
.misuse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3.4vh, 36px) var(--g); }
.misuse__item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.misuse__art {
  aspect-ratio: 4 / 3; max-height: calc((var(--avail) - 236px) / 2);
  display: grid; place-items: center; overflow: hidden;
  background: var(--cj-rotulo); border-radius: var(--tile-r);
}
.misuse__art > img, .mis-color { width: 46%; }
.misuse figcaption { display: flex; align-items: baseline; font-size: var(--fs-small); }
.mis-stretch { transform: scale(1.55, 0.78); }
.mis-rotate { transform: rotate(-16deg); }
/* recolours the real file to an off-palette blue */
.mis-color { filter: brightness(0) invert(37%) sepia(62%) saturate(1300%) hue-rotate(190deg) brightness(92%); }
/* intentionally off-palette: this tile shows a forbidden drop shadow */
.mis-shadow { filter: drop-shadow(6px 8px 4px rgb(40 30 20 / 0.55)); }
.misuse__art--busy { position: relative; background-color: var(--cj-ambar); }
.misuse__art--busy > img { width: 56%; }
.mis-rearrange { display: flex; align-items: center; justify-content: center; gap: 5%; width: 80%; }
.mis-rearrange img:first-child { width: 52%; }
.mis-rearrange img:last-child { width: 40%; }

/* ------------------------------------------------------------- 04 cores - */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--g); align-items: start; }
.swatch { min-width: 0; }
.swatch__chip { aspect-ratio: 2 / 3; background: var(--chip); border-radius: var(--tile-r); width: 100%; max-height: calc(var(--avail) - 320px); }
.swatch__chip--line, .tint__chip, .photo-chip { box-shadow: inset 0 0 0 1px var(--divisor-70); }
.swatch__name {
  margin-top: 16px; font-family: var(--cj-font-display); font-weight: var(--cj-weight-display);
  font-size: clamp(26px, 2.2vw, 34px); line-height: 1.1;
}
.swatch__token { font-family: var(--cj-font-num); font-size: 12px; letter-spacing: 0.02em; margin-top: 2px; }
.swatch__data { margin-top: 12px; border-top: var(--hair); }
.swatch__data > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: var(--hair); }
.swatch__data dt { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.swatch__data dd { font-family: var(--cj-font-num); font-size: 13.5px; white-space: nowrap; }
.swatch__contrast, .swatch__use { margin-top: 10px; font-size: 13.5px; line-height: 1.45; }
.swatch__use { margin-top: 6px; }

.copy {
  display: inline-flex; align-items: center; min-height: 24px;
  padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--cj-font-num);
  text-decoration: underline dotted currentColor; text-underline-offset: 0.25em;
}
.copy:hover { text-decoration-style: solid; }
@media (pointer: coarse) { .copy { min-height: 44px; } }
.no-js .copy { text-decoration: none; cursor: auto; }

.colour-use {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(28px, 5vh, 52px);
}
.ratio { grid-column: 1 / -1; }
/* bar and labels share one grid, so every label sits on its own share */
.ratio__bar, .ratio__labels {
  display: grid;
  grid-template-columns: minmax(0, 60fr) minmax(0, 25fr) minmax(0, 10fr) minmax(0, 5fr);
}
.ratio__bar {
  height: clamp(56px, 9vh, 92px); border-radius: var(--tile-r); overflow: hidden;
  outline: 1px solid var(--cj-divisor); outline-offset: -1px;
}
.ratio__seg { display: flex; min-width: 0; }
.ratio__seg i { flex: 1; }
.ratio__seg--base i:first-child { background: var(--cj-papel); }
.ratio__seg--base i:last-child { background: var(--cj-rotulo); }
.ratio__seg--photo { position: relative; background-color: var(--cj-parede); }
.ratio__seg--oliva { background: var(--cj-oliva); }
.ratio__seg--tint i:nth-child(1) { background: var(--cj-bamboo); }
.ratio__seg--tint i:nth-child(2) { background: var(--cj-primeira-luz); }
.ratio__seg--tint i:nth-child(3) { background: var(--cj-vanilla); }
.ratio__labels { margin-top: 12px; font-size: 13px; }
.ratio__labels span { min-width: 0; padding-right: 8px; }
/* the 5% track is narrower than its label: right-align it and let it run to the left */
.ratio__labels span:last-child { justify-self: end; padding-right: 0; text-align: right; white-space: nowrap; }
.ratio__labels b { display: block; font-weight: 400; font-size: 20px; line-height: 1.2; }

.tints { grid-column: 1 / span 7; }
.tints h4, .photo-palette h4 { margin-bottom: 6px; }
.tints .note, .photo-palette .note { margin-bottom: 16px; }
.tints__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tint { min-width: 0; }
.tint__chip {
  height: clamp(84px, 14vh, 140px); background: var(--chip); display: flex; align-items: flex-end; padding: 12px 14px;
  box-shadow: inset 0 1px 0 var(--divisor-70), inset 0 -1px 0 var(--divisor-70);
}
.tint:first-child .tint__chip { border-radius: var(--tile-r) 0 0 var(--tile-r); box-shadow: inset 0 0 0 1px var(--divisor-70); clip-path: inset(0 0 0 0 round var(--tile-r) 0 0 var(--tile-r)); }
.tint:last-child .tint__chip { border-radius: 0 var(--tile-r) var(--tile-r) 0; box-shadow: inset 0 0 0 1px var(--divisor-70); }
.tint__chip span { font-family: var(--cj-font-display); font-weight: 500; font-size: clamp(20px, 1.8vw, 26px); line-height: 1; }
.tint .swatch__token { margin-top: 10px; padding-left: 2px; }
.tint__data { margin-top: 6px; font-family: var(--cj-font-num); font-size: 12.5px; line-height: 1.6; padding: 0 8px 0 2px; }

.photo-palette { grid-column: 9 / -1; }
.photo-palette__list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px var(--g); }
.photo-palette__list li { display: flex; gap: 12px; align-items: flex-start; font-size: 12.5px; line-height: 1.55; }
.photo-chip { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--chip); }
.photo-palette__text { min-width: 0; }
.photo-palette__list b { display: block; font-weight: 500; font-size: 14px; }
.photo-palette__list .num { display: block; white-space: nowrap; }

/* -------------------------------------------------------- 05 tipografia - */
/* the three specimens share their rows (subgrid), so names, roles, glyphs and links line up */
.specimens {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(5, auto);
  column-gap: var(--g); row-gap: 0; align-items: start;
}
.specimen {
  border-top: var(--hair); padding-top: 18px; min-width: 0;
  display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start;
}
.specimen__aa { font-size: clamp(96px, 9.5vw, 168px); line-height: 1; margin-bottom: clamp(14px, 2.4vh, 24px); }
.specimen__name { font-size: 24px; line-height: 1.15; font-weight: 500; }
.specimen__role { margin-top: 6px; font-size: var(--fs-small); }
.specimen__glyphs { margin-top: 14px; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.45; overflow-wrap: anywhere; }
.specimen__link {
  margin-top: 18px; justify-self: start; align-self: start; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 13.5px; font-family: var(--cj-font-text);
}
.specimen--cormorant .specimen__aa,
.specimen--cormorant .specimen__name,
.specimen--cormorant .specimen__glyphs { font-family: var(--cj-font-display); font-weight: 500; }
.specimen--cormorant .specimen__name { font-size: 28px; }
.specimen--cormorant .specimen__glyphs { font-size: clamp(17px, 1.45vw, 22px); }
.specimen--raleway .specimen__aa,
.specimen--raleway .specimen__name,
.specimen--raleway .specimen__glyphs { font-family: var(--cj-font-text); }
.specimen--raleway .specimen__aa { font-weight: 400; }
.specimen--montserrat .specimen__aa,
.specimen--montserrat .specimen__name,
.specimen--montserrat .specimen__glyphs { font-family: var(--cj-font-num); font-weight: 400; }
.specimen--montserrat .specimen__name { font-weight: 400; }

.type-system {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(24px, 4vh, 40px);
}
.roles-wrap { grid-column: 1 / -1; overflow-x: auto; }
.roles { width: 100%; font-size: var(--fs-small); }
.roles th, .roles td { text-align: left; vertical-align: baseline; padding: 9px 16px 9px 0; border-bottom: var(--hair); }
.roles thead th { font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em; padding-top: 0; }
.roles tbody th { font-weight: 500; white-space: nowrap; }
.roles td:last-child { white-space: nowrap; }
.roles td:last-child .num { font-size: 12.5px; }
/* one fixed sample width (in rem, not em) so every px value starts at the same x */
.role-sample { display: inline-block; width: 8rem; }
.role-sample--name { font-family: var(--cj-font-display); font-weight: 500; font-size: 26px; line-height: 1; }
.role-sample--line { font-size: 12.5px; letter-spacing: var(--cj-track-caps); }
.role-sample--fragrance { font-weight: 500; font-size: 14.5px; letter-spacing: var(--cj-track-fragrance); }
.role-sample--num { font-family: var(--cj-font-num); font-size: 14px; }
.role-none { font-size: 12.5px; }

.digital { grid-column: 1 / span 7; }
.digital h4, .type-rules h4 { margin-bottom: 10px; }
.ladder { border-top: var(--hair); }
.ladder li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15.5em); gap: var(--g); align-items: center;
  padding: 10px 0; border-bottom: var(--hair);
}
.ladder__spec { font-size: 13px; line-height: 1.45; }
.ladder__sample--title { font-family: var(--cj-font-display); font-weight: 500; font-size: clamp(40px, 3.6vw, 58px); line-height: 1; }
.ladder__sample--desc { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.45; max-width: 26ch; }
.ladder__sample--sizes { font-family: var(--cj-font-num); font-size: 16px; letter-spacing: 0.06em; }
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 24px;
  background: var(--cj-oliva); color: var(--cj-rotulo); border-radius: var(--cj-radius-pill);
  font-weight: 500; font-size: 15px; letter-spacing: 0.06em; white-space: nowrap;
}
.type-rules { grid-column: 9 / -1; }
.rules { border-top: var(--hair); }
.rules li { padding: 9px 0; border-bottom: var(--hair); font-size: var(--fs-small); line-height: 1.5; }

/* ------------------------------------------------------------ 06 rótulo - */
.anatomy {
  --lead: clamp(28px, 3.4vw, 56px);
  --art-w: min(calc((var(--avail) - 48px) * 0.786), 54%, 500px);
  display: grid; grid-template-columns: var(--art-w) minmax(0, 1fr); column-gap: var(--lead);
  padding: 36px 0 0 36px; align-items: start;
}
.anatomy__art { position: relative; width: 100%; }
.anatomy__art img { width: 100%; }
.anatomy__overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.anatomy__notes { position: relative; align-self: stretch; }
.anatomy__notes li {
  position: absolute; left: 0; right: 0; top: calc(var(--y) / 706 * 100%);
  transform: translateY(-0.68em); font-size: 13.5px; line-height: 1.35;
  counter-increment: note;
}
.anatomy__notes ol { counter-reset: note; }
.anatomy__notes li::before {
  content: ""; position: absolute; right: 100%; top: 0.68em; width: var(--lead);
  border-top: 1px dotted var(--cj-oliva);
}
.anatomy__notes b { display: block; font-weight: 500; letter-spacing: 0.02em; }
.anatomy__notes b::before { content: counter(note) "  "; font-family: var(--cj-font-num); font-weight: 400; white-space: pre; }
.anatomy__notes li > span { display: block; }

.variants {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 28px; align-items: start;
}
.variants__grid {
  grid-column: 1 / span 7;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vh, 28px) var(--g); align-items: end;
  max-width: calc((var(--avail) - 240px) * 0.786 * 3 / 1.766 + 2 * var(--g));
}
.variants__item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.variants__item img { width: 100%; }
.variants__item--100 img { width: 76.7%; }
.variants__item figcaption { font-size: 13px; }
.print-specs { grid-column: 9 / -1; }
.print-specs h4 { margin-bottom: 12px; }
.specs { width: 100%; font-size: var(--fs-small); margin-bottom: 18px; }
.specs th, .specs td { text-align: left; padding: 8px 10px 8px 0; border-bottom: var(--hair); vertical-align: baseline; }
.specs thead th { font-weight: 400; font-size: 13px; border-bottom: 1px solid var(--cj-oliva); }
.specs tbody th { font-weight: 500; }
.specs td { white-space: nowrap; }
.print-specs .rules { border-top: 0; }

/* -------------------------------------------------------- 07 fotografia - */
.dodont {
  margin-top: clamp(24px, 4.5vh, 48px); display: grid; grid-template-columns: 1fr 1fr; gap: var(--g); width: 100%;
}
.dodont__title {
  display: flex; align-items: baseline; font-family: var(--cj-font-text); font-weight: 500; font-size: var(--fs-small);
  letter-spacing: 0.02em; padding-bottom: 8px; border-bottom: var(--hair); margin-bottom: 4px;
}
.dodont li { font-size: 13.5px; line-height: 1.4; padding: 6px 0; border-bottom: var(--hair); }

.photo-direction {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr); column-gap: clamp(24px, 3vw, 48px); align-items: center;
}
.photo-annot__frame {
  position: relative; width: min(100%, calc(var(--avail) * 0.8333), 560px); margin-left: auto;
  border-radius: 28px; overflow: hidden; background: var(--cj-parede);
}
.photo-annot__frame img { width: 100%; }
.mark {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cj-rotulo); color: var(--cj-oliva); font-family: var(--cj-font-num); font-size: 12.5px; line-height: 1;
  box-shadow: 0 0 0 1px var(--oliva-35);
}
.direction { counter-reset: dir; border-top: var(--hair); }
.direction li {
  position: relative; padding: 9px 0 9px 2.2em; border-bottom: var(--hair); font-size: var(--fs-small); line-height: 1.45;
  counter-increment: dir;
}
.direction li::before {
  content: counter(dir); position: absolute; left: 0; top: 9px;
  width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center;
  background: var(--cj-oliva); color: var(--cj-rotulo); font-family: var(--cj-font-num); font-size: 11.5px; line-height: 1;
}
.direction li.direction__plain { counter-increment: none; }
.direction li.direction__plain::before { content: ""; width: 7px; height: 7px; left: 0.55em; top: 1.05em; background: var(--cj-divisor); }
.direction b { font-weight: 500; }

/* -------------------------------------------------------- 08 aplicações - */
.ads {
  --ad-h: clamp(300px, calc(var(--avail) - 250px), 540px);
  display: flex; gap: clamp(24px, 3.4vw, 56px); align-items: flex-start;
}
.ad { display: flex; flex-direction: column; gap: 16px; }
.ad__img { height: var(--ad-h); width: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--divisor-60); }
.ad figcaption { max-width: calc(var(--ad-h) * 0.8); }
.ad:nth-child(2) figcaption { max-width: max(calc(var(--ad-h) * 0.5625), 240px); }
.ad__title { font-family: var(--cj-font-display); font-weight: 500; font-size: 26px; line-height: 1.1; margin-bottom: 8px; }
.ad__title .num { font-size: 0.55em; letter-spacing: 0.04em; margin-left: 6px; }
.ad__spec li { font-size: 13px; line-height: 1.45; padding: 5px 0; border-bottom: var(--hair); }
.ad__spec li:first-child { border-top: var(--hair); }

.apps {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(24px, 4vh, 40px);
  align-items: start;
}
.apps__tints { grid-column: 1 / span 8; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g); max-width: calc((var(--avail) - 240px) * 0.8 * 3 + 2 * var(--g)); }
.tint-ad img { width: 100%; border-radius: 6px; box-shadow: 0 0 0 1px var(--divisor-60); }
.tint-ad figcaption { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.tint-ad .num { font-size: 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--chip); box-shadow: inset 0 0 0 1px var(--cj-divisor); flex: none; }
.apps__bottle { grid-column: 9 / -1; }
.bottle-crop {
  position: relative; aspect-ratio: 4 / 5; max-height: calc(var(--avail) - 340px); width: 100%; border-radius: var(--tile-r);
  background-color: var(--cj-ambar);
}
.apps__bottle figcaption { margin-top: 10px; font-size: var(--fs-small); }
.apps__site {
  grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px var(--g);
  padding: 18px clamp(18px, 2.4vw, 32px); background: var(--cj-rotulo); border-radius: var(--tile-r);
}
.apps__site p { font-size: var(--fs-small); max-width: 62ch; }
.apps__url { font-size: 13px; letter-spacing: 0.04em; }
.link-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
  border: 1px solid currentColor; border-radius: var(--cj-radius-pill); background: none;
  font-family: var(--cj-font-text); font-weight: 500; font-size: 14px; letter-spacing: 0.06em; text-decoration: none;
  cursor: pointer; white-space: nowrap;
}
.link-cta:hover { background: var(--cj-oliva); color: var(--cj-rotulo); border-color: var(--cj-oliva); }

/* --------------------------------------------------------- 09 voz e tom - */
.voice { display: flex; flex-direction: column; gap: clamp(28px, 5vh, 52px); }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 4vh, 40px) var(--g); }
.principles li { border-top: var(--hair); padding-top: 14px; }
.principles h3 { font-family: var(--cj-font-display); font-weight: 500; font-size: clamp(30px, 2.6vw, 40px); line-height: 1.05; margin-bottom: 8px; }
.principles p { max-width: 34ch; }
.saywords { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--g); }
.saywords h3 { display: flex; align-items: baseline; font-weight: 500; font-size: var(--fs-small); letter-spacing: 0.02em; padding-bottom: 8px; border-bottom: 1px solid var(--cj-oliva); }
.saywords li { padding: 8px 0; border-bottom: var(--hair); font-size: var(--fs-small); }

.practice {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 32px; align-items: start;
}
.practice h4 { margin-bottom: 12px; }
.practice h4:not(:first-child) { margin-top: clamp(22px, 4vh, 36px); }
.examples { grid-column: 1 / span 5; }
.rewrite { grid-column: 6 / span 4; }
.never { grid-column: 10 / -1; }
.copy-list { border-top: var(--hair); }
.copy-list > div { padding: 10px 0; border-bottom: var(--hair); }
.copy-list dt { font-weight: 500; font-size: 13px; letter-spacing: var(--cj-track-fragrance); text-transform: uppercase; }
/* descriptions follow the type rule: Raleway Regular, as in the ads */
.copy-list dd { font-family: var(--cj-font-text); font-weight: 400; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.45; margin-top: 2px; }
.copy-sample { font-size: var(--fs-small); max-width: 52ch; }
.rewrite__pair { display: grid; gap: 10px; }
.rewrite__bad, .rewrite__good { display: flex; align-items: baseline; padding: 14px 16px; border-radius: 14px; }
.rewrite__bad { font-size: 14px; border: 1px dashed var(--cj-divisor); }
.rewrite__good { background: var(--cj-rotulo); font-family: var(--cj-font-display); font-weight: 500; font-size: 24px; line-height: 1.15; }
.rewrite__good .icon-ok { width: 0.65em; height: 0.65em; }
.cta-demo { margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cta-demo__dark { display: inline-flex; padding: 14px 18px; background: var(--cj-oliva); border-radius: 14px; }
.pill--creme { background: var(--cj-rotulo); color: var(--cj-oliva); }
.cta-demo + .note { font-size: 13.5px; }
.never .note { font-size: 13.5px; margin-bottom: 12px; }
.never__list { border-top: var(--hair); }
.never__list li { padding: 8px 0; border-bottom: var(--hair); font-size: var(--fs-small); }

/* ---------------------------------------------------------- 10 arquivos - */
.page--dark { background: var(--cj-oliva); color: var(--cj-rotulo); border-top-color: var(--cj-oliva); }
.page--dark .ch-rule { background: var(--rotulo-55); }
.page--dark :focus-visible { outline-color: var(--cj-rotulo); }
.page--dark .link-cta:hover { background: var(--cj-rotulo); color: var(--cj-oliva); border-color: var(--cj-rotulo); }
.files__mark { width: min(200px, 60%); margin-top: auto; padding-top: 40px; }
.page--dark .ch-head { align-self: stretch; }
.files {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4.5vh, 44px) var(--g); align-content: start;
}
.files__group h3 {
  font-family: var(--cj-font-display); font-weight: 500; font-size: var(--fs-h4); line-height: 1.1;
  padding-bottom: 10px; border-bottom: 1px solid var(--rotulo-45); margin-bottom: 4px;
}
.files__fmt { font-family: var(--cj-font-num); font-size: 12px; letter-spacing: 0.08em; margin-left: 8px; vertical-align: 0.25em; }
.files__list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--rotulo-20); font-size: var(--fs-small);
}
.files__list a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 76px; padding: 0 14px;
  border: 1px solid var(--rotulo-55); border-radius: var(--cj-radius-pill); text-decoration: none; font-size: 13px;
  letter-spacing: 0.04em;
}
.files__list a:hover { background: var(--cj-rotulo); color: var(--cj-oliva); }
.files__hint { margin-top: 10px; font-size: 13px; max-width: 56ch; }
.files__group--wide { grid-column: 1 / -1; }
.files__group--wide > p:not(.files__hint) { font-size: var(--fs-small); max-width: 70ch; margin-top: 10px; }
.files__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.no-js .files__links--print { display: none; }
.colophon { grid-column: 1 / -1; font-size: 13px; }

/* toast for the copy button */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translate(-50%, 12px);
  padding: 10px 18px; border-radius: var(--cj-radius-pill); background: var(--cj-oliva); color: var(--cj-rotulo);
  font-size: var(--fs-small); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .toast, .nav__list a::after { transition: none; }
}
/* Windows high contrast: the colour samples are the content, keep them */
@media (forced-colors: active) {
  .swatch__chip, .tint__chip, .photo-chip, .ratio__bar, .ratio__seg, .dot, .tile__art, .pill,
  .cta-demo__dark, .page--dark { forced-color-adjust: none; }
}

/* ===================================================== responsive ======== */
@media screen and (max-width: 1099px) {
  .ch-head { grid-column: 1 / span 5; }
  .ch-body { grid-column: 6 / -1; align-self: start; }
  .ch-num + .ch-title { margin-top: 0; }
  .ch-head > :last-child { margin-bottom: 0; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .swatch__chip { aspect-ratio: 16 / 9; max-height: none; }
  .specimens { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: var(--g); }
  .specimen {
    display: grid; grid-row: auto; grid-template-rows: none; row-gap: 0;
    grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: var(--g);
  }
  .specimen__aa { grid-row: 1 / span 4; margin: 0; }
  .specimen__role { min-height: 0; }
  .ads { flex-direction: column; }
  .ad { flex-direction: row; align-items: flex-start; gap: var(--g); }
  .ad__img { height: auto; width: 46%; }
  .ad:nth-child(2) .ad__img { width: 34%; }
  .ad figcaption, .ad:nth-child(2) figcaption { max-width: none; flex: 1; }
}

@media screen and (max-width: 899px) {
  :root { --pt: 44px; --pb: 76px; }
  .page { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; min-height: 0; row-gap: 32px; }
  .page--cover { grid-template-rows: minmax(0, 1fr); }
  .ch-num + .ch-title { margin-top: 0; }
  .ch-head > :last-child { margin-bottom: 0; }
  .page > :not(.folio) { grid-column: 1 / -1 !important; }
  .page--cover { min-height: calc(100svh - var(--nav-h)); }
  .ch-num { margin-bottom: 20px; }
  .ch-intro, .ch-note { max-width: 46ch; }
  .pg-head { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .pg-title, .pg-intro { grid-column: 1 !important; }

  .page--photo-right { grid-template-rows: auto; padding-right: var(--m); }
  .page--photo-right .ch-body { align-self: start; padding-bottom: 0; }
  .page--photo-right .folio { right: var(--m); }
  /* fixed height + object-fit: the photo always runs edge to edge */
  .bleed-photo { grid-row: auto; margin: 0 calc(-1 * var(--m)); aspect-ratio: auto; height: min(80svh, calc(100vw * 1.2)); }

  .brand-traits, .construction, .protection, .colour-use, .type-system, .variants, .apps, .practice {
    grid-template-columns: minmax(0, 1fr); row-gap: 36px;
  }
  .brand-traits > *, .construction > *, .protection > *, .colour-use > *, .type-system > *,
  .variants > *, .apps > *, .practice > * { grid-column: 1 !important; grid-row: auto !important; }

  .lockups { height: auto; min-height: 0; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .lockups__main .tile__art { aspect-ratio: 4 / 3; }
  .lockups__main img { height: auto; width: 70%; }
  .lockups__w { grid-column: 1 / -1; }
  .lockups__w .tile__art { aspect-ratio: 16 / 7 !important; }

  .diagram--v svg, .diagram--clear svg { max-height: none; }
  .diagram--x svg { max-width: 340px; }
  .versions { grid-template-columns: 1fr 1fr; }
  .misuse { grid-template-columns: 1fr 1fr; }

  .ratio__labels { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ratio__labels span:last-child { justify-self: start; text-align: left; }
  .tints__row { grid-template-columns: 1fr 1fr 1fr; }
  .tint__data { font-size: 12px; }

  .anatomy { grid-template-columns: minmax(0, 1fr); padding: 30px 0 0 30px; row-gap: 28px; }
  .anatomy__art { width: min(100%, 420px); }
  .anatomy__notes li { position: static; transform: none; padding: 8px 0; border-bottom: var(--hair); }
  .anatomy__notes ol { border-top: var(--hair); }
  .anatomy__notes li::before { display: none; }
  .anatomy__overlay .dg-lead { display: none; }
  .anatomy__notes li b, .anatomy__notes li span { display: inline; }
  .anatomy__notes li b { margin-right: 8px; }

  .variants__grid { max-width: none; }
  .photo-direction { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .photo-annot__frame { width: 100%; }
  .dodont { grid-template-columns: 1fr; }

  .ad { flex-direction: column; }
  .ad__img, .ad:nth-child(2) .ad__img { width: 100%; max-width: 420px; }
  .ad:nth-child(2) .ad__img { max-width: 300px; }
  .apps__tints { max-width: none; }
  .apps__site { grid-template-columns: 1fr; justify-items: start; }
  /* smaller zoom and a capped box keep the label close to 1:1 instead of upscaled */
  .bottle-crop { max-height: none; max-width: 420px; }
  .photo-bg--bottle img { width: 170%; left: -35%; top: calc((100% - 204cqw) * 0.68); }   /* 170% auto, 50% 68% */

  .principles, .saywords { grid-template-columns: 1fr; }
  .files { grid-template-columns: minmax(0, 1fr); }
  .files__mark { margin-top: 32px; padding-top: 0; }
}

@media screen and (max-width: 599px) {
  .toc a { grid-template-columns: 2.4em minmax(0, 1fr) auto; row-gap: 2px; }
  .toc__desc { grid-column: 2 / -1; grid-row: 2; }
  .toc__p { grid-column: 3; grid-row: 1; }
  .traits { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .swatch__data dd { font-size: 12.5px; }
  .swatch__name { font-size: 24px; }
  .specimen { display: flex; flex-direction: column; }
  .specimen__aa { margin-bottom: 12px; }
  .misuse { grid-template-columns: 1fr; }
  .versions { grid-template-columns: 1fr 1fr; column-gap: 14px; row-gap: 24px; }
  .versions .tile figcaption { font-size: 13px; }
  .diagram--v .dg-label { font-size: 26px; }
  .diagram--v .dg-label--small { font-size: 22px; }
  .diagram--h .dg-label { font-size: 40px; }
  .diagram--h .dg-label--small { font-size: 30px; }
  .diagram--h .dg-label--f { font-size: 44px; }
  .variants__grid { align-items: start; column-gap: 12px; }
  .variants__item figcaption { font-size: 13px; text-align: center; }
  .swatch__token, .swatch__data dt { font-size: 12.5px; }
  .lockups { grid-template-columns: 1fr; }
  .lockups__main .tile__art, .lockups .tile .tile__art { aspect-ratio: 16 / 9; }
  .tints__row { grid-template-columns: 1fr; }
  .tint { display: grid; grid-template-columns: 42% minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .tint__chip { grid-row: 1 / span 2; height: 100px; border-radius: 14px !important; box-shadow: inset 0 0 0 1px var(--divisor-70); clip-path: none; margin-bottom: 10px; }
  .tint .swatch__token { margin: 0; align-self: end; }
  .tint__data { margin: 0; align-self: start; font-size: 13px; }
  .photo-palette__list { grid-template-columns: 1fr; }
  .roles thead { display: none; }
  .roles, .roles tbody, .roles tr, .roles th, .roles td { display: block; width: 100%; }
  .roles tr { padding: 12px 0; border-bottom: var(--hair); }
  .roles th, .roles td { border: 0; padding: 2px 0; white-space: normal !important; }
  .roles tbody th { font-family: var(--cj-font-display); font-size: 22px; }
  .roles td:last-child { margin-top: 6px; }
  .ladder li { grid-template-columns: 1fr; gap: 6px; }
  .specs td { white-space: normal; }
  .files__list li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .files__list a { min-width: 64px; }
  /* long button labels wrap instead of pushing the page sideways (320 px / 400% zoom) */
  .link-cta { white-space: normal; text-align: center; line-height: 1.3; padding: 10px 20px; }
  .mark { width: 22px; height: 22px; font-size: 12px; }
}

/* ============================================================ print ====== */
@page { size: A4 landscape; margin: 0; }

@media print {
  :root {
    --nav-h: 0px;
    --m: 15mm;
    --g: 6mm;
    --pt: 13mm;
    --pb: 17mm;
    --avail: calc(210mm - 13mm - 17mm);
    --fs-body: 10.5pt;
    --fs-small: 9.6pt;
    --fs-xs: 8.6pt;
    --fs-lead: 12.5pt;
    --fs-ch: 54pt;
    --fs-h3: 27pt;
    --fs-h4: 16pt;
  }
  html, body { background: var(--cj-papel); }
  html { scroll-behavior: auto; }
  .nav, .skip, .toast, .files__links--print { display: none !important; }
  .page {
    width: auto; height: 210mm; min-height: 0;
    overflow: hidden; border-top: 0;
    break-after: page; page-break-after: always; break-inside: avoid;
    row-gap: 7mm;
  }
  .chapter:last-of-type .page:last-child { break-after: auto; page-break-after: auto; }
  .folio { bottom: 8mm; font-size: 8pt; }
  a { text-decoration: none; }
  .ch-num { margin-bottom: 9mm; font-size: 10.5pt; }
  .ch-rule { margin: 6mm 0; }
  .ch-intro { max-width: 29ch; }
  .page--cover { padding-top: 14mm; }
  .cover-label { width: calc((210mm - 14mm - 17mm) * 0.786); }

  .lockups { height: var(--avail); min-height: 0; }
  .minsize__v { width: 20mm; }
  .minsize__s { width: 12mm; }
  .diagram--clear { padding: 9mm 8mm; }
  .copy { text-decoration: none; }
  .toc a { padding: 3.2mm 0; }
  .toc__name { font-size: 20pt; }
  .specimen__aa { font-size: 78pt; }
  .specimen__glyphs { font-size: 11pt; }
  .specimen--cormorant .specimen__glyphs { font-size: 13pt; }
  .role-sample--name { font-size: 18pt; }
  .ladder__sample--title { font-size: 32pt; }
  .ladder__sample--desc { font-size: 11.5pt; }
  .ladder li { padding: 2.2mm 0; }
  .print-only { display: block; }
  /* the paper copy shows where the links go */
  .files__links .link-cta { height: auto; min-height: 0; padding: 2mm 4.5mm; white-space: normal; flex-direction: column; align-items: flex-start; text-align: left; }
  .files__links a[href^="http"]::after {
    content: attr(href); display: block; margin-top: 0.8mm;
    font-family: var(--cj-font-num); font-weight: 400; font-size: 7pt; letter-spacing: 0; word-break: break-all;
  }
  .photo-palette__list { column-gap: 4mm; }
  .photo-palette__list li { font-size: 8.5pt; gap: 2.5mm; }
  .photo-chip { width: 7mm; height: 7mm; }
  .roles th, .roles td { padding-top: 2mm; padding-bottom: 2mm; }
  .signature blockquote p { font-size: 38pt; }
  .traits h4 { font-size: 22pt; }
  .principles h3 { font-size: 22pt; }
  .swatch__name { font-size: 18pt; margin-top: 4mm; }
  .tint__chip { height: 26mm; }
  .ratio__bar { height: 20mm; }
  .ads { --ad-h: 108mm; }
  .bottle-crop { max-height: 96mm; }
  .tint-ad img { max-height: 92mm; width: auto; }
  .copy-list dd { font-size: 11.5pt; }
  .rewrite__good { font-size: 16pt; }
  .mark { width: 5.6mm; height: 5.6mm; font-size: 8pt; }
  .tile__art { padding: 6mm; }
  .swatch__chip { max-height: 62mm; }
}
