/* methodology.css — self-sufficient stylesheet for regions/methodology.html
   (does not depend on assets/css/site.css, which is owned by a parallel agent) */

:root { color-scheme: dark; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0b0b0f;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: #8ab4ff; }
a:hover { color: #b7cdff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  background: rgba(11, 11, 15, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #232330;
}

.site-header .brand {
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #eee;
  text-decoration: none;
}

.site-header nav { display: flex; gap: 1.25rem; font-size: 0.92rem; }
.site-header nav a { color: #b9b9c6; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: #eee; }
.site-header nav a[aria-current="page"] { border-bottom: 1px solid #8ab4ff; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.page-intro h1 {
  font-size: 1.9rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.page-intro .tagline {
  color: #9a9aa8;
  margin: 0 0 2.5rem;
  font-size: 1.02rem;
}

.toc {
  background: #131318;
  border: 1px solid #232330;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  font-size: 0.92rem;
}
.toc h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8a8a99; margin: 0 0 0.6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 1.5rem; }
.toc li { margin-bottom: 0.3rem; break-inside: avoid; }

section.methodology-section {
  margin-bottom: 3.2rem;
  scroll-margin-top: 4.5rem;
}

section.methodology-section > h2 {
  font-size: 1.35rem;
  font-weight: 600;
  border-bottom: 1px solid #232330;
  padding-bottom: 0.5rem;
  margin-bottom: 1.1rem;
}

section.methodology-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.6rem 0 0.5rem;
  color: #f0f0f5;
}

p { color: #d3d3dc; }
ul, ol { color: #d3d3dc; }
li { margin-bottom: 0.35rem; }

strong { color: #f2f2f7; }

.note-block, .verdict-block, .limitation-block {
  background: #131318;
  border: 1px solid #232330;
  border-left: 3px solid #4a4a63;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 0.9rem 0 1.3rem;
}

.verdict-block { border-left-color: #5c8a5c; }
.verdict-block .verdict-label {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fce8f;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.limitation-block { border-left-color: #ceac6a; }

.challenge-item {
  margin-bottom: 1.8rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1c1c24;
}
.challenge-item:last-child { border-bottom: none; }
.challenge-item h3 { margin-top: 0; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.4rem;
  letter-spacing: 0.03em;
}
.tag-a { background: #1d3a2e; color: #7fd9a3; }
.tag-b { background: #22304a; color: #8ab4ff; }
.tag-c { background: #3a2f1d; color: #d9b97f; }
.tag-warn { background: #402424; color: #ff9d9d; }

.autarky-dims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem 1rem;
  margin: 0.8rem 0 1.2rem;
  padding: 0;
  list-style: none;
}
.autarky-dims li {
  background: #131318;
  border: 1px solid #232330;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  margin: 0;
}
.autarky-dims li.out-of-scope { opacity: 0.55; text-decoration: line-through; }

/* Visually-hidden but screen-reader-accessible labels */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* NUTS-1 comparison table */
.table-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.table-controls input[type="search"] {
  background: #131318;
  border: 1px solid #2c2c3a;
  color: #eee;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  min-width: 220px;
}
.table-controls .row-count { color: #8a8a99; font-size: 0.85rem; }

.table-scroll {
  overflow-x: auto;
  border: 1px solid #232330;
  border-radius: 8px;
  margin-bottom: 1rem;
}

table.nuts1-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 640px;
}
table.nuts1-table caption { caption-side: top; text-align: left; padding: 0.5rem 0.75rem; color: #8a8a99; font-size: 0.8rem; }
table.nuts1-table th, table.nuts1-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #1c1c24;
  vertical-align: top;
}
table.nuts1-table thead th {
  background: #16161d;
  position: sticky;
  top: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9a9aa8;
}
table.nuts1-table tbody tr:hover { background: #14141a; }
table.nuts1-table td.region-cell { color: #f0f0f5; font-weight: 500; white-space: nowrap; }
table.nuts1-table td.nuts1-cell code { color: #8ab4ff; background: #131a26; padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.82rem; }
table.nuts1-table td.disagreement-cell { color: #c7c7d1; min-width: 320px; }
table.nuts1-table td.none-cell { color: #6f6f7d; font-style: italic; }

.summary-paragraph {
  background: #12161f;
  border: 1px solid #202a3a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.1rem 0 1.6rem;
  font-size: 0.92rem;
}

.sources-list { list-style: none; padding: 0; margin: 0; }
.sources-list li { padding: 0.35rem 0; border-bottom: 1px solid #1c1c24; }
.sources-list li:last-child { border-bottom: none; }

footer.site-footer {
  text-align: center;
  color: #6f6f7d;
  font-size: 0.82rem;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid #1c1c24;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 640px) {
  .toc ol { columns: 1; }
  main { padding: 1.5rem 1rem 4rem; }
}

/* ---- v0.1.2 additions ---------------------------------------------- */

/* Priority axes ordered list (section 2) */
.priority-axes-list {
  padding-left: 1.4rem;
  margin: 0.8rem 0 1.2rem;
}
.priority-axes-list li { margin-bottom: 0.7rem; }
.priority-axes-list li:first-child {
  color: #f0f0f5;
}

/* Live stat strip (sections 3 & 13) */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.stat-box {
  background: #131318;
  border: 1px solid #232330;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #8ab4ff;
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: #9a9aa8;
  margin-top: 0.2rem;
}
.stat-label .target-note { color: #6f6f7d; }

.live-stat-caveat {
  font-size: 0.85rem;
  color: #8a8a99;
  font-style: italic;
  margin: 0 0 1.3rem;
}

/* v0.1.2 update callout on the (f) push-back challenge */
.verdict-block.v012-update {
  border-left-color: #8ab4ff;
  background: #12161f;
}
.verdict-block.v012-update .verdict-label { color: #8ab4ff; }

/* Parliament exceptions + Pomerania fit + grouping-rebalance tables reuse the NUTS-1 table look */
table.parliament-exceptions-table,
table.pomerania-fit-table,
table.grouping-rebalance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 560px;
}
table.parliament-exceptions-table caption,
table.pomerania-fit-table caption,
table.grouping-rebalance-table caption {
  caption-side: top;
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: #8a8a99;
  font-size: 0.8rem;
}
table.parliament-exceptions-table th,
table.parliament-exceptions-table td,
table.pomerania-fit-table th,
table.pomerania-fit-table td,
table.grouping-rebalance-table th,
table.grouping-rebalance-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #1c1c24;
  vertical-align: top;
}
table.parliament-exceptions-table thead th,
table.pomerania-fit-table thead th,
table.grouping-rebalance-table thead th {
  background: #16161d;
  position: sticky;
  top: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9a9aa8;
}
table.parliament-exceptions-table tbody tr:hover,
table.pomerania-fit-table tbody tr:hover,
table.grouping-rebalance-table tbody tr:hover { background: #14141a; }
table.grouping-rebalance-table td:nth-child(2),
table.grouping-rebalance-table td:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.parliament-exceptions-table td.region-cell {
  color: #f0f0f5;
  font-weight: 500;
  white-space: nowrap;
}
table.parliament-exceptions-table td.region-cell code {
  color: #8ab4ff;
  background: #131a26;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 400;
}
table.parliament-exceptions-table td.disagreement-cell { color: #c7c7d1; min-width: 280px; }

table.pomerania-fit-table td.fit-strong { color: #7fd9a3; font-weight: 600; }
table.pomerania-fit-table td.fit-weak { color: #d9b97f; font-weight: 600; }
table.pomerania-fit-table td.fit-weakest { color: #ff9d9d; font-weight: 600; }

.variant-notes-list, .changelog-list {
  padding-left: 1.4rem;
  margin: 0.8rem 0 1.2rem;
}
.variant-notes-list li, .changelog-list li { margin-bottom: 0.7rem; }

.source-note {
  font-size: 0.85rem;
  color: #8a8a99;
  margin-top: -0.4rem;
}
