:root {
  --paper: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #132033;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #d7e0ea;
  --line-2: #e7edf4;
  --gold: #9a741e;
  --gold-soft: #f4e7bd;
  --wine: #8f1f3f;
  --sage: #0f766e;
  --navy: #0d1b2f;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  font-family: "Avenir Next", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(19, 32, 51, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(19, 32, 51, 0.028) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(19, 32, 51, 0.12);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  background: var(--navy);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 20px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small,
.topbar-meta {
  color: var(--muted);
  font-size: 12px;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.topbar-meta span,
.topbar-meta a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  padding: 7px 10px;
  text-decoration: none;
}

.topbar-meta a:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 28px;
  padding: 42px 0 28px;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 500;
  line-height: 0.98;
}

h2 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.lead {
  max-width: 660px;
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.55;
}

.hero-proof {
  align-self: end;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.hero-proof div {
  padding: 18px;
  border-bottom: 1px solid var(--line-2);
}

.hero-proof div:last-child {
  border-bottom: 0;
}

.hero-proof small,
.panel-heading p,
.field small,
.plan small,
.muted,
.sub,
.state {
  color: var(--muted);
}

.hero-proof small {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-proof strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.control-panel,
.results-panel {
  display: grid;
  gap: 14px;
}

.control-panel {
  position: sticky;
  top: 16px;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 18px;
}

.action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 270px);
  gap: 18px;
  align-items: end;
  background: linear-gradient(135deg, var(--navy), #1f3659);
  color: #fff;
  border-color: rgba(13, 27, 47, 0.2);
}

.action-panel .muted {
  color: rgba(255, 255, 255, 0.74);
}

.action-stack {
  display: grid;
  gap: 8px;
}

.panel-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.panel-heading p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(138, 106, 42, 0.14);
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.state {
  font-size: 13px;
}

.suggestions {
  display: none;
  max-height: 280px;
  overflow: auto;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.suggestions.show {
  display: block;
}

.suggestions li {
  padding: 12px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background 160ms var(--ease);
}

.suggestions li:hover {
  background: #eef6f5;
}

.suggestions li:last-child {
  border-bottom: 0;
}

.suggestions .meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.plan-row,
.field-list {
  display: grid;
  gap: 9px;
}

.plan,
.field {
  display: grid;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease);
}

.plan {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.field {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
}

.plan:hover,
.field:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

.field em {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.field strong,
.plan strong {
  display: block;
  margin-bottom: 3px;
}

.field small,
.plan small {
  display: block;
  line-height: 1.4;
}

.btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--wine);
  background: var(--wine);
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms var(--ease), background 160ms var(--ease), opacity 160ms var(--ease);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #651c2c;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

.btn.secondary {
  width: auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.secondary:hover:not(:disabled) {
  background: #eef6f5;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.preview ul {
  margin: 10px 0;
  padding-left: 18px;
}

.preview li {
  margin-bottom: 6px;
}

.hidden {
  display: none !important;
}

.data-list {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.raw {
  display: none;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.report-area {
  margin-top: 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  padding: 12px;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.research-status {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 16px;
  border: 1px solid rgba(154, 116, 30, 0.36);
  background: #fffbf0;
  overflow-wrap: anywhere;
}

.research-status.loading {
  border-color: var(--line);
  background: var(--surface-2);
}

.research-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.research-status-head strong {
  color: var(--wine);
  font-size: 13px;
  text-transform: uppercase;
}

.research-status-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.research-status p {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.research-status ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.research-status a {
  color: var(--sage);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 118, 110, 0.34);
}

.locked-report {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(143, 31, 63, 0.24);
  background: #fff7f5;
}

.locked-report.loading {
  border-color: var(--line);
  background: var(--surface-2);
}

.locked-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.locked-report-head strong,
.locked-report-head span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.locked-report-head strong {
  color: var(--wine);
}

.locked-report-head span {
  color: var(--muted);
}

.locked-report h3 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.locked-report p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-2);
}

.locked-report ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.locked-report li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(216, 210, 196, 0.75);
}

.locked-report li:first-child {
  border-top: 0;
}

.locked-report li span {
  color: var(--ink-2);
  font-weight: 800;
}

.locked-report li em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.unlock-report-btn {
  width: fit-content;
  min-width: 220px;
}

.report-card {
  border: 1px solid var(--line-2);
  background: #fff;
  padding: 16px;
  min-height: 0;
  overflow-wrap: anywhere;
}

.report-card.alert {
  border-color: rgba(124, 36, 54, 0.36);
  background: #fff7f5;
}

.report-card.ok {
  border-color: rgba(15, 118, 110, 0.28);
  background: #f4fbfa;
}

.report-card.research {
  border-color: rgba(154, 116, 30, 0.34);
  background: #fffbf0;
}

.report-card h3 {
  margin-bottom: 10px;
  color: var(--wine);
  font-size: 14px;
  text-transform: uppercase;
}

.report-card ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.report-card li {
  padding: 10px 0;
  border-top: 1px solid rgba(216, 210, 196, 0.65);
  line-height: 1.45;
}

.report-card li:first-child {
  border-top: 0;
  padding-top: 0;
}

.report-card li strong {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.report-card li span {
  display: block;
  color: var(--ink-2);
}

.report-card a {
  color: var(--sage);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 118, 110, 0.34);
}

.report-card a:hover {
  border-bottom-color: currentColor;
}

.report-meta {
  color: var(--muted);
  font-size: 13px;
}

.report-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 36, 54, 0.38);
  background: #fff2ef;
  color: var(--wine);
}

.report-alert strong {
  font-size: 12px;
  text-transform: uppercase;
}

.report-alert span {
  color: var(--ink-2);
  font-size: 14px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--wine);
}

.status-dot.ok {
  background: var(--sage);
}

.status-dot.warn {
  background: var(--gold);
}

.summary {
  display: grid;
  gap: 9px;
}

#quote-items {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.total strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
}

code {
  color: var(--wine);
  font-size: 0.92em;
}

.seo-shell {
  max-width: 1180px;
}

.seo-report,
.seo-list {
  display: grid;
  gap: 16px;
}

.seo-hero {
  padding: 54px 0 26px;
}

.seo-hero h1 {
  max-width: 900px;
}

.seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.seo-btn,
.seo-secondary {
  width: auto;
}

.seo-section {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 20px;
}

.seo-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}

.seo-facts div {
  min-width: 0;
  background: #fff;
  padding: 16px;
}

.seo-facts dt,
.seo-report-card dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.seo-facts dd,
.seo-report-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.seo-locked {
  margin-top: 0;
}

.seo-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-checks li {
  border: 1px solid var(--line-2);
  background: #fff;
  padding: 12px;
  color: var(--ink-2);
}

.seo-note {
  display: grid;
  gap: 4px;
  padding: 14px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.seo-note strong {
  color: var(--ink);
}

.profile-shell {
  max-width: 1240px;
}

.tufte-shell {
  --tufte-rule: rgba(19, 32, 51, 0.14);
}

.tufte-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.tufte-column {
  min-width: 0;
}

.tufte-text {
  max-width: 68ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.72;
}

.margin-note {
  float: right;
  clear: right;
  width: min(260px, 32%);
  margin: 0 0 16px 24px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.fact-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
  padding: 48px 0 28px;
}

.profile-kicker {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.5;
}

.profile-score {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.profile-score small,
.profile-card strong,
.profile-note strong {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-score strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.05;
}

.profile-score span {
  color: var(--muted);
  font-weight: 700;
}

.profile-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 20px;
}

.tufte-shell .profile-section {
  margin-bottom: 22px;
  padding: 18px 0 16px;
  border: 0;
  border-top: 1px solid var(--tufte-rule);
  background: transparent;
  box-shadow: none;
}

.tufte-shell .profile-section:first-of-type {
  border-top: 0;
}

.profile-grid {
  display: grid;
  gap: 12px;
}

.profile-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: #fff;
  padding: 16px;
}

.tufte-shell .profile-card {
  border: 0;
  background: transparent;
  padding: 0;
}

.profile-card span {
  color: var(--ink-2);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
}

.profile-source a {
  color: var(--sage);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.profile-source a:hover {
  border-bottom: 1px solid currentColor;
}

.profile-facts {
  margin-top: 10px;
}

.profile-note {
  padding-bottom: 40px;
}

.ownership-card {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--tufte-rule);
  border-bottom: 1px solid var(--tufte-rule);
  background: transparent;
  padding: 16px 0 10px;
}

.ownership-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
}

.ownership-card-head strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.2;
}

.ownership-card-head p {
  max-width: 72ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}

.ownership-annotation {
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.82);
}

.ownership-annotation strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ownership-annotation span {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.ownership-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.ownership-stack-chart {
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--ink);
}

.stack-axis {
  stroke: var(--ink);
  stroke-width: 1.2;
}

.stack-caption {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stack-segment {
  stroke: var(--paper);
  stroke-width: 2;
}

.stack-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.stack-sub,
.stack-tick-label,
.stack-note {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stack-tick {
  stroke: rgba(19, 32, 51, 0.28);
  stroke-width: 1.1;
}

.ownership-explainer {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.9);
}

.ownership-explainer h3 {
  margin: 0;
  font-size: 15px;
}

.ownership-insights {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.ownership-insights strong {
  color: var(--ink);
}

.ownership-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.diagram-legend {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.diagram-legend div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--sage);
  flex: 0 0 auto;
}

.swatch.core,
.swatch-1 {
  background: var(--sage);
}

.swatch.secondary,
.swatch-2 {
  background: var(--gold);
}

.swatch.alert,
.swatch-3 {
  background: var(--wine);
}

.swatch.tertiary,
.swatch-4 {
  background: #c6d0dd;
}

.source-notes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

.source-index {
  color: var(--gold);
  font-weight: 800;
}

.charts-section {
  display: grid;
  gap: 18px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.chart-card {
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--tufte-rule);
  border-bottom: 1px solid var(--tufte-rule);
  background: #fff;
}

.chart-card figcaption {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.chart-card figcaption strong {
  font-size: 14px;
}

.chart-card figcaption span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.bar-chart {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
}

.bar-label,
.bar-value {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.bar-track {
  height: 10px;
  background: #eef2f7;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--wine);
}

.bar-fill.gold {
  background: var(--gold);
}

.bar-fill.sage {
  background: var(--sage);
}

.annual-revenue-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.annual-revenue-chart .axis {
  stroke: var(--ink);
  stroke-width: 1.5;
}

.annual-revenue-chart .axis-tick {
  stroke: rgba(19, 32, 51, 0.45);
  stroke-width: 1.1;
}

.annual-revenue-chart .axis-label,
.annual-revenue-chart .bar-year,
.annual-revenue-chart .bar-top {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-family: "Avenir Next", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.annual-revenue-chart .bar-year {
  fill: var(--ink-2);
}

.annual-revenue-chart .bar-top {
  fill: var(--wine);
}

.annual-revenue-chart .annual-bar {
  fill: var(--gold);
}

.ownership-wrap {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.pie-chart {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto;
}

.pie-chart path {
  stroke: var(--paper);
  stroke-width: 2;
}

.pie-legend {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pie-legend li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line-2);
  background: #fff;
}

.timeline-item time {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.timeline-item p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
}

.profile-full-report {
  gap: 18px;
}

.profile-full-intro {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

.report-block ul {
  gap: 10px;
}

.report-block li span {
  color: var(--gold);
  font-weight: 800;
}

.report-block.ok {
  border-color: rgba(15, 118, 110, 0.22);
  background: #f4fbfa;
}

.report-block.research {
  border-color: rgba(154, 116, 30, 0.2);
  background: #fffbf3;
}

.report-block.alert {
  border-color: rgba(143, 31, 63, 0.24);
  background: #fff7f5;
}

.seo-report-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 18px;
}

.seo-report-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 800;
}

.seo-report-card h2 {
  margin-bottom: 6px;
  color: var(--ink);
}

.seo-report-card p {
  margin-bottom: 14px;
  color: var(--ink-2);
}

.seo-report-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
  margin: 0 0 14px;
}

.seo-report-card a {
  color: var(--sage);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 118, 110, 0.34);
}

.seo-report-card a:hover {
  border-bottom-color: currentColor;
}

@media (max-width: 1080px) {
  .workspace,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 16px;
  }

  .topbar,
  .action-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar-meta {
    justify-content: flex-start;
  }

  .field {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .field em {
    grid-column: 2;
  }

  h1 {
    font-size: 42px;
  }

  .seo-facts,
  .seo-checks,
  .seo-report-card dl {
    grid-template-columns: 1fr;
  }

  .seo-actions {
    display: grid;
  }

  .seo-btn,
  .seo-secondary {
    width: 100%;
  }

  .profile-hero,
  .profile-grid-3,
  .profile-grid-2,
  .profile-grid-4 {
    grid-template-columns: 1fr;
  }

  .tufte-columns,
  .ownership-wrap {
    grid-template-columns: 1fr;
  }

  .ownership-card-head,
  .ownership-layout {
    grid-template-columns: 1fr;
  }

  .margin-note {
    float: none;
    width: auto;
    margin: 0;
  }

  .chart-grid,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

/* --- Programmatic directory (SEO scale layer) ------------------------------ */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 20px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs a {
  color: var(--sage);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs span[aria-hidden] {
  color: var(--line);
}
.breadcrumbs .crumb-current {
  color: var(--ink);
  font-weight: 600;
}

.directory-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 34px 30px;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}
.directory-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.directory-hero h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 6px 0 12px;
  color: var(--ink);
}
.directory-hero .lead {
  color: var(--muted);
  max-width: 70ch;
}
.directory-kpi {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.directory-kpi article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.directory-kpi article strong {
  display: block;
  color: var(--ink);
  font-size: 29px;
  line-height: 1;
}
.directory-kpi article span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.directory-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 30px 30px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.registry-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14px;
}
.registry-table th,
.registry-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.registry-table th {
  width: 34%;
  color: var(--muted);
  font-weight: 600;
}
.registry-table td {
  color: var(--ink);
  font-weight: 500;
}
.registry-table tr:last-child th,
.registry-table tr:last-child td {
  border-bottom: none;
}

.hub-links,
.hub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.hub-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.hub-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.hub-chip:hover {
  transform: translateY(-2px);
  border-color: var(--sage);
}
.hub-chip small {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hub-chip strong {
  color: var(--ink);
  font-size: 15px;
}

.company-index {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.company-index--grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.muted-inline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.company-index a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.company-index a:hover {
  border-color: var(--sage);
}
.company-index strong {
  color: var(--ink);
  font-size: 15px;
}
.company-index span {
  color: var(--muted);
  font-size: 13px;
}
.company-index em {
  color: var(--sage);
  font-style: normal;
  font-size: 12px;
}

a.directory-card {
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
a.directory-card:hover {
  transform: translateY(-2px);
  border-color: var(--sage);
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 16px;
  background: var(--paper);
}
.faq-item summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--sage);
  font-weight: 700;
}
.faq-item[open] summary::before {
  content: "–";
}
.faq-item p {
  margin: 0 0 14px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.directory-note {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.directory-note .btn {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .directory-hero,
  .directory-section {
    padding: 22px 18px;
  }
  .directory-hero-grid {
    grid-template-columns: 1fr;
  }
  .directory-kpi {
    grid-template-columns: 1fr;
  }
  .hub-links,
  .registry-table th {
    width: 42%;
  }
}

/* --- Directory explorer + signal flags ------------------------------------ */
.flag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
  white-space: nowrap;
}
.flag-ok    { background: #e7f3f1; color: #0f766e; border-color: #b7ddd8; }
.flag-info  { background: #e9eef6; color: #2a4a7f; border-color: #c2cfe4; }
.flag-warn  { background: #fbf0d9; color: #8a6300; border-color: #ecd49a; }
.flag-alert { background: #f8e3e8; color: #8f1f3f; border-color: #e6b8c4; }

/* --- Vercly public branding ------------------------------------------------ */
body.vercly-branded {
  --paper: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #f0ede4;
  --ink: #111111;
  --ink-2: #2a2926;
  --muted: #6f6b61;
  --line: rgba(17, 17, 17, 0.15);
  --line-2: rgba(17, 17, 17, 0.09);
  --gold: #b9974f;
  --gold-soft: #ead9a4;
  --navy: #080808;
  --shadow: 0 18px 50px rgba(8, 8, 8, 0.08);
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 8, 8, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 54px 54px;
}

body.vercly-branded .seo-shell {
  max-width: 1180px;
}

body.vercly-branded .topbar {
  min-height: 68px;
  border-bottom-color: var(--line);
}

body.vercly-branded .brand-mark {
  width: 42px;
  height: 42px;
  border-color: var(--gold);
  background: #080808;
  color: #fff;
  font-size: 21px;
}

body.vercly-branded .brand strong {
  color: var(--ink);
}

body.vercly-branded .brand small {
  color: var(--muted);
}

body.vercly-branded .topbar-meta a,
body.vercly-branded .topbar-meta span {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  padding: 0 0 2px;
  font-weight: 700;
}

body.vercly-branded .topbar-meta a:hover {
  color: var(--ink);
}

body.vercly-branded .breadcrumbs {
  margin-top: 18px;
}

body.vercly-branded .breadcrumbs a {
  color: var(--ink);
  border-bottom: 1px solid rgba(17, 17, 17, 0.24);
}

body.vercly-branded .eyebrow,
body.vercly-branded .go-kicker {
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.vercly-branded h1 {
  color: #080808;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

body.vercly-branded .directory-hero,
body.vercly-branded .directory-section,
body.vercly-branded .profile-section,
body.vercly-branded .profile-score,
body.vercly-branded .seo-section,
body.vercly-branded .stat-card,
body.vercly-branded .explorer-filters,
body.vercly-branded .explorer-results {
  border-color: var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

body.vercly-branded .directory-hero {
  padding-top: 42px;
  padding-bottom: 38px;
}

body.vercly-branded .directory-hero h1,
body.vercly-branded .profile-hero h1,
body.vercly-branded .seo-hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
}

body.vercly-branded .lead,
body.vercly-branded .directory-hero .lead,
body.vercly-branded .profile-kicker,
body.vercly-branded .tufte-text {
  color: var(--muted);
}

body.vercly-branded .directory-kpi article,
body.vercly-branded .hub-chip,
body.vercly-branded .company-index a,
body.vercly-branded .profile-card,
body.vercly-branded .faq-item,
body.vercly-branded .explorer-row,
body.vercly-branded .facet-chip {
  border-color: var(--line);
  border-radius: 0;
  background: #fff;
}

body.vercly-branded .directory-kpi article strong,
body.vercly-branded .stat-card strong {
  color: #080808;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

body.vercly-branded .hub-chip:hover,
body.vercly-branded .company-index a:hover,
body.vercly-branded a.directory-card:hover,
body.vercly-branded .stat-card:hover {
  border-color: var(--gold);
}

body.vercly-branded .hub-chip small,
body.vercly-branded .company-index em,
body.vercly-branded .profile-card strong {
  color: var(--gold);
}

body.vercly-branded .btn,
body.vercly-branded .explorer-search button {
  border-radius: 0;
  border-color: #080808;
  background: #080808;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.vercly-branded .btn.secondary,
body.vercly-branded .btn.ghost,
body.vercly-branded .seo-secondary {
  background: transparent;
  color: #080808;
}

body.vercly-branded input,
body.vercly-branded select {
  border-radius: 0;
}

body.vercly-branded .flag {
  border-radius: 0;
}

.hero-flags,
.explorer-row-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hero-flags { margin: 14px 0 18px; }

.explorer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--sage); }
.stat-card strong { font-size: 26px; color: var(--ink); }
.stat-card span { font-size: 12.5px; color: var(--muted); }
.stat-card.tone-alert { border-left: 4px solid #8f1f3f; }
.stat-card.tone-warn  { border-left: 4px solid #9a741e; }
.stat-card.tone-info  { border-left: 4px solid #2a4a7f; }
.stat-card.tone-ok    { border-left: 4px solid #0f766e; }

.explorer-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}
.explorer-filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
}
.explorer-search { display: flex; gap: 6px; margin-bottom: 14px; }
.explorer-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.explorer-search button {
  padding: 9px 14px;
  border: none;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.problem-toggle {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e6b8c4;
  background: #f8e3e8;
  color: #8f1f3f;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 18px;
}
.problem-toggle.on { background: #8f1f3f; color: #fff; border-color: #8f1f3f; }

.facet-group { margin-bottom: 18px; }
.facet-group h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0 0 8px;
}
.facet-list { display: flex; flex-direction: column; gap: 5px; }
.facet-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  text-decoration: none;
  font-size: 12.5px;
  color: var(--ink);
}
.facet-chip:hover { border-color: var(--sage); }
.facet-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.facet-chip em { font-style: normal; color: var(--muted); }
.facet-chip.active em { color: #cfd8e6; }

.explorer-results { min-width: 0; }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.filter-tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: #e9eef6;
  color: #2a4a7f;
  text-decoration: none;
  font-weight: 600;
}
.filter-tag em { font-style: normal; }
.filter-clear { color: var(--wine); text-decoration: none; font-weight: 600; }
.results-count { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.results-count strong { color: var(--ink); }

.explorer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.explorer-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  flex-wrap: wrap;
}
.explorer-row-main { text-decoration: none; min-width: 220px; flex: 1; }
.explorer-row-main strong { display: block; color: var(--ink); font-size: 14.5px; }
.explorer-row-meta { font-size: 12px; color: var(--muted); }
.explorer-row-flags { align-items: flex-start; max-width: 60%; justify-content: flex-end; }

@media (max-width: 820px) {
  .explorer-layout { grid-template-columns: 1fr; }
  .explorer-filters { position: static; }
  .explorer-row-flags { max-width: 100%; justify-content: flex-start; }
}

/* --- Full company report sections ----------------------------------------- */
.report-section { padding-top: 22px; }
.report-subhead {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 18px 0 8px;
}
.report-lede { color: var(--ink); font-size: 14.5px; line-height: 1.55; margin: 6px 0 12px; }
.report-rows { display: grid; gap: 6px; margin: 0; }
.report-rows > div {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.report-rows dt { color: var(--muted); font-size: 13px; margin: 0; }
.report-rows dd { color: var(--ink); font-size: 13px; margin: 0; }

.risk-summary,
.adverse-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 6px 0 14px;
}
.risk-summary > div,
.adverse-summary > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.risk-summary small,
.adverse-summary small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.risk-summary strong,
.adverse-summary strong { color: var(--ink); font-size: 17px; }
.risk-low      { color: #0f766e; }
.risk-medium   { color: #9a741e; }
.risk-high     { color: #8f1f3f; }
.risk-niejednoznaczny { color: #2a4a7f; }

.findings-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.finding {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  border-left: 4px solid #c2cfe4;
}
.finding-wysoka, .finding-high, .finding-alert { border-left-color: #8f1f3f; }
.finding-srednia, .finding-medium, .finding-warn { border-left-color: #9a741e; }
.finding-niska, .finding-low, .finding-informacja, .finding-info { border-left-color: #0f766e; }
.finding strong { color: var(--ink); font-size: 14px; }
.finding span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.finding em { font-style: normal; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.source-list li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.source-list a { color: var(--sage); text-decoration: none; font-weight: 600; }
.source-list small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* === Intel-doc — verification report in classified-brief style ============ */
.intel-doc {
  margin: 32px 0;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid #d4dbe6;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(13, 27, 47, 0.04),
    0 30px 80px -50px rgba(13, 27, 47, 0.35);
}

.intel-banner {
  background:
    radial-gradient(circle at 85% 12%, rgba(154, 116, 30, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, #0d1b2f 0%, #132033 100%);
  color: #f4f7fb;
  padding: 30px 44px 28px;
  position: relative;
}
.intel-banner::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--wine) 0 33%, var(--gold) 33% 66%, var(--sage) 66% 100%);
}

.intel-classification {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, "Roboto Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.78);
  margin: 0 0 16px;
}
.intel-classification i {
  display: block;
  flex: 1;
  height: 1px;
  background: rgba(244, 247, 251, 0.22);
}

.intel-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.intel-subtitle {
  margin: 4px 0 18px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(244, 247, 251, 0.55);
}

.intel-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 247, 251, 0.18);
}
.intel-meta > div {
  padding: 4px 18px 4px 0;
  border-right: 1px solid rgba(244, 247, 251, 0.12);
}
.intel-meta > div:last-child { border-right: none; }
.intel-meta dt {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.55);
}
.intel-meta dd {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
}
.intel-meta .risk-low { color: #6ee7b7; }
.intel-meta .risk-medium { color: #fbbf24; }
.intel-meta .risk-high { color: #fca5a5; }
.intel-meta .risk-niejednoznaczny,
.intel-meta .risk-brak,
.intel-meta .risk- { color: #93c5fd; }

.intel-section {
  padding: 38px 44px 42px;
  border-top: 1px solid var(--line);
}
.intel-adverse {
  background:
    linear-gradient(180deg, #fbf7ef 0%, var(--surface) 220px),
    var(--surface);
}

.intel-section-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: baseline;
  margin: 0 0 22px;
}
.intel-num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1;
  border-top: 3px solid var(--navy);
  padding-top: 6px;
}
.intel-section-head h3 {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.intel-section-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 65ch;
}

.intel-sub {
  margin: 26px 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
}
.intel-sub::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.intel-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.intel-stat {
  padding: 14px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.intel-stat small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.intel-stat strong {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.intel-stat .risk-low { color: #0f766e; }
.intel-stat .risk-medium { color: #9a741e; }
.intel-stat .risk-high { color: #8f1f3f; }
.intel-stat.tone-alert { background: #fbeef2; }
.intel-stat.tone-alert strong { color: #8f1f3f; }

.intel-rows {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.intel-rows > div {
  display: grid;
  grid-template-columns: 36% 1fr;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.intel-rows > div:nth-child(even) { background: var(--paper); }
.intel-rows > div:last-child { border-bottom: none; }
.intel-rows dt { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.intel-rows dd { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink); }

.intel-flag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.intel-lede {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 70ch;
}
.intel-lede strong { color: var(--navy); }

.intel-aside {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--paper);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  color: var(--ink);
}

.intel-muted { color: var(--muted); font-size: 14px; }

/* --- Intel-doc prose (adverse media) ----------------------------------- */
.intel-prose {
  max-width: 72ch;
  font-family: "Charter", "Iowan Old Style", "Source Serif Pro", Georgia, serif;
}
.intel-prose p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.75;
  color: #1f2d44;
  text-align: justify;
  hyphens: auto;
}
.intel-prose p:first-child::first-letter {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 3.4em;
  font-weight: 700;
  color: var(--navy);
  float: left;
  line-height: 0.9;
  margin: 4px 8px -4px 0;
}

sup.cite {
  vertical-align: super;
  font-size: 0.66em;
  line-height: 0;
  margin: 0 1px;
}
sup.cite a {
  display: inline-block;
  padding: 0 2px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  background: rgba(13, 27, 47, 0.06);
  border-radius: 3px;
}
sup.cite a:hover { background: rgba(13, 27, 47, 0.14); }

.intel-list {
  counter-reset: rec;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 72ch;
  display: grid;
  gap: 8px;
}
.intel-list li {
  counter-increment: rec;
  position: relative;
  padding: 14px 16px 14px 60px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  border-left: 3px solid var(--navy);
  border-radius: 0 10px 10px 0;
}
.intel-list li::before {
  content: counter(rec, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.06em;
}

.intel-sources {
  counter-reset: src;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.intel-sources li {
  counter-increment: src;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.intel-sources li:last-child { border-bottom: none; }
.intel-sources li::before {
  content: "[" counter(src) "]";
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.05em;
}
.intel-sources li:target { background: rgba(154, 116, 30, 0.10); }
.intel-sources a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  word-break: break-word;
}
.intel-sources a:hover { color: var(--navy); text-decoration: underline; }
.intel-sources time {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.intel-footer {
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .intel-banner, .intel-section { padding-left: 22px; padding-right: 22px; }
  .intel-section { padding-top: 28px; padding-bottom: 32px; }
  .intel-section-head { grid-template-columns: 1fr; gap: 6px; }
  .intel-num { font-size: 22px; display: inline-block; }
  .intel-prose p:first-child::first-letter { font-size: 2.6em; }
  .intel-meta > div { border-right: none; border-bottom: 1px solid rgba(244, 247, 251, 0.12); padding: 8px 0; }
  .intel-list li { padding-left: 54px; }
  .intel-sources li { grid-template-columns: 32px 1fr; }
  .intel-sources time { grid-column: 1 / -1; padding-left: 46px; }
}
