/* ==========================================================================
   PROBLEMS (4 Nov, "Unlock Homepage Edits"): "What's still dragging your
   SDLC down?", on the same night-2 as the partners plinth that closes the
   hero (the two read as one band; graphite, then stone, for a day on
   4 Nov). A bento after
   unkey.com's Gateway section: two cards stacked left, one tall card in
   the middle (the impact map), two stacked right. Each card: a 24px
   two-part title (the subject cream, the rest stone),
   its line at 16px, and a drawing of the problem in the site's diagram
   style (muted lines, a few marks lit in Sage, 10px mono labels, 6px
   stations). Copy from the edits doc, verbatim; the drawings' words are
   set dressing, aria-hidden.
   Earlier rounds in web/explorations/: index-problems-list.html (list on
   paper), index-problems-bento-mocks.html (cards with product mocks); the
   ruled grid and the framed panel are in web/versions/unlock-4-nov/.
   ========================================================================== */

.problems {
  --ground: var(--night-2);
  --line: color-mix(in srgb, var(--ember-cream) 14%, var(--night-2));
  /* Fill does the separating, not the line (5 Nov, after modal/oxide: a
     clear lift and a near-invisible edge; was 3% fill and the 14% line). */
  --panel: color-mix(in srgb, var(--ember-cream) 6%, var(--night-2));
  --panel-edge: color-mix(in srgb, var(--ember-cream) 8%, var(--night-2));
  background: var(--night-2);
}

/* The bento: 3 columns, the second card spans both rows (unkey's layout:
   2 left, centre long, 2 right). Cards are separate, on a slight lift. */
.problems__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);   /* 12px (5 Nov, user; 6px, the corner radius, from 4 Nov) */
  margin: 0; padding: 0; list-style: none;
}
.problem {
  display: flex; flex-direction: column;
  min-width: 0; padding: var(--space-5);   /* 24px (4 Nov, user; was 32) */
  border: var(--border-w) solid var(--panel-edge); border-radius: var(--r-box, 6px);
  background: var(--panel);
}
/* A colour field (5 Nov, user: "like modules, but subtle"): two soft
   illustration-colour glows rising from the card's foot, behind the
   drawing. Still, fainter than the module tiles, a different pair per card. */
.problem { position: relative; isolation: isolate; overflow: hidden; }
.problem::before {
  content: ''; position: absolute; inset: 35% -10% -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 55% at 28% 100%, var(--field-1), transparent 70%),
    radial-gradient(50% 50% at 82% 88%, var(--field-2), transparent 70%);
  opacity: 0.16;
}
.problem:nth-child(1) { --field-1: var(--ill-teal);  --field-2: var(--ill-sage); }
.problem:nth-child(2) { --field-1: var(--ill-jade);  --field-2: var(--ill-lime); }
.problem:nth-child(3) { --field-1: var(--ill-sage);  --field-2: var(--ill-butter); }
.problem:nth-child(4) { --field-1: var(--ill-lime);  --field-2: var(--ill-teal); }
.problem:nth-child(5) { --field-1: var(--ill-butter); --field-2: var(--ill-jade); }
.problem--tall::before { inset: 25% -10% -10%; }

.problem--tall { grid-column: 2; grid-row: 1 / 3; }
.problem:nth-child(3) { grid-column: 1; grid-row: 2; }
.problem:nth-child(4) { grid-column: 3; grid-row: 1; }
.problem:nth-child(5) { grid-column: 3; grid-row: 2; }

/* Title at 24px (user, 4 Nov): the subject in cream, the rest in stone
   (on the dark bands --ink-muted is --ember-stone). */
.problem h3 {
  margin: 0; font-family: var(--font-display);
  font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--heading); text-wrap: balance;   /* every title in two even lines (27 Nov, user: with `pretty` some broke early to save a last word and others ran full, which read as random) */
}
.problem h3 span { color: inherit; }   /* the whole title in the heading colour (27 Nov, user: "make title text white"; its second half stone from 4 Nov) */
.problem p { margin: var(--space-3) 0 0; font-size: var(--size-body); line-height: 1.55; color: var(--ink-muted); }   /* 16, the main items' scale (27 Nov, user; back to 14 for a short while the same day, then "use 16px"; 14 from 4 Nov) */

/* The drawing fills the card's lower half; in the tall card it takes all
   the spare height (and its taller map drawing fills it, 4 Nov, instead of
   floating in a void), so the two rows of cards stay level. */
.problem__art { display: grid; place-items: center; margin-top: auto; padding-top: var(--space-5); }
.problem__art--fill { flex: 1; }
.problem--tall .pr-art { max-width: 300px; }
/* On the three-column bento the tall card's map fills its room (27 Nov, user:
   the tall card "dont work": at 300 wide the map floated in a 401 by 610
   space, 80px of nothing above and below it where the other four keep 24). */
@media (min-width: 992px) { .problem--tall .pr-art { max-width: 372px; } }
.pr-art { display: block; width: 100%; max-width: 310px; height: auto; overflow: visible; }   /* a step down (4 Nov, user: shorter section) */
.pr-art--fill { max-width: none; }   /* the expedition fills its card's width (13 Nov, user: too much space wasted) */

/* Diagram vocabulary (one family with the header menu tiles and the
   playbook cells: wires at heading 24%, muted marks 26%, lit marks Sage,
   10px DM Mono labels in stone). */
.pr-art text {
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  fill: var(--ink-muted);
}
.pr-art use { fill: currentColor; stroke: none; }
.pr-art__muted { color: color-mix(in srgb, var(--heading) 34%, var(--ground)); }
.pr-art__wire { fill: none; stroke: color-mix(in srgb, var(--heading) 24%, var(--ground)); stroke-width: 1.25; }
.pr-art__wire--dashed { stroke-dasharray: 3 4; }
.pr-art__wire--lit { stroke: var(--accent-text); stroke-dasharray: 3 4; }
.pr-art__frame { fill: color-mix(in srgb, var(--heading) 7%, var(--ground)); stroke: color-mix(in srgb, var(--heading) 20%, var(--ground)); }   /* a solid surface a step above the card (4 Nov, panels round) */
.pr-art__frame--lit { stroke: color-mix(in srgb, var(--accent-text) 55%, var(--ground)); }
/* A person the work waits on (4 Nov, accents round): the gate's Ember, as
   the diamonds elsewhere. The problems are where people are the bottleneck;
   the rest of the page answers them in Sage. Marks and chips only. */
.pr-art__frame--person { stroke: color-mix(in srgb, var(--accent) 80%, var(--ground)); }
.pr-art .pr-art__t-person { fill: var(--accent); }
.pr-art__node { fill: color-mix(in srgb, var(--heading) 34%, var(--ground)); }
.pr-art__node--lit { fill: var(--accent-text); }
.pr-art__ring { fill: none; stroke: color-mix(in srgb, var(--heading) 30%, var(--ground)); stroke-dasharray: 3 4; }
.pr-art__bar { fill: color-mix(in srgb, var(--heading) 14%, var(--ground)); }
.pr-art__bar--lit { fill: color-mix(in srgb, var(--accent-text) 60%, var(--ground)); }
.pr-art .pr-art__t-lit { fill: var(--accent-text); }   /* .pr-art scoped, to beat the base label rule (4 Nov) */
.pr-art__lit { color: var(--accent-text); }
.pr-art__tip { fill: none; stroke: var(--accent-text); stroke-width: 1.25; }

/* The expedition (19 Nov, user): a still drawing, like the other four
   cards. Its Sage pulse and the stops lighting in turn (4 and 13 Nov) are in
   web/versions/before-rohit-19-nov/. */
.pr-art .pr-art__t-ring { fill: color-mix(in srgb, var(--heading) 44%, var(--ground)); }

/* Unit cells, ports and rules (4 Nov, after modal.com's unit grids): a
   cell is one piece of work — queued (heading tint), empty (an outline), or
   done (Sage). Ports are the small ticks where a wire leaves a panel; rules
   split rows inside a panel. Chip text is the people's initials. */
.pr-art .pr-art__cell { fill: none; stroke: color-mix(in srgb, var(--heading) 14%, var(--ground)); }
.pr-art .pr-art__cell--queued { fill: color-mix(in srgb, var(--heading) 12%, var(--ground)); stroke: color-mix(in srgb, var(--heading) 30%, var(--ground)); }
.pr-art .pr-art__cell--lit { fill: color-mix(in srgb, var(--accent-text) 30%, var(--ground)); stroke: var(--accent-text); }
.pr-art__port { fill: color-mix(in srgb, var(--heading) 40%, var(--ground)); }
.pr-art__rule { fill: none; stroke: color-mix(in srgb, var(--heading) 10%, var(--ground)); }
.pr-art .pr-art__t-chip { font-size: 9px; font-weight: 500; letter-spacing: 0.04em; }

/* Shapes only (5 Nov, user: the drawings leaned on words): skeleton bars
   for titles and lines (--strong for a title), people as Ember rings with
   the Phosphor user glyph, and a small meter of cells for a share. */
.pr-art .pr-art__person { color: var(--accent); }
.pr-art__bar--strong { fill: color-mix(in srgb, var(--heading) 30%, var(--ground)); }
.pr-art__meter { fill: none; stroke: color-mix(in srgb, var(--heading) 24%, var(--ground)); }
.pr-art__meter--lit { fill: color-mix(in srgb, var(--accent-text) 30%, var(--ground)); stroke: var(--accent-text); }

/* Two columns: the middle card falls back into the flow (no tall cell),
   and the fifth takes the full width. */
@media (max-width: 991px) {
  .problems__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .problem, .problem:nth-child(n) { grid-column: auto; grid-row: auto; }
  .problem--tall .pr-art { max-width: 260px; }
  .problem:nth-child(5) { grid-column: 1 / -1; }
  .problem__art { flex: 1; }   /* cards in a row differ more here; centre each drawing in its spare room */
}
@media (max-width: 640px) {
  .problems__grid { grid-template-columns: minmax(0, 1fr); }
  .problem, .problem--tall, .problem:nth-child(n) { grid-column: auto; grid-row: auto; padding: var(--space-3); }   /* 12px on phones (10 Nov, user; 24 before) */
  .problem h3 { font-size: 20px; }
  .problem--tall .pr-art { max-width: 300px; }
}

/* The Problems cards, lifted (27 Nov, user: "do all three" of — the drawings
   too faint, the drawings at different sizes, the cards grey slabs).
   1. The drawings' greys a step up, inside these cards only (the same parts
      draw the closing steps and the hero cards, which keep theirs): bars,
      frames, wires, cells and marks about half as bright again, lit frames
      firmer.
   2. One size: on the three-column bento the four small drawings run to
      360px (310 before; the expedition already fills its card) and the tall
      card's map fills its column.
   3. The colour field at each card's foot at 26% (16 before). */
.problem .pr-art__bar { fill: color-mix(in srgb, var(--heading) 22%, var(--ground)); }
.problem .pr-art__bar--strong { fill: color-mix(in srgb, var(--heading) 42%, var(--ground)); }
.problem .pr-art__bar--lit { fill: color-mix(in srgb, var(--accent-text) 72%, var(--ground)); }
.problem .pr-art__muted { color: color-mix(in srgb, var(--heading) 48%, var(--ground)); }
.problem .pr-art__wire { stroke: color-mix(in srgb, var(--heading) 36%, var(--ground)); }
.problem .pr-art__wire--lit { stroke: var(--accent-text); }
.problem .pr-art__frame { fill: color-mix(in srgb, var(--heading) 9%, var(--ground)); stroke: color-mix(in srgb, var(--heading) 30%, var(--ground)); }
.problem .pr-art__frame--lit { stroke: color-mix(in srgb, var(--accent-text) 78%, var(--ground)); }
.problem .pr-art__frame--person { stroke: color-mix(in srgb, var(--accent) 80%, var(--ground)); }
.problem .pr-art__node { fill: color-mix(in srgb, var(--heading) 48%, var(--ground)); }
.problem .pr-art__node--lit { fill: var(--accent-text); }
.problem .pr-art__ring { stroke: color-mix(in srgb, var(--heading) 42%, var(--ground)); }
.problem .pr-art .pr-art__cell { stroke: color-mix(in srgb, var(--heading) 24%, var(--ground)); }
.problem .pr-art .pr-art__cell--queued { fill: color-mix(in srgb, var(--heading) 18%, var(--ground)); stroke: color-mix(in srgb, var(--heading) 42%, var(--ground)); }
.problem .pr-art .pr-art__cell--lit { fill: color-mix(in srgb, var(--accent-text) 30%, var(--ground)); stroke: var(--accent-text); }
.problem .pr-art__port { fill: color-mix(in srgb, var(--heading) 52%, var(--ground)); }
.problem .pr-art__rule { stroke: color-mix(in srgb, var(--heading) 16%, var(--ground)); }
.problem .pr-art .pr-art__t-ring { fill: color-mix(in srgb, var(--heading) 56%, var(--ground)); }
.problem::before { opacity: 0.26; }
@media (min-width: 992px) {
  .problem .pr-art:not(.pr-art--fill) { max-width: 360px; }
  .problem--tall .pr-art:not(.pr-art--fill) { max-width: none; }
}
/* Trying the cards without the colour field at their foot (27 Nov, user:
   "what if remove those gradient? from image cards"); delete this rule to
   bring the fields back (26% as set earlier the same day). */
.problem::before { display: none; }
/* The cards lifted off the band by a shadow, as the white surfaces on the
   light bands are (27 Nov, user: "add shadows, as we added in light section
   in platform"): the same two layers, in night-deep so they show on the dark
   band (a tight one under the edge, a soft wide one below). */
.problem {
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--night-deep) 60%, transparent),
    0 var(--space-3) var(--space-6) color-mix(in srgb, var(--night-deep) 55%, transparent);
}

/* The Problems cards in the supporting points' make (27 Nov, user: "what if
   we apply this to problem card too?", then "i meant same 16px title and
   20x20px icon size"): the title in Inter 16 weight 500 after a 20px muted
   icon (bug, tree-structure, git-pull-request, rocket, robot), the line at 16
   8px under it; the drawing below as before. The 24px DM Sans title (4 Nov)
   is in web/versions/before-item-scale/. */
.problem h3 { font: 500 16px/1.4 var(--font-body); letter-spacing: 0; text-wrap: pretty; }
.problem h3 .icon { --icon-size: 20px; display: inline-block; width: 20px; height: 20px; margin-right: var(--space-2); vertical-align: -4px; color: var(--ink-muted); }
.problem p { margin-top: var(--space-2); }
@media (max-width: 767px) { .problem h3 { font-size: 16px; } }

/* Problems keeps only the foot's Sage field (27 Nov, user: the teal at the
   top left "is messing up the cutout": the partners plinth above is the same
   night-2 and has to meet this band with no change of colour). */
.section.problems::before { background: radial-gradient(46% 64% at 92% 100%, color-mix(in srgb, var(--sage-ink) 26%, transparent), transparent 72%); }

/* The review queue as a list (28 Nov, user, after fingerprint.com's
   scored-events list): a small header and a few real words, one row in
   focus — a PR waiting on a reviewer, its dot Ember (a person) — the rest
   queued, each a step fainter, and the list fading out at the card's foot.
   Inter (no mono in illustrations), 12px, ages in tabular figures. */
.problem__art--list { display: block; place-items: initial; margin-inline: calc(var(--space-5) * -1); margin-bottom: calc(var(--space-5) * -1); padding: var(--space-5) var(--space-5) 0; }
.pr-queue {
  display: grid; gap: var(--space-2); max-width: 400px; margin-inline: auto;
  font: 400 12px/1.4 var(--font-body); color: var(--ink-muted);
  -webkit-mask-image: linear-gradient(var(--white) 55%, transparent); mask-image: linear-gradient(var(--white) 55%, transparent);
}
.pr-queue__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-1); }
.pr-queue__chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--space-2); border: var(--border-w) solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--r-box, 6px); color: var(--heading); white-space: nowrap; }
.pr-queue__chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pr-queue ol { display: grid; margin: 0; padding: 0; list-style: none; }
.pr-queue li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto 2.4em; align-items: center; gap: var(--space-3); height: 32px; padding: 0 var(--space-2); border-radius: var(--r-box, 6px); }
.pr-queue li:nth-child(2) { opacity: 0.62; }
.pr-queue li:nth-child(3) { opacity: 0.48; }
.pr-queue li:nth-child(n+4) { opacity: 0.36; }
.pr-queue__id, .pr-queue__age { font-variant-numeric: tabular-nums; }
.pr-queue__age { text-align: right; }
.pr-queue__title { overflow: hidden; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.pr-queue__state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pr-queue__state i { width: 6px; height: 6px; border-radius: 50%; border: var(--border-w) solid color-mix(in srgb, var(--heading) 40%, transparent); }
/* the one in focus */
.pr-queue .is-on { background: color-mix(in srgb, var(--heading) 6%, transparent); box-shadow: inset 0 0 0 var(--border-w) color-mix(in srgb, var(--heading) 14%, transparent); }
.pr-queue .is-on .pr-queue__id, .pr-queue .is-on .pr-queue__title, .pr-queue .is-on .pr-queue__state, .pr-queue .is-on .pr-queue__age { color: var(--heading); }
.pr-queue .is-on .pr-queue__state i { border: 0; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* The impact map a size down (28 Nov, user: "too big, scale it down"; it
   filled its column, 401px wide and 604 tall at 1440), centred in the
   tall card's spare room. */
@media (min-width: 992px) { .problem--tall .pr-art:not(.pr-art--fill) { max-width: 280px; } }
/* on phones a size down too (300 wide and 452 tall there) */
@media (max-width: 767px) { .problem--tall .pr-art { max-width: 240px; } }
/* in a narrow card the state keeps its dot and drops its words, so the
   titles keep their room (the header's chip says who it waits on) */
.problem__art--list { container-type: inline-size; }
@container (max-width: 360px) {
  .pr-queue__state { gap: 0; font-size: 0; }
  .pr-queue li { grid-template-columns: 3.4em minmax(0, 1fr) 6px 2.4em; }
}

/* A little text in the drawings (28 Nov, user: "they can benefit a little
   bit of text"; after fingerprint.com's illustrations): a few real words in
   place of skeleton bars — the ticket, the release, the services touched,
   the checks written down, the instruction files — in Inter (no mono in
   illustrations), the rest still skeleton. 9 units, about 11px at the
   drawings' size. Ours, illustrative. */
.pr-art .pr-art__word { font-family: var(--font-body); font-size: 9px; font-weight: 500; letter-spacing: 0; text-transform: none; fill: color-mix(in srgb, var(--heading) 82%, var(--ground)); }
.pr-art .pr-art__word--lit { fill: var(--accent-text); }
.pr-art .pr-art__word--muted { font-weight: 400; fill: color-mix(in srgb, var(--heading) 52%, var(--ground)); }
.pr-art .pr-art__word--person { fill: var(--accent); }
.pr-art .pr-art__word--end { text-anchor: end; }
/* the review queue: after three rows, skeleton */
.pr-queue__bar { display: block; width: var(--w); max-width: 100%; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--heading) 16%, transparent); }
.pr-queue .is-skeleton .pr-queue__age .pr-queue__bar { margin-left: auto; }
.pr-art .pr-art__word--small { font-size: 8px; }
.pr-art .pr-art__word--big { font-size: 11px; }   /* the impact map, drawn smaller than the others */
/* each word sits on its row's centre line, level with its icon (28 Nov, user:
   "the text not aligned centrally in the boxes"); in the impact map's lit
   tiles the icon and name are centred as a group */
.pr-art .pr-art__word { dominant-baseline: central; }

/* the text floor (28 Nov, illustration audit): the impact map's words at 12
   units (it draws at 0.93, so about 11px), the record's empty state at 9 */
.pr-art .pr-art__word--big { font-size: 12px; }
.pr-art .pr-art__word--small { font-size: 9px; }
.pr-art .pr-art__word--big:first-of-type { font-size: 11.5px; }
