/* vaalilupaus.fi — Tyylit */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Inter itse hostattuna: ei pyyntöjä Googlelle → kävijän IP ei siirry kolmannelle osapuolelle */
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

:root {
  --bg: #f4f6fb;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-light: #dbeafe;
  --primary-mid: #3b82f6;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 0 rgba(15,23,42,0.08);
  --shadow: 0 2px 0 rgba(15,23,42,0.1);
  --shadow-hover: 0 3px 0 rgba(15,23,42,0.14);
  --shadow-blue: 0 2px 0 rgba(29,78,216,0.3);
  --radius: 0px;
  --radius-sm: 0px;
  --radius-xs: 0px;
  --max-width: 1200px;
  --transition: 0.18s ease;

  /* Puoluevärit */
  --sdp: #E11931;
  --kok: #006288;
  --ps: #D4A000;
  --kesk: #00A651;
  --vihr: #4CAF50;
  --vas: #CC0000;
  --rkp: #D4A000;
  --kd: #1C408A;
  --liik: #00B7E1;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === HEADER === */
.site-header {
  background: #0f172a;
  color: white;
  padding: 2.5rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  border-bottom: 3px solid var(--primary);
}

.site-header::before {
  display: none;
}

.site-header::after {
  display: none;
}

.header-inner {
  position: relative;
  z-index: 1;
}

.site-header h1 {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.site-header h1 .accent {
  color: #fbbf24;
}

/* Logo: puhekupla + valintamerkki — "luvattu ja lunastettu" */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
}

.logo-mark {
  display: block;
  width: 1.2em;
  height: 1.2em;
  flex: 0 0 auto;
}

.logo-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Puolueraita: kaikki yhdeksän puoluetta samalla viivalla */
.logo-stripe {
  display: flex;
  width: 100%;
  max-width: 360px;
  height: 5px;
  margin: 0 auto 0.85rem;
}

.logo-stripe i {
  flex: 1;
}

.site-header .tagline {
  font-size: 1.1rem;
  opacity: 0.85;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.header-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.header-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.header-updated {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  z-index: 2;
  margin: 0;
}

.header-updated span {
  display: inline-block;
  padding: 1px 4px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 8px;
  line-height: 1.4;
  font-weight: 400;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.02em;
  cursor: default;
}

/* === VIEW TOGGLE === */
.view-toggle {
  display: flex;
  gap: 2px;
  margin-bottom: 1.25rem;
  background: var(--border);
  border: 1px solid var(--border);
  width: fit-content;
}

.view-btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  letter-spacing: -0.01em;
}

.view-btn.active {
  background: var(--primary);
  color: #fff;
}

.view-btn:not(.active):hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* === PARTIES HERO === */
.parties-hero {
  margin-bottom: 1.75rem;
}
.parties-hero-title {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}
.parties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 0.75rem;
}
.party-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.05rem 2.6rem 1.05rem 1.1rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: inherit;
  text-align: left;
}

.party-card .spine {
  width: 20px;
}

.party-card .spine span {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
}

.party-card:hover {
  background: #fafcff;
}

.party-card:hover .spine {
  width: 28px;
}

.party-card.active {
  border-color: var(--party-color, var(--primary));
  box-shadow: inset 0 0 0 1px var(--party-color, var(--primary));
}

.party-card.active .spine {
  width: 28px;
}
.party-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--text);
}
.party-card-counts {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.party-card-breakdown {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.party-card-counts strong {
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 600px) {
  .parties-grid { grid-template-columns: repeat(auto-fill, minmax(min(165px, 100%), 1fr)); }

  .party-card { padding: 0.9rem 2.2rem 0.9rem 0.9rem; }
}

/* === STATS NÄKYMÄ === */
.stats-section {
  margin-bottom: 2rem;
}

.stats-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.stats-cell {
  background: var(--bg-card);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stats-cell-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stats-cell-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.stats-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* === PUOLUEKOHTAISET KORTIT === */
.party-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.party-stat-card {
  background: var(--bg-card);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.party-stat-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.party-stat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.party-stat-total {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.party-stack-bar {
  display: flex;
  height: 8px;
  background: var(--border);
  overflow: hidden;
  gap: 1px;
}

.party-stack-segment {
  height: 100%;
  min-width: 2px;
  transition: width 0.3s ease;
}

.party-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.party-status-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.party-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.party-status-label {
  flex: 1;
  color: var(--text-secondary);
}

.party-status-count {
  font-weight: 700;
  color: var(--text);
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 36px;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  background: var(--border);
  height: 18px;
}

.bar-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.4s ease;
}

.bar-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
}

/* === MAIN === */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* === STATS === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 1.5rem;
  margin-top: 0;
  background: var(--border);
  border: 1px solid var(--border);
}

.stat-card {
  background: var(--bg-card);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: background var(--transition);
}

.stat-card:hover {
  background: #f8faff;
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  display: block;
  line-height: 1;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* === LEGAL BANNER === */
.legal-banner {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #0c4a6e;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.legal-banner .banner-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.legal-banner strong {
  font-weight: 700;
  color: #0369a1;
}

/* === FILTERS === */
.filters-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.search-box {
  position: relative;
  margin-bottom: 1.1rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg);
  color: var(--text);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.08);
  background: white;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.filter-group {
  margin-bottom: 0.85rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  min-width: 48px;
}

.filter-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  color: var(--text-secondary);
  line-height: 1.4;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-blue);
}

.chip[data-party] {
  position: relative;
  padding-left: 1.65rem;
}

.chip[data-party]::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.chip[data-party="sdp"]::before { background: var(--sdp); }
.chip[data-party="kok"]::before { background: var(--kok); }
.chip[data-party="ps"]::before  { background: var(--ps); }
.chip[data-party="kesk"]::before { background: var(--kesk); }
.chip[data-party="vihr"]::before { background: var(--vihr); }
.chip[data-party="vas"]::before  { background: var(--vas); }
.chip[data-party="rkp"]::before  { background: var(--rkp); }
.chip[data-party="kd"]::before   { background: var(--kd); }
.chip[data-party="liik"]::before { background: var(--liik); }

/* === RESULTS TOOLBAR === */
.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.results-count-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.results-count-text strong {
  color: var(--text);
  font-weight: 700;
}

.sort-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-select {
  padding: 0.35rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition);
  font-weight: 500;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* === PROMISES LIST === */
.promises-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.promise-card {
  background: var(--bg-card);
  padding: 1.25rem 3.1rem 1.25rem 1.4rem;
  border: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

/* Puolueväri kortin oikeassa reunassa "kirjan selkämyksenä" — lupaus- ja puoluekortit */
.spine {
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  width: 26px;
  background: var(--party-color, var(--border-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width var(--transition);
}

.spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}

/* Vaaleilla puolueväreillä valkoinen teksti ei erotu — tumma muste tilalle */
[data-party="ps"] .spine span,
[data-party="rkp"] .spine span,
[data-party="liik"] .spine span,
[data-party="vihr"] .spine span,
[data-party="kesk"] .spine span {
  color: #0f172a;
}

.promise-card:hover {
  background: #fafcff;
}

.promise-card:hover .spine {
  width: 32px;
}



.promise-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.promise-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
}

.promise-category {
  font-size: 0.72rem;
  padding: 0.22rem 0.65rem;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.promise-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

/* Poliitikko-linkki kortissa */
.promise-meta .politician-link {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  padding: 0;
  transition: color var(--transition);
}

.promise-meta .politician-link:hover {
  color: var(--primary);
}

.promise-party-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem 0.18rem 0.4rem;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.promise-party-badge i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
}

.promise-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.promise-details {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.65rem;
}

.promise-source {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.promise-source a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.promise-source a:hover {
  text-decoration: underline;
}

.promise-tags {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.68rem;
  padding: 0.18rem 0.55rem;
  background: var(--bg);
  border-radius: 20px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 500;
}

/* === STATUS BADGE === */
.promise-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.promise-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-lupaus {
  background: #dbeafe;
  color: #1e40af;
}
.status-lupaus::before { background: #3b82f6; }

.status-toteutunut {
  background: #dcfce7;
  color: #166534;
}
.status-toteutunut::before { background: #22c55e; }

.status-rikottu {
  background: #fee2e2;
  color: #991b1b;
}
.status-rikottu::before { background: #ef4444; }

.status-kesken {
  background: #fef3c7;
  color: #92400e;
}
.status-kesken::before { background: #f59e0b; }

/* === ELECTION BADGE === */
.promise-election {
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid var(--border);
  font-weight: 500;
}

/* === LEVEL BADGE (henkilö / puolue) === */
.promise-level {
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.promise-level--henkilo {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.promise-level--puolue {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* === NO RESULTS === */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.no-results .emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
}

.no-results h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1.15rem;
}

.no-results p {
  font-size: 0.9rem;
}

/* === INFO SECTION === */
.info-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-top: 2.5rem;
  border: 1px solid var(--border);
}

.info-section h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.info-card {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
}

.info-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.info-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* === FOOTER === */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  line-height: 1.7;
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* === MODAL === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(15,23,42,0.3), 0 0 0 1px rgba(255,255,255,0.05);
  animation: modalIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-dialog--wide {
  max-width: 760px;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.modal-close-btn {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-weight: 400;
}

.modal-close-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* Promise detail modal */
.modal-promise-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.modal-promise-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  padding-right: 2.5rem;
  letter-spacing: -0.02em;
}

.modal-politician-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.politician-link {
  background: none;
  border: none;
  padding: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
}

.politician-link:hover {
  color: var(--primary-dark);
}

.modal-category-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.modal-details-text {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.modal-source-box {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.modal-source-box a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.modal-source-box a:hover {
  text-decoration: underline;
}

/* Politician profile modal */
.pol-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-right: 2.5rem;
}

.pol-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-blue);
}

.pol-info h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.pol-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.pol-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.pol-promises-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pol-promise-item {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
}

.pol-promise-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  background: #fafcff;
}

.pol-promise-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.pol-promise-text {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.pol-promise-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.pol-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* === LOADING === */
.loading {
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .site-header {
    padding: 2.5rem 1rem 3.5rem;
  }

  .site-header h1 {
    font-size: 2rem;
  }

  .site-header .tagline {
    font-size: 0.95rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: -1rem;
  }

  .stat-card .stat-number {
    font-size: 1.6rem;
  }

  .promise-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-content {
    padding: 1rem 1rem 2.5rem;
  }

  .info-section {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 2rem 1rem 3rem;
  }

  .site-header h1 {
    font-size: 1.65rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .promise-card {
    padding: 1rem 2.4rem 1rem 1.1rem;
  }

  .spine {
    width: 20px;
  }

  .modal-dialog {
    padding: 1.5rem;
    max-height: 95vh;
  }
}

/* === Puolueohjelmat-näkymä === */
.prog-election-section {
  margin-bottom: 2.5rem;
}

.prog-election-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.prog-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.prog-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prog-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.prog-party-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.prog-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.prog-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.prog-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.prog-role {
  font-size: 0.72rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--text-secondary);
  text-align: right;
}

.prog-source-link {
  font-size: 0.72rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.prog-source-link:hover {
  text-decoration: underline;
}

.prog-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.78rem;
}

.prog-status-chip {
  font-weight: 600;
}

.prog-total {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.prog-details {
  margin-top: 0.25rem;
}

.prog-details summary {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  padding: 0.3rem 0;
  list-style: none;
  user-select: none;
}

.prog-details summary::-webkit-details-marker { display: none; }
.prog-details summary::before { content: '▶ '; font-size: 0.65rem; }
.prog-details[open] summary::before { content: '▼ '; }

.prog-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.prog-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.prog-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.prog-item-promise {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.prog-item-source {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--primary);
  text-decoration: none;
}
.prog-item-source:hover {
  text-decoration: underline;
}
.prog-item-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .prog-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* === Vinkkaa lupaus === */
.tip-title { margin: 0 0 8px; font-size: 1.25rem; }
.tip-intro {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.tip-form { display: flex; flex-direction: column; gap: 12px; }
.tip-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.tip-form input,
.tip-form textarea {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.tip-form input:focus,
.tip-form textarea:focus { outline: 2px solid var(--primary-mid); outline-offset: -1px; }
.tip-req { color: #dc2626; }
.tip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tip-btn-primary,
.tip-btn-secondary {
  padding: 9px 16px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.tip-btn-primary {
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary-dark);
}
.tip-btn-primary:hover { background: var(--primary-dark); }
.tip-btn-secondary {
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
}
.tip-btn-secondary:hover { background: var(--bg); }
.tip-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* === Pikatoiminnot (view-togglen alla) === */
.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.5rem 0 1.5rem;
}

.top-action {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.top-action:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.top-action--primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary-dark);
}

.top-action--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}

/* === Näytä lisää === */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.load-more-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--primary);
  cursor: pointer;
  transition: background var(--transition);
}

.load-more-btn:hover {
  background: var(--primary-light);
}

.load-more-rest {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* === Vinkkaa lupaus -CTA (hakulaatikon yläpuolella) === */
.tip-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.4rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-mid);
  text-align: center;
}

.tip-cta-btn {
  padding: 0.85rem 2.25rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary-dark);
  box-shadow: var(--shadow-blue);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.tip-cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.tip-cta-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 42ch;
}

@media (max-width: 600px) {
  .tip-cta-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }
}

/* Sisarsivuston ristiinlinkitys footerissa */
.footer-sister {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border-strong);
  font-size: 0.8rem;
}

.footer-sister a {
  font-weight: 700;
}

.footer-contact {
  margin-top: 0.6rem;
}

.footer-contact .js-email a {
  font-weight: 600;
}

/* === Kehitysehdotus-widget (kiinteä, oikea alakulma) === */
.feedback-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 900; /* modaalien (1000) alle */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.feedback-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(15,23,42,0.08);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.feedback-toggle:hover,
.feedback-widget.open .feedback-toggle {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: #fff;
}

.feedback-toggle-icon {
  font-size: 0.72rem;
  line-height: 1;
}

.feedback-panel {
  width: 300px;
  border-radius: 8px;
  max-width: calc(100vw - 2rem);
  padding: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 0 rgba(15,23,42,0.12);
  order: -1; /* paneeli napin yläpuolelle */
}

.feedback-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.feedback-close {
  padding: 0 0.25rem;
  font-family: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.feedback-close:hover { color: var(--text); }

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.feedback-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.feedback-form textarea,
.feedback-form input[type="email"],
.feedback-form input[type="text"] {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text);
  padding: 6px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
}

.feedback-form textarea:focus,
.feedback-form input:focus {
  outline: 2px solid var(--primary-mid);
  outline-offset: -1px;
}

.feedback-note {
  margin: 0 0 0.6rem;
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.feedback-check {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.feedback-check input {
  width: 56px;
}

/* Hunajapurkki piiloon ihmisiltä, ei display:none jotta botti täyttää sen */
.feedback-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback-send {
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary-dark);
  cursor: pointer;
}

.feedback-send:hover { background: var(--primary-dark); }

.feedback-status {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .feedback-widget {
    right: 0.6rem;
    bottom: 0.6rem;
  }

  .feedback-toggle-label {
    display: none; /* mobiilissa pelkkä kynäikoni, ei peitä sisältöä */
  }

  .feedback-widget.open .feedback-toggle-label {
    display: inline;
  }

  .feedback-toggle {
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
  }
}

/* === Toimenpiteiden aikajana (lupauksen modaalissa) === */
.promise-actions-count {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  color: var(--primary-dark);
  border: 1px solid var(--primary-mid);
  background: var(--primary-light);
}

.timeline {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.timeline-heading {
  margin-bottom: 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.timeline-list {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  border-left: 2px solid var(--border-strong);
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 0 0.9rem 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  background: var(--primary);
}

.timeline-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-type {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.timeline-title {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.timeline-source {
  font-size: 0.72rem;
  color: var(--primary);
  text-decoration: none;
}

.timeline-source:hover { text-decoration: underline; }

.timeline-empty {
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timeline-tip-btn {
  padding: 0.45rem 0.8rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--bg-card);
  border: 1px dashed var(--primary-mid);
  cursor: pointer;
}

.timeline-tip-btn:hover { background: var(--primary-light); }
