.ib-hero { padding: 1rem 0 1.2rem; }
.ib-hero h1 { margin: 0; letter-spacing: 0.2px; }
.ib-subheader { margin: 0.35rem 0 0.75rem; opacity: 0.85; }
.ib-desc { margin: 0 0 1rem; max-width: 60ch; }
.ib-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.ib-cta { border-top: 1px solid rgba(0,0,0,0.08); padding-top: 1rem; }
.ib-cta ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }

/* ===== Brand: same palette and type as the map site (src/styles/site.css) ===== */

:root,
[data-md-color-scheme="default"] {
  --ib-green: #173e39;
  --ib-green-mid: #2d554c;
  --ib-green-deep: #10302c;
  --ib-link: #22573f;
  --ib-gold: #e6c77f;
  --ib-gold-line: #d9c47b;
  --ib-gold-dark: #8a6a1c;
  --ib-ink: #172725;
  --ib-muted: #60716b;
  --ib-line: #dce4de;
  --ib-pale: #f5f7f2;
  --ib-mint: #edf5ee;

  --md-primary-fg-color: var(--ib-green);
  --md-primary-fg-color--light: var(--ib-green-mid);
  --md-primary-fg-color--dark: var(--ib-green-deep);
  --md-primary-bg-color: #fff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.72);
  --md-accent-fg-color: var(--ib-gold-dark);
  --md-accent-fg-color--transparent: rgba(138, 106, 28, 0.1);
  --md-default-bg-color: var(--ib-pale);
  --md-default-fg-color: var(--ib-ink);
  --md-typeset-color: var(--ib-ink);
  --md-typeset-a-color: var(--ib-link);
}

/* Headings use the serif from the map site */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  color: var(--ib-green);
  letter-spacing: -0.02em;
}
.md-typeset h1 { letter-spacing: -0.03em; }

/* Header and tabs */
.md-header,
.md-tabs {
  background-color: var(--ib-green);
  color: #fff;
}
.md-header {
  box-shadow: none;
}
.md-tabs {
  border-bottom: 2px solid var(--ib-gold-line);
  box-shadow: 0 5px 18px rgba(16, 45, 25, 0.22);
}
body,
.md-main {
  background-color: var(--ib-pale);
}
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
}
.md-header__title {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.md-tabs__link {
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
}
.md-tabs__link:hover,
.md-tabs__link--active,
.md-tabs__item--active .md-tabs__link {
  color: var(--ib-gold);
  opacity: 1;
}

/* Buttons */
.md-typeset .md-button {
  border-color: var(--ib-green);
  border-radius: 6px;
  color: var(--ib-green);
}
.md-typeset .md-button:hover,
.md-typeset .md-button:focus {
  border-color: var(--ib-green-mid);
  background: var(--ib-mint);
  color: var(--ib-green);
}
.md-typeset .md-button--primary {
  border-color: var(--ib-green);
  background: var(--ib-green);
  color: #fff;
}
.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus {
  border-color: var(--ib-green-mid);
  background: var(--ib-green-mid);
  color: #fff;
}

/* Cards and tables */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid var(--ib-line);
  border-radius: 8px;
  background: #fff;
}
.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
  border-color: var(--ib-gold);
  box-shadow: 0 8px 22px rgba(23, 62, 57, 0.12);
}
.md-typeset table:not([class]) {
  border: 1px solid var(--ib-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.md-typeset table:not([class]) th {
  background: var(--ib-mint);
  color: var(--ib-green);
}

/* Footer */
.md-footer,
.md-footer-meta {
  background-color: var(--ib-green);
}
.md-footer-meta {
  background-color: var(--ib-green-deep);
}

/* --- Slider layout --- */
.ib-wiki-slider { margin: 0.8rem 0 1.2rem; position: relative; }
.ib-wiki-slider .swiper { padding: 0.25rem 0.25rem 1.75rem; }

.ib-wiki-card {
  height: 100%;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
}

.ib-wiki-card h4 { margin: 0 0 0.35rem; font-size: 1.02rem; }
.ib-wiki-card p { margin: 0 0 0.75rem; opacity: 0.86; font-size: 0.92rem; }

.ib-wiki-slider .swiper-button-next,
.ib-wiki-slider .swiper-button-prev { transform: scale(0.85); }

.ib-wiki-slider .swiper-pagination-bullet { opacity: 0.45; }
.ib-wiki-slider .swiper-pagination-bullet-active { opacity: 0.9; }

/* --- Badges --- */
.ib-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0 0 0.55rem;
}
.ib-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.4;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.04);
  opacity: 0.92;
  white-space: nowrap;
}
.ib-badge--unesco {
  border-color: rgba(178,58,58,0.55);
  background: rgba(178,58,58,0.08);
}
.ib-wiki-card {
  min-height: 260px;
}

.ib-wiki-card img {
  height: 180px !important;
}

/* ===== Handbook components ===== */

/* "Në një shikim": three short facts at the top of a practical page */
.md-typeset .ib-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.6rem;
  margin: 1.1rem 0 1.5rem;
}
.md-typeset .ib-glance > div {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--ib-line);
  border-left: 3px solid var(--ib-gold-line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
}
.md-typeset .ib-glance strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ib-muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Numbered steps: wrap an ordered list in <div class="ib-steps" markdown> */
.md-typeset .ib-steps > ol {
  margin: 1rem 0 1.3rem;
  padding: 0;
  list-style: none;
  counter-reset: ib-step;
}
.md-typeset .ib-steps > ol > li {
  position: relative;
  margin: 0 0 0.75rem;
  padding: 0.15rem 0 0.15rem 2.7rem;
  counter-increment: ib-step;
}
.md-typeset .ib-steps > ol > li::before {
  content: counter(ib-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--ib-green);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}
.md-typeset .ib-steps > ol > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 2rem;
  bottom: -0.7rem;
  left: 0.9rem;
  width: 2px;
  background: var(--ib-line);
}

/* Compact cards: less padding, for reference lists */
.md-typeset .grid.cards.ib-compact > ul > li { padding: 0.6rem 0.8rem; }
.md-typeset .grid.cards.ib-compact p { margin: 0.2em 0; }

/* Pill labels for status, level, country */
.md-typeset .ib-pill {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--ib-line);
  border-radius: 999px;
  background: var(--ib-mint);
  color: var(--ib-green);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.md-typeset .ib-pill--warn {
  border-color: var(--ib-gold-line);
  background: #fbf3dc;
  color: var(--ib-gold-dark);
}

/* Tool logos next to headings: small, consistent badge so mixed favicon
   qualities and transparent backgrounds still read cleanly */
.md-typeset img.ib-tool-logo {
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  vertical-align: -0.45rem;
  margin-right: 0.45rem;
  padding: 0.2rem;
  background: #fff;
  border: 1px solid var(--ib-line);
  border-radius: 0.4rem;
}

/* Tool/plugin entries as standalone cards: separates each recommendation
   from surrounding prose, matching the border+radius+hover language already
   used by .grid.cards and tables. */
.md-typeset .ib-tool-card {
  border: 1px solid var(--ib-line);
  border-radius: 8px;
  background: #fff;
  padding: 1.1rem 1.3rem 1.3rem;
  margin: 1.25rem 0 1.5rem;
}
.md-typeset .ib-tool-card:hover {
  border-color: var(--ib-gold);
  box-shadow: 0 8px 22px rgba(23, 62, 57, 0.12);
}
.md-typeset .ib-tool-card > h3:first-child {
  margin-top: 0;
}
.md-typeset .ib-tool-card > :last-child {
  margin-bottom: 0;
}

/* Task lists read as checklists */
.md-typeset .task-list-item { margin-bottom: 0.25rem; }

/* Landing hero lead paragraph */
.md-typeset .ib-lead { font-size: 0.95rem; color: var(--ib-muted); max-width: 46rem; }

/* Exactly four cards: 2x2 instead of 3 + 1 orphan */
@media screen and (min-width: 60em) {
  .md-typeset .grid.cards > ul:has(> li:nth-child(4):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Landing page ===== */

.md-typeset .ib-landing-hero {
  position: relative;
  overflow: hidden;
  margin: 0.4rem 0 2rem;
  padding: 2.6rem 2.4rem 2.2rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 8%, rgba(230, 199, 127, 0.28), transparent 42%),
    radial-gradient(circle at 8% 110%, rgba(45, 85, 76, 0.9), transparent 55%),
    linear-gradient(135deg, var(--ib-green-deep), var(--ib-green) 60%, var(--ib-green-mid));
  box-shadow: 0 18px 40px rgba(16, 48, 44, 0.22);
  color: #fff;
}
.md-typeset .ib-landing-hero::after {
  content: "";
  position: absolute;
  top: -3.5rem;
  right: -3.5rem;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(230, 199, 127, 0.35);
  border-radius: 50%;
  box-shadow: 0 0 0 2.2rem rgba(230, 199, 127, 0.06), 0 0 0 4.4rem rgba(230, 199, 127, 0.04);
  pointer-events: none;
}
.md-typeset .ib-landing-hero > * { position: relative; z-index: 1; }
.md-typeset .ib-landing-hero .ib-eyebrow {
  margin: 0 0 0.6rem;
  color: var(--ib-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.md-typeset .ib-landing-hero h1 {
  max-width: 34rem;
  margin: 0 0 0.8rem;
  color: #fff;
  font-size: 2.35rem;
  line-height: 1.12;
}
.md-typeset .ib-landing-hero p { color: rgba(255, 255, 255, 0.86); }
.md-typeset .ib-landing-hero .ib-hero-lead {
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.md-typeset .ib-landing-hero .ib-hero-lead strong { color: var(--ib-gold); }
.md-typeset .ib-landing-hero .md-button {
  margin: 0.5rem 0.5rem 0 0;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.md-typeset .ib-landing-hero .md-button:hover,
.md-typeset .ib-landing-hero .md-button:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.md-typeset .ib-landing-hero .md-button--primary {
  border-color: var(--ib-gold);
  background: var(--ib-gold);
  color: var(--ib-green-deep);
  font-weight: 700;
}
.md-typeset .ib-landing-hero .md-button--primary:hover,
.md-typeset .ib-landing-hero .md-button--primary:focus {
  border-color: #f0d898;
  background: #f0d898;
  color: var(--ib-green-deep);
}
.md-typeset .ib-landing-hero .ib-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0 0;
}
.md-typeset .ib-landing-hero .ib-chips span {
  padding: 0.15rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
}

/* Section heading with a short gold rule */
.md-typeset .ib-landing h2 {
  margin-top: 2.4rem;
}
.md-typeset .ib-landing h2::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 3px;
  margin-top: 0.4rem;
  border-radius: 2px;
  background: var(--ib-gold-line);
}
.md-typeset .ib-section-lead {
  margin-top: -0.2rem;
  color: var(--ib-muted);
  font-size: 0.8rem;
}

/* Four-step path through the guide */
.md-typeset .ib-path > ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
  padding: 0;
  list-style: none;
  counter-reset: ib-path;
}
.md-typeset .ib-path > ol > li {
  position: relative;
  margin: 0;
  padding: 2.9rem 1rem 1rem;
  border: 1px solid var(--ib-line);
  border-top: 3px solid var(--ib-green);
  border-radius: 10px;
  background: #fff;
  counter-increment: ib-path;
  font-size: 0.78rem;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.md-typeset .ib-path > ol > li:hover {
  border-top-color: var(--ib-gold-line);
  box-shadow: 0 10px 24px rgba(23, 62, 57, 0.12);
  transform: translateY(-2px);
}
.md-typeset .ib-path > ol > li::before {
  content: "0" counter(ib-path);
  position: absolute;
  top: 0.6rem;
  left: 1rem;
  color: var(--ib-gold-dark);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}
.md-typeset .ib-path > ol > li > p:first-child {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}
.md-typeset .ib-path > ol > li > p:first-child a { font-weight: 700; }

/* Two wide highlight banners */
.md-typeset .ib-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}
.md-typeset .ib-banner {
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--ib-line);
  border-radius: 12px;
  background: linear-gradient(160deg, #fff, var(--ib-mint));
}
.md-typeset .ib-banner--dark {
  border-color: transparent;
  background: linear-gradient(150deg, var(--ib-green-deep), var(--ib-green-mid));
  color: #fff;
}
.md-typeset .ib-banner h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.md-typeset .ib-banner--dark h3,
.md-typeset .ib-banner--dark p { color: #fff; }
.md-typeset .ib-banner p { margin: 0.3rem 0 0.7rem; font-size: 0.82rem; }
.md-typeset .ib-banner .md-button { margin: 0.2rem 0.4rem 0 0; }
.md-typeset .ib-banner--dark .md-button {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.md-typeset .ib-banner--dark .md-button:hover { background: rgba(255, 255, 255, 0.12); }
.md-typeset .ib-banner--dark .md-button--primary {
  border-color: var(--ib-gold);
  background: var(--ib-gold);
  color: var(--ib-green-deep);
}
.md-typeset .ib-banner ul { margin: 0.4rem 0 0.8rem; padding-left: 1.1rem; font-size: 0.82rem; }
.md-typeset .ib-banner li { margin: 0.15rem 0; }

@media screen and (max-width: 44.9375em) {
  .md-typeset .ib-landing-hero { padding: 1.8rem 1.3rem 1.6rem; }
  .md-typeset .ib-landing-hero h1 { font-size: 1.75rem; }
}

/* ===== Mobile ===== */

/* The edit pencil floats beside the hero on the landing page */
.md-content__inner:has(.ib-landing-hero) > .md-content__button { display: none; }

@media screen and (max-width: 76.1875em) {
  /* Site name fits the header instead of ending in an ellipsis */
  .md-header__title { font-size: 0.72rem; letter-spacing: 0.04em; }
}

@media screen and (max-width: 59.9375em) {
  .md-main__inner { margin-top: 0.4rem; }
  .md-content__inner { margin-inline: 0.9rem; }
  .md-content__inner::before { height: 0.2rem; }

  .md-typeset { font-size: 0.76rem; line-height: 1.6; }
  .md-typeset h1 { margin-bottom: 0.9em; font-size: 1.75em; line-height: 1.15; }
  .md-typeset h2 { margin-top: 1.9em; font-size: 1.4em; }
  .md-typeset h3 { font-size: 1.1em; }

  /* Tables: denser, so three columns still read on a phone */
  .md-typeset table:not([class]) { font-size: 0.68rem; }
  .md-typeset table:not([class]) th,
  .md-typeset table:not([class]) td { padding: 0.65em 0.7em; }

  .md-typeset code { word-break: break-word; }
  .md-typeset pre > code { font-size: 0.72em; }
  .md-typeset .admonition,
  .md-typeset details { font-size: 0.72rem; }
  .md-typeset .grid.cards > ul > li { padding: 0.8rem 0.9rem; }
  .md-typeset .ib-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Buttons fill the row and are easy to tap */
  .md-typeset .md-button {
    display: block;
    margin: 0.5rem 0 0;
    padding: 0.7em 1em;
    text-align: center;
  }
  .md-typeset .ib-landing-hero .md-button,
  .md-typeset .ib-banner .md-button { margin: 0.5rem 0 0; }

  /* Landing: the four steps become a 2x2 grid */
  .md-typeset .ib-landing h2 { margin-top: 2rem; font-size: 1.35em; }
  .md-typeset .ib-path > ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .md-typeset .ib-path > ol > li { padding: 2.5rem 0.8rem 0.8rem; font-size: 0.72rem; }
  .md-typeset .ib-path > ol > li::before { top: 0.5rem; left: 0.8rem; font-size: 1.25rem; }
  .md-typeset .ib-path > ol > li > p:first-child { font-size: 0.85rem; }
  .md-typeset .ib-banner { padding: 1.1rem 1.1rem 1rem; }
  .md-typeset .ib-landing-hero .ib-chips { margin-top: 1.1rem; }
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .ib-landing-hero {
    margin: 0.2rem -0.3rem 1.5rem;
    padding: 1.5rem 1.1rem 1.3rem;
    border-radius: 12px;
  }
  .md-typeset .ib-landing-hero h1 { font-size: 1.7rem; }
  .md-typeset .ib-landing-hero::after { top: -5rem; right: -6rem; }
}
