@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=IBM+Plex+Sans:wght@300;400;500&display=swap');

:root {
  --bg: #fffaf8;
  --ink: #1a0800;
  --red: #c0392b;
  --orange: #e67e22;
  --amber: #f39c12;
  --warm-gray: #6b5b52;
  --light: #fdf0ec;
  --border: #ecd5cc;
  --card: #ffffff;
  --accent-strip: #c0392b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* Top warning strip */
.warning-strip {
  background: var(--red);
  color: #fff;
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 48px 24px 80px; }

/* Header */
.page-header { margin-bottom: 48px; }

.dept-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 16px;
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 800;
  line-height: 0.88;
  color: var(--ink);
  position: relative;
}

.h1-accent {
  color: var(--red);
  display: block;
  font-size: 0.45em;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.subtitle {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--warm-gray);
  max-width: 58ch;
  line-height: 1.75;
}

/* Debt meter */
.debt-meter {
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.debt-clock { font-family: 'Syne', sans-serif; }
.debt-clock-label { font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.debt-clock-num { font-size: 2.4rem; font-weight: 800; color: var(--amber); letter-spacing: -0.02em; }
.debt-clock-sub { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 4px; }

.debt-ratios { display: flex; gap: 28px; }
.ratio { text-align: center; }
.ratio-num { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 700; display: block; }
.ratio-label { font-size: 0.72rem; color: rgba(255,255,255,0.5); display: block; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }
.ratio.high .ratio-num { color: var(--red); }
.ratio.mid .ratio-num { color: var(--orange); }
.ratio.ok .ratio-num { color: #2ecc71; }

/* Section title */
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 5px solid var(--red);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  margin-bottom: 18px;
  transition: box-shadow 0.3s;
}

.card:hover { box-shadow: 0 6px 28px rgba(192,57,43,0.12); }

.card h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 12px;
}

.card p { color: var(--warm-gray); line-height: 1.75; font-size: 0.97rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }

.card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.card ul li { padding-left: 20px; position: relative; color: var(--warm-gray); font-size: 0.95rem; line-height: 1.6; }
.card ul li::before { content: '!'; position: absolute; left: 0; color: var(--red); font-weight: 700; font-size: 0.8rem; }

/* Country table */
.country-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.country-table th { text-align: left; padding: 10px 12px; background: var(--light); color: var(--warm-gray); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid var(--border); }
.country-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--ink); }
.country-table tr:last-child td { border-bottom: none; }
.pct { font-family: 'Syne', sans-serif; font-weight: 700; }
.pct.crit { color: var(--red); }
.pct.high { color: var(--orange); }
.pct.ok { color: #27ae60; }

.bar-row { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 1s ease; }
.bar-fill.crit { background: var(--red); }
.bar-fill.high { background: var(--orange); }
.bar-fill.ok { background: #27ae60; }

/* Tag list */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { background: var(--light); border: 1px solid var(--border); color: var(--red); padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; }

section { margin-bottom: 48px; }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .debt-meter { flex-direction: column; }
  .debt-ratios { flex-wrap: wrap; justify-content: center; }
}
