/* Document-first presentation for the shared wiki and legacy article templates. */
:root {
  --bg-body: #fff; --surface: #fff; --text-main: #172c36;
  --text-sub: #53616b; --border: #daddd8; --line: #daddd8;
  --primary: #2053c9; --primary-dark: #183f98; --primary-light: #f2f6ff;
  --accent: #2053c9;
  --radius: 0; --radius-lg: 0;
}
body { background: #fff; opacity: 1; }
a { transition: color .15s ease; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 4px;
}
.wikiWrap { max-width: 1140px; padding: 32px 36px 64px; }
.wikiHeader { padding-bottom: 23px; margin-bottom: 48px; gap: 24px; }
.wikiBrandTitle { font-family: inherit; font-size: 24px; font-weight: 750; letter-spacing: -.7px; animation: none; color: var(--primary-dark); }
.wikiBrandTitle { display: inline-flex; align-items: baseline; --no-color: #2563eb; --frailty-color: #183f98; }
.brandNo { color: var(--no-color); transition: color .25s ease; }
.brandFrailty { color: var(--frailty-color); transition: color .25s ease; animation: brandResolve 1.8s .3s both; }
.wikiBrandTitle:hover, .wikiBrandTitle:focus-visible { --no-color: #183f98; --frailty-color: #2563eb; }
@keyframes brandResolve { from { opacity: .3; } to { opacity: 1; } }
.wikiBrandSub { font-weight: 400; font-size: 12px; }
.wikiNav { gap: 20px; padding: 5px 0; flex-wrap: wrap; overflow: visible; }
.wikiNavLink { padding: 5px 0; border-radius: 0; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; }
.wikiNavLink:hover, .wikiNavLink.active { background: transparent; color: var(--primary-dark); }
.wikiNavLink.active { border-bottom-color: var(--primary-dark); }
.wikiH1, .wikiTitle { font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.035em; line-height: 1.35; margin: 0 0 18px; color: var(--text-main); }
.wikiDesc, .wikiLead { font-size: 17px; color: var(--text-sub); line-height: 1.8; }
.heroSection, .wikiHero { margin-bottom: 40px; }
.sectionTitle { font-size: 21px; font-weight: 650; margin: 40px 0 16px; }
.sectionTitle::before { content: none; }
.wikiArticle, .contentWrap { max-width: 780px; font-size: 17px; }
.wikiArticle h2 { font-size: 25px; font-weight: 650; border: 0; padding: 0; margin: 48px 0 18px; }
.wikiArticle h3 { font-weight: 650; }
.wikiArticle p, .contentWrap p { color: var(--text-main); margin: 1.25rem 0; }
.wikiArticle strong, .contentWrap strong { font-weight: 650; color: inherit; }
.wikiSummary, .noteBox, .calloutBox { padding: 18px 0 !important; margin: 28px 0 !important; background: transparent !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; box-shadow: none !important; }
.wikiGrid, .cardGrid { display: block; }
.wikiCard, .wikiList .wikiItemLink, .wikiList div.wikiItemLink, .infoCard {
  height: auto; min-height: 0; margin: 0; padding: 22px 0; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; background: transparent; box-shadow: none;
}
.wikiCard:hover, a.wikiItemLink:hover, .caseCard:hover, .toolCard:hover, .sdGalleryItem:hover { transform: none !important; box-shadow: none !important; background: transparent; }
.wikiCard h2 { font-size: 21px; margin: 0 0 8px; }
.cardIcon, .cardArrow { display: none; }
.wikiList .wikiItemLink:hover { border-color: var(--line); }
a.wikiItemLink:hover .wikiItemTitle, .wikiCard:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.wikiItemDesc { font-size: 15px; line-height: 1.65; margin-top: 6px; }
.wikiItemChevron { font-size: 18px; }
.wikiItemLink:hover .wikiItemChevron { transform: none; }
.useTag, .badge, .caseTag { background: transparent !important; color: var(--text-sub) !important; border: 0; border-radius: 0; font-weight: 400; padding: 0; font-size: 12px; letter-spacing: 0; }
.useTag + .useTag::before { content: '·'; margin-right: 8px; }
.wikiFigure img, .post-figure img, .wikiItemPreview img { border-radius: 0; box-shadow: none; }
.wikiMore { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.wikiMoreSummary { background: transparent; padding: 16px 0; }
.wikiMoreBody { padding: 0 0 20px; }
.keyPhrase, .hl { background: transparent; border: 0; padding: 0; color: inherit; font-weight: 650; }
.wikiFooter { text-align: left; margin-top: 64px; padding: 28px 0; font-size: 12px; line-height: 1.8; }
.wikiFooter .footerNote, .wikiFooter .footerOrg { opacity: 1; }
.copyAiWrap { justify-content: flex-start; }
.copyAiBtn { border-radius: 0; background: transparent; }
.downloadButton { border-radius: 2px; box-shadow: none; padding: 10px 18px; }
.downloadButton:hover { transform: none; box-shadow: none; }
/* Preserve actual controls, but remove card treatment around tools. */
.toolsGrid { display: block; }
.toolCard, .toolCard.isDisabled:hover { border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; padding: 24px 0; box-shadow: none; transform: none; }
.toolsSearch, .chipBtn, .toolInput, .toolSelect { border-radius: 2px; box-shadow: none; }
.toolsSearch { min-width: 0; max-width: 100%; }
.toolsSearch input { min-width: 0; max-width: 100%; }
.toolIcon, .printIcon { display: none; }
.toolBody, .printBody { display: block; }
.toolBadge, .toolBadge.isPending, .printBadge, .printBadge.isInternal, .clickCountBadge {
  border: 0; border-radius: 0; background: transparent; padding: 0;
  color: var(--text-sub); box-shadow: none;
}
.toolBadge .dot, .printBadge .dot { display: none; }
.toolCTA, .printCTA { border: 0; padding-top: 0; }
.printGrid { display: block; }
.printCard, .printCard:hover { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 24px 0; box-shadow: none; transform: none; }
/* Case index: image and text on an open page, not enclosed tiles. */
.caseGrid { display: block; }
.caseCard { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto; gap: 28px; min-height: 0; height: auto; padding: 28px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.caseCard:hover { border-color: var(--line); }
.caseBody { padding: 0; gap: 8px; display: block; }
.caseTitle { font-size: 21px; font-weight: 650; line-height: 1.5; display: block; overflow: visible; }
.caseDesc { display: block; overflow: visible; margin: 10px 0; font-size: 15px; }
.caseCoverWrap { aspect-ratio: auto; overflow: visible; background: transparent; }
.caseCard .caseCover { aspect-ratio: 16 / 9; height: auto; filter: none; transform: none; }
.caseBadgeRow { position: static; margin-top: 8px; gap: 6px; flex-wrap: wrap; }
.caseBadge { background: transparent; color: var(--text-sub); padding: 0; border-radius: 0; backdrop-filter: none; font-weight: 400; }
.caseFooter { justify-content: flex-start; margin-top: 12px; }
.caseCta { font-size: 13px; font-weight: 500; }
.caseCta, .toolLink { color: var(--primary); }
.toolInput:focus, .toolSelect:focus { border-color: var(--primary); box-shadow: none; }
.caseCta::after { content: none; }
.caseEmpty { background: transparent; border: 0; border-radius: 0; padding: 20px 0; }
/* Legacy case-study callouts become ordinary sections. Keep data graphics intact. */
.articleToc, .docInfoBox, .implicationBox, .cautionBox, .studyCard,
.domainCard, .statCard, .deficitBox, .tensionCard, .checkCard, .stageCard {
  background: transparent !important; border: 0 !important;
  border-top: 1px solid var(--line) !important; border-radius: 0 !important;
  box-shadow: none !important; padding: 20px 0 !important;
}
.articleToc { border-bottom: 1px solid var(--line) !important; }
.tensionGrid, .domainGrid { display: block; }
.statCard .statNum { color: var(--text-main) !important; }
.domainBadge, .levelBadge, .levelU, .levelA, .levelB, .levelC {
  background: transparent !important; border: 0 !important;
  border-radius: 0 !important; color: var(--text-sub) !important;
}
/* Home index: intentionally different weights for entry points and topics. */
.homeIntro {
  display: block;
  padding: 0;
  margin: 0 0 40px;
  max-width: none;
  background: transparent;
}
.homeIntroCopy { padding: 8px 0 0; max-width: 740px; }
.homeIntro .wikiH1 { font-size: clamp(30px, 3.1vw, 40px); color: #142b34; }
.homeIntro .wikiDesc { color: #33493e; font-size: 16px; }
.introLink { color: var(--primary-dark); font-weight: 600; }
.homeQuick { border-top-color: var(--primary); }
.homeQuick h2 { color: var(--primary-dark); }
.homeEyebrow { margin: 0 0 16px; font-size: 12px; letter-spacing: .06em; color: var(--text-sub); }
/* Opening paragraphs under the deck. Sized below .wikiDesc so the hierarchy
   stays eyebrow → title → deck → body, and the page still reads as an index. */
.homeLede { margin: 14px 0 0; font-size: 15px; line-height: 1.85; color: var(--text-main); }
.homeLede strong { font-weight: 650; }
.homeLede a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.homeLede a:hover { color: var(--primary); }
.introLink { display: inline-block; margin-top: 22px; font-size: 14px; color: var(--primary-dark); text-decoration: underline; text-underline-offset: 5px; }
.homeQuick { padding: 24px 0 30px; border-top: 2px solid var(--primary); border-bottom: 1px solid var(--line); }
.homeQuick h2, .indexHeading { font-size: 15px; font-weight: 650; margin: 0 0 20px; }
.quickLinks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.quickLinks a { font-size: 22px; font-weight: 600; }
.quickLinks span { display: block; margin-top: 6px; font-size: 14px; color: var(--text-sub); font-weight: 400; }
.quickLinks a:hover, .topicRow a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.homeTopics { margin-top: 44px; }
.topicRow { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: 28px; border-top: 1px solid var(--line); padding: 24px 0; }
.topicRow h3 { grid-row: span 2; margin: 0; font-size: 21px; font-weight: 600; }
.topicRow p { margin: 0 0 10px; font-size: 15px; color: var(--text-sub); }
.topicLinks { display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 14px; }
.topicLinks a { text-decoration: underline; text-decoration-color: #a3b4ac; text-underline-offset: 4px; }
@media (max-width: 767px) {
  .wikiWrap { padding: 24px 22px 48px; }
  .wikiHeader { gap: 22px; margin-bottom: 34px; }
  .wikiNav { gap: 8px 20px; }
  .homeIntro {
    display: block;
    padding: 0;
    margin: 0 0 32px;
    min-height: 0;
  }
  .homeIntroCopy { padding: 0; }
  .desktopBreak { display: none; }
  .quickLinks { grid-template-columns: 1fr; gap: 20px; }
  .quickLinks a { font-size: 20px; }
  .quickLinks span { display: inline; margin-left: 12px; font-size: 13px; }
  .topicRow { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .topicRow h3 { grid-row: auto; font-size: 20px; }
  .topicRow p { margin-bottom: 4px; }
  .caseCard { grid-template-columns: 1fr; gap: 18px; }
  .caseCoverWrap { max-width: 360px; }
  .wikiH1 .useTag { display: inline-block; vertical-align: middle; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
