/* ═══════════════════════════════════════
   ekonomi.css — Ekonomisidan
   ═══════════════════════════════════════ */

/* ── Page hero ── */
.page-hero {
  padding: 5rem var(--gutter) 4rem;
  border-bottom: 1px solid var(--rule);
}
.page-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.page-hero h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  margin: 1rem 0 1.5rem;
}
.page-lead {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 56ch;
  line-height: 1.85;
  margin-bottom: 2.5rem;
}

/* ── Spectrum bar ── */
.spectrum-section {
  padding: 3.5rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-dark);
}
.spectrum-inner { max-width: var(--max-w); margin: 0 auto; }
.spectrum-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.spectrum-track {
  position: relative;
  padding-top: 1.6rem;
  margin-bottom: 1rem;
}
.spectrum-bar {
  height: 6px;
  background: linear-gradient(to right,
    #7a1f2a 0%,
    #a04020 18%,
    #c9973a 38%,
    #8b3a2a 55%,
    #5a6e4a 72%,
    #3f6f8f 88%,
    #2a3f6a 100%
  );
  border-radius: 3px;
}
.spectrum-endpoints {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.spectrum-dots {
  position: absolute;
  top: 1.6rem;
  left: 0;
  right: 0;
  height: 6px;
}
.spectrum-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--paper-dark);
  cursor: pointer;
  transition: transform 0.15s;
}
.spectrum-dot[data-tier="system"] { width: 15px; height: 15px; }
.spectrum-dot[data-tier="skola"] { width: 9px; height: 9px; }
.spectrum-dot:hover { transform: translate(-50%, -50%) scale(1.4); }
.spectrum-dot .spectrum-tip {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  padding: 0.3rem 0.6rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.spectrum-dot:hover .spectrum-tip { opacity: 1; }
.spectrum-sizekey {
  display: flex;
  gap: 1.6rem;
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.spectrum-sizekey span { display: flex; align-items: center; gap: 0.5rem; }
.spectrum-sizekey .sk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.spectrum-sizekey .sk-dot.small { width: 7px; height: 7px; }

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.filter-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.4rem;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Tier legend ── */
.tier-legend-section {
  padding: 3.5rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.tier-legend-inner { max-width: var(--max-w); margin: 0 auto; }
.tier-legend-inner h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 300;
  margin-bottom: 0.6rem;
}
.tier-legend-lead {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62ch;
  line-height: 1.75;
  margin-bottom: 1.8rem;
}
.tier-legend-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.tier-legend-card {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 1.3rem 1.5rem;
}
.tier-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.9rem;
}
.tier-chip.tier-system { background: var(--ink); color: var(--paper); }
.tier-chip.tier-skola { border: 1px solid var(--rule-dark); color: var(--muted); }
.tier-legend-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── Philosophy grid ── */
.library-section {
  padding: 4rem var(--gutter);
}
.library-inner { max-width: var(--max-w); margin: 0 auto; }
.tier-group { margin-bottom: 3rem; }
.tier-group:last-child { margin-bottom: 0; }
.tier-group.hidden { display: none; }
.tier-group-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}
.tier-group-head h3 {
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
}
.tier-group-count {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* ── Philosophy card ── */
.phil-card {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.phil-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26,24,20,0.1);
  border-color: var(--rule-dark);
}
.phil-card-accent {
  height: 4px;
  width: 100%;
}
.phil-card-body {
  padding: 1.6rem 1.8rem 1.8rem;
}
.phil-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
}
.phil-card-era {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.phil-card-tags {
  display: flex;
  gap: 0.4rem;
}
.phil-card-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--rule);
  color: var(--muted);
}
.phil-card-tag.tier-system { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.phil-card h2 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 300;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}
.phil-card-tagline {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  border-left: 2px solid var(--rule);
  padding-left: 0.8rem;
}
.phil-card-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}
.phil-pillar {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.45;
}
.phil-pillar::before {
  content: '—';
  font-family: var(--font-mono);
  color: var(--muted);
  flex-shrink: 0;
  font-size: 0.8rem;
  margin-top: 0.05rem;
}
.phil-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.phil-card-thinkers {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  max-width: 70%;
  line-height: 1.5;
}
.phil-card-cta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s;
}
.phil-card:hover .phil-card-cta { gap: 0.7rem; }

/* Hidden state */
.phil-card.hidden { display: none; }

/* ── Detail overlay ── */
.detail-panel {
  --detail-panel-width: 680px;
}

/* ── Detail panel content (dp-* — delad konvention med bibliotek/strategier/ideologikarta) ── */
.dp-header {
  padding: 0;
  overflow: hidden;
  position: relative;
}
.dp-accent-bar {
  height: 6px;
  background: var(--accent-color, var(--accent));
}
.dp-header-body {
  padding: 2.5rem 2.5rem 2rem;
  background: var(--ink);
  color: var(--paper);
}
.dp-era {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.45);
  display: block;
  margin-bottom: 0.8rem;
}
.dp-header-body h2 {
  font-size: 2.2rem;
  font-style: italic;
  color: var(--paper);
  margin-bottom: 0.6rem;
}
.dp-tagline {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(245,240,232,0.65);
  line-height: 1.6;
}

.dp-body {
  padding: 2.5rem;
}

.dp-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.dp-section:last-of-type { border-bottom: none; }

.dp-section h3 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
  font-weight: 400;
  font-style: normal;
}

.dp-section p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
}

.dp-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dp-list li {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.6;
}
.dp-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.15rem;
}

.dp-thinkers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dp-thinker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--rule);
  color: var(--muted);
}

.dp-tension {
  background: rgba(139,58,42,0.05);
  border-left: 3px solid var(--accent);
  padding: 1.2rem 1.5rem;
  border-bottom: none !important;
  border-radius: 0;
}
.dp-tension h3 { margin-bottom: 0.6rem; }

.dp-action {
  padding-top: 1rem;
}

/* ── Axis viz (positioneringen — unik för ekonomisidan) ── */
.axis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}
.axis-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.axis-item-label {
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.axis-track {
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  position: relative;
}
.axis-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s var(--ease-out);
}
.axis-value {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
  text-align: right;
}

/* ── Comparison table ── */
.compare-section {
  padding: 4rem var(--gutter);
  background: var(--paper-dark);
  border-top: 1px solid var(--rule);
}
.compare-inner { max-width: var(--max-w); margin: 0 auto; }
.compare-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  margin: 1rem 0 0.5rem;
}
.compare-lead {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 52ch;
}
.compare-table-wrap {
  overflow-x: auto;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare-table th {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule-dark);
  white-space: nowrap;
}
.compare-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.55;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .row-name {
  font-weight: 400;
  white-space: nowrap;
}
.compare-table .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.compare-table tr:hover td { background: var(--canvas); }
.compare-table tr.tier-divider td {
  background: var(--canvas);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.55rem 1rem;
}
.compare-table tr.tier-divider:hover td { background: var(--canvas); }

/* ── CTA section ── */
.compare-banner {
  background: var(--accent);
  color: var(--paper);
  padding: 4rem var(--gutter);
  text-align: center;
}
.compare-banner h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  color: var(--paper);
  margin: 0.8rem 0 0.8rem;
}
.compare-banner p {
  color: rgba(245,240,232,0.6);
  max-width: 46ch;
  margin: 0 auto 2rem;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .axis-grid { grid-template-columns: 1fr; }
  .compare-table { min-width: 600px; }
  .detail-panel { width: 100vw; }
  .tier-legend-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .philosophy-grid { grid-template-columns: 1fr; }
}
