:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --ink: #1e211f;
  --muted: #68706b;
  --line: #dfe4dd;
  --brand: #287a3e;
  --brand-dark: #122018;
  --warn: #b7791f;
  --danger: #b42318;
  --info: #315f8c;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(18, 32, 24, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.more-data { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.68); overflow: hidden; }
.more-data summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem; font-weight: 750; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.more-data summary::-webkit-details-marker { display: none; }
.more-data summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); margin-left: .8rem; }
.more-data[open] summary::after { content: "−"; }
.more-data summary span { margin-left: auto; color: var(--muted); font-size: .82rem; font-weight: 600; }
.more-data-content { padding: 0 1.2rem 1.2rem; }
.packaging-module { padding: 1.1rem; border-radius: 15px; background: linear-gradient(135deg, rgba(35,92,72,.08), rgba(204,143,54,.08)); }
.module-heading { margin-bottom: 1rem; }
.module-heading h3 { margin: .15rem 0; font-size: 1.25rem; }
.module-heading p { margin: 0; color: var(--muted); }
.extra-indicators { margin-top: 1rem; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}

a {
  color: var(--brand);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  background: var(--brand-dark);
  color: #fff;
  padding: 22px max(24px, calc((100vw - 1120px) / 2));
  display: grid;
  grid-template-columns: minmax(260px,.7fr) minmax(360px,1fr) auto;
  gap: 24px;
  align-items: center;
}

.site-header h1 {
  margin: 2px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.site-header p {
  max-width: 650px;
  margin: 0;
  color: #d5ddd7;
}

.eyebrow {
  text-transform: uppercase;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: #82c58c !important;
}

.note {
  font-size: .95rem;
}

.portal-link {
  display: inline-block;
  margin: 0;
  white-space: nowrap;
  color: #b9e4c0;
}

body.embedded .site-header { display: none; }
body.embedded main { margin-top: 18px; }

main {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 56px;
}

main > section + section {
  margin-top: 22px;
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.executive-summary,
.exchange-panel,
.alerts-section,
.dashboard-section,
.status-card,
.methodology,
.data-state,
.admin-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.executive-summary {
  padding: 18px 20px;
  border-left: 4px solid var(--brand);
}
.executive-summary .section-heading { margin: 0; }
.executive-reading { color: var(--ink) !important; font-family: Georgia, "Times New Roman", serif; font-size: 1.18rem; line-height: 1.35; }

.exchange-panel {
  padding: 22px;
  background: linear-gradient(135deg, #122018 0%, #193426 100%);
  color: #fff;
  border-color: #254b35;
}

.exchange-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.exchange-heading p,
.exchange-footer span { color: #c8d5cb; }

.exchange-values {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 12px;
}

.exchange-quote,
.exchange-gap {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  display: grid;
  gap: 4px;
}

.exchange-gap { background: #e8f4eb; color: var(--brand-dark); }
.exchange-quote span,
.exchange-gap span { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.exchange-quote strong,
.exchange-gap strong { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1; }
.exchange-quote small { color: #c8d5cb; }
.exchange-gap small { color: var(--muted); }

.gap-history { margin-top: 16px; display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; }
.gap-history h3 { margin: 0 0 4px; }
.gap-history p { margin: 0; color: #c8d5cb; font-size: .9rem; }
.gap-chart { min-height: 110px; }
.gap-chart svg { width: 100%; height: 80px; overflow: visible; }
.chart-axis { stroke: rgba(255,255,255,.18); stroke-width: .5; }
.chart-line { fill: none; stroke: #82c58c; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-dot { fill: #fff; stroke: #287a3e; stroke-width: .7; vector-effect: non-scaling-stroke; }
.chart-labels { display: flex; justify-content: space-between; color: #c8d5cb; font-size: .78rem; }
.chart-labels strong { color: #fff; font-size: .95rem; }
.chart-empty { padding: 30px; text-align: center; color: #c8d5cb; border: 1px dashed rgba(255,255,255,.2); border-radius: var(--radius); }
.exchange-footer { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .82rem; }
.exchange-footer a { color: #b9e4c0; }

.summary-grid,
.indicator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

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

.dashboard-section,
.alerts-section,
.methodology,
.data-state,
.admin-section,
.status-card {
  padding: 20px;
}

.summary-card,
.indicator-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  min-height: 188px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.summary-card {
  background: #f7faf7;
  border-color: #cfe5d3;
}

.indicator-card {
  background: var(--surface);
}

.expandable-card { padding: 0; display: block; height: 100%; }
.expandable-card[open] { display: grid; grid-template-rows: auto 1fr; }
.expandable-card > summary { list-style: none; cursor: pointer; min-height: 186px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.expandable-card > summary::-webkit-details-marker { display: none; }
.expand-hint { color: var(--brand); font-size: .72rem; font-weight: 800; }
.expand-hint::after { content: " +"; }
.expandable-card[open] .expand-hint::after { content: " −"; }
.indicator-detail { border-top: 1px solid var(--line); padding: 14px 16px 16px; display: flex; flex: 1; flex-direction: column; gap: 12px; background: #fafbf9; }
.indicator-detail h4 { margin: 0 0 3px; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.indicator-detail p { margin: 0; font-size: .86rem; color: var(--ink); }
.indicator-detail > a { font-size: .78rem; margin-top: auto; }
.source-line { overflow-wrap: anywhere; }
.source-line.compact { white-space: nowrap; }
.source-line a { display: inline; }
.metric small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.agreement-links, .report-error { font-size: .78rem; }
.report-error { margin-top: auto; }
.agreement-percent { color: var(--brand); }
.agreement-card { min-height: 440px; }
.agreement-main h3 { min-height: 4.4em; }
.agreement-main .agreement-percent { min-height: 1em; }
.salary-reference { margin: 8px 0 0; padding: 9px 10px; min-height: 92px; border-radius: 10px; background: #f5f7f4; border: 1px solid var(--line); }
.salary-reference span, .salary-reference small { display: block; color: var(--muted); font-size: .66rem; line-height: 1.35; }
.salary-reference strong { display: block; margin: 3px 0 1px; font-size: 1.02rem; font-weight: 750; color: var(--ink); letter-spacing: -.025em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.agreement-state { min-height: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.status-note { color: var(--warn); font-size: .72rem; font-weight: 750; }
.review-dot::after { content: " •"; color: var(--warn); font-size: 1rem; line-height: .5; }
.agreement-detail { border-top: 1px solid var(--line); padding-top: 9px; }
.agreement-detail summary { cursor: pointer; color: var(--brand); font-size: .76rem; font-weight: 800; }
.agreement-detail .card-meta { margin-top: 8px; display: grid; gap: 4px; }
.agreement-detail .card-meta p { font-size: .76rem; }
.mini-history svg { width: 100%; height: 72px; overflow: visible; }
.mini-history polyline { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mini-history > div { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .68rem; }
.mini-history strong { color: var(--ink); font-size: .8rem; }
.history-empty { padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); }

.summary-card h3,
.indicator-card h3 {
  margin: 0;
  font-size: .78rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .08em;
}

.metric {
  margin: 8px 0 0;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.metric.money { font-size: clamp(1.35rem, 2.2vw, 1.75rem); white-space: nowrap; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

.metric small {
  font-size: .95rem;
  color: var(--muted);
}

.card-meta p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #e8f4eb;
  color: var(--brand);
}

.badge.review {
  background: #fff4db;
  color: var(--warn);
}
.badge.conflict { background: #fff4db; color: var(--warn); }
.badge.no-agreement { background: #fde8e5; color: var(--danger); }
.badge.not-located { background: #edf0ed; color: #626a65; }
.badge.current { background: #e8f4eb; color: var(--brand); }

.trend { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 800; color: var(--muted); }
.trend b { font-size: 1rem; line-height: 1; }
.trend.up { color: #287a3e; }
.trend.down { color: #a45124; }
.trend.neutral { color: var(--muted); }

.alert-list {
  display: grid;
  gap: 10px;
}

.alert-card {
  border-left: 3px solid var(--info);
  background: #f5f8fb;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}

.alert-card.warning {
  border-left-color: var(--warn);
  background: #fff9ec;
}

.alert-card.critical {
  border-left-color: var(--danger);
  background: #fff2f0;
}

.alert-card span {
  color: var(--muted);
}

.agenda-list,
.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agenda-item,
.method-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.agenda-item {
  display: grid;
  gap: 3px;
}

.agenda-item time {
  font-weight: 800;
  color: var(--brand);
}

.agenda-item span,
.method-grid p,
.data-state li {
  color: var(--muted);
}

.method-grid h3 {
  margin: 0 0 6px;
}

.methodology { padding: 14px 16px; background: #f8f9f7; box-shadow: none; }
.methodology .section-heading { margin-bottom: 10px; }
.methodology .section-heading h2 { font-size: 1.05rem; }
.methodology .section-heading p { font-size: .8rem; }
.methodology .method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; }
.methodology .method-grid article { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 9px 0; }
.methodology .method-grid h3 { font-size: .78rem; margin-bottom: 3px; }
.methodology .method-grid p { margin: 0 0 3px; font-size: .72rem; line-height: 1.3; }
.methodology .method-grid a { font-size: .72rem; font-weight: 700; }

.freshness-note { display:block; color:#747b76; font-size:.72rem; font-weight:600; line-height:1.3; }
.country-risk-panel { padding:18px 20px; background:#f7f9f7; border:1px solid var(--line); box-shadow:none; }
.risk-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 22px; align-items:center; }
.risk-summary h2,.risk-summary p { margin:0; }
.risk-summary>strong { font-size:2rem; color:var(--brand); font-variant-numeric:tabular-nums; }
.country-risk-panel details { margin-top:12px; border-top:1px solid var(--line); padding-top:10px; }
.government-legend { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:10px 0; }
.government-legend span { border-left:2px solid var(--brand); padding-left:8px; display:grid; }
.government-legend small { color:var(--muted); }
.source-line a,.card-meta a { font-size:.78rem; line-height:1.25; }
.more-data-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.more-data-grid .indicator-card,.extra-indicators .indicator-card { min-height: 220px; }
@media(max-width:700px){.government-legend{grid-template-columns:repeat(2,minmax(0,1fr))}.risk-summary{grid-template-columns:1fr}.risk-summary>strong{font-size:1.75rem}}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, .7fr));
  gap: 10px;
  align-items: center;
}

.admin-row strong {
  display: block;
}

.admin-row span {
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 1020px) {
  .summary-grid,
  .indicator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-header { grid-template-columns: 1fr auto; }
  .site-header > p { grid-column: 1 / -1; grid-row: 2; }
  .more-data-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .site-header {
    padding: 30px 18px 24px;
    grid-template-columns: 1fr;
  }

  main {
    width: min(100% - 24px, 1120px);
    margin-top: 18px;
  }

  .summary-grid,
  .indicator-grid,
  .exchange-values,
  .gap-history,
  .method-grid,
  .agenda-list,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .executive-summary,
  .exchange-panel,
  .dashboard-section,
  .alerts-section,
  .methodology {
    padding: 16px;
  }

  .metric {
    font-size: 1.75rem;
  }
  .metric.money { font-size: 1.35rem; }
  .more-data-grid { grid-template-columns: 1fr; }
}
