/* Extra styles for work/hrms.html only. The shared system (case.css) is built around phone screens;
   this case is mostly desktop, so it adds a wide screen frame, a mixed key-screens strip, wide final screens
   with pins, and decision rows that pair the reasoning with a crop of the screen it produced. */

/* wide desktop screens sit on their own light plate in both themes, like every artefact */
.wide { position: relative; display: block; width: 100%; padding: 0; background: #fff; border: 1px solid var(--plate-edge); border-radius: 10px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent), 0 22px 48px -30px rgba(0, 0, 0, .45); }
.wide img { display: block; width: 100%; height: auto; border-radius: 9px; }
.wide .scr { position: relative; display: block; }
button.wide { cursor: zoom-in; transition: transform .18s var(--ease), border-color .15s; }
button.wide:hover { transform: translateY(-2px); border-color: var(--ink-3); }
button.wide:focus-visible { outline-offset: 4px; }
[data-theme="dark"] .wide { filter: brightness(.94); }

/* key screens: one desktop screen and one phone, bottoms aligned */
.keys-row.keys-row--mix { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
.keys-row--mix > li { display: block; }
.keys-row--mix > li:first-child { grid-column: 1 / 9; }
.keys-row--mix > li:last-child { grid-column: 9 / 13; }
.keys-row--mix .key-v--phone { max-width: 236px; }
.keys-row--mix .key-c { margin-top: 16px; padding-bottom: 0; max-width: 34em; }

/* summary: the confidentiality line stays quiet */
.prose .quiet { font-size: 14.5px; color: var(--ink-3); }

/* decisions: the reasoning on the left, the screen it produced on the right */
.decs { list-style: none; margin-inline-start: calc((100% + var(--g)) / 12); border-top: 1px solid var(--ink); }
.dec { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); column-gap: var(--g); row-gap: 24px; align-items: start;
  padding: clamp(28px, 3.4vw, 48px) 0; border-bottom: 1px solid var(--rule); }
.dec-t { grid-column: 1 / 5; }
.dec-v { grid-column: 5 / 12; margin: 0; }
.dec-n { font-size: 11.5px; color: var(--data-ink); }
.dec h3 { margin-top: 8px; font-weight: 480; font-size: clamp(22px, 2vw, 28px); line-height: 1.18; letter-spacing: -.012em; text-wrap: pretty; }
.dec .pair-r:first-of-type { margin-top: 16px; }
.dec-v figcaption { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.dec-v .shot { border-radius: 2px; }
.dec-v .shot img { max-width: 100%; border-radius: 8px; }
.dec-v .shot--narrow img { max-width: 332px; }
.dec-phones { display: flex; justify-content: center; gap: clamp(14px, 2.4vw, 32px); background: #f1f1f1; border: 1px solid var(--plate-edge); padding: clamp(14px, 2vw, 28px); }
.dec-phones .phone { max-width: 216px; }
[data-theme="dark"] .dec-phones { background: #e4e4e4; }

/* final screens: a wide screen with pins, the words above and the callouts in two columns below */
.wscreen { scroll-margin-top: 16px; }
.wscreen + .wscreen { margin-top: clamp(72px, 8vw, 120px); }
.wscreen .screen-t { max-width: 46em; margin-inline-start: calc((100% + var(--g)) / 12); }
.wscreen .wide { margin-top: 28px; }
.wscreen .calls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--g); margin-top: 28px;
  margin-inline-start: calc((100% + var(--g)) / 12); border-top: 0; }
.wscreen .calls li { border-top: 1px solid var(--rule); border-bottom: 0; }
.wscreen .fig-cap { margin-inline-start: calc((100% + var(--g)) / 12); }

.flow-row.flow-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow-row--3 .phone { max-width: 250px; }

/* design system: the kit sheet, then the status colours and the rules */
.kit { margin-top: 28px; }
.ds-rules { margin-top: 16px; }
.ds-rules li { font-size: 15.5px; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .keys-row--mix .key-v { max-width: none; }
  .keys-row--mix > li:first-child { grid-column: 1 / 9; }
  .keys-row--mix > li:last-child { grid-column: 9 / 13; }
  .keys-row--mix .key-v--phone { max-width: 196px; }
  .dec-t { grid-column: 1 / 12; }
  .dec-v { grid-column: 1 / 12; }
  .dec-t { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--g); }
  .dec-t > .dec-n, .dec-t > h3 { grid-column: 1 / -1; }
  .dec-t .pair-why { grid-column: 1 / -1; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .keys-row.keys-row--mix { grid-template-columns: 1fr; row-gap: 32px; }
  .keys-row--mix > li:first-child, .keys-row--mix > li:last-child { grid-column: 1 / -1; }
  .keys-row--mix > li:last-child { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); column-gap: 16px; align-items: center; }
  .keys-row--mix > li:last-child .key-c { margin-top: 0; }
  .keys-row--mix .key-v--phone { max-width: none; }
  .wide { border-radius: 6px; }
  .wide img { border-radius: 5px; }
  .decs { margin-inline-start: 0; }
  .dec { display: block; padding: 28px 0 32px; }
  .dec-t { display: block; }
  .dec-v { margin-top: 22px; }
  .dec-phones { padding: 14px 10px; gap: 10px; }
  .wscreen .screen-t, .wscreen .calls, .wscreen .fig-cap { margin-inline-start: 0; }
  .wscreen .calls { grid-template-columns: 1fr; }
  .wscreen .wide .pin { width: 17px; height: 17px; font-size: 9.5px; }
  .flow-row.flow-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  button.wide { transition: none; }
  button.wide:hover { transform: none; }
}

/* additions after the first review */
.ph-bar.ph-bar--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.decs { margin-top: clamp(40px, 4vw, 56px); }
button.shot { display: block; width: 100%; cursor: zoom-in; transition: border-color .15s; }
button.shot:hover { border-color: var(--ink-3); }
button.shot:focus-visible { outline-offset: 4px; }
.learned { margin-inline-start: calc((100% + var(--g)) / 12); }
@media (max-width: 720px) {
  .learned { margin-inline-start: 0; }
}

/* ---------- summary: the NDA note and the "How I worked" strip (page-level, same block on all four case studies) ---------- */
.nda-note { grid-column: 9 / 13; padding: 2px 0 2px 16px; border-inline-start: 3px solid var(--data); }
.nda-note .k { margin-bottom: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--data-ink); }
.nda-note p:last-child { font-size: 16px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.hw { margin-top: clamp(48px, 5vw, 72px); margin-inline-start: calc((100% + var(--g)) / 12); }
.hw-h { font-weight: 400; font-size: 12px; line-height: 1.5; color: var(--ink-2); padding-bottom: 14px; }
.hw-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 3px; }
.hw-steps li { display: grid; grid-template-rows: auto 8px auto; row-gap: 10px; align-content: start; min-width: 0; }
.hw-steps li::before { content: ""; grid-row: 2; background: var(--data); }
.hw-k { grid-row: 1; font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--ink); white-space: nowrap; }
.hw-k span { color: var(--data-ink); margin-inline-end: 8px; }
.hw-t { grid-row: 3; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); padding-inline-end: clamp(10px, 1.4vw, 22px); text-wrap: pretty; }
.hw .fig-cap { margin-top: 18px; }
@media (max-width: 1100px) {
  .nda-note { grid-column: 2 / 11; }
  .hw-t { font-size: 14px; }
}
@media (max-width: 720px) {
  .hw { margin-inline-start: 0; }
  .hw-steps { grid-template-columns: 1fr; row-gap: 3px; }
  .hw-steps li { grid-template-columns: 6px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px; padding: 0; }
  .hw-steps li::before { grid-column: 1; grid-row: 1 / 3; }
  .hw-k { grid-column: 2; padding-top: 10px; }
  .hw-t { grid-column: 2; grid-row: 2; padding: 0 0 12px; font-size: 15px; }
}

/* ---------- redesigned screens (Dec 2026): the second shot in Decision 1 is the batch confirmation ---------- */
.dec-v .shot + .shot { margin-top: 12px; }
.dec-v .shot--confirm img { max-width: 488px; }
