/* CaseModel website: css/p-caseiq.css
   CaseIQ's own page: the line under its name, questions answered with the page behind each reference, one subject at
   three levels, and an interview where the record runs out. */

/* a quieter button sits beside the main one. The shared section class shares its name, so its padding is set back here */
.btn.sec { padding: 0 24px; } .btn.sec.sm { padding: 0 18px; }

/* ---- the head: the name is the wordmark, with what it is said plainly under it ---- */
.ph-what { margin: 14px 0 0; font: 700 clamp(19px, 1.7vw, 24px)/1.25 var(--display); color: var(--text-2); letter-spacing: -.01em; }

/* ---- the exchange, as the overview sets it: questions on the left of a bubble, the answer under them ---- */
.chat-qs { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.chat-qs button { text-align: left; min-height: 44px; padding: 10px 16px; border: 1px solid var(--edge); border-radius: 18px 18px 18px 4px; background: #fff; font: 600 16px/1.3 var(--ui); color: var(--navy); transition: background .2s, border-color .2s, color .2s; }
.chat-qs button:hover { border-color: var(--azure); }
.chat-qs button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chat-a { margin-top: 14px; padding: 18px 20px; border-radius: 4px 18px 18px 18px; background: var(--sky-3); min-height: 196px; transition: opacity .3s; }
.chat-a p { font-size: 16.5px; line-height: 1.6; margin-bottom: .7em; }
.chat-a .flag { padding-left: 14px; border-left: 3px solid var(--orange); }

/* a reference that opens its page: the label stays a citation, with a larger area to press than it shows */
cite button { position: relative; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
cite button::after { content: ''; position: absolute; inset: -11px -8px; }
/* where a finger may press it, a reference is pressed over 44 px, reaching further down than up so that it never takes a
   press meant for a reference on the line above */
@media (any-pointer: coarse) { cite button::after { top: -8px; bottom: -22px; } }
cite:has(button) { transition: background .2s, border-color .2s, color .2s; }
cite:has(button):hover { border-color: var(--azure); }
cite:has(button[aria-pressed="true"]) { background: var(--azure-d); border-color: var(--azure-d); color: #fff; }

/* ---- the demo: the exchange beside the page it cites ---- */
.ak { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 3.4vw, 48px); align-items: start; }
.ak-page { position: sticky; top: calc(var(--top) + 72px); }
.ak-k, .iv-k { margin: 0 0 10px; font: 700 12.5px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
#ak-doc .doc { box-shadow: var(--sh-2); }
@media (prefers-reduced-motion: no-preference) { #ak-doc .doc.fresh { animation: iq-in .35s var(--ease); } }
@keyframes iq-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.doc-rows { margin: 0; display: grid; gap: 6px; }
.doc-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 10px; border-radius: 4px; background: var(--sky-1); font: 600 15.5px/1.3 var(--display); color: var(--text-2); }
.doc-rows mark { flex: 1; display: flex; justify-content: space-between; margin: -6px -10px; padding: 6px 10px; }
.doc-fact { padding: 16px 18px; border-radius: 8px; border: 1px solid var(--line); border-left: 4px solid var(--orange); background: var(--orange-bg); }
.doc-fact p { margin: 0 0 6px; } .doc-fact p:last-child { margin: 0; font-size: 15px; color: var(--orange-dd); }
@media (max-width: 860px) { .ak { grid-template-columns: minmax(0, 1fr); } .ak-page { position: static; } .chat-a { min-height: 0; } }

/* ---- bubbles: a question, CaseIQ, and a witness ---- */
.bub { max-width: 46em; padding: 14px 18px; border-radius: 4px 18px 18px 18px; background: var(--sky-3); }
.bub p { margin: 0 0 .6em; font-size: 16.5px; line-height: 1.55; } .bub p:last-child { margin: 0; }
.bub .by { margin-bottom: 4px; font: 700 12.5px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--azure-dd); }
.bub.q { margin-left: auto; width: max-content; max-width: 80%; border-radius: 18px 18px 4px 18px; background: var(--navy); }
.bub.q p { color: #fff; font-weight: 600; }
.bub.her { margin-left: clamp(16px, 6vw, 64px); background: #fff; border: 1px solid var(--line); border-radius: 18px 4px 18px 18px; }
.bub.her .by { color: var(--text-3); }
.bub + .bub, .bub + .arg { margin-top: 14px; }

/* ---- the three levels ---- */
html:not(.js) .lv-seg { display: none; }
.lv-body { display: grid; gap: 40px; }
.js .lv-body { display: block; min-height: 300px; }
.js .lv-p:not(.on) { display: none; }
@media (prefers-reduced-motion: no-preference) { .js .lv-p.on { animation: iq-in .4s var(--ease); } }
.gd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.gd-page { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--sky-1); }
.gd-h { margin: 0 0 12px; font: 700 14px/1.3 var(--display); color: var(--text-3); }
.gd-els { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gd-els li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 6px; background: #fff; border: 1px solid var(--line-2); font: 600 15.5px/1.3 var(--display); color: var(--text-3); }
.gd-els li span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--text-2); font: 700 12.5px/1 var(--display); }
.gd-els li.lit { color: var(--navy); border-color: var(--azure); box-shadow: 0 0 0 3px var(--sky-4); }
.gd-els li.lit span { background: var(--navy); color: #fff; }
.gd-els em { margin-left: auto; white-space: nowrap; font-style: normal; font-size: 14px; color: var(--azure-dd); }
.arg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.arg-side { padding: 16px 18px; border-radius: 10px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--azure); }
.arg-side.against { border-top-color: var(--text-3); }
.arg-k { margin: 0 0 10px; font: 700 13px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.arg ul { list-style: none; margin: 0; padding: 0; }
.arg li { padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 16px; line-height: 1.5; }
.arg li:first-child { border-top: 0; padding-top: 0; }
.arg-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--red-bg); font-size: 15px; line-height: 1.45; color: var(--red-dd); }
.lv-line { margin: 18px 4px 0; font-size: 16.5px; color: var(--text-2); max-width: 46em; }
@media (max-width: 860px) { .gd, .arg { grid-template-columns: 1fr; } .js .lv-body { min-height: 0; } }
@media (max-width: 560px) {
  .lv-seg { display: flex; width: 100%; }
  .lv-seg button { flex: 1 1 auto; padding: 0 6px; min-height: 44px; font-size: 14.5px; }
  .bub.q { max-width: 92%; width: auto; }
}

/* ---- the interview ---- */
.iv { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.iv-talk { padding: clamp(18px, 2.4vw, 28px); border: 1px solid var(--line); border-radius: var(--r-l); background: #fff; box-shadow: var(--sh-2); }
.iv-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); font: 700 15.5px/1.3 var(--display); color: var(--navy); }
.iv-put { margin: 14px 0; padding-left: clamp(16px, 6vw, 64px); }
.iv-res { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 16px; color: var(--text-2); }
.iv-side .go { margin-top: 8px; }
/* numbered steps joined by a line, running down */
.vsteps { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: vs; }
.vsteps li { position: relative; padding: 2px 0 26px 54px; counter-increment: vs; }
.vsteps li::before { content: counter(vs); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 16px/1 var(--display); z-index: 1; }
.vsteps li::after { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--edge); }
.vsteps li:last-child::after { display: none; }
.vsteps h3 { font-size: 18px; margin-bottom: 4px; }
.vsteps p { margin: 0; font-size: 16px; color: var(--text-2); }
@media (max-width: 900px) { .iv { grid-template-columns: 1fr; } }
/* the link under the steps wraps on a narrow window: its arrow follows the last word, and its lines break evenly */
.iv-side .go { display: block; width: fit-content; max-width: 100%; text-wrap: balance; }
.iv-side .go::after { display: inline-block; margin-left: 8px; vertical-align: middle; }
