/* =============================================================================
   Socient · Insights article shell + interactive primitives
   Shared by all /insights/* long-form posts. Loaded after /style.css.
   Depends on the site tokens: --serif --sans --amber --card-bg --card-border
   --card-divider --card-shadow --page-text --page-text-soft --inv-bg --inv-text
   ============================================================================= */

/* ---------- Chart palette (validated against --card-bg in both themes) ------- */
/* Built from the site palette: Nordic Noir, Lavender Pillow, Kiss a Frog,
   Orchid Hue. Deepened where a mark has to carry a label. */
:root, [data-theme="light"] {
  --ch-accent:       #003344;   /* single-series + emphasis mark            */
  --ch-accent-2:     #00212d;   /* ordinal deep step / "after"              */
  --ch-accent-1:     #6f7f9a;   /* ordinal light step / "before"            */
  --ch-deemph:       #8a93a0;   /* de-emphasised mark                       */
  --ch-good:         #5a7d3f;   /* pass / healthy                           */
  --ch-ok:           #7e8a3c;   /* minor gaps (4-level scales)              */
  --ch-warn:         #8a6a1f;   /* watch                                    */
  --ch-bad:          #8c3a4a;   /* fail / at risk                           */
  --ch-track:        rgba(0, 51, 68, 0.08);
  --ch-grid:         rgba(0, 51, 68, 0.12);
  --ch-tooltip-bg:   #003344;
  --ch-tooltip-text: #f3f4f4;
  --chip-good:       #4d6d36;
  --chip-ok:         #6f7a34;
  --chip-warn:       #7a5d1b;
  --chip-bad:        #7d3341;
}
[data-theme="dark"] {
  /* Re-selected for the dark surface, not an automatic flip */
  --ch-accent:       #e5e999;
  --ch-accent-2:     #c5b9d3;
  --ch-accent-1:     #8fa3ab;
  --ch-deemph:       #6f7f88;
  --ch-good:         #bec187;
  --ch-ok:           #d3d68f;
  --ch-warn:         #e0c176;
  --ch-bad:          #e2909c;
  --ch-track:        rgba(243, 244, 244, 0.09);
  --ch-grid:         rgba(243, 244, 244, 0.12);
  --ch-tooltip-bg:   #f3f4f4;
  --ch-tooltip-text: #003344;
  --chip-good:       #bec187;
  --chip-ok:         #d3d68f;
  --chip-warn:       #e0c176;
  --chip-bad:        #e2909c;
}

/* ============================== Article shell =============================== */
.post-hero { padding: 72px 0 36px; }
.post-hero .container { max-width: 880px; }
.post-breadcrumb { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--page-text-soft); margin-bottom: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.post-breadcrumb a { color: inherit; text-decoration: none; }
.post-breadcrumb a:hover { color: var(--amber); }
.post-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.post-tag::before { content: ''; width: 22px; height: 2px; background: var(--amber); }
/* text-wrap: balance evens the line lengths, so headlines never need a hardcoded
   <br> (which is only ever correct at one viewport width). The 880px container
   already gives a sensible measure at this size, so no max-width is needed. */
.post-hero h1 { font-family: var(--serif); font-style: normal; font-weight: 500; font-size: clamp(34px, 5.2vw, 48px); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 22px; text-wrap: balance; }
.post-hero h1 em, .post-body h2 em, .post-body h3 em, .post-cta h3 em, .no-results .nr-title em { font-family: var(--serif); font-style: italic; font-weight: 700; }
/* pretty avoids orphaned last words without reflowing the whole block */
.post-standfirst { font-size: 20px; line-height: 1.6; color: var(--page-text-soft); max-width: 720px; margin-bottom: 30px; text-wrap: pretty; }
.post-standfirst strong { color: var(--page-text); }
.post-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--card-divider); padding-top: 22px; }
.post-meta img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.post-meta-name { font-weight: 600; font-size: 15px; }
.post-meta-sub { font-size: 13px; color: var(--page-text-soft); }
.post-meta-dot { color: var(--page-text-soft); }

.post-body { padding: 12px 0 40px; }
.post-body .container { max-width: 880px; }
.post-body h2 { font-family: var(--serif); font-style: normal; font-weight: 500; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -0.015em; margin: 64px 0 18px; scroll-margin-top: 150px; }
.post-body h2 .kicker { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.post-body h3 { font-family: var(--sans); font-size: 19px; margin: 26px 0 10px; line-height: 1.25; font-weight: 600; }
.post-body p { margin: 0 0 18px; font-size: 17px; line-height: 1.7; }
.post-body p.lede { font-size: 18.5px; }
.post-body a { color: var(--amber); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body em { font-family: var(--serif); }
/* Absolute-positioned marker rather than flex: with `display:flex` on the li,
   a leading <strong> becomes its own flex item and sits beside the rest of the
   sentence instead of running into it. */
.post-body ul.takeaway-list { margin: 0 0 22px; padding: 0; list-style: none; }
.post-body ul.takeaway-list li { position: relative; padding-left: 26px; margin-bottom: 12px; line-height: 1.6; font-size: 16.5px; }
.post-body ul.takeaway-list li::before { content: '→'; position: absolute; left: 0; top: 0; color: var(--amber); font-weight: 600; }
.post-body ul.takeaway-list li strong { font-weight: 600; }
.post-body ol.step-list { margin: 0 0 22px; padding-left: 22px; }
.post-body ol.step-list li { margin-bottom: 12px; line-height: 1.65; font-size: 16.5px; padding-left: 4px; }

.pullquote {  padding: 6px 0 6px 24px; margin: 30px 0; font-family: var(--serif); font-size: 21px; line-height: 1.5; font-style: italic; }

.takeaway { background: var(--card-bg); border: 1px solid var(--card-border);  border-radius: 12px; padding: 18px 22px 17px; margin: 30px 0 10px; }
.takeaway .tk-label { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 7px; }
.takeaway p { margin: 0; font-size: 15.5px; line-height: 1.65; }

.toc-label { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--page-text-soft); margin: 30px 0 12px; }
.post-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding-bottom: 28px; }
.post-toc a { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--page-text); background: var(--card-bg); border: 1px solid var(--card-border); padding: 8px 14px; border-radius: 100px; transition: border-color 0.2s ease, color 0.2s ease; }
.post-toc a:hover { border-color: var(--amber); color: var(--amber); }

.source-note { font-size: 12px !important; color: var(--page-text-soft); border-top: 1px solid var(--card-divider); margin-top: 54px; padding-top: 18px; line-height: 1.65; }
.source-note a { color: inherit; }

/* Post CTA band */
.post-cta { background: var(--inv-bg); color: var(--inv-text); border-radius: 20px; padding: 46px 40px; margin: 60px 0 30px; text-align: center; }
.post-cta .cta-icon { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--inv-card-border); background: var(--inv-card-bg); display: inline-flex; align-items: center; justify-content: center; color: var(--amber); margin-bottom: 18px; }
.post-cta .cta-icon svg { width: 26px; height: 26px; }
.post-cta h3 { font-family: var(--serif); font-style: normal; font-weight: 500; font-size: clamp(25px, 3.2vw, 34px); letter-spacing: -0.015em; margin-bottom: 12px; }
.post-cta p { font-size: 16px; opacity: 0.85; max-width: 580px; margin: 0 auto 24px; line-height: 1.6; }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.rv.in { opacity: 1; transform: none; }

/* ============================ Stat tiles ================================== */
.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 30px 0; }
.stat-tiles.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-tile { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; padding: 20px 20px 18px; }
.stat-tile .st-label { font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--page-text-soft); margin-bottom: 10px; line-height: 1.4; }
.stat-tile .st-value { font-family: var(--sans); font-weight: 600; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.stat-tile .st-delta { font-size: 12.5px; color: var(--page-text-soft); margin-top: 8px; line-height: 1.45; }
.stat-tile .st-delta strong { color: var(--page-text); font-weight: 600; }

/* ========================= Numbered pattern grid ==========================
   For a set of short named practices. Two columns on desktop with the last
   card spanning the full width so an odd count still reads as a block; one
   column below 700px. On narrow phones each card collapses to a native
   <details> so the set stays scannable without a wall of scrolling. */
.pattern-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0 30px; }
.pattern-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.pattern-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; padding: 20px 22px 19px; }
.pattern-card > summary { list-style: none; cursor: default; }
.pattern-card > summary::-webkit-details-marker { display: none; }
.pattern-card .pc-num { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 11px; }
.pattern-card .pc-num::after { content: ''; flex: 1; height: 1px; background: var(--card-divider); }
.pattern-card h4 { font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.35; margin: 0; letter-spacing: -0.005em; }
.pattern-card p { font-size: 14.5px !important; line-height: 1.62 !important; color: var(--page-text-soft); margin: 9px 0 0 !important; }
.pattern-card p strong { color: var(--page-text); font-weight: 600; }
.pattern-card .pc-chevron { display: none; }

/* ============================ Chart cards ================================= */
.chart-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 26px 26px 18px; margin: 28px 0; }
.chart-card .cc-title { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.chart-card .cc-sub { font-size: 13px; color: var(--page-text-soft); margin-bottom: 18px; line-height: 1.5; }
.chart-legend { display: flex; gap: 18px; align-items: center; margin: 0 0 14px; font-size: 12.5px; color: var(--page-text-soft); flex-wrap: wrap; }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend .swatch { width: 11px; height: 11px; border-radius: 50%; }
.chart-note { font-size: 13px; color: var(--page-text-soft); margin-top: 12px; line-height: 1.55; }

/* Horizontal bars */
.hbar { display: grid; grid-template-columns: minmax(120px, 230px) 1fr 52px; align-items: center; gap: 12px; padding: 6px 0; border-radius: 8px; }
.hbar:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.hbar .hb-label { font-size: 13.5px; line-height: 1.3; color: var(--page-text); }
.hbar .hb-track { position: relative; height: 18px; background: var(--ch-track); border-radius: 0 4px 4px 0; }
.hbar .hb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ch-accent); border-radius: 0 4px 4px 0; transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.hbar.deemph .hb-fill { background: var(--ch-deemph); }
.hbar.good .hb-fill { background: var(--ch-good); }
.hbar.bad  .hb-fill { background: var(--ch-bad); }
.hbar .hb-value { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--page-text); }
.hbar:hover .hb-fill, .hbar:focus-visible .hb-fill { filter: brightness(1.08); }

/* Dumbbell rows (before → after) */
.dbell { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 78px; align-items: center; gap: 12px; padding: 7px 0; border-radius: 8px; }
.dbell:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.dbell .db-label { font-size: 13.5px; line-height: 1.3; }
.dbell .db-track { position: relative; height: 20px; }
.dbell .db-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ch-grid); }
.dbell .db-line { position: absolute; top: 50%; height: 2px; transform: translateY(-50%); background: var(--ch-accent-1); opacity: 0.55; border-radius: 2px; }
.dbell .db-dot { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--card-bg); }
.dbell .db-dot.d1 { background: var(--ch-accent-1); }
.dbell .db-dot.d2 { background: var(--ch-accent-2); }
.dbell .db-delta { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--page-text-soft); white-space: nowrap; text-align: right; }
.dbell .db-delta strong { color: var(--page-text); font-weight: 600; }

/* Chips (shared control) */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--page-text); background: transparent; border: 1px solid var(--card-divider); border-radius: 100px; padding: 7px 14px; cursor: pointer; transition: all 0.2s ease; }
.chip:hover { border-color: var(--amber); color: var(--amber); }
.chip[aria-pressed="true"] { background: var(--btn-dark-bg); color: var(--btn-dark-text); border-color: var(--btn-dark-bg); }

/* Tooltip */
.chart-tip { position: fixed; z-index: 500; pointer-events: none; background: var(--ch-tooltip-bg); color: var(--ch-tooltip-text); border-radius: 10px; padding: 10px 13px; font-size: 12.5px; line-height: 1.5; box-shadow: 0 12px 30px -8px rgba(0,0,0,0.35); opacity: 0; transform: translateY(4px); transition: opacity 0.15s ease, transform 0.15s ease; max-width: 280px; }
.chart-tip.visible { opacity: 1; transform: translateY(0); }
.chart-tip .tt-title { font-weight: 600; margin-bottom: 3px; }
.chart-tip .tt-row { display: flex; align-items: center; gap: 7px; }
.chart-tip .tt-key { display: inline-block; width: 10px; height: 3px; border-radius: 2px; }
.chart-tip .tt-val { font-weight: 600; }

/* Accessible table twin */
.chart-table { margin-top: 12px; border-top: 1px solid var(--card-divider); padding-top: 10px; }
.chart-table summary { font-size: 12.5px; color: var(--page-text-soft); cursor: pointer; user-select: none; }
.chart-table summary:hover { color: var(--amber); }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--card-divider); }
.chart-table td.num, .chart-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chart-table th { font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--page-text-soft); }

/* ============================ Tabbed playbook ============================= */
.playbook { margin: 30px 0 10px; }
.playbook-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.playbook-tab { font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 12px 20px; border: 1px solid var(--card-border); border-bottom: none; border-radius: 12px 12px 0 0; background: transparent; color: var(--page-text-soft); cursor: pointer; transition: all 0.2s ease; }
.playbook-tab:hover { color: var(--amber); }
.playbook-tab[aria-selected="true"] { background: var(--card-bg); color: var(--page-text); }
.playbook-panel { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 0 16px 16px 16px; padding: 30px 30px 22px; }
.playbook-panel[hidden] { display: none; }
.playbook-panel .pp-intro { font-size: 15px; color: var(--page-text-soft); margin-bottom: 22px; line-height: 1.6; }
.play-item { display: grid; grid-template-columns: 108px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--card-divider); }
.play-item .pi-stat { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; color: var(--amber); line-height: 1.15; }
.play-item .pi-stat span { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--page-text-soft); margin-top: 3px; line-height: 1.35; }
.play-item h4 { font-size: 15.5px; font-weight: 600; margin-bottom: 5px; }
.play-item p { font-size: 14.5px; line-height: 1.6; color: var(--page-text-soft); margin: 0; }
.play-item p strong { color: var(--page-text); }

/* ======================= Interactive: assessment tool ===================== */
.tool { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; padding: 30px 30px 26px; margin: 34px 0; }
.tool-head { display: flex; align-items: flex-start; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 6px; }
.tool-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.tool h3 { font-family: var(--serif) !important; font-style: normal; font-weight: 500 !important; font-size: 26px !important; letter-spacing: -0.015em; margin: 0 0 8px !important; }
.tool .tool-sub { font-size: 14.5px; color: var(--page-text-soft); line-height: 1.6; margin: 0 0 22px; max-width: 620px; }
.tool-progress { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--page-text-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Question group */
.q-group { border-top: 1px solid var(--card-divider); padding-top: 20px; margin-top: 20px; }
.q-group > .qg-title { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 4px; }
.q-group > .qg-sub { font-size: 13.5px; color: var(--page-text-soft); margin-bottom: 16px; line-height: 1.55; }
.q-item { padding: 13px 0; border-bottom: 1px solid var(--card-divider); display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.q-item:last-child { border-bottom: none; }
.q-text { font-size: 15px; line-height: 1.5; }
.q-text .q-help { display: block; font-size: 12.5px; color: var(--page-text-soft); margin-top: 4px; line-height: 1.5; }
.q-opts { display: flex; gap: 6px; flex-shrink: 0; }
.q-opt { font-family: var(--sans); font-size: 12.5px; font-weight: 600; padding: 8px 15px; border-radius: 100px; border: 1px solid var(--card-divider); background: transparent; color: var(--page-text-soft); cursor: pointer; transition: all 0.18s ease; white-space: nowrap; }
.q-opt:hover { border-color: var(--amber); color: var(--amber); }
.q-opt:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* Pressed state: fills are chosen dark enough for white text in both themes
   (each is at or above 4.5:1 against #ffffff), so the tone reads without
   depending on the surrounding surface. */
.q-opt[aria-pressed="true"] { border-color: transparent; color: #fff; }
.q-opt[aria-pressed="true"][data-tone="good"] { background: var(--chip-good); }
.q-opt[aria-pressed="true"][data-tone="ok"]   { background: var(--chip-ok); }
.q-opt[aria-pressed="true"][data-tone="warn"] { background: var(--chip-warn); }
.q-opt[aria-pressed="true"][data-tone="bad"]  { background: var(--chip-bad); }

/* Result panel */
.tool-result { margin-top: 26px; border-top: 1px solid var(--card-divider); padding-top: 24px; }
.result-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.gauge { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .g-track { fill: none; stroke: var(--ch-track); stroke-width: 10; }
.gauge .g-fill { fill: none; stroke: var(--ch-accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.4s ease; }
.gauge .g-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge .g-num b { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge .g-num span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--page-text-soft); margin-top: 5px; }
.result-verdict { flex: 1 1 300px; }
.result-verdict .rv-tier { font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; margin-bottom: 8px; }
.result-verdict .rv-tier em { font-family: var(--serif); font-style: italic; font-weight: 700; }
.result-verdict p { font-size: 15px; line-height: 1.6; color: var(--page-text-soft); margin: 0; }

/* Per-pillar breakdown */
.pillar-bars { margin-top: 24px; display: grid; gap: 10px; }
.pillar { display: grid; grid-template-columns: minmax(110px, 190px) 1fr 46px; gap: 12px; align-items: center; }
.pillar .p-label { font-size: 13px; }
.pillar .p-track { height: 8px; border-radius: 4px; background: var(--ch-track); overflow: hidden; }
.pillar .p-fill { height: 100%; width: 0; border-radius: 4px; background: var(--ch-accent); transition: width 0.6s ease, background 0.4s ease; }
.pillar .p-val { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color: var(--page-text-soft); }

/* Prioritised action list generated from answers */
.action-list { margin-top: 24px; border-top: 1px solid var(--card-divider); padding-top: 20px; }
.action-list .al-title { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.action-list ol { margin: 0; padding-left: 20px; }
.action-list li { font-size: 14.5px; line-height: 1.6; margin-bottom: 11px; padding-left: 4px; }
.action-list li strong { font-weight: 600; }
.action-list .al-empty { font-size: 14.5px; color: var(--page-text-soft); line-height: 1.6; }

.tool-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.btn-ghost { font-family: var(--sans); font-size: 13.5px; font-weight: 600; padding: 12px 20px; border-radius: 100px; border: 1px solid var(--card-divider); background: transparent; color: var(--page-text); cursor: pointer; transition: all 0.2s ease; text-decoration: none !important; display: inline-flex; align-items: center; gap: 8px; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.tool-hint { font-size: 12.5px; color: var(--page-text-soft); line-height: 1.55; }

/* ==================== Interactive: two-column compare ===================== */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.compare-col { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 22px 24px 20px; }
.compare-col.is-bad {  }
.compare-col.is-good {  }
.compare-col .cmp-label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px; }
.compare-col.is-bad .cmp-label { color: var(--ch-bad); }
.compare-col.is-good .cmp-label { color: var(--ch-good); }
.compare-col .cmp-body { font-size: 15px; line-height: 1.65; }
.compare-col .cmp-body mark { background: rgba(229, 233, 153, 0.18); color: inherit; padding: 1px 3px; border-radius: 3px; }
.compare-col .cmp-foot { font-size: 12.5px; color: var(--page-text-soft); border-top: 1px solid var(--card-divider); margin-top: 16px; padding-top: 12px; line-height: 1.55; }

/* ==================== Interactive: extract simulator ====================== */
.extract { margin-top: 18px; }
.extract-q { font-size: 13px; color: var(--page-text-soft); margin-bottom: 10px; }
.extract-out { background: var(--ch-tooltip-bg); color: var(--ch-tooltip-text); border-radius: 12px; padding: 16px 18px; font-size: 14.5px; line-height: 1.6; min-height: 62px; }
.extract-out .eo-label { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.65; margin-bottom: 7px; }
.extract-out .eo-cite { font-size: 12px; opacity: 0.7; margin-top: 10px; }

/* ==================== Interactive: prompt builder ========================= */
.pb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pb-fields { display: grid; gap: 15px; align-content: start; }
.pb-field label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.pb-field .pb-hint { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--page-text-soft); margin-top: 3px; }
.pb-field input, .pb-field textarea, .pb-field select { width: 100%; font-family: var(--sans); font-size: 14px; color: var(--page-text); background: transparent; border: 1px solid var(--card-divider); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.pb-field textarea { min-height: 82px; resize: vertical; line-height: 1.5; }
.pb-field input:focus, .pb-field textarea:focus, .pb-field select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(229, 233, 153, 0.15); }
.pb-out-wrap { display: flex; flex-direction: column; }
.pb-out { flex: 1; background: var(--ch-tooltip-bg); color: var(--ch-tooltip-text); border-radius: 14px; padding: 20px 20px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; overflow-y: auto; max-height: 460px; }
.pb-out .pb-key { opacity: 0.55; }
.pb-out .pb-ph { opacity: 0.42; font-style: italic; }

/* ==================== Interactive: sorter (human vs AI) =================== */
.sorter-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.sorter-chip { font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 9px 15px; border-radius: 100px; border: 1px solid var(--card-divider); background: transparent; color: var(--page-text); cursor: pointer; transition: all 0.18s ease; }
.sorter-chip:hover { border-color: var(--amber); }
.sorter-chip.answered { opacity: 0.55; }
.sorter-chip[aria-pressed="true"] { background: var(--btn-dark-bg); color: var(--btn-dark-text); border-color: var(--btn-dark-bg); opacity: 1; }
.sorter-verdict { border-top: 1px solid var(--card-divider); padding-top: 18px; }
.sorter-verdict .sv-empty { font-size: 14.5px; color: var(--page-text-soft); }
.sorter-verdict .sv-badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 12px; border-radius: 100px; margin-bottom: 12px; color: #fff; }
.sorter-verdict .sv-badge.ai { background: var(--ch-good); }
.sorter-verdict .sv-badge.assist { background: var(--ch-warn); }
.sorter-verdict .sv-badge.human { background: var(--ch-bad); }
.sorter-verdict h4 { font-size: 16px; font-weight: 600; margin-bottom: 7px; }
.sorter-verdict p { font-size: 14.5px !important; line-height: 1.65 !important; color: var(--page-text-soft); margin: 0 0 10px !important; }
.sorter-verdict p:last-child { margin-bottom: 0 !important; }
.sorter-verdict p strong { color: var(--page-text); }

/* ==================== Interactive: 5-second test =========================== */
.fivesec { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; }
.fivesec-dial { position: relative; width: 150px; height: 150px; }
.fivesec-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fivesec-dial .fs-track { fill: none; stroke: var(--ch-track); stroke-width: 9; }
.fivesec-dial .fs-fill { fill: none; stroke: var(--ch-accent); stroke-width: 9; stroke-linecap: round; }
.fivesec-dial .fs-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.fivesec-body h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.fivesec-body p { font-size: 14.5px !important; line-height: 1.6 !important; color: var(--page-text-soft); margin: 0 0 14px !important; }
.fivesec-recall { display: none; }
.fivesec-recall.on { display: block; }
.fivesec-recall .fr-q { font-size: 14px; margin-bottom: 10px; }

/* ==================== Interactive: priority matrix ======================== */
.matrix-wrap { margin-top: 24px; border-top: 1px solid var(--card-divider); padding-top: 22px; }
/* auto rows + start alignment: a long "do now" column must not stretch the
   quadrant beside it into a field of dead space */
.matrix { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; align-items: start; gap: 10px; margin-top: 14px; }
.mx-cell { border: 1px solid var(--card-divider); border-radius: 14px; padding: 16px 16px 14px; min-height: 132px; }
.mx-cell .mx-head { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.mx-cell.now    { border-color: rgba(168, 80, 31, 0.45); }
.mx-cell.now    .mx-head { color: var(--ch-bad); }
.mx-cell.plan   .mx-head { color: var(--ch-warn); }
.mx-cell.quick  .mx-head { color: var(--ch-good); }
.mx-cell.later  .mx-head { color: var(--page-text-soft); }
.mx-cell ul { margin: 0; padding: 0; list-style: none; }
.mx-cell li { font-size: 13px; line-height: 1.45; padding: 5px 0 5px 14px; position: relative; }
.mx-cell li::before { content: ''; position: absolute; left: 0; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.45; }
.mx-cell .mx-empty { font-size: 12.5px; color: var(--page-text-soft); font-style: italic; }
.matrix-axis { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--page-text-soft); margin-top: 10px; }

/* ==================== Partner band (AEMfix) =============================== */
.partner-band { border: 1px solid var(--card-border); border-radius: 20px; padding: 30px 32px 28px; margin: 40px 0 28px; background: var(--card-bg); position: relative; overflow: hidden; }
.partner-band::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--amber), var(--ch-good)); }
.partner-band .pbd-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.partner-band h3 { font-family: var(--serif) !important; font-style: normal; font-weight: 500 !important; font-size: clamp(22px, 3vw, 29px) !important; letter-spacing: -0.015em; margin: 0 0 12px !important; }
.partner-band h3 em { font-family: var(--serif); font-style: italic; font-weight: 700; }
.partner-band > p { font-size: 15.5px !important; line-height: 1.65 !important; color: var(--page-text-soft); max-width: 640px; margin: 0 0 20px !important; }
.partner-band > p strong { color: var(--page-text); }
.pbd-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 24px; padding: 0; list-style: none; }
.pbd-list li { font-size: 13.5px; line-height: 1.5; padding-left: 20px; position: relative; color: var(--page-text-soft); }
.pbd-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--ch-good); font-weight: 700; }
.pbd-list li strong { color: var(--page-text); font-weight: 600; display: block; margin-bottom: 2px; }
/* The primary button carries an offset shadow, so the visual gap below it is
   smaller than the box gap. Pad the row itself rather than only the note. */
.pbd-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-bottom: 14px; }
.pbd-fine { font-size: 12px; color: var(--page-text-soft); margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--card-divider); line-height: 1.6; }
.pbd-fine a { color: inherit; }

/* ============================== Responsive ================================ */
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hbar .hb-fill, .gauge .g-fill, .pillar .p-fill { transition: none; }
}

@media (max-width: 900px) {
  .pb-grid { grid-template-columns: 1fr; }
  .pbd-list { grid-template-columns: 1fr 1fr; }
  .stat-tiles.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .compare { grid-template-columns: 1fr; }
  .matrix { grid-template-columns: 1fr; }
  .pattern-grid { grid-template-columns: 1fr; gap: 10px; }
  .pattern-grid > :last-child:nth-child(odd) { grid-column: auto; }
  /* Collapse to accordions on phones: the summary row stays tappable and the
     body is still in the DOM, so nothing is hidden from crawlers. */
  .pattern-card { padding: 15px 17px; }
  .pattern-card > summary { cursor: pointer; display: flex; align-items: flex-start; gap: 12px; }
  .pattern-card > summary > div { flex: 1; min-width: 0; }
  .pattern-card .pc-num { margin-bottom: 7px; }
  .pattern-card .pc-num::after { display: none; }
  .pattern-card h4 { font-size: 15.5px; }
  .pattern-card .pc-chevron { display: block; flex-shrink: 0; margin-top: 20px; color: var(--amber); transition: transform 0.2s ease; }
  .pattern-card[open] .pc-chevron { transform: rotate(180deg); }
  .pattern-card > p { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--card-divider); }
}

@media (max-width: 640px) {
  .post-hero { padding: 48px 0 28px; }
  .hbar { grid-template-columns: 1fr; gap: 4px; padding: 9px 0; }
  .hbar .hb-value { display: none; }
  .hbar .hb-label { display: flex; justify-content: space-between; gap: 10px; }
  .hbar .hb-label::after { content: attr(data-value); font-weight: 600; font-variant-numeric: tabular-nums; }
  .dbell { grid-template-columns: 1fr 70px; }
  .dbell .db-label { grid-column: 1 / -1; }
  .chart-card { padding: 20px 18px 14px; }
  .tool { padding: 22px 18px 20px; }
  .playbook-panel { padding: 22px 18px 16px; }
  .play-item { grid-template-columns: 92px 1fr; gap: 12px; }
  .post-cta { padding: 36px 22px; }
  .partner-band { padding: 24px 20px 22px; }
  .pbd-list { grid-template-columns: 1fr; }
  .q-item { grid-template-columns: 1fr; gap: 10px; }
  .q-opts { justify-content: flex-start; }
  .fivesec { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pillar { grid-template-columns: 1fr 40px; }
  .pillar .p-track { grid-column: 1 / -1; grid-row: 2; }
  .stat-tiles, .stat-tiles.cols-4 { grid-template-columns: 1fr 1fr; }
  .stat-tile .st-value { font-size: 32px; }
}

/* ---------------------------------------------------------------------------
   Key takeaways — the extractable summary at the head of every post.
   Deliberately plain markup (h2 + ol) so an answer engine can lift it whole,
   and mirrored into the BlogPosting `abstract` in the page's JSON-LD.
   --------------------------------------------------------------------------- */
.post-takeaways {
  margin: 0 0 44px;
  padding: 28px 32px 30px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  
  border-radius: 16px;
}
.post-takeaways h2 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 16px;
  padding: 0;
  border: none;
}
.post-takeaways ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 11px;
}
.post-takeaways li {
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--page-text);
  padding-left: 4px;
}
.post-takeaways li strong { font-weight: 600; }
@media (max-width: 620px) {
  .post-takeaways { padding: 22px 20px 24px; border-radius: 14px; }
  .post-takeaways li { font-size: 15.5px; }
}


/* ============================ Related insights ============================
   Shared card row before the CTA on every post. Self is excluded per page. */
.related-wrap { margin-top: 54px; border-top: 1px solid var(--card-divider); padding-top: 40px; }
.related-wrap .rel-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.related-wrap h2.rel-title { margin: 0 0 22px !important; padding: 0 !important; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rel-card { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 22px 24px 20px; text-decoration: none !important; color: var(--page-text); transition: transform 0.25s ease, border-color 0.25s ease; }
.rel-card:hover { transform: translateY(-3px); border-color: rgba(229, 233, 153, 0.45); }
.rel-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.rel-card .rc-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.rel-card h3 { font-family: var(--serif) !important; font-style: normal; font-weight: 500 !important; font-size: 19px !important; line-height: 1.25 !important; letter-spacing: -0.01em; margin: 0 0 8px !important; }
.rel-card h3 em { font-family: var(--serif); font-style: italic; font-weight: 700; }
.rel-card p { font-size: 13.5px !important; line-height: 1.55 !important; color: var(--page-text-soft); margin: 0 !important; flex: 1; }
.rel-card .rc-read { font-size: 12.5px; font-weight: 600; color: var(--amber); margin-top: 14px; }
@media (max-width: 700px) { .related-grid { grid-template-columns: 1fr; } }
