/* ============================================================
   Knowledge Centre v2 — editorial reading layout
   Shares design language with manufacturing-excellence-v2:
   - .au-hero banner (overridden to position: relative standalone)
   - Tab carousel for chapter TOC
   - Sticky chapter title left + accordion sub-blocks right
   - Theme-aware via --paper / --ink tokens
   - Every font-size snaps to var(--fs-xs|s|m|l) per site rule;
     the only 35 px is the hero in about.css (.au-hero__title).
   ============================================================ */

.kcv2-accent { color: var(--accent); }

/* Body copy uses Raleway like the rest of the site (the global body
   default is Inter). Scoped to page content only — nav/footer are
   injected outside #main-content. Deliberate Inter (e.g. .kcv2-acc__num)
   keeps its own explicit rule. */
#main-content { font-family: 'Raleway', sans-serif; }

/* ────── 1. CINEMATIC BANNER ────── */
.au-hero.kcv2-hero{
  position: relative;
  height: clamp(560px, 80svh, 760px);
  min-height: 560px;
}
.kcv2-hero__container{
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.kcv2-hero__eyebrow{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin: 0;
}
.kcv2-hero__title em,
.kcv2-hero__title .kcv2-accent{
  font-style: normal;
  color: var(--accent);
}
.kcv2-hero__lede{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-m);
  line-height: 1.6;
  color: rgba(255,255,255,0.86);
  margin: 4px 0 0;
  max-width: 62ch;
  font-weight: 400;
}
@media (max-width: 767px){
  .kcv2-hero__lede{ font-size: var(--fs-s); line-height: 1.55; max-width: 100%; }
}

/* ────── 2. CHAPTER TOC TAB CAROUSEL ────── */
.kcv2-toc-tabs{
  background: var(--paper);
  color: var(--ink);
  padding: 80px 0;
  border-top: 1px solid var(--ink-06);
}
.kcv2-toc-tabs__inner{
  max-width: var(--container, 1320px);
  margin: 0 auto;
  padding: 0 var(--gutter, 32px);
}
.kcv2-toc-tabs__header{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
@media (min-width: 900px){
  .kcv2-toc-tabs__header{ grid-template-columns: 1.1fr 1fr; gap: 56px; }
}
.kcv2-toc-tabs__title{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-l);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.kcv2-toc-tabs__lede{
  font-size: var(--fs-m);
  line-height: 1.6;
  color: var(--ink-60);
  margin: 0;
  max-width: 56ch;
}

.kcv2-tabs__pills{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.kcv2-tab{
  appearance: none;
  background: transparent;
  border: 1px solid var(--ink-12);
  color: var(--ink-80);
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-s);
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms;
}
.kcv2-tab:hover{ color: var(--ink); border-color: var(--ink-40); }
.kcv2-tab.is-active{
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

/* Panel */
.kcv2-panel{
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  min-height: clamp(360px, 45vw, 560px);
}
.kcv2-panel[hidden]{ display: none; }
.kcv2-panel__media{ position: absolute; inset: 0; }
.kcv2-panel__media img{
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.kcv2-panel::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,8,9,0.85) 0%, rgba(10,8,9,0.45) 45%, rgba(10,8,9,0.10) 100%);
  pointer-events: none;
}
.kcv2-panel__overlay{
  position: relative;
  z-index: 2;
  padding: 40px 32px;
  max-width: 560px;
}
@media (min-width: 768px){
  .kcv2-panel__overlay{ padding: 56px 48px; }
}
.kcv2-panel__eyebrow{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.kcv2-panel__title{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-l);
  font-weight: 600;
  line-height: 1.2;
  color: #FFFFFF;
  margin: 0 0 14px;
}
.kcv2-panel__body{
  font-size: var(--fs-m);
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  margin: 0 0 24px;
  max-width: 48ch;
}
.kcv2-panel__actions{ display: flex; gap: 12px; }

.kcv2-panel__nav{
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.kcv2-arrow{
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #FFFFFF;
  font-size: var(--fs-l);
  line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.kcv2-arrow:hover{
  background: var(--accent);
  border-color: var(--accent);
}

/* ────── 3-5. CHAPTER SECTIONS  (sticky title + accordion) ────── */
.kcv2-chapter{
  background: var(--paper);
  color: var(--ink);
  padding: 88px 0;
  border-top: 1px solid var(--ink-06);
}
.kcv2-chapter--alt{
  background: var(--paper-elev);
}
.kcv2-chapter__inner{
  max-width: var(--container, 1320px);
  margin: 0 auto;
  padding: 0 var(--gutter, 32px);
}
.kcv2-chapter__cols{
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 1024px){
  .kcv2-chapter__cols{ grid-template-columns: 1fr 1.25fr; gap: 64px; }
}

.kcv2-chapter__left{
  position: relative;
}
@media (min-width: 1024px){
  .kcv2-chapter__left{ position: sticky; top: 96px; }
}
.kcv2-chapter__num{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.kcv2-chapter__title{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-l);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--ink);
}
.kcv2-chapter__lede{
  font-size: var(--fs-m);
  line-height: 1.6;
  color: var(--ink-60);
  margin: 0;
  max-width: 48ch;
}

/* ─── Accordion ─── */
.kcv2-acc-group{
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink-12);
}
.kcv2-acc{
  border-bottom: 1px solid var(--ink-12);
}
.kcv2-acc__head{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 4px;
  font-family: 'Raleway', sans-serif;
  color: var(--ink);
  transition: color 220ms, padding 220ms;
}
.kcv2-acc__head::-webkit-details-marker{ display: none; }
.kcv2-acc__head:hover{ color: var(--accent); padding-left: 10px; }
.kcv2-acc__num{
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  min-width: 24px;
}
.kcv2-acc__name{
  font-size: var(--fs-l);
  font-weight: 600;
  letter-spacing: -0.005em;
  flex: 1;
}
.kcv2-acc__chev{
  width: 18px; height: 18px;
  position: relative;
  flex: 0 0 auto;
}
.kcv2-acc__chev::before,
.kcv2-acc__chev::after{
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 280ms cubic-bezier(.2,.7,.2,1), opacity 220ms;
}
.kcv2-acc__chev::before{
  left: 0; right: 0; top: 50%;
  height: 2px;
  transform: translateY(-50%);
}
.kcv2-acc__chev::after{
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  transform: translateX(-50%);
}
.kcv2-acc[open] .kcv2-acc__chev::after{
  transform: translateX(-50%) scaleY(0);
}

.kcv2-acc__body{
  padding: 4px 4px 28px;
  animation: kcv2AccIn 280ms cubic-bezier(.2,.7,.2,1);
}
@keyframes kcv2AccIn{
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kcv2-acc__body p{
  font-size: var(--fs-m);
  line-height: 1.65;
  color: var(--ink-80);
  margin: 0 0 14px;
}
.kcv2-acc__body p:last-child{ margin-bottom: 0; }

/* Definition list - term left/inline, body underneath */
.kcv2-deflist{
  margin: 0 0 16px;
  padding: 0;
}
.kcv2-deflist dt{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-m);
  font-weight: 600;
  color: var(--ink);
  margin: 12px 0 4px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.kcv2-deflist dt:first-child{ margin-top: 4px; }
.kcv2-deflist dt em{
  font-style: normal;
  font-size: var(--fs-s);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.kcv2-deflist dd{
  font-size: var(--fs-m);
  line-height: 1.6;
  color: var(--ink-80);
  margin: 0 0 4px;
  padding: 0;
}

/* Orange-dot list */
.kcv2-dotlist{
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.kcv2-dotlist li{
  position: relative;
  padding-left: 18px;
  margin: 0 0 8px;
  font-size: var(--fs-m);
  line-height: 1.6;
  color: var(--ink-80);
}
.kcv2-dotlist li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Accent callout */
.kcv2-acc__callout{
  background: rgba(245,130,32,0.08);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 12px 0;
  font-size: var(--fs-s);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.55;
}

/* Inline figures (diagrams) */
.kcv2-figure{
  margin: 18px 0 0;
  background: var(--paper);
  border: 1px solid var(--ink-12);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kcv2-figure img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  cursor: zoom-in;
}
.kcv2-figure figcaption{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-s);
  color: var(--ink-60);
  letter-spacing: 0.02em;
}
.kcv2-figrow{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 4px;
}
@media (min-width: 700px){
  .kcv2-figrow{ grid-template-columns: 1fr 1fr; }
}
.kcv2-figure--single{ max-width: 520px; }

/* ────── 6. KEY TAKEAWAYS  ────── */
.kcv2-summary{
  background: var(--paper);
  padding: 88px 0;
  border-top: 1px solid var(--ink-06);
}
.kcv2-summary__inner{
  max-width: var(--container, 1320px);
  margin: 0 auto;
  padding: 0 var(--gutter, 32px);
  text-align: center;
}
.kcv2-summary__eyebrow{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.kcv2-summary__quote{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-l);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 auto;
  max-width: 30ch;
  position: relative;
  padding: 0 32px;
}
/* Decorative oversized quote glyphs - display type, not part of
   the body text scale (handoff allows display numerals/glyphs
   to stay on clamp()). */
.kcv2-summary__quote::before,
.kcv2-summary__quote::after{
  content: "“";
  position: absolute;
  top: -10px;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1;
  color: var(--accent);
  opacity: 0.7;
}
.kcv2-summary__quote::before{ left: 0; }
.kcv2-summary__quote::after{ content: "”"; right: 0; }
@media (min-width: 800px){
  .kcv2-summary__quote{ max-width: 56ch; }
}

/* ────── 7. CONTINUE EXPLORING  ────── */
.kcv2-explore{
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  border-top: 1px solid var(--ink-06);
}
.kcv2-explore__inner{
  max-width: var(--container, 1320px);
  margin: 0 auto;
  padding: 56px var(--gutter, 32px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: stretch;
}
@media (min-width: 900px){
  .kcv2-explore__inner{ grid-template-columns: 1fr 1fr; gap: 0; }
}
.kcv2-explore__media{
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  min-height: 320px;
}
.kcv2-explore__media img{
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.kcv2-explore__media::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.20) 100%);
}
.kcv2-explore__media-title{
  position: relative;
  z-index: 2;
  padding: 36px 32px;
  height: 100%;
  display: flex;
  align-items: flex-start;
}
.kcv2-explore__media-title h2{
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-l);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: #FFFFFF;
}

.kcv2-explore__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
@media (min-width: 900px){
  .kcv2-explore__list{ padding-left: 24px; }
}
.kcv2-explore__list li{
  border-bottom: 1px solid var(--ink-12);
}
.kcv2-explore__list li:first-child{ border-top: 1px solid var(--ink-12); }
.kcv2-explore__list a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 8px;
  font-family: 'Raleway', sans-serif;
  font-size: var(--fs-m);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color 200ms, padding 200ms;
}
.kcv2-explore__list a span{
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms, transform 200ms;
}
.kcv2-explore__list a:hover{ color: var(--accent); padding-left: 16px; }
.kcv2-explore__list a:hover span{ opacity: 1; transform: translateX(0); }

/* ────── Dark theme adjustments for figures ────── */
:root[data-theme="dark"] .kcv2-figure{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}
:root[data-theme="dark"] .kcv2-acc__callout{ color: #FFFFFF; }
