:root {
  --bg: #f6f8f6;
  --surface: #ffffff;
  --surface2: #f0f4f2;
  --surface3: #e2e9e5;
  --text: #17201c;
  --muted: #5f6f68;
  --border: #d7e0db;
  --brand: #b11f24;
  --brand-deep: #7d1118;
  --accent: #0f766e;
  --gold: #c79a2b;
  --shadow: 0 10px 28px rgba(18, 32, 27, 0.07);
  --shadow-soft: 0 6px 18px rgba(18, 32, 27, 0.05);
  --radius: 10px;
  --radius-sm: 8px;
  --font-sans: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
  --font-display: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
}

.dark {
  --bg: #121416;
  --surface: #171a1d;
  --surface2: #1e2327;
  --surface3: #252b31;
  --text: #edf1f3;
  --muted: #a3adb5;
  --border: #2d353b;
  --brand: #db5358;
  --brand-deep: #ff7c80;
  --accent: #45b6ab;
  --gold: #e0b24c;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.65;
  background: linear-gradient(180deg, #fbfcfb 0%, var(--bg) 42%, #eef4f1 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p, li { color: inherit; }
.container { width: min(calc(100% - 2rem), 1180px); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.header-glow {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--accent));
  opacity: .85;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}
.brand-copy strong {
  display: block;
  font-size: 1rem;
  letter-spacing: .02em;
}
.brand-copy small { color: var(--muted); display: block; }

.nav-desktop, .nav-mobile {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav-desktop a, .nav-mobile a {
  color: var(--muted);
  font-weight: 700;
  transition: color .18s ease;
}
.nav-desktop a:hover, .nav-mobile a:hover { color: var(--brand); }
.nav-mobile {
  display: none;
  flex-direction: column;
  align-items: stretch;
  padding: 0 1rem 1rem;
  gap: .8rem;
}
.nav-mobile.open { display: flex; }
.mobile-only { display: none; }
.icon-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.lang-switcher {
  display: flex;
  gap: .35rem;
  align-items: center;
  padding: .25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
}
.lang-switcher a {
  padding: .25rem .58rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--muted);
}
.lang-switcher a.is-active {
  background: var(--brand);
  color: #fff;
}

.main-shell { padding: 1.25rem 0 4rem; }
.breadcrumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: .55rem;
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] {
  border-bottom: 2px solid var(--accent);
}

a:hover,
a:active {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.action-bar {
  margin: .9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
}

.action-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, color .15s ease;
}

.action-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.risk-score-block {
  margin-top: .9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.risk-score-warning {
  border-color: var(--score-mid);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--score-mid) 35%, transparent);
}
.risk-score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.risk-score-head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.risk-score-value {
  font-weight: 900;
  font-size: 1.15rem;
}
.score-good { color: var(--score-good); }
.score-mid { color: var(--score-mid); }
.score-bad { color: var(--score-bad); }
.risk-score-sub {
  margin: .45rem 0 .75rem;
  color: var(--muted);
}
.risk-factor-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.risk-factor {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  font-size: .95rem;
}
.risk-icon { min-width: 1rem; font-weight: 800; }
.risk-pass .risk-icon { color: var(--score-good); }
.risk-fail .risk-icon { color: var(--score-bad); }
.risk-n\/a .risk-icon, .risk-n_a .risk-icon, .risk-na .risk-icon { color: var(--muted); }
.risk-sep { color: var(--muted); }
.risk-evidence { color: var(--muted); }
.risk-score-method { margin: .75rem 0 0; font-weight: 700; }

.prose-article.is-code-page {
  display: grid;
  gap: .9rem;
}
.code-visual-head {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: .9rem;
  margin-bottom: .9rem;
}
.code-hero-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface2) 55%, var(--surface)));
}
.code-hero-kicker {
  margin: 0 0 .3rem;
  font-weight: 800;
  color: var(--accent);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.code-hero-card h3 {
  margin: 0 0 .4rem;
  font-size: 1.2rem;
}
.code-hero-card p {
  margin: 0;
  color: var(--muted);
}
.code-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .6rem;
}
.code-fact {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .7rem .75rem;
  background: var(--surface2);
}
.code-fact span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: .2rem;
}
.code-fact strong {
  font-size: 1rem;
}
.code-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .9rem;
}
.code-quick-nav a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem .7rem;
  background: var(--surface2);
  font-size: .84rem;
  font-weight: 700;
}
.prose-article.is-code-page > .code-content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-soft);
  border-left-width: 4px;
}
.prose-article.is-code-page > .block-classification { border-left-color: #1e40af; }
.prose-article.is-code-page > .block-practical { border-left-color: #0f766e; }
.prose-article.is-code-page > .block-tax { border-left-color: #b45309; }
.prose-article.is-code-page > .block-licence { border-left-color: #7c2d12; }
.prose-article.is-code-page > .block-risk { border-left-color: #b42318; }
.prose-article.is-code-page > .block-legal { border-left-color: #0e7490; }
.prose-article.is-code-page > .block-faq { border-left-color: #334155; }
.prose-article.is-code-page > .code-content-block > h2 {
  margin: 0 0 .7rem;
  font-size: 1.08rem;
  border-top: 0;
  padding-top: 0;
}
.prose-article.is-code-page > .code-content-block table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface2);
}
.prose-article.is-code-page > .code-content-block th,
.prose-article.is-code-page > .code-content-block td {
  border: 1px solid var(--border);
  padding: .6rem .65rem;
  vertical-align: top;
}
.prose-article.is-code-page > .code-content-block ul,
.prose-article.is-code-page > .code-content-block ol {
  margin: 0;
  padding-left: 1.2rem;
}
.prose-article.is-code-page > .code-content-block p:last-child,
.prose-article.is-code-page > .code-content-block ul:last-child,
.prose-article.is-code-page > .code-content-block ol:last-child,
.prose-article.is-code-page > .code-content-block table:last-child {
  margin-bottom: 0;
}

.creation-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin-top: .25rem;
}
.creation-step {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: .7rem;
  min-height: 76px;
  padding: .85rem .9rem .85rem .85rem;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 54%),
    var(--surface);
  box-shadow: 0 12px 24px rgba(18,32,27,.07);
}
.creation-step-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 18px color-mix(in srgb, var(--brand) 22%, transparent);
}
.creation-step-number {
  position: absolute;
  top: .65rem;
  right: .75rem;
  color: color-mix(in srgb, var(--brand) 36%, transparent);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.creation-step-text {
  align-self: center;
  padding-right: 1.6rem;
  font-weight: 750;
  line-height: 1.42;
}

.profession-fit-block,
.internal-link-panel {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}
.profession-intro {
  margin: 0 0 .85rem;
  max-width: 72ch;
  color: var(--muted);
  font-weight: 650;
}
.profession-subtitle {
  margin: 1rem 0 .55rem;
  font-weight: 850;
  color: var(--text);
}
.role-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .62rem;
}
.role-chip {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .72rem .85rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--text);
  font-weight: 850;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.role-chip:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
}
.role-chip.is-soft {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--muted);
}
.role-source-note {
  margin: .9rem 0 0;
  color: var(--muted);
  font-size: .88rem;
}
.role-source-note a {
  font-weight: 850;
}

.internal-link-panel {
  display: grid;
  gap: 1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 52%),
    var(--surface);
}
.sibling-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .55rem;
}
.sibling-code {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: .66rem .75rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-weight: 800;
  color: var(--text);
}
.sibling-code.is-current {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand);
}
.internal-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.internal-link-grid h3 {
  margin: 0 0 .55rem;
  font-size: .98rem;
}
.compact-link-list {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.compact-link-list a {
  display: block;
  padding: .58rem .7rem;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-weight: 750;
}
.prev-next-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.prev-next-link {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: .15rem;
  padding: .75rem .85rem;
  border-radius: 16px;
  background: #111827;
  color: #fff;
}
.prev-next-link span {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
}
.prev-next-link strong {
  font-size: 1.02rem;
}

.profession-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem;
  margin: 1rem 0;
}
.profession-directory-card {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  gap: .65rem;
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.profession-directory-card strong {
  font-size: 1.02rem;
}
.profession-directory-card span {
  color: var(--muted);
  font-weight: 750;
}
@media (max-width: 900px) {
  .code-visual-head { grid-template-columns: 1fr; }
  .creation-checklist,
  .internal-link-grid,
  .prev-next-row {
    grid-template-columns: 1fr;
  }
}

.risk-score-section.is-inline {
  margin: 0;
}
.prose-article.is-code-page > .risk-score-section {
  display: block;
}
.prose-article.is-code-page > .risk-score-section .risk-score-block {
  margin: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hero,
.page-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}
.hero-copy,
.hero-visual,
.hero-panel,
.page-hero-copy,
.content-card,
.content-link-card,
.section-card,
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-copy,
.page-hero-copy {
  padding: 1.4rem 1.55rem;
  background: var(--surface);
  border-left: 5px solid var(--brand);
  box-shadow: var(--shadow-soft);
}
.eyebrow,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .78rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.hero-copy h1,
.page-hero-copy h1 {
  margin: .7rem 0 .85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 800;
}
.hero-copy p,
.page-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.03rem;
  max-width: 86ch;
}

.hero-side {
  display: grid;
  gap: 1rem;
}
.hero-visual {
  min-height: 260px;
  padding: 1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 7%, var(--surface)), color-mix(in srgb, var(--accent) 9%, var(--surface)));
}
.hero-visual img,
.page-hero-art img {
  width: min(100%, 360px);
  margin: 0 auto;
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.08));
}
.hero-panel.stats {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  align-content: start;
}
.stat-card {
  padding: 1rem;
  border-radius: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: .3rem;
}
.stat-card span { color: var(--muted); font-weight: 700; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1rem;
}
.pill-link,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}
.pill-link:hover { transform: translateY(-1px); }

.featured-grid,
.card-grid {
  display: grid;
  gap: 1rem;
}
.featured-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sections-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rich-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.section-block { margin-top: 1.15rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: .95rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.6vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: 0;
}
.section-head a,
.section-note {
  color: var(--muted);
  font-weight: 700;
}

.featured-card,
.section-card,
.content-link-card {
  padding: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.featured-card:hover,
.section-card:hover,
.content-link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(18,32,27,.09);
  border-color: color-mix(in srgb, var(--brand) 36%, var(--border));
}
.featured-card small,
.content-link-card small {
  display: block;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .55rem;
  font-size: .74rem;
}
.featured-card strong,
.content-link-card strong,
.section-card strong {
  display: block;
  margin-bottom: .4rem;
  font-size: 1.08rem;
  line-height: 1.35;
}
.featured-card span,
.content-link-card span,
.section-card small {
  color: var(--muted);
}
.content-link-card em {
  display: inline-block;
  margin-top: .8rem;
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}
.content-link-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: .25rem;
  border-radius: var(--radius);
}
.section-card {
  border-left: 6px solid var(--accent);
  min-height: 154px;
  position: relative;
  overflow: hidden;
}
.section-card::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -18px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.section-letter {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: .8rem;
  background: var(--surface2);
  font-weight: 900;
  margin-bottom: .85rem;
  position: relative;
  z-index: 1;
}

.search-box { position: relative; }
.search-box input {
  width: 100%;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  font-size: 1rem;
}
.search-box input:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--border));
}
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + .55rem);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 12;
}
.search-results.open { display: block; }
.search-item {
  display: flex;
  gap: .85rem;
  padding: .9rem 1rem;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}
.search-item:first-child { border-top: 0; }
.search-item:hover,
.search-item.is-active { background: var(--surface2); }
.search-item strong { display: block; margin-bottom: .12rem; }
.search-item small { color: var(--muted); }
.search-item.is-empty { color: var(--muted); }
.search-code {
  min-width: 4.25rem;
  font-weight: 900;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.1;
}
mark {
  background: color-mix(in srgb, var(--gold) 28%, transparent);
  color: inherit;
  border-radius: .2rem;
  padding: 0 .1rem;
}

.page-shell { display: grid; gap: 1rem; }
.page-hero-art {
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), color-mix(in srgb, var(--gold) 8%, var(--surface)));
}
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}

.content-card {
  padding: 1.6rem;
  overflow: hidden;
}
.prose-shell {
  font-size: 1rem;
  color: var(--text);
  max-width: 1040px;
}
.prose-shell > :first-child { margin-top: 0; }
.prose-shell h2,
.prose-shell h3 {
  font-family: var(--font-display);
  line-height: 1.22;
  margin-top: 1.45rem;
  margin-bottom: .65rem;
  letter-spacing: 0;
}
.prose-shell h2 {
  font-size: clamp(1.25rem, 1.6vw, 1.65rem);
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}
.prose-shell h3 { font-size: 1.2rem; }
.prose-shell p,
.prose-shell li {
  color: var(--text);
  max-width: 92ch;
}
.prose-shell ul,
.prose-shell ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.prose-shell li + li { margin-top: .35rem; }
.prose-shell blockquote {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--brand);
  background: var(--surface2);
  border-radius: 0 1rem 1rem 0;
}
.prose-shell a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent);
  text-underline-offset: 2px;
}
.prose-shell table {
  width: 100%;
  display: block;
  overflow: auto;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0 1.4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}
.prose-shell th,
.prose-shell td {
  border-bottom: 1px solid var(--border);
  padding: .8rem .9rem;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}
.prose-shell th:first-child,
.prose-shell td:first-child {
  text-align: center;
  white-space: nowrap;
}
.prose-shell th:last-child,
.prose-shell td:last-child {
  text-align: center;
}
.prose-shell td:first-child a {
  font-weight: 800;
  text-decoration: none;
  padding: .2rem .48rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface2));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  display: inline-flex;
}
.prose-shell tr:last-child td { border-bottom: 0; }
.prose-shell th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface3);
  font-weight: 800;
}

.faq-accordion {
  display: grid;
  gap: .85rem;
  margin: 1rem 0;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: .9rem 1rem;
  font-weight: 800;
  position: relative;
  padding-right: 3rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--brand);
}
.faq-item[open] summary::after { content: "?"; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer {
  padding: .9rem 1rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 82%, var(--surface2));
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.calc-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}
.calc-card input {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: .9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.calc-card button {
  margin-top: .8rem;
  width: 100%;
  padding: .9rem 1rem;
  border: 0;
  border-radius: .9rem;
  background: linear-gradient(135deg, var(--brand), #d35d2f);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.calc-results { margin-top: 1rem; display: grid; gap: .6rem; }
.calc-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .95rem;
  background: var(--surface);
  border-radius: .9rem;
  border: 1px solid var(--border);
}

.cnss-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin: 1rem 0 1.1rem;
}
.cnss-kpi-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 8%, var(--surface)), var(--surface));
  padding: .9rem .95rem;
  box-shadow: var(--shadow-soft);
}
.cnss-kpi-label {
  margin: 0 0 .35rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}
.cnss-kpi-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--brand-deep);
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.4rem 0 3rem;
  margin-top: 3rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}
.footer-inner p {
  margin: .35rem 0 0;
  max-width: 62ch;
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.footer-badges span {
  padding: .45rem .7rem;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 800;
  font-size: .82rem;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 2.9rem;
  height: 2.9rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: none;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.back-to-top.show { display: inline-grid; place-items: center; }

@media (max-width: 1100px) {
  .featured-grid,
  .card-grid,
  .sections-grid,
  .calc-grid,
  .rich-grid,
  .hero,
  .page-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-desktop { display: none; }
  .mobile-only { display: inline-grid; place-items: center; }
}

@media (max-width: 760px) {
  .hero,
  .page-hero,
  .featured-grid,
  .card-grid,
  .sections-grid,
  .calc-grid,
  .rich-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy,
  .page-hero-copy,
  .content-card,
  .hero-visual,
  .page-hero-art {
    padding: 1.15rem;
  }
  .hero-copy h1,
  .page-hero-copy h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); }
  .hero-panel.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lang-switcher { justify-content: center; }
  .section-head { align-items: start; flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: start; }
  .action-bar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    border-radius: 14px 14px 0 0;
    padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0));
  }
  .cnss-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  .action-bar { display: none !important; }
}

/* morocco-nma postbuild polish v1 */
:root {
  --page-max: 1080px;
  --soft-ring: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent), 0 22px 55px rgba(20, 39, 34, .09);
}
body {
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 28rem),
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 30rem),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 38%, #eef5f1 100%);
}
.main-shell {
  width: min(calc(100% - 2rem), 1240px);
}
.page-shell,
.section-block,
.page-hero,
.prose-shell {
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.page-hero-art,
.hero-visual {
  display: none !important;
}
.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface2) 85%, transparent)),
    radial-gradient(circle at 85% 18%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 20rem);
  box-shadow: var(--soft-ring);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -8rem -10rem auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  pointer-events: none;
}
.page-hero-copy {
  position: relative;
  z-index: 1;
  border-left: 0;
  border-radius: 28px;
  padding: clamp(1.35rem, 3.4vw, 2.7rem);
  background: transparent;
  box-shadow: none;
}
.page-hero-copy h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 4.35rem);
  letter-spacing: -.04em;
}
.page-lead {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
}
.section-block {
  border-radius: 26px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 18px 45px rgba(20, 39, 34, .07);
}
.code-visual-head {
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 1rem;
}
.code-hero-card,
.code-fact,
.cnss-kpi-card,
.content-link-card,
.featured-card {
  border-radius: 22px;
}
.code-hero-card {
  min-height: 100%;
  padding: 1.25rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, var(--surface)), color-mix(in srgb, var(--accent) 7%, var(--surface)));
}
.code-facts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.code-fact {
  min-height: 92px;
  align-content: center;
  background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--accent) 8%, var(--surface)));
}
.prose-article.is-code-page > .code-content-block,
.prose-article.is-code-page > .risk-score-section .risk-score-block,
.internal-link-panel,
.profession-fit-block {
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  box-shadow: 0 16px 36px rgba(20, 39, 34, .07);
}
.prose-article.is-code-page > .code-content-block {
  padding: clamp(1rem, 2.2vw, 1.45rem);
  border-left-width: 0;
  position: relative;
  overflow: hidden;
}
.prose-article.is-code-page > .code-content-block::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--accent);
}
.prose-article.is-code-page > .block-tax::before { background: #b45309; }
.prose-article.is-code-page > .block-licence::before { background: #7c2d12; }
.prose-article.is-code-page > .block-risk::before { background: #b42318; }
.prose-article.is-code-page > .block-legal::before { background: #0e7490; }
.prose-article.is-code-page > .block-faq::before { background: #334155; }
.creation-checklist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.creation-step {
  min-height: 128px;
  grid-template-columns: 1fr;
  align-content: space-between;
  padding: 1rem;
}
.creation-step-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
}
.creation-step-text {
  padding-right: .2rem;
  font-size: .98rem;
}
.risk-score-block {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--accent) 6%, var(--surface)));
}
.risk-score-value {
  padding: .45rem .7rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 10%, var(--surface));
}
.role-chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
  align-items: stretch;
}
.role-chip {
  min-height: 44px;
  justify-content: center;
}
.prose-shell table td:nth-child(2) a,
.prose-shell table td:first-child a {
  font-weight: 800;
}
.prose-shell table td:nth-child(2) a {
  color: var(--text);
  text-decoration: none;
}
.cnss-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.1rem 0;
}
.cnss-kpi-card {
  padding: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent) 8%, var(--surface)));
  box-shadow: 0 14px 28px rgba(20, 39, 34, .07);
}
.cnss-kpi-value {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -.04em;
}
@media (max-width: 920px) {
  .code-visual-head,
  .creation-checklist,
  .cnss-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .main-shell { width: min(calc(100% - 1rem), 1240px); }
  .page-hero,
  .section-block { border-radius: 20px; }
  .code-visual-head,
  .creation-checklist,
  .cnss-kpi-grid,
  .code-facts-grid {
    grid-template-columns: 1fr;
  }
  .page-hero-copy h1 { max-width: none; }
}

/* morocco-nma recovery polish v2 */
:root{
  --page-max: 1160px;
  --text-max: 980px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 24px 70px rgba(69,42,19,.10);
  --shadow-card: 0 14px 36px rgba(69,42,19,.08);
}
html{scroll-behavior:smooth}
body{
  background:
    radial-gradient(circle at 8% 0%, rgba(177,31,36,.10), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(15,118,110,.12), transparent 32rem),
    linear-gradient(180deg,#fbf5eb 0%,#f7efe2 42%,#f8f5ee 100%) !important;
}
.site-header{
  backdrop-filter: blur(16px);
  background: rgba(251,247,239,.82) !important;
  border-bottom: 1px solid rgba(126,82,45,.16) !important;
}
.brand-mark{
  width:42px !important;
  height:42px !important;
  border-radius:16px !important;
  background:
    radial-gradient(circle at 35% 25%,rgba(255,255,255,.32),transparent 34%),
    linear-gradient(145deg,var(--brand,#b11f24),#7d1118) !important;
  box-shadow:0 12px 28px rgba(177,31,36,.28);
}
.brand-text strong{letter-spacing:-.02em}
.site-nav a{
  position:relative;
  border-radius:999px;
  padding:.55rem .72rem;
}
.site-nav a:hover,
.site-nav a.is-active{
  background:rgba(177,31,36,.08);
  color:var(--brand,#b11f24);
}
.site-header .inner,
.header-inner,
.container,
.shell,
.page-shell,
.content-shell,
.main-shell{
  max-width: var(--page-max) !important;
}
main,
.page-main,
.page-content,
.content,
.prose-article,
.section-block,
.hero,
.hero-content{
  text-align: left;
}
html[dir="rtl"] main,
html[dir="rtl"] .page-main,
html[dir="rtl"] .page-content,
html[dir="rtl"] .content,
html[dir="rtl"] .prose-article,
html[dir="rtl"] .section-block,
html[dir="rtl"] .hero,
html[dir="rtl"] .hero-content{
  text-align: right;
}
.page-grid,
.content-grid,
.layout-grid,
.main-grid,
.two-col,
.article-layout{
  display: block !important;
  grid-template-columns: none !important;
}
aside,
.sidebar,
.toc,
.right-rail,
.quick-nav-card,
.hero-visual,
.hero-illustration,
img[src*="/illustrations/portal.svg"],
img[src*="/illustrations/nma.svg"]{
  display:none !important;
}
.prose-article,
article.prose-article,
.section-block,
.content-card,
.card,
.panel{
  max-width: var(--text-max);
}
.hero,
.page-hero,
.nma-hero{
  position:relative;
  max-width: var(--page-max);
  margin: 28px auto 24px;
  padding: clamp(28px,5vw,58px);
  border: 1px solid rgba(126,82,45,.16);
  border-radius: 32px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.92),rgba(255,250,241,.78)),
    radial-gradient(circle at 100% 0%,rgba(15,118,110,.13),transparent 24rem);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.hero::after,
.page-hero::after,
.nma-hero::after{
  content:"";
  position:absolute;
  right:clamp(18px,5vw,64px);
  top:50%;
  width:min(28vw,320px);
  aspect-ratio:1;
  transform:translateY(-50%) rotate(10deg);
  opacity:.13;
  background:
    linear-gradient(36deg, transparent 41%, var(--accent,#0f766e) 42% 58%, transparent 59%),
    linear-gradient(108deg, transparent 41%, var(--brand,#b11f24) 42% 58%, transparent 59%),
    linear-gradient(180deg, transparent 41%, var(--gold,#c79a2b) 42% 58%, transparent 59%),
    linear-gradient(252deg, transparent 41%, var(--accent,#0f766e) 42% 58%, transparent 59%),
    linear-gradient(324deg, transparent 41%, var(--brand,#b11f24) 42% 58%, transparent 59%);
  pointer-events:none;
}
html[dir="rtl"] .hero::after,
html[dir="rtl"] .page-hero::after,
html[dir="rtl"] .nma-hero::after{
  left:clamp(18px,5vw,64px);
  right:auto;
}
.page-hero-copy,
.hero-copy{position:relative;z-index:1}
.hero h1,
.page-hero h1,
.nma-hero h1{
  max-width: 920px;
  letter-spacing: -.045em;
  line-height: .98;
}
.hero p,
.page-hero p,
.nma-hero p,
.page-lead{
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem,1.2vw,1.16rem);
  line-height: 1.75;
}
.prose-article{
  margin: 0 auto 48px !important;
}
.prose-article > h2,
.section-block > h2,
.code-content-block > h2{
  margin-top: 0;
  letter-spacing: -.03em;
}
.code-content-block,
.prose-article > section,
.section-block,
.risk-score-section,
.profession-fit-block,
.internal-link-panel{
  position: relative;
  margin: 18px auto;
  padding: clamp(18px,3vw,30px);
  border: 1px solid rgba(126,82,45,.16);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow-card);
}
.section-head{
  align-items:center;
  gap:1rem;
}
.section-head h2{
  letter-spacing:-.035em;
}
.featured-grid,
.card-grid.sections-grid,
.rich-grid,
.calc-grid{
  display:grid;
  gap:16px;
}
.gist-decision-panel{
  max-width:var(--page-max) !important;
  border-color:rgba(15,118,110,.25) !important;
  background:
    radial-gradient(circle at 100% 0%,rgba(15,118,110,.15),transparent 18rem),
    linear-gradient(135deg,rgba(255,255,255,.92),rgba(240,253,250,.68)) !important;
}
.gist-decision-panel .section-head{align-items:flex-start}
.gist-decision-panel .section-head h2{max-width:680px}
.gist-decision-intro{max-width:820px;margin:0 0 18px;line-height:1.7}
.gist-decision-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.gist-decision-card{
  position:relative;
  display:grid;
  gap:7px;
  min-height:148px;
  padding:18px 20px;
  overflow:hidden;
  border:1px solid rgba(126,82,45,.16);
  border-radius:20px;
  background:rgba(255,255,255,.82);
  color:var(--text);
  text-decoration:none;
  box-shadow:0 10px 24px rgba(69,42,19,.06);
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.gist-decision-card::after{
  content:"";
  position:absolute;
  right:-18px;
  bottom:-24px;
  width:84px;
  height:84px;
  border-radius:50%;
  background:linear-gradient(145deg,var(--accent,#0f766e),var(--brand,#b11f24));
  opacity:.10;
}
.gist-decision-card:hover{
  transform:translateY(-2px);
  border-color:var(--accent,#0f766e);
  box-shadow:0 18px 34px rgba(69,42,19,.11);
}
.gist-decision-card small{
  position:relative;
  z-index:1;
  color:var(--accent,#0f766e);
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.gist-decision-card strong{
  position:relative;
  z-index:1;
  font-size:1.06rem;
  line-height:1.25;
}
.gist-decision-card span{
  position:relative;
  z-index:1;
  color:var(--muted);
  font-size:.94rem;
  line-height:1.5;
}
html[dir="rtl"] .gist-decision-card::after{left:-18px;right:auto}
.featured-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.featured-card,
.section-card,
.content-link-card,
.calc-card{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(126,82,45,.16) !important;
  border-radius:24px !important;
  background:
    radial-gradient(circle at 100% 0%,rgba(177,31,36,.10),transparent 9rem),
    rgba(255,255,255,.78) !important;
  box-shadow:0 14px 32px rgba(69,42,19,.08);
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.featured-card::after,
.section-card::after{
  content:"";
  position:absolute;
  inset:auto 18px 14px auto;
  width:34px;
  height:34px;
  border-radius:12px;
  background:linear-gradient(145deg,var(--accent,#0f766e),var(--brand,#b11f24));
  opacity:.16;
}
.featured-card:hover,
.section-card:hover,
.content-link-card:hover,
.calc-card:hover{
  transform:translateY(-3px);
  border-color:color-mix(in srgb,var(--accent,#0f766e) 45%,var(--border)) !important;
  box-shadow:0 22px 48px rgba(69,42,19,.12);
}
.section-letter{
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border-radius:16px;
  background:color-mix(in srgb,var(--accent,#0f766e) 14%,#fff);
  color:var(--accent,#0f766e);
  font-weight:950;
}
.hero-panel.stats,
.stats{
  border-radius:28px !important;
  background:
    linear-gradient(145deg,rgba(255,255,255,.86),rgba(255,250,241,.70)),
    radial-gradient(circle at 100% 0%,rgba(15,118,110,.14),transparent 16rem) !important;
  box-shadow:var(--shadow-card);
}
.stat-card{
  border-radius:22px !important;
  background:rgba(255,255,255,.72) !important;
}
.stat-card strong{
  font-size:clamp(1.9rem,4vw,3rem);
  letter-spacing:-.06em;
}
.code-visual-head{
  align-items:stretch;
}
.code-hero-card{
  position:relative;
  min-height:190px;
  border:1px solid rgba(126,82,45,.16);
  border-radius:28px;
  padding:clamp(20px,3vw,34px);
  background:
    linear-gradient(135deg,rgba(255,255,255,.92),rgba(255,247,237,.78)),
    radial-gradient(circle at 94% 8%,rgba(15,118,110,.14),transparent 13rem);
  box-shadow:0 16px 38px rgba(69,42,19,.09);
}
.code-hero-card h3{
  font-size:clamp(1.5rem,3vw,2.45rem);
  line-height:1.04;
  letter-spacing:-.05em;
  margin:.25rem 0 .8rem;
}
.code-hero-kicker,
.page-kicker{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  color:var(--brand,#b11f24);
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:.78rem;
}
.code-facts-grid{
  align-content:stretch;
}
.code-fact{
  position:relative;
  overflow:hidden;
}
.code-fact strong{
  font-size:clamp(1.2rem,2.6vw,1.9rem) !important;
  letter-spacing:-.045em;
}
.code-fact::after{
  content:"";
  position:absolute;
  right:-18px;
  bottom:-18px;
  width:72px;
  height:72px;
  border-radius:50%;
  background:currentColor;
  opacity:.06;
}
.code-quick-nav{
  display:none !important;
}
.category-context-panel{
  background:
    linear-gradient(135deg,rgba(255,255,255,.88),rgba(240,253,250,.58)),
    radial-gradient(circle at 100% 0%,rgba(15,118,110,.13),transparent 13rem) !important;
}
.category-path-strip{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:14px;
  padding:12px;
  border:1px solid rgba(126,82,45,.14);
  border-radius:999px;
  background:rgba(255,255,255,.70);
}
.category-path-strip a,
.category-path-strip span{
  display:inline-flex;
  min-height:34px;
  align-items:center;
}
.category-path-strip a{
  padding:6px 12px;
  border-radius:999px;
  background:#fff7ed;
  color:var(--brand,#b11f24);
  font-weight:850;
}
.code-content-block::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  border-radius: 24px 0 0 24px;
  background: linear-gradient(180deg,var(--accent,#b11f24),var(--accent-secondary,#0f766e));
}
html[dir="rtl"] .code-content-block::before{
  inset:0 0 0 auto;
  border-radius: 0 24px 24px 0;
}
.block-classification::before{background:linear-gradient(180deg,#0f766e,#60a5fa)}
.block-practical::before{background:linear-gradient(180deg,#b11f24,#f59e0b)}
.block-licence::before{background:linear-gradient(180deg,#7c3aed,#0f766e)}
.block-risk::before{background:linear-gradient(180deg,#b42318,#f59e0b)}
.block-legal::before{background:linear-gradient(180deg,#1d4ed8,#0f766e)}
.block-faq::before{background:linear-gradient(180deg,#334155,#b11f24)}
/* Stable leaf-page composition: all content is grouped at build time, not by JS. */
.prose-article.is-code-page{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:18px;
}
.prose-article.is-code-page > .code-content-block,
.prose-article.is-code-page > .risk-score-section{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  margin:0;
}
.prose-article.is-code-page > .code-content-block{
  padding:clamp(20px,3vw,32px);
  border:1px solid rgba(126,82,45,.16);
  border-radius:22px;
  background:rgba(255,255,255,.8);
  box-shadow:0 14px 32px rgba(69,42,19,.055);
}
.prose-article.is-code-page > .code-content-block::before{display:none}
.prose-article.is-code-page > .code-content-block > h2{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 18px;
  font-size:clamp(1.12rem,2vw,1.44rem);
}
.prose-article.is-code-page > .code-content-block > h2::after{
  content:"";
  flex:1;
  min-width:28px;
  height:1px;
  background:linear-gradient(90deg,rgba(177,31,36,.35),transparent);
}
.prose-article.is-code-page > .block-overview{
  padding:0 4px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.prose-article.is-code-page > .block-overview .page-lead{margin:0}
.prose-article.is-code-page > .block-classification{background:linear-gradient(135deg,rgba(240,253,250,.92),rgba(255,255,255,.82))}
.prose-article.is-code-page > .block-practical{background:linear-gradient(135deg,rgba(255,251,235,.9),rgba(255,255,255,.82))}
.prose-article.is-code-page > .block-licence{background:linear-gradient(135deg,rgba(250,245,255,.9),rgba(255,255,255,.82))}
.prose-article.is-code-page > .block-risk{background:linear-gradient(135deg,rgba(255,247,237,.94),rgba(255,255,255,.82))}
.prose-article.is-code-page > .block-legal{background:linear-gradient(135deg,rgba(239,246,255,.92),rgba(255,255,255,.82))}
.prose-article.is-code-page > .code-content-block table{width:100%;margin:0}
.prose-article.is-code-page > .code-content-block .internal-link-panel,
.prose-article.is-code-page > .code-content-block .profession-fit-block{width:100%;margin:0;box-shadow:none}
.prose-article.is-code-page > .risk-score-section{padding:clamp(20px,3vw,32px);border-radius:22px;box-shadow:0 14px 32px rgba(69,42,19,.055)}
.prose-article.is-code-page > .risk-score-section .risk-score-block{margin:0;border:0;padding:0;background:transparent;box-shadow:none}
.code-content-block table,
.section-block table,
.prose-article table{
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(126,82,45,.14);
}
.code-content-block th,
.section-block th,
.prose-article th{
  background: #fff7ed;
  color: #5b2d17;
  font-weight: 800;
}
.code-content-block td,
.section-block td,
.prose-article td{
  vertical-align: top;
}
.creation-checklist{
  display:grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
  margin: 18px 0 6px;
}
.creation-step{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px 12px;
  align-items:start;
  min-height: 130px;
  padding:18px;
  border:1px solid rgba(126,82,45,.16);
  border-radius:22px;
  background:
    radial-gradient(circle at 100% 0%,rgba(15,118,110,.12),transparent 7rem),
    #fffdf8;
  box-shadow:0 10px 26px rgba(69,42,19,.08);
}
.creation-step-mark{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--accent,#b11f24);
  color:#fff;
  font-weight:900;
}
.creation-step-number{
  align-self:center;
  color:var(--accent,#b11f24);
  font-size:.82rem;
  font-weight:900;
  letter-spacing:.08em;
}
.creation-step-text{
  grid-column:1 / -1;
  font-size:1rem;
  line-height:1.55;
  font-weight:700;
}
.profession-chip-list,
.sibling-code-grid,
.related-grid,
.quick-links,
.hub-card-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.profession-chip,
.sibling-code,
.related-card,
.hub-card,
.branch-link{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:10px 14px;
  border:1px solid rgba(126,82,45,.16);
  border-radius:999px;
  background:#fffaf2;
  color:var(--text);
  text-decoration:none;
  font-weight:750;
  box-shadow:0 8px 18px rgba(69,42,19,.06);
}
.profession-chip:hover,
.sibling-code:hover,
.related-card:hover,
.hub-card:hover,
.branch-link:hover{
  border-color:var(--accent,#b11f24);
  transform:translateY(-1px);
}
.sibling-code.is-current{
  background:var(--accent,#b11f24);
  color:#fff;
}
.risk-score-section{
  border-color: rgba(154,103,0,.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(245,158,11,.18), transparent 14rem),
    rgba(255,253,247,.88);
}
.risk-score-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}
.risk-score-value{
  display:grid;
  place-items:center;
  min-width:96px;
  height:76px;
  border-radius:22px;
  background:#fff;
  font-size:1.65rem;
  font-weight:950;
  box-shadow:0 10px 24px rgba(69,42,19,.10);
}
.risk-factor-list{
  display:grid;
  gap:10px;
  padding:0;
  margin:18px 0;
  list-style:none;
}
.risk-factor{
  display:grid;
  grid-template-columns:auto minmax(150px,240px) auto 1fr;
  gap:10px;
  align-items:center;
  padding:12px 14px;
  border:1px solid rgba(126,82,45,.13);
  border-radius:16px;
  background:rgba(255,255,255,.74);
}
.risk-icon{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:50%;
  background:#f5efe4;
  font-weight:900;
}
.faq-accordion details,
.faq-item{
  border:1px solid rgba(126,82,45,.15);
  border-radius:18px;
  background:#fffdf8;
  margin:10px 0;
  padding:0;
  overflow:hidden;
}
.faq-accordion summary,
.faq-item summary{
  cursor:pointer;
  padding:16px 18px;
  font-weight:850;
}
.faq-accordion details > div,
.faq-item > div{
  padding:0 18px 18px;
  color:var(--muted);
  line-height:1.7;
}
.action-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:18px 0;
  padding:10px;
  border:1px solid rgba(126,82,45,.16);
  border-radius:999px;
  background:rgba(255,255,255,.76);
  box-shadow:0 12px 30px rgba(69,42,19,.08);
}
.action-bar button{
  min-width:44px;
  min-height:44px;
  border:0;
  border-radius:999px;
  background:#fff7ed;
  color:var(--text);
  font-weight:850;
  cursor:pointer;
}
.action-bar button:hover,
.action-bar button:focus-visible{
  background:var(--accent,#b11f24);
  color:#fff;
  outline:2px solid var(--accent,#b11f24);
  outline-offset:2px;
}
.breadcrumb{
  overflow-x:auto;
  white-space:nowrap;
  scrollbar-width:thin;
}
.breadcrumb a,
.breadcrumb span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
}
.breadcrumbs{
  overflow-x:auto;
  white-space:nowrap;
  scrollbar-width:thin;
}
.breadcrumbs a,
.breadcrumbs span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
}
.postal-hero .page-meta,
.postal-leaf-hero .page-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
}
.postal-overview .content-link-card,
.postal-kind-card{
  min-height:160px;
}
.postal-region-shortcut-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
  margin-top:18px;
}
.postal-region-shortcut{
  padding:16px;
  border:1px solid rgba(126,82,45,.16);
  border-radius:18px;
  background:rgba(255,255,255,.75);
  box-shadow:0 10px 24px rgba(69,42,19,.05);
}
.postal-region-shortcut h3{
  margin:0 0 12px;
  font-size:1rem;
}
.postal-region-shortcut div{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.postal-region-shortcut a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:38px;
  padding:7px 10px;
  border:1px solid rgba(177,31,36,.18);
  border-radius:999px;
  color:#7d1118;
  font-weight:750;
  text-decoration:none;
}
.postal-region-shortcut a:hover,
.postal-region-shortcut a:focus-visible{
  background:#fff1ed;
  outline:2px solid var(--accent,#b11f24);
  outline-offset:2px;
}
.postal-region-shortcut a small{color:#765d4d;font-weight:650}
.nma-profession-bridge{
  display:grid;
  gap:5px;
  margin:18px 0;
  padding:16px 18px;
  border:1px solid rgba(15,118,110,.22);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(236,253,245,.92),rgba(255,255,255,.78));
  color:var(--text,#18212a);
  text-decoration:none;
}
.nma-profession-bridge span{color:#0f766e;font-size:.82rem;font-weight:850;text-transform:uppercase;letter-spacing:.06em}
.nma-profession-bridge strong{font-size:.98rem;line-height:1.45}
.nma-profession-bridge em{color:#0f766e;font-style:normal;font-weight:850}
.nma-profession-bridge:hover,
.nma-profession-bridge:focus-visible{
  border-color:#0f766e;
  box-shadow:0 12px 28px rgba(15,118,110,.10);
  outline:2px solid #0f766e;
  outline-offset:2px;
}
.nma-branch-shortcut-list{display:grid;gap:10px;margin-top:18px}
.nma-branch-shortcut{
  border:1px solid rgba(126,82,45,.16);
  border-radius:16px;
  background:rgba(255,255,255,.68);
  overflow:hidden;
}
.nma-branch-shortcut summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  min-height:50px;
  padding:12px 16px;
  cursor:pointer;
  font-weight:850;
}
.nma-branch-shortcut summary small{color:#765d4d;font-weight:700}
.nma-branch-shortcut > div{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:8px;
  padding:0 12px 12px;
}
.nma-branch-shortcut a{
  display:flex;
  gap:8px;
  align-items:flex-start;
  padding:10px;
  border-radius:12px;
  background:#fffaf4;
  color:var(--text,#18212a);
  text-decoration:none;
}
.nma-branch-shortcut a strong{color:var(--accent,#b11f24)}
.nma-branch-shortcut a span{font-size:.9rem;line-height:1.35}
.nma-branch-shortcut a:hover,
.nma-branch-shortcut a:focus-visible{
  background:#fff1ed;
  outline:2px solid var(--accent,#b11f24);
  outline-offset:2px;
}
html[dir="rtl"] .nma-branch-shortcut summary{flex-direction:row-reverse}
.table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid rgba(126,82,45,.14);
  border-radius:18px;
  background:rgba(255,255,255,.74);
}
.data-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.data-table th,
.data-table td{
  padding:.85rem 1rem;
  border-bottom:1px solid rgba(126,82,45,.12);
  text-align:left;
  vertical-align:top;
}
html[dir="rtl"] .data-table th,
html[dir="rtl"] .data-table td{
  text-align:right;
}
.data-table thead th{
  position:sticky;
  top:0;
  background:#fffaf1;
  color:#5a3823;
  z-index:1;
}
.data-table tbody tr:hover td{
  background:rgba(177,31,36,.045);
}
.data-table a{
  color:var(--brand,#b11f24);
  font-weight:800;
  text-decoration:none;
}
.key-facts th{
  width:32%;
  color:#5a3823;
}
.source-table td:nth-child(2){
  min-width:280px;
}
.section-focus-block{
  margin:1.25rem 0 1.5rem;
  padding:clamp(18px,3vw,28px);
  border:1px solid rgba(177,31,36,.18);
  border-radius:24px;
  background:
    radial-gradient(circle at 100% 0%,rgba(15,118,110,.10),transparent 18rem),
    linear-gradient(135deg,rgba(255,255,255,.92),rgba(255,249,238,.82));
  box-shadow:0 16px 42px rgba(69,42,19,.08);
}
.section-focus-block h2{
  margin-top:0;
  letter-spacing:-.025em;
}
.section-focus-block p{
  max-width:860px;
  line-height:1.75;
}
.focus-note-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.75rem;
  margin-top:1rem;
}
.focus-note-grid span{
  display:flex;
  align-items:center;
  min-height:58px;
  padding:.8rem .95rem;
  border-radius:16px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(126,82,45,.13);
  color:#5a3823;
  font-weight:800;
}
.site-footer{
  margin-top:4rem;
  padding:2.6rem 0 3.1rem;
  border-top:1px solid rgba(126,82,45,.16);
  background:linear-gradient(120deg,rgba(255,255,255,.72),rgba(246,237,222,.78));
}
.footer-inner{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(250px,.85fr) minmax(260px,.95fr);
  align-items:start;
  gap:1.5rem 2.2rem;
}
.footer-identity strong{font-family:var(--font-display);font-size:1.12rem;color:#2b2119}
.footer-identity p{margin:.5rem 0 0;max-width:52ch;line-height:1.6}
.footer-contact{padding:.95rem 1rem;border-inline-start:3px solid var(--brand,#b11f24);background:rgba(255,255,255,.7);border-radius:0 14px 14px 0}
.footer-contact-kicker,.section-eyebrow{display:block;margin-bottom:.35rem;color:var(--brand,#b11f24);font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.footer-contact p{margin:0 0 .75rem;line-height:1.45;font-size:.92rem}
.footer-contact-actions{display:flex;flex-wrap:wrap;gap:.45rem .75rem}
.footer-contact-actions a{font-weight:800;color:#6d1820;text-decoration:none;border-bottom:1px solid currentColor}
.footer-badges{align-content:flex-start;justify-content:flex-end}
.footer-badges a{font-weight:750;text-decoration:none;color:#4d4439;padding:.36rem .58rem;border-radius:999px;border:1px solid rgba(126,82,45,.16);background:rgba(255,255,255,.5)}
.footer-badges a:hover{color:#8e141c;border-color:rgba(177,31,36,.34)}
.contact-introduction{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.42fr);gap:1rem 2rem;align-items:end;margin:1.25rem 0 1rem;padding:1.35rem 0;border-top:1px solid rgba(126,82,45,.16);border-bottom:1px solid rgba(126,82,45,.16)}
.contact-introduction h2,.methodology-intro h2{margin:.1rem 0 .45rem;font-size:clamp(1.45rem,2.2vw,2rem)}
.contact-introduction p,.methodology-intro p{margin:0;line-height:1.72;max-width:68ch}
.contact-response{display:grid;gap:.25rem;padding:.95rem 1rem;border-radius:16px;background:linear-gradient(135deg,rgba(177,31,36,.09),rgba(245,179,62,.1));border:1px solid rgba(177,31,36,.15)}
.contact-response strong{color:#6d1820;font-size:.88rem;text-transform:uppercase;letter-spacing:.04em}
.contact-response span{line-height:1.45;font-weight:700}
.contact-channel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:1.25rem 0 1.6rem}
.contact-channel{display:grid;grid-template-columns:42px minmax(0,1fr);gap:.8rem;align-items:start;padding:1.05rem;border-top:1px solid rgba(126,82,45,.18);text-decoration:none;color:inherit;transition:background .15s ease,transform .15s ease}
.contact-channel:hover{background:rgba(255,255,255,.7);transform:translateY(-2px)}
.contact-channel-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#3a2c21;color:#fff;font-weight:900;font-size:.84rem}
.contact-channel-email .contact-channel-mark{background:var(--brand,#b11f24)}
.contact-channel-telegram .contact-channel-mark{background:#166b7a}
.contact-channel small,.portal-country{display:block;color:#8d5f39;font-size:.72rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.contact-channel strong{display:block;margin:.18rem 0 .38rem;font-size:1.03rem;color:#272019}
.contact-channel em{display:block;color:#5d554c;font-style:normal;line-height:1.48;font-size:.91rem}
.contact-guidance{margin:1.65rem 0;padding:1.2rem 0;border-top:1px solid rgba(126,82,45,.16)}
.contact-guidance h2,.methodology-steps h2,.methodology-sources h2,.methodology-boundaries h2,.methodology-languages h2,.methodology-update h2{margin-top:0;font-size:clamp(1.25rem,1.8vw,1.6rem)}
.contact-guidance ul,.methodology-steps ol{margin:0;padding-inline-start:1.25rem;line-height:1.72}
.contact-guidance-quiet{border-bottom:1px solid rgba(126,82,45,.16)}
.contact-guidance-quiet p{margin-bottom:0;line-height:1.7}
.methodology-intro{margin:1.2rem 0 1.45rem;padding:1.4rem;max-width:900px;border-radius:18px;background:linear-gradient(135deg,rgba(17,96,89,.1),rgba(255,255,255,.72));border:1px solid rgba(17,96,89,.16)}
.methodology-steps{margin:1.5rem 0;padding-bottom:1.4rem;border-bottom:1px solid rgba(126,82,45,.16)}
.methodology-steps li{margin:.42rem 0}
.methodology-sources,.methodology-boundaries,.methodology-languages,.methodology-update{margin:1.5rem 0}
.methodology-sources p,.methodology-languages p,.methodology-update p{line-height:1.7;max-width:86ch}
.methodology-boundary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.methodology-boundary-grid>div{padding:1.05rem;border:1px solid rgba(126,82,45,.16);border-radius:16px;background:rgba(255,255,255,.62)}
.methodology-boundary-grid h3{margin:0 0 .45rem;font-size:1rem}.methodology-boundary-grid p{margin:0;line-height:1.6}
.international-hero{background:radial-gradient(circle at 92% 15%,rgba(245,179,62,.24),transparent 18rem),linear-gradient(135deg,rgba(255,255,255,.94),rgba(235,244,240,.84))}
.international-network-intro{margin:1.5rem 0 2rem;padding:.85rem 0;border-block:1px solid rgba(126,82,45,.16);color:#5d554c;font-weight:700}
.international-network-intro p{margin:0;max-width:82ch;line-height:1.65}
.international-region{margin:2.1rem 0}.international-region .section-head{margin-bottom:.25rem}.international-region .section-head>span{font:800 .85rem var(--font-body);color:#8d5f39}
.portal-list{list-style:none;margin:0;padding:0;border-top:1px solid rgba(126,82,45,.16)}
.portal-row{border-bottom:1px solid rgba(126,82,45,.16)}
.portal-row>a{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:1.2rem;align-items:center;padding:1rem .15rem;text-decoration:none;color:inherit;transition:padding .15s ease,background .15s ease}
.portal-row>a:hover{padding-inline:.65rem;background:rgba(255,255,255,.65)}
.portal-copy strong{display:block;margin-bottom:.2rem;font-size:1.02rem;color:#272019}.portal-copy span{display:block;max-width:72ch;color:#5d554c;line-height:1.45;font-size:.92rem}
.portal-open{white-space:nowrap;color:#8e141c;font-size:.86rem;font-weight:850}.portal-open b{font-size:1.1rem}
html[dir="rtl"] .footer-contact{border-inline-start:0;border-inline-end:3px solid var(--brand,#b11f24);border-radius:14px 0 0 14px}
html[dir="rtl"] .portal-row>a{grid-template-columns:auto minmax(0,1fr) 150px}
@media (max-width: 860px){
  .hero,.page-hero,.nma-hero{margin:14px 10px 18px;padding:24px}
  .featured-grid{grid-template-columns:1fr}
  .gist-decision-grid{grid-template-columns:1fr}
  .creation-checklist{grid-template-columns:1fr}
  .focus-note-grid{grid-template-columns:1fr}
  .footer-inner,.contact-introduction,.contact-channel-grid,.methodology-boundary-grid{grid-template-columns:1fr}
  .footer-badges{justify-content:flex-start}
  .portal-row>a,html[dir="rtl"] .portal-row>a{grid-template-columns:1fr;gap:.42rem;padding:1rem 0}
  .portal-row>a:hover{padding-inline:.25rem}
  .portal-open{margin-top:.15rem}
  .risk-score-head{align-items:flex-start;flex-direction:column}
  .risk-factor{grid-template-columns:auto 1fr}
  .risk-sep,.risk-evidence{grid-column:2}
  .action-bar{position:sticky;bottom:10px;z-index:30;border-radius:22px}
}
@media print{
  .action-bar,.site-header,header,footer,nav,aside,.sidebar{display:none!important}
  body{background:#fff!important;color:#000!important;font:11pt/1.4 serif!important}
  details{display:block!important}
  h2{page-break-before:always}
  a[href]::after{content:" (" attr(href) ")"}
}
