/* quadraarkan.com: the case study pages. Loaded after site.css, which carries the tokens, the header, the title block and the drawing motion. */
.cs { --c: var(--c-struct); --t: var(--t-struct); }
.cs section { min-height: 0; display: block; padding: clamp(56px, 7vw, 100px) 0; }
.cs #top { padding-top: 150px; padding-bottom: clamp(40px, 5vw, 72px); }
.cs .sheet-no { color: var(--c); } .cs .sheet-no::before { background: var(--c); }
.cs h1 { font-size: clamp(30px, 3.3vw, 50px); max-width: 21ch; }
.cs h2 { max-width: 30ch; }
.cs .back { display: inline-block; font-family: var(--mono); font-size: 13px; color: var(--grey); margin-bottom: 26px; border-bottom: 1px solid var(--rule); padding-bottom: 2px; transition: color .25s ease, border-color .25s ease; }
.cs .back:hover { color: var(--ink); border-color: var(--ink); }
.cs .lead { margin-top: 26px; }
.cs .txt p { font-size: 17px; max-width: 60ch; margin-top: 18px; }
.cs .txt p.lead { font-size: clamp(18px, 1.4vw, 21px); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5.5vw, 100px); align-items: center; }
.two.flip > :first-child { order: 2; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } .cs #top { padding-top: 110px; } }

/* a photograph or a plot, framed like a sheet */
.plate { margin: 0; }
.plate picture { display: block; border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--shade); background: var(--stone); }
.plate img { width: 100%; height: auto; }
.plate figcaption { font-family: var(--mono); font-size: 12px; color: var(--grey); line-height: 1.55; margin-top: 20px; max-width: 72ch; }
.plate figcaption b { color: var(--ink); font-weight: 500; }
.verdict { display: inline-block; margin-top: 30px; border: 1px solid var(--ink); box-shadow: inset 4px 0 0 var(--c); padding: 11px 18px 11px 20px; font-weight: 600; color: var(--ink); font-size: 17px; }

/* the project sheet: figures in the cells of a title block */
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--ink); border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--shade); --gap: 110ms; }
.facts > div { background: #fff; padding: 16px 18px 18px; }
.facts > div:last-child { background: var(--stone); }
.facts small { display: block; font-family: var(--mono); font-size: 11px; color: var(--grey); margin-bottom: 6px; }
.facts b { display: block; font-weight: 500; font-size: clamp(20px, 1.9vw, 27px); line-height: 1.15; color: var(--ink); letter-spacing: -.01em; }
.cs .sheetrow { padding: 0 0 clamp(56px, 7vw, 100px); border-top: 0; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } .facts > div:last-child { grid-column: 1 / -1; } }

/* line drawings in the discipline's colour */
.cs .fig svg { width: 100%; height: auto; overflow: visible; color: var(--ink); --step: 40ms; --dur: 1.1s; }
.cs .fig text { fill: var(--c); font-family: var(--mono); }
.cs .fig .ann { stroke: var(--sand); } .cs .fig .hot { stroke: var(--c); }
.cs .draw .dash { stroke-dasharray: 3 2 !important; stroke-dashoffset: 0 !important; opacity: 0; transition: opacity .8s ease 1.1s !important; }
.cs .draw.on .dash { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cs .draw .dash { transition: none !important; opacity: 1; } }

/* the five steps: one bay drawn in five states on a common ground line */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(32px, 4vw, 56px); --gap: 260ms; }
.steps .fig svg { --step: 30ms; --dur: .9s; }
.steps .st { padding: 16px 22px 0 0; }
.steps .sn { font-family: var(--mono); font-size: 12px; color: var(--c); }
.steps h3 { font-size: 20px; margin: 2px 0 8px; }
.steps p { font-size: 15px; color: var(--grey); line-height: 1.5; }
.span { position: relative; margin-top: 34px; border-top: 1px solid var(--sand); padding-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--sand-dark); display: flex; justify-content: space-between; gap: 16px; }
.span::before, .span::after { content: ""; position: absolute; top: -5px; width: 1px; height: 9px; background: var(--sand); }
.span::before { left: 0; } .span::after { right: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .steps .st { padding: 0; }
}

/* the works: photographs and the detail sheet */
.works { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; margin-top: clamp(32px, 4vw, 56px); }
.works .col { display: grid; gap: clamp(32px, 4vw, 56px); }
.refs { display: grid; grid-template-columns: minmax(0, 14ch) minmax(0, 1fr); gap: 10px 24px; font-size: 15.5px; margin-top: 28px; border-top: 2px solid var(--c); padding-top: 18px; max-width: 64ch; }
.refs dt { font-family: var(--mono); font-size: 14px; color: var(--ink); padding-top: 1px; } .refs dd { color: var(--grey); }
@media (max-width: 760px) { .works { grid-template-columns: 1fr; } }

/* the workflow: what was measured, the model, the checks, the answer */
.flow { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: clamp(32px, 4vw, 56px); --gap: 320ms; }
.flow > * { position: relative; }
.flow > * + *::before { content: ""; position: absolute; left: -48px; top: 50%; width: 40px; height: 1px; background: var(--sand); }
.flow > * + *::after { content: ""; position: absolute; left: -12px; top: calc(50% - 4px); border: 4px solid transparent; border-left: 8px solid var(--sand); }
.flow ul { list-style: none; }
.flow .in { display: grid; gap: 10px; }
.node { border: 1px solid var(--ink); background: #fff; padding: 13px 16px; }
.node b { display: block; font-weight: 600; color: var(--ink); font-size: 16px; line-height: 1.3; }
.node span { display: block; font-family: var(--mono); font-size: 12px; color: var(--grey); margin-top: 3px; line-height: 1.45; }
.node.model { box-shadow: inset 0 4px 0 var(--c); background: var(--t); padding: 26px 18px; }
.node.checks li { font-size: 15px; padding: 8px 0; border-top: 1px solid var(--rule); }
.node.checks b { margin-bottom: 10px; }
.flow .out { display: grid; gap: 10px; }
.node.yes { background: var(--ink); box-shadow: 8px 8px 0 var(--shade); }
.node.yes b { color: #fff; } .node.yes span { color: #cfc8b6; }
.node.alt { border-style: dashed; border-color: var(--grey); }
.node.alt b { color: var(--grey); font-weight: 500; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 40px; }
  .flow > * + *::before { left: 28px; top: -40px; width: 1px; height: 32px; }
  .flow > * + *::after { left: 24px; top: -12px; border: 4px solid transparent; border-top: 8px solid var(--sand); }
}

/* tables and check lists, ruled like the rest */
.cs table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin-top: 26px; border-top: 2px solid var(--c); }
.cs th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--grey); padding: 12px 16px 8px 0; }
.cs td { padding: 13px 16px 13px 0; border-top: 1px solid var(--rule); vertical-align: top; color: var(--ink); }
.cs td + td, .cs th + th { font-family: var(--mono); font-size: 13.5px; color: var(--grey); padding-right: 0; }
.checklist { list-style: none; border-top: 1px solid var(--ink); margin-top: 26px; --gap: 180ms; }
.checklist li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--rule); font-size: 16px; color: var(--ink); }
.checklist li span { font-family: var(--mono); font-size: 14px; color: var(--c-tech); font-weight: 500; padding-top: 2px; }
.stack { display: grid; gap: clamp(32px, 4vw, 56px); }

/* the end of the sheet: where to go next */
.next { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; background: var(--ink); border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--shade); margin-top: clamp(32px, 4vw, 56px); }
.next > * { background: #fff; padding: 18px 20px 20px; display: block; transition: background .25s ease; }
.next a:hover { background: var(--stone); }
.next small { display: block; font-family: var(--mono); font-size: 11px; color: var(--grey); margin-bottom: 6px; }
.next b { font-weight: 600; color: var(--ink); font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 760px) { .next { grid-template-columns: 1fr; } }

/* a technology case study takes the technology colour */
.cs.tech { --c: var(--c-tech); --t: var(--t-tech); }
.rules { display: grid; grid-template-columns: minmax(0, 17ch) minmax(0, 1fr); gap: 14px 26px; font-size: 15.5px; margin-top: 28px; border-top: 2px solid var(--c); padding-top: 20px; }
.rules dt { color: var(--ink); font-weight: 600; } .rules dd { color: var(--grey); }
@media (max-width: 480px) { .rules { grid-template-columns: 1fr; gap: 2px; } .rules dd { margin-bottom: 14px; } }
/* the response plan: six actions in their order, joined like the workflow */
.chain { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px; margin-top: clamp(32px, 4vw, 56px); --gap: 200ms; }
.chain li { position: relative; border: 1px solid var(--ink); background: #fff; padding: 14px 14px 16px; }
.chain li:last-child { background: var(--ink); } .chain li:last-child b { color: #fff; } .chain li:last-child span { color: #cfc8b6; }
.chain li + li::before { content: ""; position: absolute; left: -29px; top: 50%; width: 22px; height: 1px; background: var(--sand); }
.chain li + li::after { content: ""; position: absolute; left: -11px; top: calc(50% - 4px); border: 4px solid transparent; border-left: 8px solid var(--sand); }
.chain b { display: block; font-weight: 600; font-size: 16px; color: var(--ink); line-height: 1.3; }
.chain span { display: block; font-size: 13.5px; color: var(--grey); margin-top: 6px; line-height: 1.45; }
@media (max-width: 1100px) { .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); } .chain li:nth-child(4)::before, .chain li:nth-child(4)::after { display: none; } }
@media (max-width: 600px) {
  .chain { grid-template-columns: 1fr; gap: 30px; }
  .chain li:nth-child(n)::before { display: block; left: 28px; top: -30px; width: 1px; height: 22px; }
  .chain li:nth-child(n)::after { display: block; left: 24px; top: -11px; border: 4px solid transparent; border-top: 8px solid var(--sand); }
  .chain li:first-child::before, .chain li:first-child::after { display: none; }
}
.srcnote { font-family: var(--mono); font-size: 12px; color: var(--grey); margin-top: 14px; line-height: 1.5; }
