.theme-story { min-width: 0; }
.theme-story__steps { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .75rem 0 1rem; }
.theme-story__step-link { display: inline-flex; align-items: center; min-height: 36px; font-size: .82rem; text-underline-offset: .22em; }
.theme-story__step-link[aria-current="step"] { color: var(--color-ink); font-weight: 650; }
.theme-story__step { min-width: 0; padding: 1.1rem 0; border-bottom: 1px solid var(--color-rule); scroll-margin-top: var(--single-page-anchor-offset); }
.theme-story__heading { font: 600 clamp(1.2rem, 2vw, 1.55rem)/1.25 var(--font-sans); margin: 0 0 .6rem; }
.theme-story__description { font-size: .93rem; line-height: 1.65; }
.theme-story__action { margin-block: .8rem; }
.theme-story__action:empty { display: none; }
.theme-story__action button { font: inherit; min-height: 44px; padding: .45rem .7rem; background: var(--color-accent-soft); border: 1px solid var(--color-rule-strong); color: var(--color-ink); border-radius: .5rem; cursor: pointer; }
html.site-shell .single-page-prototype[data-layout="themes"][data-active-topic="summary"] > .single-page-prototype__toolbar .results-toolbar-presentation { display: none !important; }
.theme-story__content .thematic-results__group { min-width: 0; margin: 0 0 .75rem; }
.theme-story__content .thematic-results__group > h4 { margin: 0 0 .7rem; font: 600 1rem/1.35 var(--font-sans); }
.theme-story__content .thematic-results__metrics { margin-top: .8rem; }
.theme-story__content .thematic-results__scope { margin: 0 0 .65rem; }
.thematic-results__fixed-scope { font-weight: 650; }
.thematic-results__statement-list { margin:0 0 .5rem; padding:0; list-style:none; }
.thematic-results__statement-list li + li { border-top:1px solid var(--color-rule); }
.thematic-results__statement-list button {
  display:block; width:100%; min-height:32px; padding:.3rem 0;
  border:0; background:none; color:var(--color-ink);
  font:inherit; font-size:.88rem; line-height:1.35;
  text-align:start; text-decoration:underline; text-underline-offset:.18em; cursor:pointer;
}
.thematic-results__group--compact:has(> details[open]) > .thematic-results__statement-list { display:none; }
.thematic-results__group-results > summary {
  padding:.45rem 0; color:var(--color-accent); font-size:.83rem; cursor:pointer;
}
.story-statement-disclosure { min-width:0; }
.story-statement-disclosure__header {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.35rem 1rem;
  margin-bottom:.5rem;
}
.story-statement-disclosure__title { display:flex; flex-wrap:wrap; align-items:baseline; gap:.15rem .65rem; }
.story-statement-disclosure__heading { margin:0; font:600 1rem/1.35 var(--font-sans); }
.story-statement-disclosure__count { font-size:.8rem; color:var(--color-muted); }
.story-statement-disclosure__toggle {
  min-height:44px; padding:.4rem .65rem; border:1px solid var(--color-rule-strong); border-radius:.4rem;
  background:var(--color-surface); color:var(--color-ink); font:inherit; font-size:.83rem;
  cursor:pointer; scroll-margin-top:var(--single-page-anchor-offset, 1rem);
}
.story-statement-disclosure :is(button, summary):focus-visible { outline:2px solid var(--color-focus); outline-offset:2px; }
.story-statement-disclosure__preview .thematic-results__statement-list { margin:0; }
.story-statement-disclosure__teaser {
  margin:0; padding:.3rem 0 0; border-top:1px solid var(--color-rule);
  color:var(--color-ink); font-size:.88rem; line-height:1.35;
  max-height:2.5em; overflow:hidden; pointer-events:none;
  mask-image:linear-gradient(to bottom, #000 8%, transparent 95%);
}
html.site-shell .story-statement-disclosure__groups > .thematic-results__group--compact {
  margin:0; padding:.65rem 0!important; border:0; border-top:1px solid var(--color-rule);
  border-radius:0; background:none; box-shadow:none;
}
.story-statement-disclosure__groups > .thematic-results__group--compact::before { display:none; }
.story-statement-disclosure__panel > button { margin-top:.5rem; }
.story-statement-disclosure__charts { margin-top:.35rem; }
.story-statement-disclosure__groups summary { scroll-margin-top:var(--single-page-anchor-offset, 1rem); }
.theme-story--inline .theme-story__content > .background-section { margin-top: .75rem; }
.theme-story__finding { min-width: 0; padding: .8rem 0; border-bottom: 1px solid var(--color-rule); }
.theme-story__finding:last-child { border-bottom: 0; }
.theme-story__finding h4 { margin: 0 0 .4rem; font-size: 1rem; }
.theme-story__finding a { font-size: .85rem; }

@media (min-width: 1008px) and (min-height: 700px) {
  .theme-story:not(.theme-story--inline) .theme-story__step {
    display: grid;
    grid-template-columns: minmax(12rem, .68fr) minmax(0, 1.32fr);
    gap: clamp(1rem, 3vw, 2.5rem);
    align-items: start;
    min-height: 53vh;
    padding: 1.5rem 0 2.5rem;
  }
  .theme-story:not(.theme-story--inline) .theme-story__text,
  .theme-story__chart--compact {
    position: sticky;
    top: var(--single-page-anchor-offset);
  }
  .theme-story__chart {
    box-sizing: border-box;
    min-width: 0;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: var(--ui-radius);
    background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--ui-card-outline) border-box;
    box-shadow: var(--ui-shadow);
  }
  .theme-story__chart .thematic-results__group { padding: .5rem 0; box-shadow: none; border: 0; }
  .theme-story__chart .thematic-results__group::before { display: none; }
  .theme-story__chart .analysis-view__statement { padding-block: .55rem; }
  .theme-story__chart .analysis-view__statement :is(h3,h4) { font-size: .85rem; }
  #results-agency-step-development:has(.story-statement-disclosure__panel[hidden]) {
    min-height:0; padding-bottom:1.5rem;
  }
}
@media print {
  .theme-story:not(.theme-story--inline) .theme-story__step { display: block; min-height: 0; }
  .theme-story:not(.theme-story--inline) .theme-story__text, .theme-story__chart--compact { position: static; }
  .theme-story__chart { box-shadow: none; }
  .theme-story__steps, .theme-story__action { display: none; }
}

.theme-story-continuation {
  box-sizing: border-box;
  min-height: 52vh;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--color-rule);
}
.theme-story-continuation__link { font-weight: 650; text-underline-offset: .22em; }
.theme-story-continuation__hint { margin-top: .5rem; color: var(--color-muted); font-size: .88rem; }
@media print { .theme-story-continuation { display: none; } }

.responsibility-heatmap { min-width:0; padding:0 0 .75rem; margin:0 0 1rem; border-bottom:1px solid var(--color-rule); }
.responsibility-heatmap h4 { margin:.25rem 0 .5rem; font-size:1.05rem; }
.responsibility-heatmap p { line-height:1.45; }
.responsibility-heatmap__chart > svg { display:block; max-width:100%; height:auto; }
.responsibility-heatmap__scale,
.responsibility-heatmap__column-labels {
  margin-inline:var(--heatmap-grid-start,0px) var(--heatmap-grid-end,0px);
}
.responsibility-heatmap__scale {
  margin-block:.3rem .45rem;
  font-size:.75rem;
}
.responsibility-heatmap__gradient {
  height:.8rem;
  border:1px solid var(--color-rule-strong);
}
.responsibility-heatmap__ticks {
  position:relative;
  height:1.4rem;
}
.responsibility-heatmap__ticks span {
  position:absolute;
  transform:translateX(-50%);
}
.responsibility-heatmap__ticks span:first-child { transform:none; }
.responsibility-heatmap__ticks span:last-child { transform:translateX(-100%); }
.responsibility-heatmap__column-labels {
  display:grid;
  margin-block:0 .45rem;
  text-align:center;
  font-size:.75rem;
  line-height:1.2;
  hyphens:auto;
  overflow-wrap:anywhere;
}
.responsibility-heatmap details { margin:.1rem 0; }
.responsibility-heatmap details summary { cursor:pointer; padding:.55rem .2rem; font-weight:600; }
.responsibility-heatmap summary:focus-visible { outline:2px solid var(--color-focus); }
.responsibility-heatmap table { width:100%; table-layout:fixed; font-size:.76rem; }
.responsibility-heatmap :is(th,td) { padding:.25rem; overflow-wrap:anywhere; vertical-align:top; }
.responsibility-heatmap th:first-child { width:35%; }
@media (max-width:520px) {
  .responsibility-heatmap__column-labels { font-size:.6875rem; }
  .responsibility-heatmap :is(th,td) { padding:.2rem .12rem; font-size:.71rem; }
}

.story-chart-choices {
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  margin:.5rem 0 .65rem;
}
.story-chart-choices button {
  min-height:44px;
  padding:.35rem .65rem;
  border:1px solid var(--color-rule-strong);
  border-radius:.35rem;
  background:var(--color-surface);
  color:var(--color-ink);
  font:inherit;
  font-size:.8rem;
  cursor:pointer;
}
.story-chart-choices button[aria-pressed="true"] {
  border-color:var(--color-accent);
  background:var(--color-accent-soft);
  font-weight:650;
}
.story-comparison { min-width:0; }
.story-comparison--skills { margin:1rem 0; padding-top:.65rem; border-top:1px solid var(--color-rule); }
.story-comparison--skills h4 { margin:.15rem 0 .5rem; }
.story-comparison__controls { display:flex; flex-wrap:wrap; gap:.4rem 1rem; margin:.5rem 0 .65rem; }
.story-comparison__controls > .story-chart-choices { margin:0; }
.story-comparison > svg { display:block; max-width:100%; height:auto; }
.story-comparison svg circle[tabindex]:focus-visible { outline:2px solid var(--color-focus); }
.story-comparison__key {
  display:flex;
  flex-wrap:wrap;
  gap:.3rem .85rem;
  list-style:none;
  margin:.5rem 0;
  padding:0;
  font-size:.8rem;
  overflow-wrap:anywhere;
}
.story-comparison__marker { display:inline-block; min-width:1.1rem; font-weight:700; }
/* Competence key: each group is a button that marks its point. */
.story-comparison__key--selectable { gap:.15rem .5rem; }
.story-comparison__key--selectable button { display:inline-flex; align-items:baseline; gap:.25rem; min-height:32px; padding:.2rem .4rem; border:1px solid transparent; border-radius:.35rem; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.story-comparison__key--selectable button:hover { border-color:var(--color-rule); }
.story-comparison__key--selectable button[aria-pressed="true"] { border-color:var(--color-accent); background:var(--color-surface-soft); }
.story-comparison__key--selectable button:focus-visible { outline:2px solid var(--color-focus); outline-offset:1px; }
.story-comparison svg circle.is-selected { stroke:var(--color-ink); stroke-width:2.5; }
.story-comparison__selected-number { fill:var(--color-ink); font-weight:700; font-size:12px; paint-order:stroke; stroke:var(--color-surface); stroke-width:3px; }
.story-comparison__note,.story-comparison__focused { font-size:.8rem; line-height:1.4; color:var(--color-muted); }
.story-comparison__focused:empty { display:none; }
.story-comparison__exact { margin:.5rem 0; }
.story-comparison__exact summary { cursor:pointer; }
.story-comparison__exact table { width:100%; table-layout:fixed; font-size:.8rem; }
.story-comparison__exact :is(th,td) { padding:.25rem; overflow-wrap:anywhere; vertical-align:top; }
.story-comparison__exact th:first-child { width:36%; }
