/* Case-study story layout: six colour-coded tabs (accordion on phones) and a clean print / PDF layout. */
.story-main { max-width: none; min-width: 0; }
.st-lenses-aside { display: flex; flex-wrap: wrap; gap: .4rem; }
.story { --st-line: var(--c-border, #DDE4EE); --st-ink: var(--c-heading, #0f1b2d); --st-mut: var(--c-muted, #5b6b82); font-size: 1rem; }
.story h2, .story h3, .story h4 { margin: 0; color: var(--st-ink); }
.story p { margin: 0 0 .6rem; }
.st-printhead { display: none; }

/* at-a-glance strip */
.st-glance { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: stretch; padding: 1rem 1.2rem; border: 1px solid var(--st-line); border-radius: var(--radius); background: color-mix(in srgb, var(--c-primary, #0055BC) 4%, #fff); margin-bottom: 1rem; }
.st-g { display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: center; min-width: 150px; }
.st-g .st-gi { grid-row: span 2; width: 34px; height: 34px; border-radius: var(--radius); display: grid; place-items: center; background: #fff; border: 1px solid var(--st-line); color: var(--c-primary, #0055BC); }
.st-g small { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--st-mut); }
.st-g b { font-weight: 600; font-size: .95rem; color: var(--st-ink); } .st-g b a { color: var(--c-primary, #0055BC); }
.st-glens { display: block; min-width: 100%; } .st-glens div { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.st-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 99px; font-size: .8rem; font-weight: 600; border: 1px solid transparent; }
.st-chip.st-tool { background: #fff; border-color: var(--st-line); color: var(--st-ink); font-weight: 500; }
.st-chip.st-tool svg { color: var(--tc, #185FA5); } .st-hi { display: inline-flex; color: var(--tc); } .st-card h3 { display: flex; align-items: center; gap: .45rem; }
.st-actions { display: flex; justify-content: flex-end; margin-bottom: .6rem; }

/* tab bar */
.st-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .5rem; margin-top: .4rem; }
.st-tab { appearance: none; border: 1px solid var(--st-line); background: #fff; border-radius: var(--radius); padding: .65rem .4rem .55rem; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15rem; transition: border-color .2s, transform .2s, box-shadow .2s; font: inherit; color: var(--st-ink); }
.st-tab b svg { width: 16px; height: 16px; } .st-head b svg { width: 16px; height: 16px; }
.st-tab b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--tc); color: #fff; font-size: .8rem; font-weight: 600; }
.st-tab span { font-weight: 600; font-size: .86rem; line-height: 1.2; } .st-tab small { color: var(--st-mut); font-size: .74rem; }
.st-tab:hover { border-color: var(--tc); transform: translateY(-2px); }
.st-tab.on { border: 2px solid var(--tc); box-shadow: 0 8px 20px -14px var(--tc); padding: calc(.65rem - 1px) calc(.4rem - 1px) calc(.55rem - 1px); }
.st-prog { height: 4px; border-radius: 2px; background: var(--st-line); margin: .7rem 0 1rem; overflow: hidden; } .st-prog i { display: block; height: 100%; background: linear-gradient(90deg, #5F5E5A, #185FA5, #0F6E56, #854F0B, #3B6D11, #534AB7); background-size: 600px 100%; transition: width .35s ease; }

/* panels */
.st-sec { display: none; } .st-sec.on { display: block; animation: stIn .35s ease both; }
@keyframes stIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.st-head { display: none; }
.st-body { background: #fff; border: 1px solid var(--st-line); border-top: 4px solid var(--tc); border-radius: var(--radius); padding: 1.4rem 1.6rem 1.2rem; }
.st-eb { display: flex; align-items: center; gap: .4rem; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--tc); margin: 0 0 .15rem !important; }
.st-body > h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.st-hook { font-style: italic; color: var(--st-mut); margin: .3rem 0 1rem !important; font-size: 1.02rem; }
.st-prose ul, .st-notes ul, .st-card ul { margin: .2rem 0 .6rem 1.1rem; padding: 0; } .st-prose li, .st-notes li, .st-card li { margin: .3rem 0; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.st-card { border-radius: var(--radius); padding: 1rem 1.2rem; } .st-card h3 { font-size: 1.05rem; } .st-sub { font-size: .8rem; color: var(--st-mut); margin-bottom: .4rem !important; }
.st-sit, .st-cha { background: var(--tb); border: 1px solid var(--tl); color: var(--tf); } .st-sit h3, .st-cha h3 { color: var(--tf); } .st-sit .st-sub, .st-cha .st-sub { color: color-mix(in srgb, var(--tf) 75%, transparent); }

.st-tools { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.st-lenses { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.st-lens { background: var(--lb); border: 1px solid var(--ll); border-radius: var(--radius); padding: .9rem 1rem; }
.st-lens h4 { display: flex; align-items: center; gap: .4rem; color: var(--lf); font-size: .98rem; margin-bottom: .3rem; } .st-lens h4 svg { color: var(--lc); }
.st-lens p { color: var(--lf); font-size: .9rem; margin: 0; }
.st-notes { color: var(--c-text, #33415c); }

/* deploy steps as cards, defend as ticks */
.st-deploy ol { list-style: none; counter-reset: step; margin: .2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.st-deploy ol li { counter-increment: step; background: var(--tb); border: 1px solid var(--tl); border-radius: var(--radius); padding: .9rem 1rem .9rem 3rem; position: relative; color: var(--tf); margin: 0; }
.st-deploy ol li::before { content: counter(step); position: absolute; left: .9rem; top: .85rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--tc); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 600; }
.st-deploy ol li strong { color: var(--tf); }
.st-design ul { list-style: none; margin-left: 0; } .st-design li { background: var(--tb); border: 1px solid var(--tl); border-radius: var(--radius); padding: .6rem .9rem; color: var(--tf); margin: .5rem 0; } .st-design li strong { color: var(--tf); }
.st-defend ul { list-style: none; margin-left: 0; padding: 1rem 1.2rem; background: var(--tb); border: 1px solid var(--tl); border-radius: var(--radius); color: var(--tf); }
.st-defend li { position: relative; padding-left: 1.7rem; margin: .5rem 0; } .st-defend li::before { content: ''; position: absolute; left: 0; top: .25rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background-color: var(--tc); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); background-position: center; background-size: 70%; background-repeat: no-repeat; }

/* outcomes */
.st-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.st-kpi { background: var(--tb); border: 1px solid var(--tl); border-radius: var(--radius); padding: .9rem 1rem; color: var(--tf); display: flex; flex-direction: column; gap: .15rem; }
.st-kpi small { color: var(--tf); font-size: .8rem; font-weight: 500; } .st-kpi b { font-size: 1.35rem; line-height: 1.2; font-weight: 700; color: var(--tf); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; } .st-kpi b i { display: inline-flex; color: var(--tc); }
.st-basis { align-self: flex-start; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; border-radius: 99px; padding: .1rem .5rem; margin-top: .25rem; }
.st-basis.m { background: var(--tc); color: #fff; } .st-basis.e { background: #fff; color: var(--tc); border: 1px solid var(--tl); }

/* navigation */
.st-nav { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; padding-top: .9rem; border-top: 1px solid var(--st-line); }
.st-step { font-size: .8rem; color: var(--st-mut); } .st-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.st-b { display: inline-flex; align-items: center; gap: .4rem; border-radius: var(--radius); padding: .55rem .95rem; font: 600 .88rem/1 inherit; cursor: pointer; border: 1px solid var(--st-line); background: #fff; color: var(--st-ink); text-decoration: none; }
.st-b:hover { border-color: var(--tc); color: var(--tc); } .st-prev svg { transform: rotate(180deg); }
.st-next { background: var(--tc); border-color: var(--tc); color: #fff; } .st-next:hover { filter: brightness(1.1); color: #fff; }

/* phones: the tab bar becomes a vertical accordion */
@media (max-width: 760px) {
  .st-bar, .st-prog { display: none; }
  .st-sec { display: block; margin-bottom: .6rem; animation: none; }
  .st-head { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; padding: .8rem .9rem; background: #fff; border: 1px solid var(--st-line); border-left: 5px solid var(--tc); border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--st-ink); }
  .st-head b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tc); color: #fff; display: grid; place-items: center; font-size: .85rem; }
  .st-head span { flex: 1; display: flex; flex-direction: column; } .st-head em { font-style: normal; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--tc); font-weight: 700; } .st-head strong { font-size: .98rem; }
  .st-head svg { transition: transform .2s; color: var(--st-mut); } .st-sec.on .st-head svg { transform: rotate(180deg); }
  .st-body { display: none; margin-top: .4rem; padding: 1rem; } .st-sec.on .st-body { display: block; animation: stIn .3s ease both; }
  .st-body > .st-eb, .st-body > h2 { display: none; }
  .st-two { grid-template-columns: 1fr; }
  .st-glance { padding: .8rem; } .st-g { min-width: 130px; }
}

/* print / save as PDF: everything visible, one clean document */
@media print {
  @page { size: A4; margin: 14mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff !important; }
  #main:has(.story-wrap) > section:not(.story-wrap) { display: none !important; }
  .story-wrap { padding: 0 !important; } .story-wrap .container { max-width: none; padding: 0; }
  .st-printhead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 3px solid #185FA5; padding-bottom: .5rem; margin-bottom: .8rem; } .st-printhead b { font-size: 1.1rem; } .st-printhead span { font-size: .95rem; text-align: right; }
  .st-bar, .st-prog, .st-actions, .st-nav, .st-head, #admin-bar, .chatbot, [data-chatbot], .to-top, #to-top { display: none !important; }
  .st-sec { display: block !important; break-inside: avoid-page; margin-bottom: .7rem; animation: none; } .st-body { display: block !important; box-shadow: none; padding: .9rem 1.1rem; }
  .st-card, .st-lens, .st-kpi, .st-deploy ol li { break-inside: avoid; }
  .st-glance { display: flex !important; break-inside: avoid; }
  .post-aside, .st-aside-glance { display: none !important; }
  .post-layout { display: block !important; }
  .notice { break-inside: avoid; }
}

/* the at-a-glance strip lives in the right-hand column on wide screens; it returns on phones, tablets and in print */
@media (min-width: 981px) { .story .st-glance { display: none; } }
@media (max-width: 980px) { .st-aside-glance { display: none; } }
@media print { .story .st-glance { display: flex !important; } .st-aside-glance { display: none !important; } }
