/* Purpose: paper-themed styling for the regulatory-tax report — a single scrolling column of
   prose and Chart.js cards, mobile-friendly down to ~320px. */

:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ink: #1d2a33;
  --ink-soft: #5c6a73;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --line: #e3ddd0;
  --accent: #b5512b;
  --accent-build: #315c6b;
  --accent-land: #91712c;
  --maxw: 880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.report {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 72px;
}

/* Header */
.report-header { margin-bottom: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin: 0 0 20px; }
.home-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-decoration: none;
}
.home-link:hover { color: var(--accent); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3f7d52;
  background: rgba(63, 125, 82, 0.08);
  border: 1px solid rgba(63, 125, 82, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f7d52;
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 125, 82, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(63, 125, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 125, 82, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 8px;
}
.report-header h1 {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.12;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.lede {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--ink-soft);
  margin: 0;
  max-width: 60ch;
}
.lede-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 10px 0 0;
  max-width: 72ch;
}
.lede-note a { color: var(--accent); }

/* Deep-linkable section headings */
h2[id], h3[id] { scroll-margin-top: 24px; }
.hlink {
  margin-left: 8px;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0.3;
  transition: opacity 0.15s;
}
h2:hover .hlink, h3:hover .hlink, .hlink:focus { opacity: 1; color: var(--accent); }

/* Subsection headings inside a method card (e.g. "Tko ubire": zemljište / marže) */
.subhead {
  font-size: 1.08rem;
  margin: 30px 0 10px;
}

/* Prose / method card */
.prose h2 {
  font-size: 1.35rem;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.prose p { margin: 0 0 14px; }
.prose strong { font-weight: 650; }

.method-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  margin-bottom: 32px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 18px;
}
.method-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px 4px;
}
.method-item h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--accent);
}
.method-item p { font-size: 0.9rem; color: var(--ink-soft); }

.method-caveat {
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 0;
}

/* Status banner */
.status-banner {
  background: #fbe9e2;
  border: 1px solid #e9c4b6;
  color: #8a2e12;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 24px;
  font-size: 0.9rem;
}

/* Chart blocks */
.chart-block { margin: 0 0 40px; }
.chart-block-head { margin-bottom: 16px; }
.chart-block-head h2 {
  font-size: 1.3rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.chart-block-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 70ch;
}

.chart-frame {
  position: relative;
  height: 320px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.chart-frame.tall { height: 400px; }

.chart-readout {
  margin: 12px 2px 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.chart-readout strong { color: var(--accent); }

.chart-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.chart-card {
  background: transparent;
}
.chart-card-head { margin-bottom: 12px; }
.chart-card-head h3 { margin: 0 0 4px; font-size: 1.02rem; }
.chart-card-head p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }

/* Footer */
.report-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.report-footer h2 { font-size: 1.1rem; margin: 0 0 12px; }
.report-footer ul { margin: 0 0 16px; padding-left: 18px; }
.report-footer li { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 8px; }
.report-footer code {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 0.82em;
}
.footer-note { font-size: 0.88rem; color: var(--ink-soft); font-style: italic; }

/* City-comparison table */
.city-table { width: 100%; border-collapse: collapse; margin: 18px 0 14px; font-size: 0.86rem; }
.city-table th, .city-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.city-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); font-weight: 600; vertical-align: bottom; }
.city-table td:nth-child(2), .city-table td:nth-child(3), .city-table td:nth-child(4),
.city-table th:nth-child(2), .city-table th:nth-child(3), .city-table th:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.city-table td:nth-child(5), .city-table th:nth-child(5) { text-align: left; }
.city-table tr.grp td { background: var(--paper); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: 600; padding-top: 12px; }
.city-table tr.hi td { font-weight: 650; }
.city-table .t0 { color: #3f7d52; font-weight: 650; }
.city-table .t2 { color: #b5512b; font-weight: 650; }
.city-table .t3 { color: #a13a18; font-weight: 650; }
.city-table .t4 { color: #7a1f0a; font-weight: 700; }

/* Responsive */
@media (max-width: 720px) {
  .method-grid { grid-template-columns: 1fr; }
  .chart-duo { grid-template-columns: 1fr; }
  .chart-frame { height: 280px; }
  .chart-frame.tall { height: 340px; }
}

@media (max-width: 380px) {
  .report { padding: 24px 14px 56px; }
  .method-card { padding: 18px 16px; }
}
