/* OutForm Ceramics: the parts Alight does not have (three theories, wide figures with an expand link, triangle lists,
   the result table, ink-bar questions). Every class of-. Boxes are cs-box, pictures sit in cs-fig frames. */
/* this case study's own colours, from its Paper board (his ask, 16 Oct: "just use the color in the paper design"):
   boxes #FFF5EC with a #E9CCAF edge, picture frames #E0E0E0, white words on the ink button and the pressed toggle */
:root { --butter: #FFF5EC; --butter-edge: #E9CCAF; }
.cs-fig { border-color: #E0E0E0; }
.pill, .cs-toggle button[aria-pressed="true"] { color: #FFFFFF; }


/* 02: three theories, side by side; the third rule and label are ink */
.of-theories { display: grid; grid-template-columns: minmax(0, 1fr) 320px minmax(0, 1fr); gap: 40px; }
.of-theories > div { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.of-theories > div:last-child { border-top-color: var(--ink); }
.of-theories > div:last-child .lab { color: var(--ink); }
.of-theories .txt { color: var(--ink); }

/* 03, 05, 06: a 1020 x 480 figure (the board's 2.125 ratio) with an expand link at its top right */
.cs-fig.of-fig img { aspect-ratio: 2040 / 960; }
/* the pictures carry their own round corner (23 of 2040 across, 23 of 960 down; the Figma ones have dark grey outside it),
   so the frame and the picture take that round at every width (his ask, 16 Oct: no sharp corners) */
.cs-fig.of-fig { border-radius: calc(1.18% + 1px) / calc(2.5% + 1px); }
.cs-fig.of-fig > img { border-radius: 1.18% / 2.5%; }
.of-expand { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--ground); }
.of-expand img { display: block; width: 16px; height: 16px; aspect-ratio: auto; border-radius: 0; }
.of-expand:hover { border-color: var(--ink); }
.of-expand:focus-visible { outline-offset: 2px; }

/* a small label and its text (FOUND, WHY IT MATTERED) */
.stack.of-pair { gap: 8px; }
.of-body { display: flex; flex-direction: column; gap: 20px; }
.of-ink { color: var(--ink); }
.h2.of-bal { text-wrap: balance; }
.h3.of-bal, .note.of-bal { text-wrap: balance; }

/* 04: the design implication's text, and the how-might-we rows (an ink bar, not grey) */
.of-impl { max-width: 760px; font-size: var(--step-1); font-weight: 500; line-height: 28px; letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.cs-box.of-implication { display: flex; flex-direction: column; gap: 12px; padding: 32px; }
.of-hmw { display: flex; flex-direction: column; gap: 6px; padding-left: 16px; border-left: 2px solid var(--ink); }
.of-hmw .q { max-width: 700px; font-size: var(--step-1); font-weight: 500; line-height: 28px; letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.of-hmw .c { font-size: var(--step--1); font-weight: 500; line-height: 16px; color: var(--muted); }

/* 05: a move's pairs (text, caption, picture), and the triangle list */
.of-pairs { display: flex; flex-direction: column; gap: 64px; }
.of-block { display: flex; flex-direction: column; gap: 14px; }
.of-block .txt { max-width: 734px; }
.of-tri { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 0; margin: 0; list-style: none; }
.of-tri li { display: flex; align-items: flex-start; gap: 12px; }
.of-tri svg { display: block; flex-shrink: 0; width: 10px; height: 28px; }
.of-tri .txt { max-width: 698px; }
.of-figure-note { padding-top: 2px; }
.cs-box.of-scope { max-width: 818px; display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.of-scope .note { max-width: none; }

/* 06: the result table (four columns) and the two text columns */
.of-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.of-table th, .of-table td { padding: 18px 24px 18px 0; text-align: left; vertical-align: top; font-weight: 400; }
.of-table th { padding-block: 0 12px; }
.of-table th:last-child, .of-table td:last-child { padding-right: 0; }
.of-table th:nth-child(1), .of-table td:nth-child(1) { width: 264px; }
.of-table th:nth-child(2), .of-table td:nth-child(2) { width: 154px; }
.of-table th:nth-child(3), .of-table td:nth-child(3) { width: 224px; }
.of-table tbody tr { border-top: 1px solid var(--line); }
.of-table .m { padding-top: 24px; font-size: var(--step-0); font-weight: 500; line-height: 24px; letter-spacing: -0.005em; color: var(--ink); }
.of-table .v { font-size: var(--step-2); font-weight: 500; line-height: 36px; letter-spacing: -0.03em; color: var(--muted); white-space: nowrap; }
.of-table .v.now { color: var(--ink); }
.of-table .w { padding-top: 22px; font-size: var(--step-0); line-height: 26px; letter-spacing: -0.005em; color: var(--muted); text-wrap: balance; }
.of-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-top: 8px; }
.of-two .txt { max-width: none; }

/* narrower: columns stack, each result row becomes a small block */
@container col (max-width: 760px) {
  .of-theories { grid-template-columns: 1fr; gap: 28px; }
  .of-two { grid-template-columns: 1fr; gap: 24px; }
  .of-table, .of-table tbody, .of-table tr, .of-table td { display: block; width: auto; }
  .of-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .of-table tbody tr { padding-block: 18px; }
  .of-table td, .of-table td:nth-child(n) { width: auto; padding: 0 0 8px; }
  .of-table .m { padding-top: 0; }
  .of-table .w { padding-top: 0; }
  .of-table td[data-l]::before { content: attr(data-l); display: block; font-family: 'Geist Mono', ui-monospace, monospace; font-size: var(--step--1);
    line-height: 16px; letter-spacing: 0.06em; color: var(--muted); }
}

/* ---------- Phone (17 Oct): follows the Paper board "OutForm · phone 390". Everything here is for 640 and under, under .cs-ph;
   the desktop page above 640 does not change. ---------- */
@media (max-width: 640px) {
  .cs-ph .cs-bar-ptr { left: -9px; top: 2px; width: 70px; height: 48px; }   /* the hoya, 70 x 48 */
  .cs-ph .cs-bar-list .cs-bar-ptr { translate: 0 2px; }                      /* case-study.js sets top to the row less 2 */

  /* boxes: 24 inside, as the board */
  .cs-ph .cs-box.of-implication, .cs-ph .cs-box.of-scope { padding: 24px; gap: 12px; }
  .cs-ph .of-impl, .cs-ph .of-hmw .q { font-size: 18px; line-height: 28px; text-wrap: wrap; }
  .cs-ph #research .cs-sub:last-child .stack .txt { margin-top: 8px; }   /* 04's last part sets its lede apart: 20 under the title */
  .cs-ph #reflection .cs-sub { gap: 12px; padding-top: 8px; border-top: 0; }   /* 07: three takeaways, no rules between */
  .cs-ph #testing .cs-sub.first { padding-top: 0; }
  .cs-ph #testing .of-block { gap: 14px; }
  .cs-ph #testing .cs-toggle-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cs-ph .of-two { padding-top: 0; gap: 24px; }
  .cs-ph #solution .cs-sub.first { gap: 32px; }
  .cs-ph [data-compare="of-home"] .cap, .cs-ph [data-compare="of-classes"] .cap { font-size: 14px; line-height: 20px; font-weight: 400; color: #3D3B37; }
  .cs-ph .of-pairs { gap: 32px; }
  .cs-ph .of-block { gap: 20px; }
  .cs-ph .of-tri { padding-top: 0; }
  .cs-ph .of-figure-note { padding-top: 0; line-height: 27px; }
  .cs-ph #testing .of-tri .txt { line-height: 28px; }
  .cs-ph .of-scope .note { font-size: 16px; line-height: 27px; letter-spacing: -0.005em; color: var(--ink); }
  .cs-ph #research .cs-sub.first { padding-top: 28px; border-top: 1px solid var(--line); }   /* 04 keeps its rule under the lede */

  /* the figures: Paper's frame, "See N more notes" under the first part */
  .cs-ph .ph-fig[hidden] { display: none; }
  .cs-ph .ph-fold-wrap { --u: min(1px, calc(100cqi / 318)); container-type: inline-size; display: flex; flex-direction: column; box-sizing: border-box;
    width: 100%; padding: 16px; background: #E9CCAF; border-radius: 12px; font: 400 14px/20px Inter, system-ui, sans-serif;
    font-variation-settings: "opsz" 14; color: #000; letter-spacing: 0; }
  .cs-ph .ph-fold-wrap *, .cs-ph .ph-fold-wrap *::before, .cs-ph .ph-fold-wrap *::after { box-sizing: border-box; }
  .cs-ph .ph-fold-wrap .tx, .cs-ph .ph-fold-wrap .t { text-wrap: wrap; }
  .cs-ph .ph-fold-p1, .cs-ph .ph-fold-body:not([hidden]) { display: flex; flex-direction: column; gap: 20px; }
  .cs-ph .ph-fold-body:not([hidden]) { padding-top: 20px; }
  .cs-ph .ph-fold-wrap .pa { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); }
  .cs-ph .ph-fold-wrap .pr { position: relative; }
  .cs-ph .ph-fold-wrap .sz { width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
  .cs-ph .ph-fold-wrap .w:not(.sz) { width: calc(var(--w) * var(--u)); }
  .cs-ph .ph-fold-wrap .h:not(.sz) { height: calc(var(--h) * var(--u)); }
  .cs-ph .ph-fold-wrap .fc { display: flex; flex-direction: column; }
  .cs-ph .ph-fold-wrap .fr { display: flex; flex-direction: row; }
  .cs-ph .ph-fold-wrap .g { gap: calc(var(--g) * var(--u)); }
  .cs-ph .ph-fold-wrap .sd { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
  .cs-ph .ph-fold-wrap .fi { display: block; flex: none; max-width: none; }
  .cs-ph .ph-fold-wrap .fi.cv { object-fit: cover; }
  .cs-ph .ph-fold-wrap .fnote { flex: none; padding: 18px 14px 14px; background: #FFFEFE; border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
  .cs-ph .ph-fold-wrap .fnote.g { display: flex; flex-direction: column; }
  /* a label sits at a spot on the picture and takes its size from its words, so under 390 it scales with the picture too */
  .cs-ph .ph-fold-wrap .fnote.lbl { width: max-content; padding: calc(10 * var(--u)) calc(14 * var(--u)) !important; font-size: calc(14 * var(--u)); line-height: calc(20 * var(--u)); }
  .cs-ph .ph-fold-wrap .fnote.lbl .tx { font-size: inherit; line-height: inherit; }
  .cs-ph .ph-fold-wrap .nb { display: flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; background: #000; color: #fff; font-weight: 500; }
  .cs-ph .ph-fold-wrap .nb.s22 { width: calc(22 * var(--u)); height: calc(22 * var(--u)); font-size: 12px; line-height: 16px; }
  .cs-ph .ph-fold-wrap .nb.s18 { width: calc(18 * var(--u)); height: calc(18 * var(--u)); font-size: 10px; line-height: 12px; }
  .cs-ph .ph-fold-wrap .dt { flex: none; width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: #000; }
  .cs-ph .ph-fold-wrap .ld { flex: none; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); background: #000; }
  .cs-ph .ph-fold-wrap .pt { flex: none; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); background: #D9D9D966; }
  .cs-ph .ph-fold-wrap .bx { flex: none; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); border: 1px solid #000; }
  .cs-ph .ph-fold-wrap .bx.ds { border: 1.5px dashed #000; }
  .cs-ph .ph-fold-wrap .ph-fold { margin-top: 20px; }
  .cs-ph .ph-fold { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
    background: #FFFEFE; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); font: 500 14px/20px Inter, system-ui, sans-serif;
    font-variation-settings: "opsz" 14; color: #000; text-align: left; cursor: pointer; }
  .cs-ph .ph-fold:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
  .cs-ph .ph-fold-more { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; }
  .cs-ph .ph-fold-more .cir { display: flex; align-items: center; gap: 6px; }
  .cs-ph .ph-fold-more .wd, .cs-ph .ph-fold-less { display: flex; align-items: center; gap: 6px; }
  .cs-ph .ph-fold-less { width: 100%; justify-content: center; }
  .cs-ph .ph-fold-less .chev { rotate: 180deg; }
  .cs-ph .ph-fold .chev { flex: none; }

  /* 06: the result table, a header and three columns, "what moved it" under each row at full width */
  .cs-ph .of-table, .cs-ph .of-table thead, .cs-ph .of-table tbody { display: block; }
  .cs-ph .of-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .cs-ph .of-table tr { display: grid; grid-template-columns: minmax(0, 1fr) 72px 96px; column-gap: 14px; row-gap: 8px; align-items: baseline; }
  .cs-ph .of-table thead th:nth-child(4) { display: none; }
  .cs-ph .of-table th:nth-child(n), .cs-ph .of-table td:nth-child(n) { display: block; width: auto; padding: 0; }
  .cs-ph .of-table thead tr { padding-bottom: 12px; }
  .cs-ph .of-table tbody tr { padding: 18px 0 20px; border-top: 1px solid var(--line); }
  .cs-ph .of-table tbody tr:last-child { border-bottom: 1px solid var(--line); }
  .cs-ph .of-table td[data-l]::before { content: none; }
  .cs-ph .of-table .m { font-size: 16px; line-height: 24px; }
  .cs-ph .of-table .v { font-size: 20px; line-height: 28px; letter-spacing: -0.02em; }
  .cs-ph .of-table .w { grid-column: 1 / -1; font-size: 16px; line-height: 26px; text-wrap: wrap; }
}

/* under 390 the board's breaks are off and the notes wrap on their own: no last line left with one word */
@media (max-width: 389.98px) { .cs-ph .ph-fold-wrap .tx { text-wrap: pretty; } }

/* tree label: keeps the board's break under 390, where the box would else need 3 lines */
@media (max-width: 389.98px) { .cs-ph .keepbr br.pb { display: inline; } }
