/* =============================================
   RENTGURU.BIZ — "Протокол" (Inspection Protocol)
   Fonts: Russo One (display), Golos Text (body), Fira Code (data)
   ============================================= */

:root {
  --paper: #f7f5f0;
  --paper-alt: #efeade;
  --paper-dark: #e8e3d8;
  --ink: #1a1814;
  --ink-light: #4a4740;
  --border: #c9c4b8;
  --stamp-red: #c0392b;
  --stamp-green: #27ae60;
  --stamp-yellow: #d4a017;
  --ink-blue: #1e3a5f;
  --highlight: #fef3c7;
}

/* Grid paper background */
body {
  font-family: 'Golos Text', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23e0dbd0' stroke-width='.3'/%3E%3C/svg%3E");
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--ink-blue);
  color: #fff;
  padding: 0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  text-decoration: none;
}
.header-brand:hover { color: #fff; }
.header-seal {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255,255,255,.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Russo One', sans-serif;
  font-size: 18px;
  line-height: 1;
  position: relative;
  flex-shrink: 0;
}
.header-seal::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 50%;
}
.header-title {
  font-family: 'Russo One', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
}
.header-subtitle {
  font-size: 12px;
  opacity: .7;
  letter-spacing: 1px;
  font-weight: 500;
  margin-top: 2px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Nav tabs */
.header-nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.header-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  background: rgba(255,255,255,.08);
  border-radius: 6px 6px 0 0;
  transition: background .2s, color .2s;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
}
.header-nav a:hover,
.header-nav a.active {
  background: var(--paper);
  color: var(--ink);
}

/* Mobile burger */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #fff;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform .2s, opacity .2s;
}
.nav-burger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =============================================
   BREADCRUMBS
   ============================================= */
.breadcrumbs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--ink-light);
}
.breadcrumbs a {
  color: var(--ink-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.breadcrumbs a:hover { color: var(--ink-blue); }
.breadcrumbs .sep {
  margin: 0 6px;
  opacity: .4;
}

/* =============================================
   SECTION TITLES
   ============================================= */
.section-title {
  font-family: 'Russo One', sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--ink-light);
  padding: 0 24px;
  max-width: 1200px;
  margin: 40px auto 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-label {
  font-family: 'Russo One', sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =============================================
   HOMEPAGE — BUREAU HEADER / HERO
   ============================================= */
.bureau-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.bureau-main { flex: 1; }
.bureau-main h1 {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--ink-blue);
  line-height: 1.15;
  margin-bottom: 16px;
}
.bureau-main p {
  font-size: 17px;
  color: var(--ink-light);
  max-width: 560px;
  line-height: 1.7;
}
.bureau-stamp {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border: 4px solid var(--stamp-green);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
  position: relative;
  opacity: .85;
}
.bureau-stamp::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px solid var(--stamp-green);
  border-radius: 50%;
}
.bureau-stamp .stamp-text {
  font-family: 'Russo One', sans-serif;
  font-size: 13px;
  color: var(--stamp-green);
  letter-spacing: 2px;
  text-align: center;
}
.bureau-stamp .stamp-year {
  font-family: 'Fira Code', monospace;
  font-size: 24px;
  color: var(--stamp-green);
  font-weight: 600;
  margin: 4px 0;
}
.bureau-stamp .stamp-sub {
  font-size: 10px;
  color: var(--stamp-green);
  letter-spacing: 1.5px;
}

/* =============================================
   COUNTRIES GRID (HOMEPAGE)
   ============================================= */
.countries-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.country-card {
  display: block;
  background: var(--paper-alt);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 16px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}
.country-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ink-blue);
  opacity: 0;
  transition: opacity .2s;
}
.country-card:hover {
  border-color: var(--ink-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.country-card:hover::before { opacity: 1; }
.country-card .cc-number {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: var(--ink-light);
  margin-bottom: 6px;
}
.country-card .cc-name {
  font-family: 'Russo One', sans-serif;
  font-size: 16px;
  color: var(--ink-blue);
  margin-bottom: 8px;
}
.country-card .cc-meta {
  font-size: 12px;
  color: var(--ink-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.country-card .cc-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.country-card .cc-meta span::before {
  content: '';
  width: 6px; height: 6px;
  border: 1.5px solid var(--border);
  display: block;
  flex-shrink: 0;
}
.country-card .cc-region {
  position: absolute;
  top: 12px; right: 12px;
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  color: var(--border);
  letter-spacing: 1px;
}

/* =============================================
   PROTOCOLS LIST (HOMEPAGE + HUB)
   ============================================= */
.protocols-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.protocol-row,
.protocol-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ink-blue);
  padding: 20px 24px;
  border-radius: 0 2px 2px 0;
  transition: all .2s;
  text-decoration: none;
  color: var(--ink);
}
.protocol-row:hover,
.protocol-card:hover {
  border-left-color: var(--stamp-green);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.protocol-number,
.pc-number {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--ink-blue);
  font-weight: 600;
}
.protocol-date,
.pc-date {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 4px;
}
.pc-type {
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  color: var(--border);
  letter-spacing: 1px;
  margin-top: 6px;
  text-transform: uppercase;
}
.protocol-body h3,
.pc-body h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 4px;
}
.protocol-body p,
.pc-body p {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
}

/* Verdict badges */
.protocol-verdict,
.pc-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 2px;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}
.verdict-green,
.v-green {
  background: rgba(39,174,96,.1);
  color: var(--stamp-green);
  border: 1.5px solid var(--stamp-green);
}
.verdict-yellow,
.v-yellow {
  background: rgba(212,160,23,.1);
  color: var(--stamp-yellow);
  border: 1.5px solid var(--stamp-yellow);
}
.verdict-red,
.v-red {
  background: rgba(192,57,43,.1);
  color: var(--stamp-red);
  border: 1.5px solid var(--stamp-red);
}

/* =============================================
   QUICK ACCESS CARDS (HOMEPAGE)
   ============================================= */
.quick-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.quick-card {
  display: block;
  background: #fff;
  border: 1.5px dashed var(--border);
  padding: 24px;
  text-align: center;
  transition: all .2s;
  text-decoration: none;
  color: var(--ink);
}
.quick-card:hover {
  border-style: solid;
  border-color: var(--ink-blue);
  background: var(--highlight);
}
.quick-card h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 15px;
  color: var(--ink-blue);
  margin-bottom: 8px;
}
.quick-card p {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
}
.quick-card .qc-icon {
  font-family: 'Fira Code', monospace;
  font-size: 28px;
  color: var(--border);
  margin-bottom: 12px;
  display: block;
}

/* =============================================
   DOSSIER HEADER (COUNTRY HUB)
   ============================================= */
.dossier-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px 32px;
}
.dossier-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.dossier-number {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--ink-blue);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.dossier-title {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(28px, 4vw, 38px);
  color: var(--ink-blue);
  line-height: 1.15;
}
.dossier-stamp {
  flex-shrink: 0;
  padding: 12px 20px;
  border: 3px solid var(--stamp-green);
  transform: rotate(-4deg);
  font-family: 'Russo One', sans-serif;
  font-size: 14px;
  color: var(--stamp-green);
  letter-spacing: 2px;
  opacity: .75;
}

/* Fact sheet */
.fact-sheet {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  margin-bottom: 32px;
}
.fact-item {
  background: var(--paper);
  padding: 14px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex: 1 1 180px;
}
.fact-item:last-child {
  border-right: none;
}
.fact-label {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.fact-value {
  font-family: 'Golos Text', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* Dossier description */
.dossier-desc {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 40px;
}
.dossier-desc strong { color: var(--ink); font-weight: 600; }

/* Related dossiers */
.related {
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 0 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.related-card {
  display: block;
  background: var(--paper-alt);
  border: 1.5px solid var(--border);
  padding: 16px;
  transition: all .2s;
  text-decoration: none;
  color: var(--ink);
}
.related-card:hover {
  border-color: var(--ink-blue);
  transform: translateY(-2px);
}
.related-card .rc-num {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: var(--ink-light);
}
.related-card .rc-name {
  font-family: 'Russo One', sans-serif;
  font-size: 15px;
  color: var(--ink-blue);
  margin-top: 4px;
}
.related-card .rc-img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

/* =============================================
   ARTICLE LAYOUT (2-COLUMN)
   ============================================= */
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

/* Protocol header (article) */
.protocol-header {
  padding: 8px 0 24px;
  border-bottom: 2px solid var(--ink-blue);
  margin-bottom: 32px;
  position: relative;
}
.protocol-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.protocol-num {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--ink-blue);
  letter-spacing: 2px;
  font-weight: 600;
}
.protocol-date-label {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--ink-light);
}
.protocol-type {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  padding: 3px 10px;
  letter-spacing: 1px;
  color: var(--ink-light);
  text-transform: uppercase;
}
.protocol-title {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(24px, 3.5vw, 34px);
  color: var(--ink-blue);
  line-height: 1.2;
  margin-bottom: 12px;
}
.protocol-subtitle {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.6;
}

/* Verdict badge on article header */
.verdict-badge {
  position: absolute;
  top: 8px;
  right: 0;
  padding: 10px 20px;
  border: 3px solid var(--stamp-green);
  font-family: 'Russo One', sans-serif;
  font-size: 14px;
  color: var(--stamp-green);
  letter-spacing: 2px;
  transform: rotate(-3deg);
}
.verdict-badge.vb-yellow {
  border-color: var(--stamp-yellow);
  color: var(--stamp-yellow);
}
.verdict-badge.vb-red {
  border-color: var(--stamp-red);
  color: var(--stamp-red);
}

/* =============================================
   ARTICLE CONTENT (rendered markdown)
   ============================================= */
.article-content {
  padding-bottom: 48px;
}
.article-content h2 {
  font-family: 'Russo One', sans-serif;
  font-size: 22px;
  color: var(--ink-blue);
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-content h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 17px;
  color: var(--ink);
  margin: 24px 0 12px;
}
.article-content h4 {
  font-family: 'Russo One', sans-serif;
  font-size: 15px;
  color: var(--ink);
  margin: 20px 0 10px;
}
.article-content p {
  margin-bottom: 16px;
  line-height: 1.75;
  font-size: 16px;
}
.article-content strong {
  color: var(--ink);
  font-weight: 700;
}
.article-content a:not(.cta-button) {
  color: var(--ink-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.article-content a:not(.cta-button):hover {
  color: var(--stamp-green);
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

/* Blockquotes */
.article-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--ink-blue);
  background: var(--paper-alt);
  font-style: italic;
  color: var(--ink-light);
}
.article-content blockquote p { margin-bottom: 0; }

/* Code */
.article-content code {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  background: var(--paper-alt);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.article-content pre {
  margin: 24px 0;
  padding: 16px;
  background: var(--ink);
  color: var(--paper);
  overflow-x: auto;
  border-radius: 2px;
}
.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border: 2px solid var(--border);
}
.article-content thead { background: var(--ink-blue); color: #fff; }
.article-content th {
  font-family: 'Russo One', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 12px 16px;
  text-align: left;
  font-weight: 400;
}
.article-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-content tr:nth-child(even) { background: var(--paper-alt); }

/* Comparison table special classes */
.comparison-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; border: 2px solid var(--border); }
.comparison-table thead { background: var(--ink-blue); color: #fff; }
.comparison-table th { font-family: 'Russo One', sans-serif; font-size: 13px; letter-spacing: 1px; padding: 12px 16px; text-align: left; font-weight: 400; }
.comparison-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.comparison-table tr:nth-child(even) { background: var(--paper-alt); }
.comparison-table .param { font-weight: 600; font-size: 13px; color: var(--ink-light); }
.td-good { color: var(--stamp-green); font-weight: 600; }
.td-warn { color: var(--stamp-yellow); font-weight: 600; }
.td-bad { color: var(--stamp-red); font-weight: 600; }

/* Highlight */
.article-content mark {
  background: var(--highlight);
  padding: 2px 6px;
}

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
}
.article-content .full-bleed {
  width: 100%;
  margin: 32px 0;
}
.article-content .inline-figure {
  max-width: 80%;
  margin: 24px auto;
  display: block;
}

/* Pros/Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.pros, .cons {
  padding: 20px;
  border: 1.5px solid var(--border);
  background: var(--paper-alt);
}
.pros { border-left: 4px solid var(--stamp-green); }
.cons { border-left: 4px solid var(--stamp-red); }
.pros h4, .cons h4 {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.pros h4 { color: var(--stamp-green); }
.cons h4 { color: var(--stamp-red); }
.pros li, .cons li {
  list-style: none;
  font-size: 14px;
  padding: 6px 0 6px 24px;
  position: relative;
  line-height: 1.5;
}
.pros li::before {
  content: '[v]';
  position: absolute; left: 0;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--stamp-green);
}
.cons li::before {
  content: '[x]';
  position: absolute; left: 0;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--stamp-red);
}

/* Warning / Danger blocks */
.warning-block {
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(212,160,23,.06);
  border-left: 4px solid var(--stamp-yellow);
  font-size: 14px;
  line-height: 1.6;
}
.warning-block .wb-title {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: var(--stamp-yellow);
  letter-spacing: 2px;
  margin-bottom: 6px;
  font-weight: 600;
}
.danger-block {
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(192,57,43,.06);
  border-left: 4px solid var(--stamp-red);
  font-size: 14px;
  line-height: 1.6;
}
.danger-block .wb-title {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: var(--stamp-red);
  letter-spacing: 2px;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Verdict box */
.verdict-box {
  border: 3px solid var(--stamp-green);
  padding: 24px;
  margin: 32px 0;
  position: relative;
}
.verdict-box::before {
  content: attr(data-label);
  position: absolute;
  top: -12px; left: 20px;
  background: var(--paper);
  padding: 0 12px;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: var(--stamp-green);
  letter-spacing: 2px;
}
.verdict-box h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 18px;
  color: var(--stamp-green);
  margin-bottom: 8px;
}
.verdict-box p {
  font-size: 15px;
  line-height: 1.7;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { padding-top: 8px; }
.sidebar-section { margin-bottom: 32px; }
.sidebar-title {
  font-family: 'Russo One', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink-light);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-link {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  border-left: 3px solid transparent;
  margin-bottom: 4px;
  transition: all .15s;
  text-decoration: none;
  color: var(--ink);
}
.sidebar-link:hover {
  border-left-color: var(--ink-blue);
  background: var(--paper-alt);
  color: var(--ink-blue);
}
.sidebar-link .sl-num {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: var(--ink-light);
  display: block;
  margin-bottom: 2px;
}

/* TOC */
.sidebar-toc {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-toc li {
  border-left: 2px solid var(--border);
  padding: 6px 0 6px 12px;
  font-size: 13px;
  color: var(--ink-light);
  margin-bottom: 4px;
  transition: all .15s;
}
.sidebar-toc li:hover {
  border-left-color: var(--ink-blue);
  color: var(--ink-blue);
}
.sidebar-toc a {
  text-decoration: none;
  color: inherit;
}

/* =============================================
   SIMPLE PAGE (About etc.)
   ============================================= */
.simple-page {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.simple-header {
  padding: 8px 0 24px;
  border-bottom: 2px solid var(--ink-blue);
  margin-bottom: 32px;
}
.simple-header h1 {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(26px, 3.5vw, 36px);
  color: var(--ink-blue);
  line-height: 1.2;
  margin-bottom: 8px;
}
.simple-header p {
  font-size: 16px;
  color: var(--ink-light);
}

/* Content wrap for simple pages */
.content-wrap h2 {
  font-family: 'Russo One', sans-serif;
  font-size: 20px;
  color: var(--ink-blue);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.content-wrap h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 17px;
  color: var(--ink);
  margin: 24px 0 12px;
}
.content-wrap p {
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 16px;
}
.content-wrap strong { color: var(--ink); }
.content-wrap a:not(.cta-button) {
  color: var(--ink-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-wrap a:not(.cta-button):hover {
  color: var(--stamp-green);
}
.content-wrap ul {
  margin: 16px 0;
  padding-left: 0;
}
.content-wrap li {
  list-style: none;
  padding: 8px 0 8px 28px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
}
.content-wrap li::before {
  content: '//';
  position: absolute; left: 0;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--border);
}
.content-wrap blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--ink-blue);
  background: var(--paper-alt);
  font-style: italic;
  color: var(--ink-light);
}
.content-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border: 2px solid var(--border);
}
.content-wrap thead { background: var(--ink-blue); color: #fff; }
.content-wrap th { font-family: 'Russo One', sans-serif; font-size: 13px; padding: 12px 16px; text-align: left; }
.content-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.content-wrap tr:nth-child(even) { background: var(--paper-alt); }
.content-wrap img {
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
}

/* =============================================
   CTA — Standard classes (Partner#cta_html)
   ============================================= */
.cta-block {
  border: 2px solid var(--ink-blue);
  padding: 0;
  position: relative;
  background: var(--paper-alt);
  margin: 32px 0;
}
.cta-banner {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.cta-banner p {
  flex: 1;
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.5;
  margin: 0;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--stamp-green);
  color: #fff !important;
  font-family: 'Russo One', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none !important;
}
.cta-button:hover {
  background: #219150;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39,174,96,.3);
  color: #fff !important;
}

/* =============================================
   CTA — Custom Protocol CTA (_cta.html.erb)
   ============================================= */
.cta-protocol {
  border: 2px solid var(--ink-blue);
  padding: 0;
  position: relative;
  background: var(--paper-alt);
  margin: 32px 0;
}
.cta-protocol-header {
  background: var(--ink-blue);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cta-protocol-label {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: rgba(255,255,255,.6);
  letter-spacing: 2px;
}
.cta-protocol-seal {
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  color: rgba(255,255,255,.4);
  letter-spacing: 1px;
}
.cta-protocol-body {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.cta-protocol-verdict {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border: 3px solid var(--stamp-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
  position: relative;
}
.cta-protocol-verdict::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px solid rgba(39,174,96,.4);
  border-radius: 50%;
}
.cta-protocol-verdict span {
  font-family: 'Fira Code', monospace;
  font-size: 8px;
  font-weight: 600;
  color: var(--stamp-green);
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.3;
}
.cta-protocol-text { flex: 1; }
.cta-protocol-text h4 {
  font-family: 'Russo One', sans-serif;
  font-size: 16px;
  color: var(--ink-blue);
  margin-bottom: 4px;
}
.cta-protocol-text p {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
  margin: 0;
}
.cta-protocol-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--stamp-green);
  color: #fff;
  font-family: 'Russo One', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.cta-protocol-btn:hover {
  background: #219150;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39,174,96,.3);
  color: #fff;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--ink-blue);
  color: rgba(255,255,255,.7);
  margin-top: 64px;
  padding: 40px 24px;
}
.site-footer a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-inner h4 {
  font-family: 'Russo One', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 16px;
}
.footer-inner p {
  font-size: 13px;
  line-height: 1.6;
}
.footer-inner ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.footer-inner li a {
  font-size: 13px;
  opacity: .7;
  transition: opacity .2s;
}
.footer-inner li a:hover { opacity: 1; }
.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  opacity: .5;
  text-align: center;
}

/* =============================================
   GDPR CONSENT BANNER
   ============================================= */
.consent-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--paper-alt);
  border-top: 2px solid var(--ink-blue);
  box-shadow: 0 -4px 24px rgba(0,0,0,.1);
}
.consent-banner.hidden { display: none; }
.consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.consent-stamp {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border: 2.5px solid var(--ink-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  position: relative;
}
.consent-stamp::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1.5px solid rgba(30,58,95,.3);
  border-radius: 50%;
}
.consent-text { flex: 1; }
.consent-label {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: var(--ink-blue);
  letter-spacing: 2px;
  margin-bottom: 4px;
  font-weight: 600;
}
.consent-text p {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
  margin: 0;
}
.consent-text a {
  color: var(--ink-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.consent-btn {
  padding: 10px 22px;
  font-family: 'Russo One', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all .2s;
}
.btn-accept {
  background: var(--stamp-green);
  color: #fff;
}
.btn-accept:hover { background: #219150; }
.btn-settings {
  background: transparent;
  color: var(--ink-light);
  border: 1.5px solid var(--border);
}
.btn-settings:hover {
  border-color: var(--ink-blue);
  color: var(--ink-blue);
}

/* =============================================
   HOMEPAGE CTA (full-width block)
   ============================================= */
.cta-home {
  max-width: 1200px;
  margin: 48px auto;
  padding: 0 24px;
}
.cta-home-inner {
  border: 2px solid var(--ink-blue);
  padding: 32px;
  position: relative;
  background: var(--paper-alt);
}
.cta-home-inner::before {
  content: attr(data-label);
  position: absolute;
  top: -11px; left: 24px;
  background: var(--paper-alt);
  padding: 0 12px;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: var(--ink-blue);
  letter-spacing: 2px;
}
.cta-home-content {
  display: flex;
  align-items: center;
  gap: 32px;
}
.cta-home-text { flex: 1; }
.cta-home-text h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 18px;
  color: var(--ink-blue);
  margin-bottom: 8px;
}
.cta-home-text p {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.6;
}
.cta-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--stamp-green);
  color: #fff;
  font-family: 'Russo One', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.cta-home-btn:hover {
  background: #219150;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39,174,96,.3);
  color: #fff;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .nav-burger { display: block; }
  .header-nav-wrap.is-mobile-closed .header-nav {
    display: none;
  }
  .header-nav-wrap.is-mobile-open .header-nav {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 8px;
  }

  .bureau-header { flex-direction: column; padding: 32px 24px 24px; }
  .bureau-stamp { width: 120px; height: 120px; align-self: center; }
  .bureau-stamp .stamp-text { font-size: 10px; }
  .bureau-stamp .stamp-year { font-size: 18px; }

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

  .protocol-row,
  .protocol-card { grid-template-columns: 1fr; gap: 8px; }
  .protocol-verdict,
  .pc-verdict { justify-self: start; }

  .quick-section { grid-template-columns: 1fr; }

  .cta-home-content { flex-direction: column; text-align: center; }

  .dossier-top { flex-direction: column; }
  .dossier-stamp { align-self: flex-start; }
  .fact-sheet { grid-template-columns: repeat(2, 1fr); }

  .article-layout { grid-template-columns: 1fr; }
  .sidebar {
    order: -1;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    margin-bottom: 24px;
  }
  .verdict-badge {
    position: static;
    transform: none;
    display: inline-block;
    margin-top: 12px;
  }
  .pros-cons { grid-template-columns: 1fr; }

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

  .footer-inner { grid-template-columns: 1fr 1fr; }

  .cta-protocol-body { flex-direction: column; text-align: center; }
  .cta-protocol-verdict { align-self: center; }

  .consent-inner { flex-direction: column; text-align: center; gap: 14px; }
  .consent-stamp { display: none; }
  .consent-actions { width: 100%; }
  .consent-btn { flex: 1; }
}
