/* case-studies-dynamic.css: the dynamic layer of /case-studies (case-studies-dynamic.js). Every rule is scoped under .csx, so nothing here can restyle the shared header, footer or the static
   studies. Brand tokens are the site's own (cream paper, navy, ONE brass accent, serif headings, square corners, hairline borders); system fonts only, no web font, no url(), no external host.
   Light only, like the rest of the site (the Landing theme sets color-scheme: only light). Mobile first: one column, then two and three columns. No horizontal scroll at 320px.
   Motion is limited to a hover colour change and is switched off when the visitor asks for reduced motion. */
.csx { --cx-bg: #F7F4EC; --cx-soft: #EEE9DC; --cx-paper: #FBFAF6; --cx-navy: #0F2140; --cx-navy2: #1B3560; --cx-brass: #D9A93E; --cx-brass-hi: #E8BE5C; --cx-brass-ink: #7A5B0C; --cx-ink: #141B2D; --cx-muted: #4A5364; --cx-blue: #1F4C8F; --cx-line: #DDD6C4; --cx-white: #FFFFFF;
  --cx-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif; --cx-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: block; background: var(--cx-bg); color: var(--cx-ink); font: 1rem/1.6 var(--cx-sans); overflow-wrap: anywhere; padding: 0 0 56px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.csx[hidden] { display: none; }
.csx *, .csx *::before, .csx *::after { box-sizing: border-box; border-radius: 0; }
.csx > * { max-width: 1040px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .csx > * { padding-left: 24px; padding-right: 24px; } }
.csx h1, .csx h2, .csx h3 { margin: 0; font-family: var(--cx-serif); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--cx-navy); text-wrap: balance; }
.csx p, .csx li { text-wrap: pretty; }
.csx a { color: var(--cx-blue); text-underline-offset: 2px; }
.csx :focus-visible { outline: 3px solid var(--cx-blue); outline-offset: 2px; }
.csx h1:focus { outline: none; }
.csx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* hero (navy band, full bleed) */
.csx-hero { max-width: none !important; padding: clamp(36px, 6vw, 64px) max(16px, calc((100% - 1040px) / 2 + 24px)) clamp(28px, 4vw, 44px) !important; background: var(--cx-navy); color: var(--cx-white); margin-bottom: 24px; }
.csx-hero > * { max-width: 44em; }
.csx-hero h1 { color: var(--cx-white); font-size: clamp(1.8rem, 5vw, 2.875rem); line-height: 1.1; margin: 0 0 14px; }
.csx-kicker { margin: 0 0 12px; font: 700 .8125rem/1.3 var(--cx-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cx-brass-hi); }
.csx-kicker::before { content: ""; display: block; width: 28px; height: 3px; margin: 0 0 10px; background: var(--cx-brass); }
.csx-lead { margin: 0 0 10px; font-size: 1.125rem; line-height: 1.5; color: var(--cx-white); }
.csx-note { margin: 0; font-size: .9375rem; color: #D5DCEA; }
.csx-hero :focus-visible { outline-color: var(--cx-brass-hi); }
.csx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.csx-pill { display: inline-block; padding: 3px 10px; background: var(--cx-soft); border: 1px solid var(--cx-line); font: 700 .75rem/1.4 var(--cx-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--cx-navy); }
.csx-hero .csx-pill { background: transparent; border-color: var(--cx-brass); color: var(--cx-brass-hi); }
.csx-id { font: 700 .8125rem/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--cx-brass-ink); letter-spacing: .02em; }
.csx-hero .csx-id, .csx-hero .csx-month { color: #D5DCEA; }
.csx-month { font-size: .875rem; color: var(--cx-muted); }
.csx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.csx-tag { padding: 2px 10px; border: 1px solid #5B6B8C; font-size: .8125rem; color: #E6EAF3; }

/* controls */
.csx-controls { display: grid; gap: 14px; margin-bottom: 8px; }
.csx-q { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--cx-navy2); background: var(--cx-white); color: var(--cx-ink); font: 1rem/1.2 var(--cx-sans); }
.csx-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
@media (min-width: 900px) { .csx-chips { flex-wrap: wrap; overflow-x: visible; } }
.csx-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--cx-line); background: var(--cx-paper); color: var(--cx-navy); font: 600 .9375rem/1.2 var(--cx-sans); cursor: pointer; transition: background-color .15s, border-color .15s; }
.csx-chip:hover { border-color: var(--cx-navy2); }
.csx-chip.csx-on { background: var(--cx-navy); border-color: var(--cx-navy); color: var(--cx-white); }
.csx-chip.csx-on:focus-visible { outline-color: var(--cx-brass-hi); }
.csx-count { font-size: .8125rem; font-weight: 700; color: var(--cx-brass-ink); }
.csx-chip.csx-on .csx-count { color: var(--cx-brass-hi); }
.csx-status { margin: 4px auto 12px; font-size: .9375rem; color: var(--cx-muted); min-height: 1.5em; }
.csx-banner { margin: 0 auto 14px; padding: 12px 14px; border-left: 4px solid var(--cx-brass); background: var(--cx-soft); }

/* grid and cards (brass top edge, hairline border) */
.csx-grid { list-style: none; margin: 0; padding: 0 16px !important; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 auto; }
@media (min-width: 720px) { .csx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 24px !important; } }
@media (min-width: 1000px) { .csx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.csx-li { display: flex; min-width: 0; }
.csx-card { display: flex; flex-direction: column; width: 100%; padding: 20px 18px 16px; background: var(--cx-paper); border: 1px solid var(--cx-line); border-top: 3px solid var(--cx-brass); }
.csx-card:hover { border-color: var(--cx-navy2); border-top-color: var(--cx-brass); }
.csx-card-h { font-size: 1.1875rem; line-height: 1.25; margin: 0 0 8px; }
.csx-card-h a { color: var(--cx-navy); text-decoration: none; }
.csx-card-h a:hover { text-decoration: underline; }
.csx-sum { margin: 0 0 14px; font-size: .9688rem; color: var(--cx-ink); flex: 1 1 auto; }
.csx-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; font-size: .875rem; color: var(--cx-muted); }
.csx-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.csx-center { text-align: center; margin: 24px auto 0; }
.csx-empty, .csx-err { margin: 12px 16px; padding: 24px 18px; background: var(--cx-paper); border: 1px solid var(--cx-line); text-align: center; }
.csx-err { border-left: 4px solid #8A1C1C; text-align: left; }
@media (min-width: 720px) { .csx-empty, .csx-err { margin: 12px auto; max-width: 992px; } }

/* buttons: square, 2px border, 48px+ high, ONE brass primary per block */
.csx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 2px solid transparent; font: 700 1rem/1.2 var(--cx-sans); text-decoration: none; cursor: pointer; text-align: center; }
.csx-btn-cta { background: var(--cx-brass); border-color: var(--cx-brass); color: var(--cx-navy); }
.csx-btn-cta:hover { background: var(--cx-brass-hi); border-color: var(--cx-brass-hi); }
.csx-btn-line { background: transparent; border-color: var(--cx-navy); color: var(--cx-navy); }
.csx-btn-line:hover { background: var(--cx-soft); }
.csx a.csx-btn-cta { color: var(--cx-navy); }
.csx a.csx-btn-line { color: var(--cx-navy); }

/* detail */
.csx-crumb { margin: 8px auto 0; padding-top: 8px; padding-bottom: 8px; font-size: .9375rem; }
.csx-crumb a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.csx-article { padding: 0 !important; max-width: none !important; }
.csx-article > * { max-width: 1040px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .csx-article > * { padding-left: 24px; padding-right: 24px; } }
.csx-article > .csx-hero { max-width: none; margin-bottom: 0; }
.csx-labels { margin-top: 20px !important; display: grid; gap: 8px; }
.csx-label { margin: 0; padding: 12px 16px; background: var(--cx-soft); border-left: 4px solid var(--cx-brass); font-size: .9375rem; line-height: 1.5; color: var(--cx-ink); }
.csx-labels.csx-end { margin-top: 28px !important; }
.csx-safety { margin-top: 20px !important; padding: 16px 18px !important; background: var(--cx-paper); border: 1px solid var(--cx-navy2); }
.csx-safety p { margin: 0 0 10px; font-size: .9688rem; }
.csx-safety p:last-child { margin-bottom: 0; }
.csx-body { max-width: 760px !important; margin-top: 24px !important; margin-left: max(0px, calc((100% - 1040px) / 2)) !important; }
@media (max-width: 1087px) { .csx-body { margin-left: auto !important; } }
.csx-sec { margin: 0 0 22px; }
.csx-sec h2 { font-size: 1.375rem; margin: 0 0 8px; }
.csx-sec p, .csx-sec li { font-size: 1.0625rem; line-height: 1.65; }
.csx-sec p { margin: 0 0 12px; }
.csx-sec ul { margin: 0 0 12px; padding-left: 22px; }
.csx-sec li { margin: 0 0 6px; }
.csx-fine { margin: 0 auto; font-size: .9375rem; color: var(--cx-muted); }
.csx-related { margin-top: 36px; }
.csx-related h2 { font-size: 1.375rem; margin: 0 0 16px; }
.csx-related .csx-grid { padding: 0 !important; }

/* closing call to action */
.csx-cta { max-width: none !important; margin-top: 40px; padding-top: 40px !important; padding-bottom: 44px !important; padding-left: max(16px, calc((100% - 1040px) / 2 + 24px)) !important; padding-right: max(16px, calc((100% - 1040px) / 2 + 24px)) !important; background: var(--cx-navy); color: var(--cx-white); }
.csx-cta h2 { color: var(--cx-white); font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 10px; }
.csx-cta p { margin: 0 0 16px; max-width: 40em; color: #E6EAF3; }
.csx-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.csx-cta .csx-btn { flex: 1 1 220px; max-width: 360px; }
.csx-cta .csx-btn-line, .csx-cta a.csx-btn-line { border-color: var(--cx-white); color: var(--cx-white); }
.csx-cta .csx-btn-line:hover { background: var(--cx-navy2); }
.csx-cta :focus-visible { outline-color: var(--cx-brass-hi); }

@media (prefers-reduced-motion: reduce) { .csx *, .csx *::before, .csx *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .csx-chips, .csx-q, .csx-btn, .csx-safety button { display: none !important; } .csx-hero, .csx-cta { background: #fff !important; color: #000 !important; } .csx-hero h1, .csx-cta h2, .csx-lead, .csx-note, .csx-cta p { color: #000 !important; } }
