/* CaseModel website: css/p-cognition.css
   Cognition's own page: the line under its name, the three readings with one finding each, one finding laid out in full
   with its decision, and the three plain statements on how it is kept. */

/* 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 h1 .wm { font-size: 1em; }
.ph-what { margin: 14px 0 0; font: 700 clamp(19px, 1.7vw, 24px)/1.25 var(--display); color: var(--text-2); letter-spacing: -.01em; }

/* ---- a finding, as the overview sets it: a rule down its left in the colour of what it is ---- */
.find { padding: 16px 18px 16px 20px; border-radius: 8px; background: var(--sky-1); border: 1px solid var(--line-2); border-left: 4px solid var(--azure); }
.find[data-k="adv"] { border-left-color: var(--red); } .find[data-k="open"] { border-left-color: var(--orange); }
.find-k { display: block; font: 700 12.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--azure-dd); }
.find[data-k="adv"] .find-k { color: var(--red-d); } .find[data-k="open"] .find-k { color: var(--orange-d); }
.find > p { margin: 10px 0 0; font-size: 17.5px; line-height: 1.45; color: var(--text); }
.find .find-src { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.find-src cite { white-space: normal; line-height: 1.3; }

/* ---- the three readings ---- */
html:not(.js) .rd-seg { display: none; }
.rd-body { display: grid; gap: 40px; }
.js .rd-body { display: block; min-height: 430px; }
.rd-p { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(22px, 4vw, 56px); align-items: start; }
.js .rd-p:not(.on) { display: none; }
@media (prefers-reduced-motion: no-preference) { .js .rd-p.on { animation: rd-in .45s var(--ease); } }
@keyframes rd-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rd-say h3 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.025em; }
.rd-say p { margin-top: 14px; font-size: 18.5px; color: var(--text-2); max-width: 22em; }
.rd-find { display: grid; gap: 16px; }
.rd-doc p:last-child { margin-bottom: 0; }
.rd-meta { margin-top: 12px !important; padding-top: 10px; border-top: 1px dashed var(--line); font: 600 14.5px/1.5 var(--display); color: var(--text-3); }
.rd-meta mark { margin: 0 4px; }
.rd-chain { padding: 18px 20px 0; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.rd-chain li.noq q { background: var(--orange-bg); color: var(--orange-dd); }
.rd-facts { margin: 0; padding: 0 0 0 1.3em; font-size: 16px; }
.rd-facts li { margin-bottom: 8px; padding-left: 4px; }
.rd-facts cite { margin-left: 4px; }
.rd-more { margin: 4px 0 0; font-size: 15px; color: var(--text-3); }
@media (max-width: 860px) { .rd-p { grid-template-columns: 1fr; } .js .rd-body { min-height: 0; } }

/* ---- one finding, in full ---- */
#finding .demo-bar .tag { transition: background .3s var(--ease), color .3s var(--ease); }
.fd-title { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; max-width: 30em; }
.fd-parts { columns: 2; column-gap: clamp(24px, 3.4vw, 48px); margin-top: 26px; }
.fd-part { break-inside: avoid; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.fd-part > p { font-size: 16.5px; color: var(--text); }
.fd-k { display: flex; align-items: center; gap: 10px; margin: 0 0 12px !important; font: 700 13px/1.2 var(--display) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--navy) !important; }
.fd-k i { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13px/1 var(--display); font-style: normal; letter-spacing: 0; }
.fd-rec, .fd-why, .fd-set { list-style: none; margin: 0; padding: 0; }
.fd-rec li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; font-size: 15px; color: var(--text-3); }
.fd-doc { margin-top: 14px; }
.fd-doc .doc-h > span { display: inline-flex; align-items: center; gap: 8px; }
.fd-doc p { margin: 0; }
.fd-why li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.fd-why li:first-child { padding-top: 0; }
.fd-why b { font: 700 15.5px/1.3 var(--display); color: var(--navy); }
.fd-why p { grid-column: 1 / -1; margin: 0; font-size: 15.5px; line-height: 1.45; color: var(--text-2); }
.fd-set li { position: relative; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line-2); font: 600 16px/1.35 var(--display); color: var(--navy); }
/* ticked as every list on the site is (.ticks in base.css), set down by the row's own top padding */
.fd-set li::before { content: ''; position: absolute; left: 2px; top: calc(10px + .3em); width: 15px; height: 8px; border: solid var(--azure); border-width: 0 0 2.2px 2.2px; transform: rotate(-45deg); }
.fd-stay { margin-top: 14px; font-size: 15.5px; color: var(--text-3) !important; }
@media (max-width: 860px) { .fd-parts { columns: 1; } }

/* the proposed change, and the decision on it */
.fd-change { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; align-items: center; margin-top: 6px; padding: 20px 22px; border-radius: 10px; background: var(--sky-3); border: 1px solid var(--edge); }
.fd-prop p:last-child { margin: 0; font-size: 17px; color: var(--text); max-width: 40em; }
.fd-prop .fd-k { margin-bottom: 8px !important; }
.fd-acts { display: flex; gap: 10px; }
.fd-acts .btn { min-width: 116px; }
.fd-out { grid-column: 1 / -1; }
.fd-out:empty { display: none; }
.fd-res { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 14px; border-top: 1px solid var(--edge); }
.fd-res p { flex: 1 1 26em; margin: 0; font-size: 16.5px; line-height: 1.45; color: var(--text); }
.fd-res .btn { min-height: 44px; }
.fd-note { margin: 0; padding-top: 14px; border-top: 1px solid var(--edge); font-size: 15.5px; color: var(--text-2); }
.fd-change[data-s="applied"] { background: var(--sky-4); border-color: var(--azure); }
.fd-change[data-s="declined"] { background: var(--sky-1); border-color: var(--line); }
.fd-change[data-s="applied"] .fd-acts, .fd-change[data-s="declined"] .fd-acts { display: none; }
.fd-change[data-s="declined"] .fd-prop p:last-child { color: var(--text-3); }
@media (prefers-reduced-motion: no-preference) { .fd-res, .fd-note { animation: rd-in .4s var(--ease); } }
@media (max-width: 700px) {
  .fd-change { grid-template-columns: minmax(0, 1fr); }
  .fd-acts .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
  /* the finding's state may run longer than the frame is wide: it wraps inside its tag */
  #finding .demo-bar .tag { height: auto; min-height: 24px; padding-top: 4px; padding-bottom: 4px; line-height: 1.25; white-space: normal; }
}

/* ---- one case, one model: three plain statements, each ruled above ---- */
.cc-rely { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.cc-rely > div { padding-top: 22px; border-top: 2px solid var(--navy); }
.cc-rely h3 { font-size: 20px; margin-bottom: 12px; }
.cc-rely p { font-size: 17px; color: var(--text-2); max-width: 24em; }

/* where its work shows: three links, each naming where it goes */
.shows { margin-top: clamp(48px, 6vw, 80px); }
.shows h3 { font-size: 20px; margin-bottom: 18px; }
.shows-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.show { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; border: 1px solid var(--line); border-radius: var(--r-l); background: #fff; text-decoration: none; color: var(--navy); box-shadow: var(--sh-1); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.show:hover { border-color: var(--azure); box-shadow: var(--sh-2); color: var(--navy); }
.show b { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1.2 var(--display); letter-spacing: -.01em; color: var(--azure-dd); }
.show b::after { content: ''; flex: none; width: 18px; height: 10px; background: currentColor; transition: transform .2s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.show:hover b::after { transform: translateX(4px); }
.show span { font-size: 16px; line-height: 1.45; color: var(--text-2); }
@media (max-width: 860px) { .cc-rely, .shows-row { grid-template-columns: 1fr; gap: 22px; } .shows-row { gap: 12px; } }

/* ---- narrow windows: the choice of reading spans the frame, and each explanation's label sits under its name ---- */
@media (max-width: 560px) {
  .rd-seg { display: flex; width: 100%; }
  .rd-seg button { flex: 1 1 auto; padding: 0 6px; min-height: 44px; font-size: 14.5px; }
  .fd-why li { grid-template-columns: 1fr; }
  .fd-why .tag { justify-self: start; }
}
.fd-res .tag { height: auto; min-height: 24px; padding: 5px 9px; white-space: normal; line-height: 1.25; }
