/* ============================================================================
   NUANSE — work.css · the project-page shared layer

   Loaded after core.css by every page under /work/. This is the spine from
   brief/02-project-pages.md, and it is identical on every project page:

     1 opening frame   2 the problem   3 the signature   4 the work
     5 the numbers     6 scope         7 next project

   What is shared is everything structural. What a page is free to change is
   its accent, its signature element, the structure of its proof section, its
   imagery and the texture of its copy — nothing else. That is the deal that
   lets the set read as one studio while each page still feels made for the
   project it describes.

   THE ACCENT. A project page overrides --accent and --accent-l and nothing
   else. The accent is taken from the client's own identity, and it appears in
   exactly three places: the opening frame, the signature element and the
   next-project link. The same 3% discipline copper gets on the home page. A
   page with the accent in seven places has nothing accented.

   --accent-ink is the same rule as core.css's --copper-ink: a darkened
   variant for the accent as SMALL TEXT on a light ground, because most brand
   colours do not clear 4.5:1 at 11px. A page sets all three.
   ========================================================================== */

/* the page sets these three; these are a visible fallback, not a default */
.pj{--accent:var(--copper); --accent-l:var(--copper-l); --accent-ink:var(--copper-ink)}

/* ============ 1 · OPENING FRAME ============
   Client name, sector, year, one-line verdict. The accent enters here and
   nowhere earlier — the nav and loader stay NUANSE's own copper.

   The frame itself is in core.css, shared with the interior pages as
   `.pg-open,.pj-open`. What is left to a project page is the accent, which is
   the only part of the frame it actually owns. */

/* The one quiet line under the client's name. Not a second heading: it is
   set at the verdict's size on the sans, so it reads as a caption to the
   name rather than as a competing title. */
.pj-open-sub{--f-min:19;--f-max:28;margin:clamp(14px,1.6vw,22px) 0 0;
  font-size:var(--fluid);line-height:1.3;max-width:24ch;color:var(--mute-d)}

/* ============ 2 · THE FACTS BESIDE A HEADING ============
   Three numbers in the pj-meta idiom of the opening frame. It is all that
   survives of the old problem section: the section itself is now an
   ordinary chapter in the slide grammar, and the four paragraphs, the
   three-column grid they needed and the <details> holding the other three
   are gone rather than folded. */
.pj-facts{display:flex;flex-wrap:wrap;margin:var(--s4) 0 0;color:var(--mute)}
.pj-facts>div{padding:0 clamp(16px,1.6vw,24px);border-left:1px solid rgba(13,26,65,.18)}
.pj-facts>div:first-child{padding-left:0;border-left:0}
.pj-facts dt{--f-min:30;--f-max:46;margin:0;font-family:var(--serif);font-size:var(--fluid);line-height:1;
  letter-spacing:-.03em;color:var(--navy)}
.pj-facts dd{margin:10px 0 0;font-family:var(--mono);font-size:10px;letter-spacing:.12em;
  text-transform:uppercase;max-width:19ch}

.pj-facts{display:flex;flex-wrap:wrap;margin:var(--s4) 0 0;color:var(--mute)}
.pj-facts>div{padding:0 clamp(16px,1.6vw,24px);border-left:1px solid rgba(13,26,65,.18)}
.pj-facts>div:first-child{padding-left:0;border-left:0}
.pj-facts dt{--f-min:30;--f-max:46;margin:0;font-family:var(--serif);font-size:var(--fluid);line-height:1;
  letter-spacing:-.03em;color:var(--navy)}
.pj-facts dd{margin:10px 0 0;font-family:var(--mono);font-size:10px;letter-spacing:.12em;
  text-transform:uppercase;max-width:19ch}

/* The frame every board on a case page is shown in. One border, one
   ratio — the ratio itself is chosen per box by .pj-box / .pj-trail, which
   is what stopped a square guideline page and a wide photograph setting two
   different scales in one row. */
.ev-frame{position:relative;overflow:hidden;border:1px solid var(--hair-c);aspect-ratio:16/10}
.ev-frame img{width:100%;height:100%;object-fit:cover;display:block}
.ev-frame{position:relative;overflow:hidden;border:1px solid var(--hair-c);aspect-ratio:16/10}
.ev-frame img{width:100%;height:100%;object-fit:cover;display:block}
.pj-nums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;
  background:rgba(13,26,65,.15);border:1px solid rgba(13,26,65,.15);margin-top:var(--gap-md)}
.pj-nums div{background:var(--cream);padding:clamp(24px,3vw,40px) clamp(18px,2vw,28px)}
.pj-nums strong{--f-min:34;--f-max:64;display:block;font-family:var(--serif);font-weight:400;
  font-size:var(--fluid);line-height:1;letter-spacing:-.03em;color:var(--accent-ink)}
.pj-nums span{display:block;margin-top:12px;font-size:15px;color:var(--mute)}
.pj-nums .src{margin-top:14px;color:var(--mute);font-family:var(--mono);font-size:10px;
  letter-spacing:.1em;text-transform:uppercase}

/* ============ 6 · SCOPE ============
   Deliverables as a plain list. This is where a prospect works out whether
   their own job looks like this one. */
.pj-scope{background:var(--cream);color:var(--navy);padding:0 var(--gut) var(--sec-y)}
.pj-scope-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2.2fr);gap:var(--gap-sm);
  border-top:1px solid var(--navy);padding-top:var(--s3)}
.pj-scope ul{list-style:none;margin:0;padding:0;columns:2;column-gap:var(--gap-sm)}
.pj-scope li{padding:11px 0;border-bottom:1px solid rgba(13,26,65,.14);break-inside:avoid;
  display:flex;gap:12px;align-items:baseline}
.pj-scope li::before{content:"";flex:0 0 14px;height:1px;background:var(--accent);
  transform:translateY(-.35em)}

/* ============ 7 · NEXT PROJECT ============
   The link itself is in core.css as `.pg-next,.pj-next`, including the
   documented reason its eyebrow carries no opacity. A project page sets
   --next-accent to the next project's colour and nothing else. */
.pj-nums strong .needs{font-size:12px}

/* ============ SHARED CHAPTER PATTERNS ============
   Added when the two case pages stopped being "a menu" and "a campaign" and
   became what they actually are: whole identity programmes. A page that runs
   eight chapters needs more than one evidence layout, and every pattern here
   earns its place by being needed on BOTH pages — a pattern used once belongs
   in that page's own file.

   The grounds alternate chapter by chapter, light and dark, so the page reads
   as chapters rather than as one long scroll. */

/* ============ THE SLIDE GRAMMAR ============
   ONE layout for every chapter of a case page, and no exceptions: the label
   at the top left, the heading and ONE short paragraph under it, the
   evidence in a box on the right. Two boards, or four in a 2x2 — never six
   at assorted sizes down the page.

   This replaces .pj-chapter + .pj-grid + .ev as three different ways of
   saying the same thing, which is what "no flow" actually was: the reader
   had to re-learn where to look in every section.

   It is also why the copy had to come down first. At 35 words a chapter fits
   beside its own evidence; at 300 it does not, which is how the page ended
   up folding half of itself behind a <details>. The budget is the layout:

     body copy    <= 35 words per chapter
     captions     <= 8 words
     disclosures  none
     source notes not in the body

   A chapter carries its ground as .lt or .dk and alternates down the page,
   so the eye gets a cut between chapters instead of one continuous scroll. */
/* A chapter is tighter than a --sec-y section (120-220px a side). That
   token sets the rhythm of a page whose sections are each a full argument;
   a case page runs eight chapters, so the same air eight times over was
   most of the "white space around the whole thing". ~127px at 1440. */
.pj-ch{padding:clamp(76px,48px + 5.5vw,150px) var(--gut)}
.pj-ch.lt{background:var(--cream);color:var(--navy)}
.pj-ch.dk{background:var(--night);color:var(--cream)}
/* the signature chapter sits on the CLIENT'S own cream, which is the one
   place the page is allowed to borrow a ground rather than describe one */
.pj-ch.sig{background:var(--pj-sig-bg,var(--stone));color:var(--pj-sig-ink,var(--navy))}

.pj-sl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);
  gap:clamp(26px,3.2vw,48px) clamp(34px,5vw,88px);align-items:start}
/* the label sits at the top left of the slide, on its own row. As a grid
   ITEM core's flex .eyebrow would stretch and ride to the middle of the
   boards beside it — the same fault that put "The problem" halfway down
   four paragraphs. */
.pj-sl>.eyebrow{grid-column:1/-1;margin:0;align-self:start}
.pj-ch.lt .pj-sl>.eyebrow{color:var(--accent-ink)}
.pj-ch.dk .pj-sl>.eyebrow{color:var(--accent-l)}

.pj-sl-txt{min-width:0}
.pj-sl-txt h2{--f-min:34;--f-max:64;margin:0 0 .45em;font-family:var(--serif);
  font-weight:400;font-size:var(--fluid);line-height:.98;letter-spacing:.025em;
  text-wrap:balance}
.pj-sl-txt p{margin:0;font-size:clamp(16px,1.2vw,19px);line-height:1.55;max-width:36ch}
.pj-ch.lt .pj-sl-txt p{color:var(--mute)}
.pj-ch.dk .pj-sl-txt p{color:var(--mute-d)}

/* --- the evidence box ---
   One board, two, or four. The count is the whole rule: a fifth board means
   the chapter is two chapters. Every frame reads against the same ratio, so
   a square guideline page and a wide photograph cannot set two different
   scales in one row. */
.pj-box{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(10px,1.1vw,18px)}
.pj-box.one{grid-template-columns:minmax(0,1fr)}
.pj-box figure{margin:0;min-width:0}
/* 16/9, which is the source boards' OWN ratio (1440x804). These are
   documents, not photographs: a 4/3 frame cropped a seventh off each side
   and took the first letter of the wordmark with it. */
.pj-box .ev-frame{aspect-ratio:16/9;border-color:var(--hair-c)}
/* A board is shown at ITS OWN ratio, because the frame is there to hold a
   set to one scale, not to crop a document. 1440x1440 guideline boards go
   square; a 1208x1800 web page goes 2:3; the Possah campaign frames keep
   the 4:5 somebody composed them at. Choosing wrong is not a style slip —
   a 16:9 frame takes half a square board away. */
.pj-box.square .ev-frame{aspect-ratio:1}
.pj-box.tall .ev-frame{aspect-ratio:2/3}
.pj-box.p45 .ev-frame{aspect-ratio:4/5}
/* A LONE square board. One board in the evidence column is ~780px at 1440,
   and a square at that width carries twice the area of any 2-up board on
   the page — the chapter would read as the loudest one in the set purely
   because it has the fewest pictures. Capped, and flush to the right so the
   page keeps one right margin: the slack falls into the gutter, which is
   already slack. */
.pj-box.one.square{grid-template-columns:minmax(0,min(100%,620px));justify-content:end}
/* One board in a box whose ratio is not its own — a square mark beside a
   wide system page. Contained rather than cropped, onto the board's own
   dominant colour from _placeholders.css, because a logo with its sides
   cut off is not a logo. Per FIGURE, not per box: the other board in the
   row does fill its frame. */
.pj-box figure.fit img{object-fit:contain}
/* a second row of boards in one chapter, at a ratio the first row cannot
   share. Still one evidence column, so it is still one slide. */
.pj-box-next{margin-top:clamp(10px,1.1vw,18px)}
.pj-ch.lt .pj-box .ev-frame{border-color:rgba(13,26,65,.18)}
.pj-box figcaption{margin-top:10px;font-family:var(--mono);font-size:10px;
  letter-spacing:.14em;text-transform:uppercase}
.pj-ch.lt .pj-box figcaption{color:var(--mute)}
.pj-ch.dk .pj-box figcaption{color:var(--mute-d)}

/* --- the facts, under the paragraph ---
   .pj-facts was written for the problem section's cream ground at 30-46px
   across a full column. In the left column of a slide that wraps, so the
   ramp comes down and the ground is no longer assumed. */
.pj-sl .pj-facts{margin:var(--s3) 0 0;gap:0}
.pj-sl .pj-facts dt{--f-min:26;--f-max:38}
.pj-ch.dk .pj-facts>div{border-left-color:var(--hair-c)}
.pj-ch.dk .pj-facts dt{color:var(--cream)}

/* --- the specification, as a line and not as a document ---
   What replaced .pj-swatches + .pj-specs + .pj-quotes + .pj-src on the
   system chapter: the values a system chapter genuinely owes the reader —
   the colours, the two faces, the ratio — stated once, with nothing written
   around them. A hex with a sentence under it is not a specification, it is
   a paragraph wearing one. */
/* Rows, not columns. In side-by-side cells the colour cell is ~220px wide,
   which fits three chips — so Possah's five broke 3 + 2 and read as two
   kinds of colour. A row gives the chips the whole column and the label
   sits beside them, which is also how a specification is actually read. */
.pj-spec{display:grid;gap:0;margin:var(--s4) 0 0}
.pj-spec>div{display:grid;grid-template-columns:minmax(0,76px) minmax(0,1fr);
  gap:clamp(14px,1.6vw,24px);align-items:baseline;
  padding:var(--s3) 0;border-top:1px solid var(--hair-c)}
.pj-ch.lt .pj-spec>div{border-top-color:rgba(13,26,65,.18)}
.pj-spec>div:last-child{padding-bottom:0}
.pj-spec dt{margin:0;font-family:var(--mono);font-size:10px;letter-spacing:.14em;
  text-transform:uppercase}
.pj-ch.lt .pj-spec dt{color:var(--mute)}
.pj-ch.dk .pj-spec dt{color:var(--mute-d)}
.pj-spec dd{margin:0;font-size:15px;line-height:1.5}
.pj-spec dd b{display:block;font-weight:400}
/* the chips, and the hex beside them as real text: the chip is hidden from
   the accessibility tree, so the value is the accessible name and nothing
   depends on seeing the colour. Classes set --sw; style-src has no
   'unsafe-inline'. */
/* auto-fit, not a fixed four: Zingara documents four colours and Possah
   five, and a fifth chip wrapping onto a line of its own would read as a
   different kind of colour */
.pj-chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,54px),1fr));
  gap:10px;margin:0;padding:0;list-style:none}
.pj-chips li{min-width:0}
.pj-chips i{display:block;aspect-ratio:1;background:var(--sw);
  border:1px solid var(--hair-c)}
.pj-ch.lt .pj-chips i{border-color:rgba(13,26,65,.22)}
/* the hex under its own chip rather than four of them run together in a
   line that wraps after the third. It is also the accessible name: the chip
   is out of the tree and the value is real text. */
.pj-spec code{display:block;margin-top:7px;font-family:var(--mono);font-size:10px;
  letter-spacing:.04em}


/* --- THE TRAIL · evidence that is a sequence, not a set ---
   The applications chapter had six boards and a paragraph under each
   explaining what a photograph of a sign is. The images were not doing any
   interpretive work, because nothing said what ORDER they were in.

   They are a route: street, room, box, traffic — the distances at which a
   diner actually meets the brand, numbered the way the home page numbers
   its proofs. The number and the place are the whole caption, which is
   possible only because the sequence now carries the meaning the prose was
   carrying. Same .pj-box geometry; what is added is the count. */
.pj-trail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(18px,2.4vw,34px) clamp(10px,1.1vw,18px);margin:0;padding:0;list-style:none;
  counter-reset:trail}
/* three across rather than a 2x2: C2's "the empty grid cell reads as a
   hole" — three steps in two columns always leaves one. */
.pj-trail.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.pj-trail.square .ev-frame{aspect-ratio:1}
.pj-trail>li{min-width:0}
.pj-trail figure{margin:0}
.pj-trail .ev-frame{aspect-ratio:16/9;border-color:var(--hair-c)}
.pj-ch.lt .pj-trail .ev-frame{border-color:rgba(13,26,65,.18)}
.pj-trail figcaption{display:flex;align-items:baseline;gap:12px;margin-top:12px;
  padding-top:11px;border-top:1px solid var(--hair-c)}
.pj-ch.lt .pj-trail figcaption{border-top-color:rgba(13,26,65,.18)}
.pj-trail figcaption b{flex:0 0 auto;font-family:var(--mono);font-size:11px;font-weight:500;
  letter-spacing:.14em;color:var(--accent-l)}
.pj-ch.lt .pj-trail figcaption b{color:var(--accent-ink)}
.pj-trail figcaption span{font-family:var(--sans);font-size:15px;line-height:1.4}
.pj-ch.dk .pj-trail figcaption span{color:var(--cream)}

/* --- a slide's full-width row ---
   The compare table and anything else that is neither the writing nor the
   evidence takes the whole slide rather than being squeezed into the text
   column, where two lists at 215px each are unreadable. */
.pj-sl>.pj-compare{grid-column:1/-1;margin:0}
/* the live link, inside the evidence box, under both frames */
.pj-box>.pj-live{grid-column:1/-1;margin:var(--s3) 0 0;padding:var(--s3) 0 0;
  border-bottom:0}

/* the numbers, as one row inside a slide */
.pj-sl .pj-nums{margin:0}
/* said once, under the row, instead of the same sentence in all three cells */
/* .pj-sl-txt p is (0,1,1) and zeroes every margin in the column, so the
   note needs the same weight to keep its air from the paragraph above. */
.pj-foot-note,.pj-sl-txt .pj-foot-note{margin:var(--s4) 0 0;font-size:10px;
  letter-spacing:.1em;text-transform:uppercase;line-height:1.6;color:var(--mute)}
.pj-ch.dk .pj-foot-note{color:var(--mute-d)}

/* scope follows the numbers on the same ground, so it opens with no top air */
.pj-ch.pj-scope{padding-top:0}

/* --- this, not that --- */
.pj-compare{display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));
  gap:1px;margin:var(--gap-md) 0 0;background:rgba(13,26,65,.14);
  border:1px solid rgba(13,26,65,.14)}
.pj-compare>div{background:var(--cream);padding:clamp(20px,2.4vw,30px)}
.pj-compare h3{margin:0 0 14px;font-family:var(--mono);font-size:10px;font-weight:400;
  letter-spacing:.14em;text-transform:uppercase;color:var(--mute)}
.pj-compare ul{list-style:none;margin:0;padding:0}
.pj-compare li{padding:9px 0;font-size:16px;line-height:1.45;
  border-bottom:1px solid rgba(13,26,65,.1);display:flex;gap:10px}
.pj-compare li:last-child{border-bottom:0}
.pj-compare li::before{content:"-";flex:0 0 auto;color:var(--mute)}
.pj-compare .yes li::before{content:"\2713";color:var(--accent-ink)}
.pj-compare .no li::before{content:"\2715";color:var(--mute)}
.pj-compare .no li{color:var(--mute)}

/* --- the live site ---
   An outbound link, and it says so: the destination is not ours, so it opens
   in a new context and carries rel=noopener. */
.pj-live{display:flex;flex-wrap:wrap;align-items:baseline;
  gap:14px clamp(18px,3vw,40px);margin:var(--gap-md) 0 0;
  padding:clamp(22px,2.6vw,34px) 0;
  border-top:1px solid var(--hair-c);border-bottom:1px solid var(--hair-c)}
.pj-ch.lt .pj-live{border-color:rgba(13,26,65,.18)}
.pj-live .mono{margin:0;color:var(--mute-d);flex:0 0 auto}
.pj-ch.lt .pj-live .mono{color:var(--mute)}
.pj-live a{font-family:var(--serif);font-size:clamp(22px,2.6vw,36px);line-height:1;
  letter-spacing:-.02em;color:inherit;text-decoration:none;
  border-bottom:1px solid var(--accent);padding-bottom:4px}
.pj-live a .ext{font-family:var(--mono);font-size:11px;letter-spacing:.1em;
  margin-left:10px;vertical-align:middle;color:var(--accent-l)}
.pj-ch.lt .pj-live a .ext{color:var(--accent-ink)}
@media (hover:hover){.pj-live a:hover{border-bottom-width:2px}}
.pj-live p{margin:0;flex:1 1 260px;min-width:0;font-size:15px;line-height:1.5;
  color:var(--mute-d)}
.pj-ch.lt .pj-live p{color:var(--mute)}

/* ============ RESPONSIVE ============ */
@media (max-width:900px){
  .pj-scope-in{grid-template-columns:1fr}
  .pj-nums{grid-template-columns:1fr}
  .pj-scope ul{columns:1}
  /* the slide stacks: text, then its evidence box */
  .pj-sl{grid-template-columns:1fr}
  .pj-spec>div{grid-template-columns:1fr;gap:10px}
  .pj-live{flex-direction:column;align-items:flex-start}
}
@media (max-width:600px){
  .pg-open,.pj-open{min-height:auto;padding-top:clamp(100px,16vh,150px)}
  .pg-meta,.pj-meta{flex-direction:column;gap:14px}
  .pg-meta>div,.pj-meta>div{padding:0;border-left:0}
  .pj-box{grid-template-columns:1fr}
  .pj-trail,.pj-trail.three{grid-template-columns:1fr}
  /* three facts in a stacked single column read as a list, not as a row of
     numbers with one stray border down the middle */
  .pj-sl .pj-facts{flex-direction:column;gap:16px}
  .pj-sl .pj-facts>div{padding:0;border-left:0}
}
