/* Tipografías locales (OFL) */
@font-face { font-family: "Public Sans"; src: url("../fonts/PublicSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/PublicSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/PublicSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/PublicSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/PublicSans-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/SourceSerif4-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/SourceSerif4-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/SourceSerif4-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/SourceSerif4-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/SourceSerif4-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --rw-text: #374151;
  --rw-text-strong: #1f2937;
  --rw-muted: #6b7280;
  --rw-accent: #2563eb;
  --rw-accent-dark: #1d4ed8;
  --rw-accent-soft: #eff4ff;
  --rw-surface: #f6f7f9;
  --rw-surface-2: #eef1f5;
  --rw-white: #ffffff;
  --rw-border: #e5e7eb;
  --rw-border-strong: #d1d5db;
  --rw-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --rw-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --rw-shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.12);
  --rw-radius-sm: 8px;
  --rw-radius: 14px;
  --rw-radius-lg: 22px;
  --rw-maxw: 1200px;
  --rw-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --rw-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --rw-sidebar-w: 264px;
  --rw-ease: cubic-bezier(.22,.61,.35,1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--rw-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--rw-text);
  background: var(--rw-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--rw-accent);
  text-decoration: none;
}

a:hover {
  color: var(--rw-accent-dark);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--rw-sans);
  color: var(--rw-text-strong);
  line-height: 1.22;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1.1em;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.container {
  width: 100%;
  max-width: var(--rw-maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--rw-accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--rw-radius-sm) 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--rw-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rw-accent);
  margin-bottom: 0.6em;
}

.lede {
  font-size: 1.08rem;
  color: var(--rw-muted);
  max-width: 64ch;
}

.serif {
  font-family: var(--rw-serif);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--rw-radius-sm);
  font-family: var(--rw-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 200ms var(--rw-ease), color 200ms var(--rw-ease), border-color 200ms var(--rw-ease), transform 200ms var(--rw-ease), box-shadow 200ms var(--rw-ease);
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--rw-accent);
  color: #fff;
  border-color: var(--rw-accent);
}

.btn--primary:hover {
  background: var(--rw-accent-dark);
  border-color: var(--rw-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--rw-shadow-md);
}

.btn--light {
  background: #fff;
  color: var(--rw-accent-dark);
  border-color: var(--rw-border-strong);
}

.btn--light:hover {
  background: var(--rw-accent-soft);
  border-color: var(--rw-accent);
  color: var(--rw-accent-dark);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--rw-text);
  border-color: var(--rw-border-strong);
}

.btn--ghost:hover {
  background: var(--rw-surface);
  color: var(--rw-text-strong);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn:hover {
    transform: none;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--rw-border);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--rw-text-strong);
}

.brand:hover {
  text-decoration: none;
  color: var(--rw-text-strong);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--rw-accent-soft);
  color: var(--rw-accent);
  flex: none;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-name span {
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rw-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-actions .btn {
  min-height: 42px;
  padding: 9px 18px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--rw-border-strong);
  border-radius: var(--rw-radius-sm);
  background: #fff;
  color: var(--rw-text-strong);
  cursor: pointer;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-toggle .icon-close {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-close {
  display: inline-flex;
}

.layout {
  display: grid;
  grid-template-columns: var(--rw-sidebar-w) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 30px 0 64px;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
}

.sidebar-nav {
  background: var(--rw-surface);
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  padding: 18px 16px;
  box-shadow: var(--rw-shadow-sm);
}

.sidebar-nav h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rw-muted);
  margin: 0 8px 10px;
  font-weight: 700;
}

.sidebar-nav h2:not(:first-child) {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rw-border);
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  margin: 2px 0;
}

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--rw-radius-sm);
  color: var(--rw-text);
  font-weight: 500;
  font-size: 0.97rem;
  min-height: 44px;
}

.sidebar-list a:hover {
  background: var(--rw-accent-soft);
  color: var(--rw-accent-dark);
  text-decoration: none;
}

.sidebar-list a[aria-current="page"] {
  background: var(--rw-accent);
  color: #fff;
  font-weight: 600;
}

.sidebar-list a svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.sidebar-cta {
  margin-top: 18px;
}

.sidebar-cta .btn {
  width: 100%;
}

.content {
  min-width: 0;
}

.hero {
  position: relative;
  border-radius: var(--rw-radius-lg);
  overflow: hidden;
  background-color: #16223a;
  background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(37, 99, 235, 0.72)), url('../img/hero-biblioteca.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: clamp(34px, 4vw, 56px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero .eyebrow {
  color: #bfdbfe;
}

.hero h1 {
  color: #fff;
  max-width: 17ch;
}

.hero-sub {
  font-family: var(--rw-serif);
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 56ch;
  margin-bottom: 1.4em;
}

.hero-search {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--rw-radius);
  padding: 18px;
  box-shadow: var(--rw-shadow-lg);
  max-width: 640px;
}

.hero-search label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rw-muted);
  margin-bottom: 8px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--rw-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 44px;
  font-family: var(--rw-sans);
  font-size: 1rem;
  color: var(--rw-text-strong);
  background: var(--rw-white);
  border: 1.5px solid var(--rw-border-strong);
  border-radius: var(--rw-radius-sm);
}

.search-field input:focus {
  border-color: var(--rw-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--rw-accent-soft);
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.search-tag {
  background: var(--rw-surface);
  border: 1px solid var(--rw-border);
  color: var(--rw-text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 34px;
}

.search-tag:hover {
  background: var(--rw-accent-soft);
  border-color: var(--rw-accent);
  color: var(--rw-accent-dark);
}

.section {
  margin-top: 56px;
}

.section-head {
  margin-bottom: 26px;
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.section-head p {
  margin-bottom: 0;
}

.glossary {
  display: grid;
  gap: 14px;
}

.glossary-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.glossary-search svg {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--rw-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glossary-search input {
  width: 100%;
  min-height: 48px;
  padding: 11px 16px 11px 44px;
  font-family: var(--rw-sans);
  font-size: 1rem;
  border: 1.5px solid var(--rw-border-strong);
  border-radius: var(--rw-radius-sm);
  background: var(--rw-white);
  color: var(--rw-text-strong);
}

.glossary-search input:focus {
  border-color: var(--rw-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--rw-accent-soft);
}

.term-card {
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  background: var(--rw-white);
  box-shadow: var(--rw-shadow-sm);
  overflow: hidden;
  transition: box-shadow 200ms var(--rw-ease), border-color 200ms var(--rw-ease);
}

.term-card:hover {
  box-shadow: var(--rw-shadow-md);
  border-color: var(--rw-border-strong);
}

.term-card__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--rw-sans);
  min-height: 56px;
}

.term-card__term {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.term-card__term strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rw-text-strong);
}

.term-card__term span {
  font-size: 0.82rem;
  color: var(--rw-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.term-card__chev {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--rw-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms var(--rw-ease);
}

.term-card[data-open="true"] .term-card__chev {
  transform: rotate(180deg);
}

.term-card__def {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms var(--rw-ease);
}

.term-card[data-open="true"] .term-card__def {
  grid-template-rows: 1fr;
}

.term-card__def > div {
  overflow: hidden;
}

.term-card__def p {
  font-family: var(--rw-serif);
  margin: 0;
  padding: 0 20px 18px;
  color: var(--rw-text);
}

@media (prefers-reduced-motion: reduce) {
  .term-card__def {
    transition: none;
  }
  .term-card__chev {
    transition: none;
  }
}

.glossary-empty {
  display: none;
  padding: 18px 20px;
  border: 1px dashed var(--rw-border-strong);
  border-radius: var(--rw-radius);
  color: var(--rw-muted);
  background: var(--rw-surface);
}

.glossary-empty[data-show="true"] {
  display: block;
}

.glossary-foot {
  margin-top: 8px;
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--rw-accent);
}

.link-cta svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--rw-ease);
}

.link-cta:hover svg {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .link-cta svg {
    transition: none;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
}

.ref-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  background: var(--rw-white);
  box-shadow: var(--rw-shadow-sm);
  overflow: hidden;
  transition: transform 200ms var(--rw-ease), box-shadow 200ms var(--rw-ease), border-color 200ms var(--rw-ease);
}

.ref-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rw-shadow-md);
  border-color: var(--rw-border-strong);
}

@media (prefers-reduced-motion: reduce) {
  .ref-card:hover {
    transform: none;
  }
}

.ref-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--rw-surface-2);
  overflow: hidden;
}

.ref-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ref-card__meta {
  font-size: 0.8rem;
  color: var(--rw-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.ref-card h3,
.ref-card h4 {
  font-size: 1.08rem;
  margin-bottom: 0.45em;
}

.ref-card h3 a,
.ref-card h4 a {
  color: var(--rw-text-strong);
}

.ref-card h3 a:hover,
.ref-card h4 a:hover {
  color: var(--rw-accent-dark);
  text-decoration: none;
}

.ref-card p {
  font-size: 0.95rem;
  color: var(--rw-text);
  margin-bottom: 14px;
}

.ref-card .link-cta {
  margin-top: auto;
}

.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
  background: var(--rw-surface);
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius-lg);
  padding: clamp(24px, 3vw, 40px);
}

.about-media img {
  border-radius: var(--rw-radius);
  box-shadow: var(--rw-shadow-md);
  width: 100%;
  object-fit: cover;
}

.about-points {
  list-style: none;
  margin: 1.1em 0 0;
  padding: 0;
}

.about-points li {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--rw-serif);
}

.about-points svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  fill: none;
  stroke: var(--rw-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checklist {
  background: var(--rw-accent-soft);
  border: 1px solid #dbe5ff;
  border-radius: var(--rw-radius-lg);
  padding: clamp(24px, 3vw, 40px);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.check-item {
  display: flex;
  gap: 14px;
  background: var(--rw-white);
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  padding: 18px;
}

.check-item__icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--rw-accent-soft);
  color: var(--rw-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check-item__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check-item h3 {
  font-size: 1.02rem;
  margin-bottom: 0.35em;
}

.check-item p {
  font-size: 0.93rem;
  margin: 0;
  color: var(--rw-text);
}

.checklist-note {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--rw-muted);
  font-style: italic;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #1e3a8a, var(--rw-accent));
  color: #fff;
  border-radius: var(--rw-radius-lg);
  padding: clamp(26px, 3vw, 44px);
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 0.4em;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  max-width: 52ch;
}

.cta-band__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-band .btn--light {
  border-color: transparent;
}

.page-head {
  background: var(--rw-surface);
  border-bottom: 1px solid var(--rw-border);
  padding: 44px 0;
}

.page-head .lede {
  margin-top: 0.4em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--rw-muted);
  margin-bottom: 1em;
}

.breadcrumb a {
  color: var(--rw-muted);
}

.breadcrumb a:hover {
  color: var(--rw-accent);
}

.breadcrumb span[aria-current] {
  color: var(--rw-text-strong);
  font-weight: 600;
}

.index-list {
  display: grid;
  gap: 18px;
}

.index-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  background: var(--rw-white);
  box-shadow: var(--rw-shadow-sm);
  overflow: hidden;
  transition: box-shadow 200ms var(--rw-ease), border-color 200ms var(--rw-ease);
}

.index-card:hover {
  box-shadow: var(--rw-shadow-md);
  border-color: var(--rw-border-strong);
}

.index-card__media {
  align-self: stretch;
  background: var(--rw-surface-2);
}

.index-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index-card__body {
  padding: 18px 20px 18px 0;
}

.index-card__meta {
  font-size: 0.82rem;
  color: var(--rw-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.index-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.4em;
}

.index-card h3 a {
  color: var(--rw-text-strong);
}

.index-card p {
  font-size: 0.97rem;
  margin-bottom: 12px;
}

.tag-pill {
  display: inline-block;
  background: var(--rw-accent-soft);
  color: var(--rw-accent-dark);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.prose {
  font-family: var(--rw-serif);
  font-size: 1.08rem;
}

.prose h2 {
  font-family: var(--rw-sans);
  margin-top: 1.5em;
}

.prose h3 {
  font-family: var(--rw-sans);
  margin-top: 1.3em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose strong {
  color: var(--rw-text-strong);
}

.callout {
  background: var(--rw-accent-soft);
  border-left: 4px solid var(--rw-accent);
  border-radius: 0 var(--rw-radius-sm) var(--rw-radius-sm) 0;
  padding: 16px 20px;
  margin: 1.6em 0;
  font-family: var(--rw-sans);
  font-size: 0.98rem;
}

.callout strong {
  color: var(--rw-accent-dark);
}

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 36px 0 64px;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
}

.article-hero-img {
  border-radius: var(--rw-radius-lg);
  overflow: hidden;
  margin: 0 auto 28px;
  max-width: 860px;
  box-shadow: var(--rw-shadow-md);
}

.article-hero-img img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--rw-muted);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.4em;
}

.article-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rw-border-strong);
}

.qa-block {
  background: var(--rw-surface);
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  padding: 20px 24px;
  margin: 1.4em 0;
}

.qa-block .qa-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rw-accent);
  margin-bottom: 0.4em;
}

.qa-block p:last-child {
  margin-bottom: 0;
}

.scenario {
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  padding: 4px 24px 4px;
  margin: 1.4em 0;
}

.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--rw-border);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.prevnext a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  padding: 16px 18px;
  background: var(--rw-white);
  transition: border-color 200ms var(--rw-ease), background 200ms var(--rw-ease);
}

.prevnext a:hover {
  border-color: var(--rw-accent);
  background: var(--rw-accent-soft);
  text-decoration: none;
}

.prevnext span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rw-muted);
}

.prevnext strong {
  color: var(--rw-text-strong);
  font-size: 1rem;
  font-weight: 600;
}

.prevnext .pn--next {
  text-align: right;
}

.faq-accordion {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  background: var(--rw-white);
  overflow: hidden;
}

.faq-item__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--rw-sans);
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--rw-text-strong);
  min-height: 56px;
}

.faq-item__btn svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--rw-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms var(--rw-ease);
}

.faq-item[data-open="true"] .faq-item__btn svg {
  transform: rotate(45deg);
}

.faq-item__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms var(--rw-ease);
}

.faq-item[data-open="true"] .faq-item__body {
  grid-template-rows: 1fr;
}

.faq-item__body > div {
  overflow: hidden;
}

.faq-item__body p {
  font-family: var(--rw-serif);
  margin: 0;
  padding: 0 20px 18px;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item__body,
  .faq-item__btn svg {
    transition: none;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.contact-form {
  background: var(--rw-white);
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  padding: 26px;
  box-shadow: var(--rw-shadow-sm);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--rw-text-strong);
  margin-bottom: 7px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--rw-sans);
  font-size: 1rem;
  color: var(--rw-text-strong);
  background: var(--rw-white);
  border: 1.5px solid var(--rw-border-strong);
  border-radius: var(--rw-radius-sm);
  min-height: 46px;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--rw-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--rw-accent-soft);
}

.field[data-error="true"] input,
.field[data-error="true"] textarea {
  border-color: #dc2626;
}

.field-error {
  display: none;
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 6px;
}

.field[data-error="true"] .field-error {
  display: block;
}

.form-note {
  font-size: 0.86rem;
  color: var(--rw-muted);
  margin-top: 6px;
}

.contact-aside {
  display: grid;
  gap: 20px;
}

.info-card {
  background: var(--rw-surface);
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  padding: 22px;
}

.info-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.info-list li {
  display: flex;
  gap: 13px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.info-list li:last-child {
  margin-bottom: 0;
}

.info-list svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  fill: none;
  stroke: var(--rw-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-list a {
  color: var(--rw-text);
}

.info-list a:hover {
  color: var(--rw-accent);
}

.map-frame {
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  overflow: hidden;
  box-shadow: var(--rw-shadow-sm);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

.map-foot {
  padding: 14px 18px;
  background: var(--rw-surface);
  border-top: 1px solid var(--rw-border);
}

.legal {
  max-width: 820px;
  margin: 0 auto;
}

.legal h2 {
  margin-top: 1.6em;
}

.legal .meta-line {
  color: var(--rw-muted);
  font-size: 0.92rem;
  margin-bottom: 1.6em;
}

.site-footer {
  background: #111827;
  color: #cbd5e1;
  padding: 54px 0 26px;
  margin-top: 70px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 32px;
}

.footer-brand .brand {
  color: #fff;
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-brand .brand-name span {
  color: #94a3b8;
}

.footer-brand .brand-mark {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

.footer-brand p {
  margin-top: 14px;
  font-size: 0.94rem;
  color: #94a3b8;
  max-width: 38ch;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.96rem;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a {
  color: #cbd5e1;
  font-size: 0.93rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-contact li {
  display: flex;
  gap: 11px;
  margin-bottom: 13px;
  font-size: 0.92rem;
  color: #cbd5e1;
  align-items: flex-start;
}

.footer-contact svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  fill: none;
  stroke: #93c5fd;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-contact a {
  color: #cbd5e1;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid #1f2937;
  font-size: 0.88rem;
  color: #94a3b8;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-bottom a {
  color: #cbd5e1;
}

.footer-bottom a:hover {
  color: #fff;
}

.cookie-btn {
  background: none;
  border: 0;
  color: #93c5fd;
  font-family: var(--rw-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.cookie-btn:hover {
  color: #fff;
  text-decoration: underline;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.55);
}

.modal[data-open="true"] {
  display: flex;
}

.modal__box {
  background: #fff;
  border-radius: var(--rw-radius);
  box-shadow: var(--rw-shadow-lg);
  max-width: 420px;
  width: 100%;
  padding: 30px 28px;
  text-align: center;
}

.modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--rw-accent-soft);
  color: var(--rw-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal__icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal__box h2 {
  font-size: 1.3rem;
}

.modal__box p {
  color: var(--rw-muted);
}

.cookie-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  background: #fff;
  border-top: 1px solid var(--rw-border);
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
  transform: translateY(110%);
  transition: transform 260ms var(--rw-ease);
}

.cookie-bar[data-show="true"] {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .cookie-bar {
    transition: none;
  }
}

.cookie-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.cookie-bar__text {
  margin: 0;
  font-size: 0.92rem;
  max-width: 60ch;
  color: var(--rw-text);
}

.cookie-bar__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-bar__actions .btn {
  min-height: 42px;
  padding: 9px 16px;
}

.cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.55);
}

.cookie-overlay[data-open="true"] {
  display: flex;
}

.cookie-panel {
  background: #fff;
  border-radius: var(--rw-radius);
  box-shadow: var(--rw-shadow-lg);
  max-width: 540px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
}

.cookie-panel h2 {
  font-size: 1.4rem;
}

.cookie-cat {
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.cookie-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cookie-cat__head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.cookie-cat p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--rw-muted);
}

.cookie-cat__locked {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rw-accent);
  background: var(--rw-accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 27px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.slider {
  position: absolute;
  inset: 0;
  background: var(--rw-border-strong);
  border-radius: 999px;
  transition: background 200ms var(--rw-ease);
}

.slider::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 200ms var(--rw-ease);
  box-shadow: var(--rw-shadow-sm);
}

.switch input:checked + .slider {
  background: var(--rw-accent);
}

.switch input:checked + .slider::before {
  transform: translateX(21px);
}

.switch input:focus-visible + .slider {
  outline: 3px solid var(--rw-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .slider,
  .slider::before {
    transition: none;
  }
}

.cookie-panel__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms var(--rw-ease), transform 500ms var(--rw-ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 1160px) {
  :root {
    --rw-sidebar-w: 230px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .sidebar {
    position: static;
    margin-bottom: 26px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .topbar-actions .btn--primary {
    display: none;
  }
  .sidebar[data-open="false"] {
    display: none;
  }
  /* Open mobile menu = full-height scrollable overlay below the header, so all
     topic links stay visible and the fixed cookie bar can never cover them. */
  .sidebar[data-open="true"] {
    position: fixed;
    top: var(--nav-top, 70px);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--nav-top, 70px));
    z-index: 900;
    margin: 0;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--rw-surface);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
  }
  .about,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .about-media {
    order: -1;
  }
}

/* Mobile nav overlay: lock background scroll and keep the header/hamburger above
   the open menu; the cookie bar drops out of the interaction layer (UI fix). */
html.nav-open { overflow: hidden; }
html.nav-open .site-header { z-index: 950; }
html.nav-open .cookie-bar { pointer-events: none; }

@media (max-width: 840px) {
  body {
    font-size: 16px;
  }
  .hero {
    min-height: 360px;
    padding: 28px 22px;
  }
  .index-card {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
  }
  .index-card__body {
    padding: 14px 16px 14px 0;
  }
  .cta-band,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .container {
    padding: 0 16px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .prevnext {
    grid-template-columns: 1fr;
  }
  .prevnext .pn--next {
    text-align: left;
  }
  .index-card {
    grid-template-columns: 1fr;
  }
  .index-card__media {
    aspect-ratio: 16 / 9;
  }
  .index-card__body {
    padding: 0 16px 16px;
  }
  .hero-search {
    padding: 14px;
  }
  .cta-band__actions .btn,
  .hero-actions .btn {
    width: 100%;
  }
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
