:root {
  --bs-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-color: #1e293b;
  --bs-body-bg: #f7f8fa;
  --bs-link-color: #0f172a;
  --bs-link-hover-color: #a97c1f;

  --brand-navy: #0f172a;
  --brand-navy-light: #1e2a4a;
  --brand-gold: #c9972c;
  --brand-gold-dark: #a97c1f;
}

body {
  color: var(--bs-body-color);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  text-decoration: none;
}

/* --- Navbar --- */
.navbar {
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.3rem;
  color: var(--brand-navy) !important;
}

.navbar-brand-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.navbar-brand-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.navbar .nav-link {
  font-weight: 500;
  color: var(--brand-navy);
  transition: color 0.15s ease;
}

@media (min-width: 768px) {
  /* One line per item in the expanded navbar — a two-line "Panel
     klienta" makes the whole bar uneven. */
  .navbar .nav-link {
    white-space: nowrap;
  }
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--brand-gold-dark) !important;
}

.navbar .btn-link {
  color: var(--brand-navy);
  text-decoration: none;
}

.navbar .btn-link:hover {
  color: var(--brand-gold-dark);
}

/* --- Third-level nav dropdown (Category > Subcategory > Service) ---
   Bootstrap 5 only ships one dropdown level; this adds a flyout submenu
   that opens to the right, per spec. static/js/main.js handles the
   click-to-toggle behavior needed for touch devices (no :hover there). */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -0.5rem;
  margin-left: 0.125rem;
}

@media (hover: hover) {
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }
}

@media (max-width: 767.98px) {
  /* No room to flyout sideways inside the collapsed mobile menu — stack
     the submenu inline (indented) instead, like Bootstrap's own dropdown
     already does inside a collapsed navbar. */
  .dropdown-submenu > .dropdown-menu {
    position: static;
    left: 0;
    margin-left: 1rem;
    box-shadow: none;
    border: none;
  }
}

/* --- Buttons --- */
.btn {
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.6rem 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
}

.btn-primary {
  background-color: var(--brand-navy);
  border-color: var(--brand-navy);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-gold-dark);
  border-color: var(--brand-gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(201, 151, 44, 0.3);
}

.btn-outline-primary {
  color: var(--brand-navy);
  border-color: var(--brand-navy);
}

.btn-outline-primary:hover {
  background-color: var(--brand-navy);
  border-color: var(--brand-navy);
  transform: translateY(-1px);
}

.btn-outline-secondary:hover {
  transform: translateY(-1px);
}

.btn-warning {
  font-weight: 700;
}

/* --- Cards --- */
.card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

/* Article cover images (Wiedza on the homepage, article list, article
   category pages) — a fixed aspect ratio + object-fit:cover so every
   card tile is the same size regardless of the uploaded image's own
   dimensions, instead of Bootstrap's default width:100%/height:auto
   (which would make cards different heights per image). */
.card-img-top {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.card-title {
  font-weight: 700;
}

/* --- Hero (homepage) --- */
.hero {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 3.5rem 2.5rem;
  margin-bottom: 3rem;
}

.hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin-bottom: 0;
}

/* --- Badges --- */
.badge {
  font-weight: 600;
  padding: 0.42em 0.8em;
  border-radius: 0.4rem;
  letter-spacing: 0.01em;
}

/* --- Forms --- */
.form-control,
.form-select {
  border-radius: 0.5rem;
  padding: 0.55rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.2rem rgba(15, 23, 42, 0.12);
}

.form-check-input:checked {
  background-color: var(--brand-navy);
  border-color: var(--brand-navy);
}

/* --- Alerts --- */
.alert {
  border-radius: 0.6rem;
  border: none;
}

/* --- Footer --- */
footer {
  background: var(--brand-navy) !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Default breathing room above the footer on normal (light-background)
   pages. Pages that already end flush with a full-bleed dark band (e.g.
   the homepage) drop this via {% block footer_class %} — otherwise it'd
   show as a visible light gap between two dark sections. */
.footer-spaced {
  margin-top: 4rem;
}

footer small,
footer a {
  color: rgba(255, 255, 255, 0.65);
}

footer a:hover {
  color: var(--brand-gold);
}

.footer-heading {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-link-list li {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75) !important;
}

.footer-social-icon:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-navy) !important;
}

/* --- Misc --- */
.text-price {
  color: var(--brand-navy);
  font-weight: 800;
}

/* Bootstrap 5 dropped the .text-justify utility that existed in Bootstrap 4.
   No longer used on article/service/about body text (2026-08-23) — on
   longer Polish words at this line length, justify produced very uneven
   word-spacing ("rivers") that visibly stood out from the rest of the
   site's normal left-aligned type. Kept here in case it's wanted again
   for a narrower column where it doesn't have that problem. */
.text-justify {
  text-align: justify;
}

/* --- Homepage news banner --- */
.news-banner {
  background: linear-gradient(135deg, rgba(201, 151, 44, 0.12) 0%, rgba(201, 151, 44, 0.04) 100%);
  border-left: 4px solid var(--brand-gold);
  border-radius: 0.75rem;
}

/* --- Live password requirement checklist (register.html) --- */
#id_password1_helptext li.pw-requirement-met {
  color: #198754;
  font-weight: 600;
}

#id_password1_helptext li.pw-requirement-met::before {
  content: "\2713  ";
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* --- Image placeholders (about.html) --- swap for a real <img> later,
   this class is only meant to hold the layout's shape until then. */
.img-placeholder {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.06) 0%, rgba(201, 151, 44, 0.1) 100%);
  border: 1px dashed rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy);
  font-weight: 600;
  font-size: 0.9rem;
  width: 100%;
  border-radius: 0.9rem;
}

/* --- Homepage: large hero --- a CSS-only dot-grid texture over the usual
   navy gradient (no photography/image asset needed). */
.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 5rem 2rem;
  margin-bottom: 3rem;
  background:
    radial-gradient(circle at 18% 20%, rgba(201, 151, 44, 0.22), transparent 42%),
    radial-gradient(circle at 82% 0%, rgba(201, 151, 44, 0.14), transparent 38%),
    linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 55%, #16213e 100%);
}

.hero-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-main-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  color: #fff;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--brand-gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.hero-main-inner h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-main-inner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}

.hero-main .btn-outline-light:hover {
  color: var(--brand-navy);
}

.hero-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 2rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* --- Homepage: "najpopularniejsze usługi" featured offer cards --- */
.featured-offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.5rem;
  padding: 1.75rem 1.5rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  color: var(--brand-navy);
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.featured-offer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  color: var(--brand-navy);
}

.featured-offer-card h5 {
  font-weight: 700;
  margin: 0;
}

.featured-offer-card p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0;
  flex-grow: 1;
}

.featured-offer-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(201, 151, 44, 0.16) 0%, rgba(15, 23, 42, 0.06) 100%);
  color: var(--brand-gold-dark);
}

.featured-offer-icon svg {
  width: 24px;
  height: 24px;
}

.featured-offer-link {
  font-weight: 700;
  color: var(--brand-navy);
  font-size: 0.9rem;
}

.featured-offer-card:hover .featured-offer-link {
  color: var(--brand-gold-dark);
}

/* The one offer we most want to sell — same gold-accent treatment as
   the highlighted pricing-card tiers, so it reads as "start here"
   without an unverifiable popularity claim. */
.featured-offer-highlight {
  border: 2px solid var(--brand-gold);
  box-shadow: 0 12px 32px rgba(201, 151, 44, 0.18);
}

.featured-offer-badge {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  background: var(--brand-gold);
  color: var(--brand-navy);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35em 0.9em;
  border-radius: 2rem;
}

/* --- Homepage: quick-start cards --- */
.quickstart-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  padding: 1.5rem;
}

.quickstart-card h5 {
  font-weight: 700;
}

/* --- Homepage: country tiles --- */
.country-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.5rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  color: var(--brand-navy);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.country-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  color: var(--brand-navy);
}

.country-flag {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 0.25rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.country-name {
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
}

/* --- Homepage: Premium CTA banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 3rem 2rem;
  margin-bottom: 1rem;
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
}

/* --- Homepage: full-bleed section bands ---
   Lets a section span the entire viewport width (edge to edge, like a
   real landing page) even though it lives inside base.html's Bootstrap
   `.container`. `.full-bleed-inner` re-applies a centered max-width so
   the actual content still lines up with the rest of the site. */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.full-bleed-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Hero keeps its own padding/eyebrow-driven layout; as a full-bleed band
   it should sit flush under the navbar with no rounded corners. */
.full-bleed.hero-main {
  border-radius: 0;
  margin-bottom: 0;
}

.band-light {
  background: #fff;
}

.band-muted {
  background: var(--bs-body-bg);
}

.band-light + .band-dark,
.band-muted + .band-dark {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.band-dark {
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 55%, #16213e 100%);
  color: #fff;
}

.band-dark h2,
.band-dark h3 {
  color: #fff;
}

.band-dark .section-heading a.btn-outline-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.band-dark .section-heading a.btn-outline-primary:hover {
  background-color: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-navy);
}

.band-lede {
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
}

.band-light .band-lede,
.band-muted .band-lede {
  color: #475569;
}

/* --- Homepage: dynamic trust stat row --- */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: center;
  text-align: center;
}

.stat-item .stat-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--brand-gold-dark);
  letter-spacing: -0.02em;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
}

/* --- Homepage: "Jak działamy" numbered process band --- */
.process-step {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  height: 100%;
}

.process-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-gold);
  display: block;
  margin-bottom: 0.5rem;
}

.process-step h5 {
  color: #fff;
  font-weight: 700;
}

.process-step p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* --- Homepage: bottom "tematy" dark tile grid --- */
.topic-tile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  height: 100%;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.topic-tile:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.topic-tile .topic-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 151, 44, 0.18);
  color: var(--brand-gold);
}

.topic-tile .topic-icon svg {
  width: 20px;
  height: 20px;
}

.topic-tile .topic-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.topic-tile .topic-count {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* --- Product pages (service list/detail, subcategory detail) ---
   A shorter cousin of `.hero-main`: same navy gradient + dot-grid texture,
   sized for an internal listing/detail page header rather than the full
   homepage hero. */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(201, 151, 44, 0.16), transparent 40%),
    linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 55%, #16213e 100%);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.page-hero > * {
  position: relative;
}

.page-hero-inner {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.page-hero h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 680px;
}

.page-hero .breadcrumb-trail {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
}

.page-hero .breadcrumb-trail a {
  color: rgba(255, 255, 255, 0.7);
}

.page-hero .breadcrumb-trail a:hover {
  color: var(--brand-gold);
}

.page-hero .country-flag {
  width: 28px;
  height: 21px;
  vertical-align: -3px;
  margin-right: 0.4rem;
  border-radius: 0.2rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* --- Product pages: headings inside an HTML service description (SEO
   copy with <h2> sections) — sized for body content, not a page title. */
.service-description h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.service-description h2:first-child {
  margin-top: 0;
}

.service-description h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.service-description p {
  margin-bottom: 1rem;
}

/* --- Case-study landing pages: important-notice callout box --- */
.notice-box {
  background: rgba(201, 151, 44, 0.08);
  border-left: 4px solid var(--brand-gold);
  border-radius: 0.6rem;
  padding: 1.25rem 1.5rem;
}

.notice-box strong {
  color: var(--brand-navy);
}

/* --- Case-study landing pages: tax/cost comparison table --- */
.comparison-table {
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.comparison-table thead th {
  background: var(--brand-navy);
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 0.9rem 1.1rem;
}

.comparison-table tbody td {
  vertical-align: middle;
  padding: 0.9rem 1.1rem;
  border-color: rgba(15, 23, 42, 0.08);
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--bs-body-bg);
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--brand-navy);
}

/* --- Product pages: subcategory pill badge on service cards --- */
.badge-subcategory {
  display: inline-block;
  background: rgba(201, 151, 44, 0.12);
  color: var(--brand-gold-dark);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35em 0.75em;
  border-radius: 2rem;
}

.service-card-country {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.service-card-country .country-flag {
  width: 22px;
  height: 16px;
  border-radius: 0.2rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
}

/* --- Product pages: service detail buy-box --- */
.buy-box {
  position: relative;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.buy-box::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-gold-dark) 100%);
}

.buy-box .buy-box-body {
  padding: 1.75rem;
}

.buy-box-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.trust-list li:last-child {
  margin-bottom: 0;
}

/* Icon slot shared by .trust-list bullets and inline meta lines (e.g. the
   duration line in .buy-box) — matches the site's monochrome line-icon
   language (pillar/topic icons) instead of mixing in emoji, which render
   in a completely different (color) font from the rest of the page. */
.trust-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--brand-gold-dark);
}

.trust-icon svg {
  width: 100%;
  height: 100%;
}

/* --- LLC-USA offer landing page: 3-tier pricing cards --- */
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  padding: 2rem 1.75rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.pricing-card-highlight {
  border: 2px solid var(--brand-gold);
  box-shadow: 0 12px 32px rgba(201, 151, 44, 0.18);
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-gold);
  color: var(--brand-navy);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35em 0.9em;
  border-radius: 2rem;
  white-space: nowrap;
}

.pricing-tier {
  display: block;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--brand-navy);
  margin-top: 0.5rem;
}

.pricing-tagline {
  color: #64748b;
  font-size: 0.9rem;
  min-height: 2.5rem;
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 1.25rem;
}

.pricing-period {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
}

.pricing-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex-grow: 1;
}

.pricing-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.65rem;
}

.pricing-feature-list li:last-child {
  margin-bottom: 0;
}

.pricing-feature-list svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--brand-gold-dark);
}

/* --- Consultation landing page: dark-band variant of .pricing-feature-list
   (same checkmark markup, readable on a navy background) --- */
.feature-list-dark {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list-dark li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
}

.feature-list-dark li:last-child {
  margin-bottom: 0;
}

.feature-list-dark svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--brand-gold);
}

/* --- Consultation landing page: "dla kogo" audience cards --- */
.audience-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  padding: 1.25rem;
  height: 100%;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audience-card .audience-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(201, 151, 44, 0.16) 0%, rgba(15, 23, 42, 0.06) 100%);
  color: var(--brand-gold-dark);
}

.audience-card .audience-icon svg {
  width: 16px;
  height: 16px;
}

/* --- Homepage: enlarged jurisdiction tiles --- */
.country-tile.country-tile-lg {
  flex-direction: row;
  justify-content: flex-start;
  padding: 1.5rem 1.6rem;
  gap: 1.1rem;
}

.country-tile-lg .country-flag {
  width: 48px;
  height: 36px;
}

.country-tile-lg .country-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.country-tile-lg .country-name {
  font-size: 1.15rem;
}

.country-tile-lg .country-sub {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

/* --- Rezerwacja terminu: kalendarz (Flatpickr) --- */
.booking-calendar {
  display: inline-block;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.booking-calendar .flatpickr-calendar {
  box-shadow: none;
  width: 320px;
  max-width: 100%;
}

.booking-calendar .flatpickr-months .flatpickr-month,
.booking-calendar .flatpickr-current-month .flatpickr-monthDropdown-months,
.booking-calendar .flatpickr-weekdays,
.booking-calendar span.flatpickr-weekday {
  background: var(--brand-navy);
  color: #fff;
  fill: #fff;
}

.booking-calendar .flatpickr-current-month input.cur-year {
  color: #fff;
}

.booking-calendar .flatpickr-prev-month:hover svg,
.booking-calendar .flatpickr-next-month:hover svg {
  fill: var(--brand-gold);
}

.booking-calendar .flatpickr-day.flatpickr-disabled,
.booking-calendar .flatpickr-day.flatpickr-disabled:hover {
  color: #cbd5e1;
}

.booking-calendar .flatpickr-day.today {
  border-color: var(--brand-gold);
}

.booking-calendar .flatpickr-day.selected,
.booking-calendar .flatpickr-day.selected:hover {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
}

.booking-calendar .flatpickr-day:hover {
  background: #f1f5f9;
}

/* --- Regulamin / Polityka Prywatności: numbered legal-text sections --- */
.legal-content h2 {
  margin-top: 2.25rem;
  font-size: 1.35rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.legal-content ol {
  padding-left: 1.4rem;
}

.legal-content ol > li {
  margin-bottom: 1rem;
  padding-left: 0.25rem;
}

.legal-content ol[type="a"] {
  margin-top: 0.75rem;
}

.legal-content ol[type="a"] > li {
  margin-bottom: 0.5rem;
}

.legal-quote {
  margin: 1rem 0 0;
  padding: 0.75rem 1.1rem;
  border-left: 3px solid var(--brand-gold);
  background: #f8fafc;
  border-radius: 0 0.4rem 0.4rem 0;
}

/* --- FAQ accordion (dark bars + gold chevron) --- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  background: var(--brand-navy);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  border-radius: 0.6rem;
  transition: background 0.15s ease;
}

.faq-question:hover {
  background: var(--brand-navy-light);
}

.faq-question:not(.collapsed) {
  border-radius: 0.6rem 0.6rem 0 0;
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--brand-gold);
  transition: transform 0.2s ease;
}

.faq-question:not(.collapsed) .faq-icon {
  transform: rotate(90deg);
}

.faq-answer {
  background: #f8fafc;
  padding: 1.1rem 1.25rem;
  border-radius: 0 0 0.6rem 0.6rem;
  color: #334155;
}

.faq-answer p,
.faq-answer ul {
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child,
.faq-answer ul:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  padding-left: 1.2rem;
}

/* Bootstrap 5 dropped .text-justify (present in v4) — Konsultacja landing
   page uses justified body copy throughout, on request. */
.text-justify {
  text-align: justify;
}

/* --- Contact form embedded in a dark CTA band --- */
.contact-form-card {
  background: #fff;
  border-radius: 0.9rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  padding: 1.75rem;
  color: var(--brand-navy);
}

.contact-form-card label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

/* --- Paid-course sales page (article category with a course_plan):
   same checkmark list as .pricing-feature-list, but sized to sit next to
   the .fs-5 body copy of the promo text rather than inside a pricing card --- */
.course-feature-list li {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.course-feature-list svg {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
}

/* --- Atlas Rezydencji Podatkowych: tile before an image is uploaded --- */
.atlas-placeholder {
  background: #f1f5f9;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.15);
  color: #94a3b8;
  font-size: 0.85rem;
}

/* --- Pillar page: /rezydencja-paragwaj/ (templates/rezydencja_paragwaj.html) ---
   Long-read hub page. Inter stays for UI (nav, TOC, buttons, forms);
   Newsreader carries headings and body copy so a long page reads like an
   advisory publication rather than a landing page. Everything is prefixed
   pp- so nothing here leaks into other pages. */
.pp-hero,
.pp-layout,
.pp-final {
  --pp-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --pp-ink: #1e293b;
  --pp-muted: #475569;
  --pp-rule: rgba(15, 23, 42, 0.12);
}

.pp-hero {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(201, 151, 44, 0.14), transparent 55%),
    linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 60%, #16213e 100%);
  color: #fff;
}

.pp-hero-inner {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.pp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.pp-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: rgba(255, 255, 255, 0.35);
}

.pp-breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
}

.pp-breadcrumb a:hover {
  color: var(--brand-gold);
}

.pp-h1 {
  font-family: var(--pp-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 14ch;
  margin-bottom: 1.5rem;
}

.pp-h1-sub {
  display: block;
  margin-top: 0.85rem;
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--brand-gold);
}

.pp-lede {
  font-family: var(--pp-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.55;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 2rem;
}

.pp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.btn.pp-btn-gold {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-navy);
}

.btn.pp-btn-gold:hover,
.btn.pp-btn-gold:focus-visible {
  background: #ddb04a;
  border-color: #ddb04a;
  color: var(--brand-navy);
}

.pp-hero-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 151, 44, 0.7);
  text-underline-offset: 0.3em;
}

.pp-hero-link:hover {
  color: var(--brand-gold);
}

.pp-hero-meta {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.62);
  max-width: 38rem;
}

/* Two columns from lg up: sticky TOC + reading column. */
.pp-layout {
  padding: 2rem 0 3rem;
}

@media (min-width: 992px) {
  .pp-layout {
    display: grid;
    grid-template-columns: 14.5rem minmax(0, 1fr);
    gap: 4.5rem;
    padding-top: 3.5rem;
  }
}

.pp-toc {
  position: sticky;
  top: 1.5rem;
  font-size: 0.9rem;
}

.pp-toc-title {
  font-weight: 600;
  color: var(--brand-navy);
  margin-bottom: 0.75rem;
}

.pp-toc ol,
.pp-toc-mobile ol {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

/* Scoped to the list on purpose: the consultation .btn below it must keep
   Bootstrap's own button colours (white text on navy when hovered). */
.pp-toc ol a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid rgba(15, 23, 42, 0.1);
  color: var(--pp-muted);
  line-height: 1.35;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pp-toc ol a:hover {
  color: var(--brand-navy);
}

.pp-toc ol a[aria-current="true"] {
  color: var(--brand-navy);
  font-weight: 600;
  border-left-color: var(--brand-gold);
}

.pp-toc-mobile {
  font-family: var(--bs-font-sans-serif);
  font-size: 1rem;
  background: #fff;
  border: 1px solid var(--pp-rule);
  border-radius: 0.6rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 2.5rem;
}

.pp-toc-mobile summary {
  font-weight: 600;
  color: var(--brand-navy);
  cursor: pointer;
}

.pp-toc-mobile ol {
  margin: 0.75rem 0 0;
}

.pp-content .pp-toc-mobile a {
  display: block;
  padding: 0.4rem 0;
  color: #334155;
  text-decoration: none;
}

/* Reading column */
.pp-content {
  max-width: 43rem;
  font-family: var(--pp-serif);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--pp-ink);
}

.pp-section {
  scroll-margin-top: 1.5rem;
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--pp-rule);
}

.pp-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.pp-content h2 {
  font-family: var(--pp-serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--brand-navy);
  margin-bottom: 1.25rem;
}

.pp-content h3 {
  font-family: var(--bs-font-sans-serif);
  font-weight: 650;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--brand-navy);
  margin: 2.25rem 0 0.6rem;
  scroll-margin-top: 1.5rem;
}

.pp-content p {
  margin-bottom: 1.15rem;
}

.pp-content a:not(.btn):not(.pp-deeplink) {
  color: var(--brand-navy);
  text-decoration: underline;
  text-decoration-color: rgba(201, 151, 44, 0.6);
  text-underline-offset: 0.2em;
}

.pp-content a:not(.btn):not(.pp-deeplink):hover {
  color: var(--brand-gold-dark);
}

/* Options listed inside a section (e.g. the two residency routes): one
   tight group with a rule down the side, so the text after it clearly
   picks the main thread back up. */
.pp-paths {
  border-left: 2px solid var(--brand-gold);
  padding-left: 1.25rem;
  margin: 0.25rem 0 1.75rem;
}

.pp-path + .pp-path {
  margin-top: 1.1rem;
}

.pp-content .pp-path h3 {
  margin: 0 0 0.2rem;
}

.pp-content .pp-path p {
  margin-bottom: 0;
}

/* Placeholder figures waiting to be filled in — loud on purpose. */
.pp-ph {
  background: #fff3c4;
  color: #7a5a00;
  padding: 0 0.25em;
  border-radius: 0.2rem;
  font-family: var(--bs-font-sans-serif);
  font-size: 0.85em;
  font-weight: 600;
}

/* Callouts: navy rule = good to know, gold = watch out. */
.pp-note {
  font-family: var(--bs-font-sans-serif);
  font-size: 1rem;
  line-height: 1.6;
  background: #fff;
  border: 1px solid var(--pp-rule);
  border-left: 3px solid var(--brand-navy);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1.1rem 1.35rem;
  margin: 1.75rem 0;
}

.pp-note.pp-note--warn {
  background: rgba(201, 151, 44, 0.07);
  border-color: rgba(201, 151, 44, 0.3);
  border-left-color: var(--brand-gold);
}

.pp-content .pp-note p {
  margin-bottom: 0;
}

.pp-content .pp-note .pp-note-title {
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.3rem;
}

/* Pointer to the in-depth article that closes each section. */
.pp-deeplink {
  display: block;
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  background: var(--brand-navy);
  border-radius: 0.5rem;
  font-family: var(--bs-font-sans-serif);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

a.pp-deeplink:hover {
  background: var(--brand-navy-light);
}

.pp-deeplink-label {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-gold);
  margin-bottom: 0.15rem;
}

.pp-deeplink-title {
  display: block;
  font-family: var(--pp-serif);
  font-size: 1.2rem;
  line-height: 1.3;
  color: #fff;
}

a.pp-deeplink:hover .pp-deeplink-title {
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 0.2em;
}

.pp-deeplink.pp-deeplink--pending {
  background: transparent;
  border: 1px dashed rgba(15, 23, 42, 0.25);
}

.pp-deeplink--pending .pp-deeplink-label,
.pp-deeplink--pending .pp-deeplink-title {
  color: #64748b;
}

/* Process timeline — the one bold element on the page. A solid gold
   segment marks steps that happen in Paraguay, a dashed slate one steps
   done online or in Poland, so the line itself shows where you need to be. */
.pp-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--bs-font-sans-serif);
  font-size: 0.85rem;
  color: var(--pp-muted);
  margin: 2rem 0 1.5rem;
}

.pp-legend-item::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-top: 2px dashed #94a3b8;
}

.pp-legend-item--py::before {
  border-top: 3px solid var(--brand-gold);
}

.pp-timeline {
  list-style: none;
  counter-reset: pp-step;
  padding: 0;
  margin: 0;
}

.pp-step {
  position: relative;
  counter-increment: pp-step;
  padding: 0 0 2.25rem 3.75rem;
}

.pp-step::before {
  content: counter(pp-step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-body-bg);
  border: 2px solid #94a3b8;
  color: var(--brand-navy);
  font-family: var(--pp-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  z-index: 1;
}

.pp-step::after {
  content: "";
  position: absolute;
  left: calc(1.25rem - 1px);
  top: 2.4rem;
  bottom: 0.1rem;
  border-left: 2px dashed #94a3b8;
}

.pp-step:last-child {
  padding-bottom: 0;
}

.pp-step:last-child::after {
  display: none;
}

.pp-step.pp-step--py::before {
  background: var(--brand-navy);
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}

.pp-step.pp-step--py::after {
  left: calc(1.25rem - 1.5px);
  border-left: 3px solid var(--brand-gold);
}

.pp-content .pp-step h3 {
  margin-top: 0.35rem;
  margin-bottom: 0.4rem;
}

.pp-content .pp-step p {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.pp-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  font-family: var(--bs-font-sans-serif);
  font-size: 0.85rem;
  line-height: 1.5;
}

.pp-step-meta div {
  display: flex;
  gap: 0.4rem;
}

.pp-step-meta dt {
  font-weight: 600;
  color: var(--pp-muted);
}

.pp-step-meta dd {
  margin: 0;
  color: var(--brand-navy);
}

/* Cost table */
.pp-costs {
  width: 100%;
  margin: 1.5rem 0 0.5rem;
  font-family: var(--bs-font-sans-serif);
  font-size: 0.95rem;
  line-height: 1.45;
  border-collapse: collapse;
  background: #fff;
}

.pp-costs caption {
  caption-side: top;
  padding: 0 0 0.6rem;
  color: var(--pp-muted);
  font-size: 0.85rem;
}

.pp-costs th,
.pp-costs td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--pp-rule);
  vertical-align: top;
}

.pp-costs thead th {
  background: var(--brand-navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

.pp-costs thead th:last-child {
  text-align: right;
}

.pp-costs tbody th {
  font-weight: 500;
  color: var(--pp-ink);
}

.pp-costs td {
  text-align: right;
  color: var(--brand-navy);
  font-weight: 600;
}

.pp-costs tfoot th,
.pp-costs tfoot td {
  border-top: 2px solid var(--brand-navy);
  border-bottom: 0;
  font-weight: 700;
  color: var(--brand-navy);
}

/* Quiet mid-page CTA */
.pp-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--pp-rule);
  font-family: var(--bs-font-sans-serif);
  font-size: 1rem;
}

.pp-content .pp-inline-cta p {
  margin: 0;
  color: var(--pp-muted);
  flex: 1 1 18rem;
}

.pp-content .faq-accordion {
  font-family: var(--bs-font-sans-serif);
  font-size: 1rem;
  line-height: 1.6;
}

.pp-content .pp-more {
  margin-top: 1.5rem;
  font-size: 1rem;
}

/* Closing band: consultation CTA */
.pp-final-inner {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 992px) {
  .pp-final-inner {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.pp-final h2 {
  font-family: var(--pp-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

.pp-final-text p {
  font-family: var(--pp-serif);
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
  margin-bottom: 2rem;
}

/* Visible keyboard focus on the dark bands and in the TOC. */
.pp-hero a:focus-visible,
.pp-final a:focus-visible,
.pp-toc a:focus-visible,
.pp-deeplink:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
  border-radius: 0.2rem;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.pp-layout) {
    scroll-behavior: smooth;
  }
}


/* --- Paid course sales page (templates/articles/course_detail.html) ---
   One bold element: the FICO scale in the hero, whose marker climbs to
   "Exceptional" once on load. Everything else stays quiet: one column of
   copy, a numbered syllabus (the lessons really are a sequence), a plain
   audience grid and a closing price box. Prefixed cr- throughout. */
.cr-hero,
.cr-section,
.cr-claim,
.cr-closing {
  --cr-muted: #475569;
  --cr-rule: rgba(15, 23, 42, 0.1);
  --cr-on-dark: rgba(255, 255, 255, 0.78);
  --cr-tier-1: #c8553d;
  --cr-tier-2: #dd8a2c;
  --cr-tier-3: #d8bf3a;
  --cr-tier-4: #8cbf5c;
  --cr-tier-5: #3bae7d;
}

.cr-hero {
  background:
    radial-gradient(ellipse at 90% 10%, rgba(59, 174, 125, 0.14), transparent 50%),
    linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 65%, #16213e 100%);
  color: #fff;
  margin-top: -1.5rem; /* flush under the navbar's mb-4 */
}

.cr-hero-inner {
  display: grid;
  gap: 2.5rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

@media (min-width: 992px) {
  .cr-hero-inner {
    grid-template-columns: minmax(0, 1fr) 25rem;
    gap: 4rem;
    align-items: center;
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }
}

.cr-breadcrumb {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.cr-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: rgba(255, 255, 255, 0.35);
}

.cr-breadcrumb a {
  color: rgba(255, 255, 255, 0.82);
}

.cr-breadcrumb a:hover {
  color: var(--brand-gold);
}

.cr-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.cr-lede p {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: var(--cr-on-dark);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.cr-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.cr-facts li {
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.88);
}

.cr-facts strong {
  color: #fff;
}

/* Price + buy box: shared by the hero and the closing band (both dark). */
.cr-hero-buy,
.cr-closing-buy {
  max-width: 26rem;
}

.cr-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.cr-price-net {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.cr-price-net-label {
  font-size: 0.95rem;
  color: var(--cr-on-dark);
}

.cr-price-gross {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 1rem;
}

.btn.cr-btn-buy {
  display: block;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1.05rem;
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-navy);
}

.btn.cr-btn-buy:hover,
.btn.cr-btn-buy:focus-visible {
  background: #ddb04a;
  border-color: #ddb04a;
  color: var(--brand-navy);
}

.btn.cr-btn-buy:disabled {
  background: rgba(255, 255, 255, 0.15);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.7);
}

.cr-buy-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
}

.cr-buy-note a,
.cr-hero-link {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(201, 151, 44, 0.7);
  text-underline-offset: 0.25em;
}

.cr-hero-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-weight: 600;
}

.cr-buy-note a:hover,
.cr-hero-link:hover {
  color: var(--brand-gold);
}

/* FICO scale card */
.cr-score {
  margin: 0;
  padding: 1.75rem 1.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
}

.cr-score-label {
  font-size: 0.85rem;
  color: var(--cr-on-dark);
}

.cr-score-target {
  margin: 0.25rem 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.cr-score-target span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cr-tier-5);
  font-variant-numeric: tabular-nums;
}

.cr-score-bar {
  position: relative;
  display: flex;
  height: 0.75rem;
  gap: 3px;
}

.cr-tier {
  height: 100%;
  border-radius: 2px;
}

/* Widths follow FICO's own bands across 300–850. */
.cr-score-bar .cr-tier-1 { width: 50.9%; background: var(--cr-tier-1); border-radius: 999px 2px 2px 999px; }
.cr-score-bar .cr-tier-2 { width: 16.4%; background: var(--cr-tier-2); }
.cr-score-bar .cr-tier-3 { width: 12.7%; background: var(--cr-tier-3); }
.cr-score-bar .cr-tier-4 { width: 10.9%; background: var(--cr-tier-4); }
.cr-score-bar .cr-tier-5 { width: 9.1%; background: var(--cr-tier-5); border-radius: 2px 999px 999px 2px; }

.cr-score-marker {
  position: absolute;
  top: 50%;
  left: 95.5%; /* ≈ 825, well inside "Exceptional" */
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-navy);
  box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: no-preference) {
  .cr-score:not(.is-ready) .cr-score-marker {
    left: 0;
  }
  .cr-score-marker {
    transition: left 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
  }
}

.cr-score-ticks {
  position: relative;
  height: 1.25rem;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.cr-score-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.cr-score-ticks span:first-child {
  transform: none;
}

.cr-score-ticks span:last-child {
  transform: translateX(-100%);
}

.cr-score-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  padding: 1rem 0 0;
  margin: 1rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: var(--cr-on-dark);
}

.cr-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.4rem;
  border-radius: 50%;
}

.cr-dot.cr-tier-1 { background: var(--cr-tier-1); }
.cr-dot.cr-tier-2 { background: var(--cr-tier-2); }
.cr-dot.cr-tier-3 { background: var(--cr-tier-3); }
.cr-dot.cr-tier-4 { background: var(--cr-tier-4); }
.cr-dot.cr-tier-5 { background: var(--cr-tier-5); }

/* Sections on the light page */
.cr-section {
  padding: 3.5rem 0 0;
}

.cr-section h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--brand-navy);
  margin-bottom: 0.75rem;
}

.cr-section-head {
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.cr-section-head p {
  color: var(--cr-muted);
  margin: 0;
}

.cr-intro {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 992px) {
  .cr-intro {
    grid-template-columns: 1.15fr 1fr;
    gap: 4rem;
  }
}

.cr-intro p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #1e293b;
  max-width: 38rem;
}

.cr-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cr-checklist li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2rem;
  border-bottom: 1px solid var(--cr-rule);
  font-size: 1.05rem;
  line-height: 1.5;
}

.cr-checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.15rem;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 2px solid var(--brand-gold-dark);
  border-bottom: 2px solid var(--brand-gold-dark);
  transform: rotate(-45deg);
}

.cr-claim {
  max-width: 48rem;
  margin: 3.5rem 0 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 4px solid var(--brand-gold);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--brand-navy);
}

/* Syllabus */
.cr-program {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 52rem;
  border-top: 1px solid var(--cr-rule);
}

.cr-program li {
  border-bottom: 1px solid var(--cr-rule);
}

.cr-lesson {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0.75rem;
  color: inherit;
  transition: background-color 0.15s ease;
}

.cr-lesson:hover {
  background: #fff;
  color: inherit;
}

.cr-lesson-number {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-gold-dark);
  font-variant-numeric: tabular-nums;
  padding-top: 0.05rem;
}

.cr-lesson-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-navy);
}

.cr-lesson:hover .cr-lesson-title {
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 0.2em;
}

.cr-lesson-excerpt {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.925rem;
  line-height: 1.5;
  color: var(--cr-muted);
}

.cr-lesson-state {
  padding-top: 0.15rem;
  color: #94a3b8;
}

.cr-lesson-open {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-navy);
}

/* Audience */
.cr-audience {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .cr-audience {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cr-audience li {
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid var(--cr-rule);
  border-top: 3px solid var(--brand-navy);
  border-radius: 0.5rem;
  line-height: 1.55;
  color: #1e293b;
}

/* Closing band */
.cr-closing {
  margin-top: 4rem;
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: #fff;
}

.cr-closing-inner {
  display: grid;
  gap: 2rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 992px) {
  .cr-closing-inner {
    grid-template-columns: minmax(0, 1fr) 26rem;
    gap: 4rem;
    align-items: center;
  }
}

.cr-closing h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.cr-closing-copy p {
  color: var(--cr-on-dark);
  font-size: 1.1rem;
  max-width: 32rem;
  margin: 0;
}

.cr-hero a:focus-visible,
.cr-closing a:focus-visible,
.cr-hero .btn:focus-visible,
.cr-closing .btn:focus-visible,
.cr-lesson:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}


/* --- Atlas Rezydencji Podatkowych (templates/atlas/atlas_landing.html) ---
   An index, not a photo wall: countries with a guide get full cards (photo,
   flag, link); the rest sit in a compact, non-clickable list so a missing
   photo never leaves a blank box and nothing looks clickable that isn't.
   The hero's continent index doubles as in-page navigation. Prefixed at-. */
.at-hero,
.at-continent,
.at-closing {
  --at-muted: #475569;
  --at-rule: rgba(15, 23, 42, 0.1);
}

.at-hero {
  background:
    radial-gradient(ellipse at 85% 0%, rgba(201, 151, 44, 0.14), transparent 55%),
    linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 65%, #16213e 100%);
  color: #fff;
  margin-top: -1.5rem; /* flush under the navbar's mb-4 */
}

.at-hero-inner {
  display: grid;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 992px) {
  .at-hero-inner {
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 5rem;
    align-items: end;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.at-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.at-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
  max-width: 38rem;
  margin: 0;
}

.at-index {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.at-index-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.at-index-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.at-index-count {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

.at-index-item:hover .at-index-name,
.at-index-item:focus-visible .at-index-name {
  color: var(--brand-gold);
}

.at-index-note {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Continent sections */
.at-continent {
  padding-top: 3.5rem;
  scroll-margin-top: 1rem;
}

.at-continent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--brand-navy);
}

.at-continent-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-navy);
}

.at-continent-head p {
  margin: 0;
  color: var(--at-muted);
}

.at-flag {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  vertical-align: 1px;
  margin-right: 0.45rem;
}

/* Countries with a guide */
.at-guides {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

@media (min-width: 640px) {
  .at-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  /* Four across, so Europe's four guides share one row. */
  .at-guides { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.at-guide {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--at-rule);
  border-radius: 0.75rem;
  overflow: hidden;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.at-guide:hover {
  color: inherit;
  border-color: rgba(15, 23, 42, 0.25);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.at-guide-media {
  display: block;
  aspect-ratio: 21 / 9; /* flatter on phones, where cards stack */
  background: linear-gradient(160deg, var(--brand-navy), var(--brand-navy-light));
}

@media (min-width: 640px) {
  .at-guide-media {
    aspect-ratio: 16 / 9;
  }
}

/* Absolutely positioned so a photo of any shape fills the fixed-ratio box
   instead of stretching it (a 4:3 upload made one card taller than the rest). */
.at-guide-media {
  position: relative;
  overflow: hidden;
}

.at-guide-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.at-guide-media-type {
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.15rem;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(201, 151, 44, 0.3), transparent 60%),
    linear-gradient(160deg, var(--brand-navy), var(--brand-navy-light));
}

.at-guide-media-type span {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
}

.at-guide-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.15rem 1.15rem;
}

.at-guide-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand-navy);
}

.at-guide-subtitle {
  margin-top: 0.25rem;
  font-size: 0.925rem;
  line-height: 1.45;
  color: var(--at-muted);
}

.at-guide-cta {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-navy);
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 0.25em;
}

.at-guide:hover .at-guide-cta {
  color: var(--brand-gold-dark);
}

/* Countries without a guide yet */
.at-others-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.at-others-title span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--at-muted);
}

.at-others {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 640px) {
  .at-others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .at-others { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.at-other {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--at-rule);
  border-radius: 0.6rem;
}

.at-other-thumb {
  flex: 0 0 4rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #eef1f5;
}

.at-other-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.at-other-thumb img.at-other-flag {
  width: 1.9rem;
  height: 1.3rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.at-other-body {
  min-width: 0;
}

.at-other-name {
  display: block;
  font-weight: 700;
  color: var(--brand-navy);
}

.at-other-subtitle {
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--at-muted);
}

/* Closing band */
.at-closing {
  margin-top: 4rem;
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: #fff;
}

.at-closing-inner {
  display: grid;
  gap: 1.75rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 992px) {
  .at-closing-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4rem;
    align-items: center;
  }
}

.at-closing h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.at-closing p {
  margin: 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
}

.at-closing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.btn.at-btn {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-navy);
  padding: 0.75rem 1.5rem;
}

.btn.at-btn:hover,
.btn.at-btn:focus-visible {
  background: #ddb04a;
  border-color: #ddb04a;
  color: var(--brand-navy);
}

.at-closing-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 151, 44, 0.7);
  text-underline-offset: 0.25em;
}

.at-closing-link:hover {
  color: var(--brand-gold);
}

.at-hero a:focus-visible,
.at-closing a:focus-visible,
.at-guide:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.at-index) {
    scroll-behavior: smooth;
  }
}


/* --- Atlas country guides (templates/atlas/country_base.html) ---
   Photo hero with the country's key rates up front, jump links built from
   the section headings, left-aligned reading column, quieter tables, and
   results/regimes called out in panels. Prefixed ct-. */
.ct-hero,
.ct-jump,
.ct-content,
.ct-closing {
  --ct-muted: #475569;
  --ct-rule: rgba(15, 23, 42, 0.1);
}

.ct-hero {
  position: relative;
  color: #fff;
  margin-top: -1.5rem; /* flush under the navbar's mb-4 */
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 65%, #16213e 100%);
}

.ct-hero-photo {
  background:
    /* Dark enough on the right too: the facts strip runs full width over the
       photo's brightest part (e.g. Santorini's white houses). */
    linear-gradient(100deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.84) 45%, rgba(15, 23, 42, 0.62) 100%),
    var(--ct-photo) center / cover no-repeat,
    var(--brand-navy);
}

.ct-hero-inner {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 992px) {
  .ct-hero-inner {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
  }
}

.ct-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.ct-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: rgba(255, 255, 255, 0.35);
}

.ct-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.ct-breadcrumb a:hover {
  color: var(--brand-gold);
}

.ct-title {
  color: #fff;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin-bottom: 1rem;
}

.ct-flag {
  width: 36px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  vertical-align: 0.15em;
  margin-right: 0.6rem;
}

.ct-lede p {
  font-size: clamp(1.05rem, 1.8vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 40rem;
  margin: 0;
}

.ct-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 2rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
  .ct-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ct-facts > div {
  padding: 1rem 1rem 0 0;
}

@media (min-width: 768px) {
  .ct-facts > div + div {
    padding-left: 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
  }
}

.ct-facts dt {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.2rem;
}

.ct-facts dd {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

/* Jump links */
.ct-jump {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 calc(50% - 50vw);
  padding: 0 calc(50vw - 50%);
  background: rgba(247, 248, 250, 0.96);
  border-bottom: 1px solid var(--ct-rule);
  backdrop-filter: blur(6px);
}

.ct-jump ul {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  list-style: none;
  padding: 0.6rem 0;
  margin: 0;
  scrollbar-width: none;
}

.ct-jump a {
  display: block;
  white-space: nowrap;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-jump a:hover {
  background: #fff;
  color: var(--brand-navy);
}

/* Content */
.ct-content {
  padding-bottom: 1rem;
}

.ct-section {
  padding-top: 3rem;
  scroll-margin-top: 4rem;
}

.ct-section + .ct-section {
  margin-top: 1rem;
  border-top: 1px solid var(--ct-rule);
}

.ct-section h2 {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-navy);
  margin-bottom: 1.25rem;
  max-width: 40rem;
}

.ct-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 1.75rem 0 0.6rem;
}

.ct-section > p,
.ct-section > ul {
  max-width: 46rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1e293b;
}

.ct-grid {
  display: grid;
  gap: 1rem 3rem;
}

@media (min-width: 992px) {
  .ct-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ct-block > h3:first-child {
  margin-top: 0;
}

.ct-table {
  width: 100%;
  margin-bottom: 0.5rem;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--ct-rule);
}

.ct-table th,
.ct-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--ct-rule);
  vertical-align: top;
  text-align: left;
}

.ct-table thead th {
  background: #eef1f5;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ct-muted);
}

.ct-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Wide rate grids (Malta's tariffs): keep amounts like "12 001 – 16 000 €"
   on one line and let the table scroll sideways on phones instead. */
.table-responsive > .ct-table:not(.ct-table-figures) th,
.table-responsive > .ct-table:not(.ct-table-figures) td {
  white-space: nowrap;
}

/* Worked examples: amounts right-aligned, the baseline row muted. */
.ct-table-figures td:last-child,
.ct-table-figures th:last-child {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  color: var(--brand-navy);
}

.ct-table-figures .ct-row-muted td {
  color: var(--ct-muted);
  font-weight: 400;
}

.ct-note {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ct-muted);
}

.ct-panels {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .ct-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ct-panel-wide {
    grid-column: 1 / -1;
  }
}

.ct-panel {
  padding: 1.25rem 1.4rem;
  background: #fff;
  border: 1px solid var(--ct-rule);
  border-radius: 0.6rem;
}

.ct-panel-accent {
  border-top: 3px solid var(--brand-gold);
}

.ct-content .ct-panel h3 {
  margin-top: 0;
}

.ct-panel p,
.ct-panel ul {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.ct-panel > :last-child {
  margin-bottom: 0;
}

.ct-panel ul,
.ct-result ul {
  padding-left: 1.1rem;
}

.ct-result {
  max-width: 46rem;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: rgba(201, 151, 44, 0.09);
  border-left: 4px solid var(--brand-gold);
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--brand-navy);
}

.ct-content .ct-result h3 {
  margin-top: 0;
}

.ct-result > :last-child {
  margin-bottom: 0;
}

.ct-checklist {
  list-style: none;
  padding: 0;
}

.ct-checklist li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.9rem;
}

.ct-checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.95rem;
  width: 0.85rem;
  height: 0.45rem;
  border-left: 2px solid var(--brand-gold-dark);
  border-bottom: 2px solid var(--brand-gold-dark);
  transform: rotate(-45deg);
}

.ct-content .faq-answer p {
  margin: 0;
}

/* Closing band */
.ct-closing {
  margin-top: 3.5rem;
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: #fff;
}

.ct-closing-inner {
  display: grid;
  gap: 2.5rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 992px) {
  .ct-closing-inner {
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 5rem;
  }
}

.ct-closing h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.ct-closing-copy p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.ct-closing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.btn.ct-btn {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-navy);
  padding: 0.75rem 1.5rem;
}

.btn.ct-btn:hover,
.btn.ct-btn:focus-visible {
  background: #ddb04a;
  border-color: #ddb04a;
  color: var(--brand-navy);
}

.ct-closing-link,
.ct-others-all {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 151, 44, 0.7);
  text-underline-offset: 0.25em;
}

.ct-closing-link:hover,
.ct-others-all:hover {
  color: var(--brand-gold);
}

.ct-others h3 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ct-others ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.ct-others li a {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.ct-others li a:hover {
  color: var(--brand-gold);
}

.ct-flag-sm {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  margin-right: 0.5rem;
  vertical-align: -1px;
}

.ct-hero a:focus-visible,
.ct-jump a:focus-visible,
.ct-closing a:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.ct-jump) {
    scroll-behavior: smooth;
  }
}


/* --- US LLC knowledge hub (templates/articles/us_llc_hub_landing.html) ---
   A knowledge base, not a link dump: section index in the hero, a sticky
   instant search, articles as cards with their excerpt, planned ones as a
   quiet "wkrótce" list, offers at the end. Prefixed kb-. */
.kb-hero,
.kb-manifesto,
.kb-toolbar,
.kb-section,
.kb-empty,
.kb-offer {
  --kb-muted: #475569;
  --kb-rule: rgba(15, 23, 42, 0.1);
}

.kb-hero {
  background:
    radial-gradient(ellipse at 85% 0%, rgba(201, 151, 44, 0.14), transparent 55%),
    linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 65%, #16213e 100%);
  color: #fff;
  margin-top: -1.5rem; /* flush under the navbar's mb-4 */
}

.kb-hero-inner {
  display: grid;
  gap: 2.5rem;
  padding-top: 2.75rem;
  padding-bottom: 3rem;
}

@media (min-width: 992px) {
  .kb-hero-inner {
    grid-template-columns: minmax(0, 1fr) 23rem;
    gap: 4.5rem;
    align-items: center;
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
  }
}

.kb-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
}

.kb-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: rgba(255, 255, 255, 0.35);
}

.kb-breadcrumb a {
  color: rgba(255, 255, 255, 0.82);
}

.kb-breadcrumb a:hover {
  color: var(--brand-gold);
}

.kb-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.kb-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 38rem;
  margin-bottom: 1.75rem;
}

.kb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.btn.kb-btn {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-navy);
  padding: 0.75rem 1.5rem;
}

.btn.kb-btn:hover,
.btn.kb-btn:focus-visible {
  background: #ddb04a;
  border-color: #ddb04a;
  color: var(--brand-navy);
}

.kb-hero-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 151, 44, 0.7);
  text-underline-offset: 0.25em;
}

.kb-hero-link:hover {
  color: var(--brand-gold);
}

.kb-index-total {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.kb-index ol {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.kb-index a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.kb-index a:hover {
  color: var(--brand-gold);
}

.kb-index-count {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* The pitch, set as a pull statement */
.kb-manifesto {
  max-width: 50rem;
  padding: 3rem 0 0.5rem;
}

.kb-manifesto-lead {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--brand-navy);
  padding-left: 1.25rem;
  border-left: 4px solid var(--brand-gold);
}

.kb-manifesto p:not(.kb-manifesto-lead) {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--kb-muted);
  margin: 0;
}

.kb-manifesto a {
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 0.2em;
}

/* Sticky search */
.kb-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 2rem calc(50% - 50vw) 0;
  padding: 0.75rem calc(50vw - 50%);
  background: rgba(247, 248, 250, 0.96);
  border-bottom: 1px solid var(--kb-rule);
  backdrop-filter: blur(6px);
  scroll-margin-top: 0;
}

.kb-search {
  flex: 1 1 18rem;
  max-width: 34rem;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font: inherit;
  font-size: 1rem;
  color: var(--brand-navy);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.85rem center;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.kb-search:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(201, 151, 44, 0.25);
}

.kb-search-status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--kb-muted);
}

/* Sections */
.kb-section {
  padding-top: 2.5rem;
  scroll-margin-top: 4.5rem;
}

.kb-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.85rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--brand-navy);
}

.kb-section-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-gold-dark);
  font-variant-numeric: tabular-nums;
}

.kb-section-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--brand-navy);
}

.kb-section-count {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--kb-muted);
}

.kb-searching .kb-section-count {
  display: none;
}

.kb-articles {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .kb-articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .kb-articles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.kb-articles .kb-item {
  display: flex;
}

.kb-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--kb-rule);
  border-radius: 0.6rem;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kb-card:hover {
  color: inherit;
  border-color: rgba(15, 23, 42, 0.25);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.kb-card-title {
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-navy);
}

.kb-card:hover .kb-card-title {
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 0.2em;
}

.kb-card-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--kb-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kb-planned {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 0;
}

.kb-planned .kb-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0;
  font-size: 0.925rem;
  color: var(--kb-muted);
}

.kb-soon {
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--kb-rule);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--kb-muted);
}

.kb-empty {
  margin: 2.5rem 0 0;
  font-size: 1.05rem;
  color: var(--kb-muted);
}

.kb-empty a {
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: underline;
}

/* Offers */
.kb-offer {
  margin-top: 4rem;
  padding: 3.5rem 0;
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: #fff;
}

.kb-offer h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.kb-offer-lede {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2rem;
}

.kb-plans {
  display: grid;
  gap: 1rem;
}

@media (min-width: 992px) {
  .kb-plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

.kb-plan {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
}

.kb-plan-featured {
  background: #fff;
  color: var(--brand-navy);
  border-color: #fff;
}

.kb-plan h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: inherit;
  margin-bottom: 0.5rem;
}

.kb-plan-tag {
  align-self: flex-start;
  margin: 0 0 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-gold);
  color: var(--brand-navy);
  font-size: 0.75rem;
  font-weight: 700;
}

.kb-plan-desc {
  font-size: 0.925rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.25rem;
}

.kb-plan-featured .kb-plan-desc {
  color: var(--kb-muted);
}

.kb-plan-price {
  margin-top: auto;
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.btn.kb-btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  background: transparent;
}

.btn.kb-btn-outline:hover,
.btn.kb-btn-outline:focus-visible {
  border-color: var(--brand-gold);
  background: var(--brand-gold);
  color: var(--brand-navy);
}

.kb-hero a:focus-visible,
.kb-card:focus-visible,
.kb-offer a:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.kb-index) {
    scroll-behavior: smooth;
  }
}


/* --- Article body building blocks (HTML articles, e.g. the Nevis cluster in
   articles/content/nevis/) and the "Czytaj dalej" block on article_detail.
   Prefixed ac- (article content). --- */
.ac-table-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.ac-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.ac-table caption {
  caption-side: top;
  padding: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #475569;
}

.ac-table th,
.ac-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  vertical-align: top;
}

.ac-table thead th {
  background: var(--brand-navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.ac-table tbody th {
  font-weight: 600;
  color: var(--brand-navy);
}

.ac-note,
.ac-warn,
.ac-example {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}

.ac-note {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-left: 4px solid var(--brand-navy);
}

.ac-warn {
  background: rgba(201, 151, 44, 0.08);
  border-left: 4px solid var(--brand-gold);
}

.ac-example {
  background: #f1f5f9;
  border-left: 4px solid #64748b;
}

.ac-note > :last-child,
.ac-warn > :last-child,
.ac-example > :last-child {
  margin-bottom: 0;
}

.ac-label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.ac-cta {
  margin: 2.5rem 0 2rem;
  padding: 1.5rem;
  background: var(--brand-navy);
  color: #fff;
  border-radius: 0.75rem;
  text-align: left;
}

.ac-cta h2,
.ac-cta h3 {
  color: #fff;
  margin-top: 0;
}

.ac-cta p {
  color: rgba(255, 255, 255, 0.82);
}

.ac-cta a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 0.2em;
}

.ac-cta a:hover {
  color: var(--brand-gold);
}

.ac-sources {
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  word-break: break-word;
}

.ac-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #64748b;
  text-align: left;
}

/* Structure diagram (e.g. Nevis holding over a Wyoming LLC) */
.ac-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 2rem 0;
  text-align: center;
}

.ac-diagram-box {
  width: min(100%, 26rem);
  padding: 0.9rem 1rem;
  background: #fff;
  border: 2px solid var(--brand-navy);
  border-radius: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.ac-diagram-box strong {
  display: block;
  color: var(--brand-navy);
}

.ac-diagram-box small {
  color: #475569;
}

.ac-diagram-box.is-shield {
  border-color: var(--brand-gold);
  background: rgba(201, 151, 44, 0.08);
}

.ac-diagram-arrow {
  position: relative;
  height: 2.75rem;
  width: 2px;
  background: var(--brand-navy);
}

.ac-diagram-arrow::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  border: 7px solid transparent;
  border-top-color: var(--brand-navy);
  border-bottom: 0;
  transform: translateX(-50%);
}

.ac-diagram-arrow span {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  color: #475569;
}

/* Justified body text opens wide gaps between words in a phone-width
   column; articles stay justified on larger screens only. */
@media (max-width: 767.98px) {
  .article-body.text-justify {
    text-align: left;
  }
}

/* "Czytaj dalej" under articles */
.article-read-next ul {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-read-next a {
  display: block;
  padding: 0.9rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.6rem;
  color: inherit;
}

.article-read-next a:hover {
  border-color: rgba(15, 23, 42, 0.25);
  color: inherit;
}

.article-read-next-title {
  display: block;
  font-weight: 700;
  color: var(--brand-navy);
}

.article-read-next-excerpt {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: #475569;
}

/* --- Long-form guides (HTML articles with 4+ sections, e.g. the Nevis
   cluster): table of contents, heading rhythm, sidebar CTA and tables that
   stack into cards on phones. Markup from articles/rich_content.py and
   templates/articles/article_detail.html. --- */

/* Left-aligned: justified text opens wide gaps around long legal terms. */
.article-body--guide {
  text-align: left;
}

.article-body--guide h2 {
  margin-top: 2.75rem;
  margin-bottom: 0.9rem;
  scroll-margin-top: 1.25rem;
}

.article-body--guide h3 {
  margin-top: 1.9rem;
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
}

.article-body--guide > h2:first-child,
.article-body--guide .ac-cta h2 {
  margin-top: 0;
}

.article-body--guide ul,
.article-body--guide ol {
  padding-left: 1.4rem;
}

.article-body--guide li + li {
  margin-top: 0.35rem;
}

.article-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.article-toc-list li {
  counter-increment: toc;
}

.article-toc-list a {
  display: flex;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid transparent;
  border-radius: 0 0.35rem 0.35rem 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #334155;
  text-decoration: none;
}

.article-toc-list a::before {
  content: counter(toc);
  flex: 0 0 1.1rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.article-toc-list a:hover {
  background: #f1f5f9;
  color: var(--brand-navy);
}

.article-toc-list a.is-active {
  border-left-color: var(--brand-gold);
  background: rgba(201, 151, 44, 0.08);
  color: var(--brand-navy);
  font-weight: 600;
}

.article-toc-title {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.article-sidebar-sticky {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 3rem);
}

.article-sidebar-sticky .article-toc {
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.75rem;
}

.article-side-cta {
  flex: none;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--brand-navy);
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.45;
}

.article-side-cta p {
  margin-bottom: 0.85rem;
}

.article-side-cta-title {
  margin-bottom: 0.3rem !important;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

/* Phones/tablets: collapsible table of contents above the article. */
.article-toc--inline {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.75rem;
}

.article-toc--inline summary {
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--brand-navy);
  cursor: pointer;
}

.article-toc--inline summary span {
  font-weight: 400;
  color: #64748b;
}

.article-toc--inline .article-toc-list {
  padding: 0 0.6rem 0.75rem;
}

.article-toc--inline .article-toc-list a {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  font-size: 1rem;
}

/* Closing call-to-action: the booking link reads as a button. */
.ac-cta a.ac-cta-btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--brand-gold);
  border-radius: 0.5rem;
  color: var(--brand-navy);
  text-decoration: none;
}

.ac-cta a.ac-cta-btn:hover,
.ac-cta a.ac-cta-btn:focus-visible {
  background: #ddb04a;
  color: var(--brand-navy);
}

/* Phones: every table row becomes a card, each cell labelled with its
   column header (data-label, added by articles/rich_content.py), instead of
   a table cut off at the right edge. */
@media (max-width: 575.98px) {
  .ac-table-wrap {
    overflow: visible;
  }

  .ac-table,
  .ac-table tbody,
  .ac-table tr,
  .ac-table th,
  .ac-table td {
    display: block;
    width: 100%;
  }

  .ac-table {
    border: 0;
    background: transparent;
  }

  .ac-table caption {
    display: block;
    font-weight: 600;
  }

  .ac-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .ac-table tr {
    margin-bottom: 0.75rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.6rem;
    overflow: hidden;
  }

  .ac-table th,
  .ac-table td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .ac-table tr > :last-child {
    border-bottom: 0;
  }

  .ac-table tbody th {
    background: #f1f5f9;
    font-size: 1rem;
  }

  .ac-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
  }
}
