/* ANWALTSINDEX · hoja de estilos única · sin fuentes ni recursos externos */
:root {
  --paper: #f7f3ea; --surface: #fffdf8; --line: #d9d3c7; --ink: #202a28; --muted: #55605c;
  --deep: #244c49; --deep-2: #1b3a38; --accent: #8f5338; --accent-soft: #f0e3d8;
  --tint-sand: #f3ede1; --tint-teal: #eef4f3; --tint-rose: #f5ece7;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Baskerville, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --w: 1120px; --w-narrow: 780px; --gap: 24px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--deep-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--deep); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { top: 8px; }
.container { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--w-narrow); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -.012em; color: var(--ink); margin: 0; }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent); margin: 0 0 10px; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

/* Cabecera */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; min-height: 92px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__mark { flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -.01em; }
.logo__sub { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: inline-block; padding: 8px 14px; font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--deep); font-weight: 600; }
.nav__search { display: inline-flex !important; align-items: center; gap: 6px; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line); width: 46px; height: 46px; cursor: pointer; border-radius: 4px; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; margin: 0 auto; content: ""; }
.nav-toggle__bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle__bars::after { position: absolute; top: 6px; left: 0; }
@media (max-width: 900px) {
  .site-header__in { min-height: 78px; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(32, 42, 40, .08); padding: 8px 24px 16px; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--deep); }
}

/* Botones */
.btn, .search-form button, .hero__search button { display: inline-block; background: var(--deep); color: #fff; border: 1px solid var(--deep); padding: 12px 22px; font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; border-radius: 999px; }
.btn:hover, .search-form button:hover, .hero__search button:hover { background: var(--deep-2); color: #fff; }
.btn--ghost { background: transparent; color: var(--deep); }
.btn--ghost:hover { background: var(--deep); color: #fff; }
.btn--light { background: var(--paper); color: var(--deep); border-color: var(--paper); }
.btn--light:hover { background: #fff; color: var(--deep-2); }
.btn--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn--outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }

/* Portada */
.hero { background: var(--deep); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 88px); pointer-events: none; }
.hero__in { position: relative; text-align: center; padding-top: 84px; padding-bottom: 84px; }
.hero__kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 22px; color: #e8dcc6; }
.hero h1 { color: #fffdf8; font-size: clamp(2.3rem, 5.4vw, 4.4rem); max-width: 17ch; margin: 0 auto 22px; line-height: 1.04; }
.hero__text { color: #e5e9e4; font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 62ch; margin: 0 auto 34px; }
.hero__search { position: relative; display: flex; align-items: center; gap: 12px; background: var(--paper); color: var(--ink); max-width: 720px; margin: 0 auto 22px; padding: 8px 8px 8px 22px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.hero__search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 17px/1.4 var(--sans); padding: 12px 4px; color: var(--ink); }
.hero__search input:focus-visible { outline: none; }
.hero__search:focus-within { outline: 3px solid var(--accent-soft); }
.hero__cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); text-align: left; z-index: 20; box-shadow: 0 14px 30px rgba(32, 42, 40, .14); border-radius: 6px; overflow: hidden; }
.suggest a { display: block; padding: 12px 18px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a:focus { background: var(--tint-sand); }
.suggest small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 640px) {
  .hero__in { padding-top: 56px; padding-bottom: 56px; }
  .hero__search { padding-left: 16px; }
  .hero__search svg { display: none; }
  .hero__search button { padding: 12px 16px; }
}

.chips { background: var(--surface); border-bottom: 1px solid var(--line); }
.chips__in { display: flex; gap: 12px; overflow-x: auto; padding-top: 20px; padding-bottom: 20px; scrollbar-width: thin; }
.chip { flex: none; border: 1px solid var(--line); background: var(--paper); padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--deep); background: #fff; }

.home-sec { padding: 72px 0; border-bottom: 1px solid var(--line); }
.home-sec--sand { background: var(--tint-sand); }
.home-sec--teal { background: var(--tint-teal); }
.home-sec--rose { background: var(--tint-rose); }
.home-sec__head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: end; padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid rgba(32, 42, 40, .18); }
.home-sec__head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; }
.home-sec__lead { margin: 0; color: var(--muted); text-align: right; max-width: 52ch; justify-self: end; }
.home-sec__all { margin: 36px 0 0; text-align: center; }
@media (max-width: 760px) { .home-sec { padding: 52px 0; } .home-sec__head { grid-template-columns: 1fr; gap: 12px; } .home-sec__lead { text-align: left; justify-self: start; } }

/* Tarjetas */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); display: flex; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--deep); box-shadow: 0 10px 26px rgba(32, 42, 40, .08); }
.card__link { display: flex; flex-direction: column; width: 100%; color: inherit; text-decoration: none; }
.card__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tint-sand); }
.card__img--ph { display: flex; align-items: center; justify-content: center; color: var(--deep); }
.card__img--sand { background: #ece2cf; }
.card__img--teal { background: #dde9e7; }
.card__img--rose { background: #eddcd3; }
.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-size: 1.32rem; line-height: 1.2; font-weight: 500; }
.card__text { margin: 4px 0 8px; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card__more { margin-top: auto; color: var(--deep); font-weight: 600; font-size: 14px; }
.card--big { max-width: 100%; }
.card--big .card__link { flex-direction: row; }
.card--big .card__img { width: 44%; aspect-ratio: auto; min-height: 240px; }
.card--big .card__title { font-size: 1.8rem; }
@media (max-width: 760px) { .card--big .card__link { flex-direction: column; } .card--big .card__img { width: 100%; aspect-ratio: 16 / 9; min-height: 0; } }

.method { padding: 72px 0; background: var(--paper); }
.method__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.method h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 400; }
@media (max-width: 760px) { .method__in { grid-template-columns: 1fr; gap: 16px; } .method { padding: 52px 0; } }

/* Categoría */
.cat-hero { padding: 36px 0 52px; border-bottom: 1px solid var(--line); }
.cat-hero--sand { background: var(--tint-sand); }
.cat-hero--teal { background: var(--tint-teal); }
.cat-hero--rose { background: var(--tint-rose); }
.cat-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 400; margin-bottom: 14px; }
.lede { font-size: 1.2rem; line-height: 1.55; color: #3b4743; max-width: 62ch; margin: 14px 0 0; }
.cat-body { padding-top: 48px; padding-bottom: 72px; }
.group { margin: 48px 0; }
.group h2 { font-size: 1.9rem; font-weight: 400; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.prose--intro { max-width: 70ch; }

/* Migas */
.breadcrumb { margin: 28px 0 18px; font-size: 14px; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin: 0 9px; color: #a29b8c; }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--ink); }
.cat-hero .breadcrumb { margin-top: 0; }

/* Artículo */
.article-head { max-width: 860px; padding: 26px 0 8px; border-top: 1px solid rgba(32, 42, 40, .2); }
.article-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.06; font-weight: 500; }
.meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 20px 0 0; font-size: 14px; color: var(--muted); }
.article-figure { margin: 28px 0 0; }
.article-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; align-items: start; margin-top: 36px; }
.article-layout > .toc { grid-column: 2; grid-row: 1; position: sticky; top: 20px; }
.article-layout > .prose { grid-column: 1; grid-row: 1; }
@media (max-width: 1040px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .article-layout > .toc, .article-layout > .prose { grid-column: 1; grid-row: auto; position: static; }
}
.toc { background: var(--surface); border: 1px solid var(--line); padding: 20px 22px; font-size: 15px; }
.toc__title { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: 6px 0; line-height: 1.35; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { color: var(--deep); text-decoration: underline; }
.toc--page { margin: 18px 0 8px; }

.prose { font-size: 1.0625rem; line-height: 1.75; max-width: 72ch; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 2.4em 0 .6em; font-weight: 500; scroll-margin-top: 16px; }
.prose h3 { font-size: 1.35rem; margin: 1.8em 0 .5em; font-weight: 600; scroll-margin-top: 16px; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose strong { font-weight: 700; }
.prose a { font-weight: 500; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 0; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; line-height: 1.5; }
.prose caption { text-align: left; font-weight: 600; padding: 12px 16px; font-family: var(--serif); font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.prose th, .prose td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { background: var(--tint-sand); font-weight: 700; white-space: nowrap; }
.prose tbody th { font-weight: 600; }
.prose tbody tr:last-child th, .prose tbody tr:last-child td { border-bottom: 0; }
.callout { margin: 1.6em 0; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--deep); }
.callout > :last-child { margin-bottom: 0; }
.callout__title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; }
.callout--key { background: var(--tint-teal); border-left-color: var(--deep); }
.callout--warn { border-left-color: var(--accent); background: #fbf3ec; }
.callout--example { border-left-color: #7a6a43; background: #f8f4e8; }
.callout ul, .callout ol { margin-bottom: .6em; }
.disclaimer { margin: 2.4em 0 1em; padding: 16px 20px; border: 1px solid var(--line); background: var(--accent-soft); font-size: .95rem; line-height: 1.6; }
.disclaimer p { margin: 0; }
.cat-body .disclaimer, .container > .disclaimer { max-width: 72ch; }
.sources { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.sources h2 { margin-top: 0; font-size: 1.6rem; }
.sources ul { font-size: .97rem; }
.sources__note { font-size: .92rem; color: var(--muted); }
.pillar-box { background: var(--surface); border: 1px solid var(--line); padding: 14px 20px; margin: 0 0 1.8em; }
.pillar-box p { margin: 0; }
.cluster { margin-top: 2.4em; }
.cluster h2 { font-size: 1.6rem; margin-top: 0; }
.cluster ul { columns: 1; }
.related { margin: 64px 0 72px; padding-top: 36px; border-top: 1px solid var(--line); }
.related h2 { font-size: 2rem; font-weight: 400; margin-bottom: 24px; }

/* Buscador */
.search-form { display: flex; gap: 10px; margin: 8px 0 20px; }
.search-form input { flex: 1; min-width: 0; font: 500 17px/1.4 var(--sans); padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; }
.search-status { color: var(--muted); margin: 0 0 14px; min-height: 1.5em; }
.search-results { list-style: none; margin: 0 0 56px; padding: 0; }
.search-results li { border-top: 1px solid var(--line); padding: 18px 0; }
.search-results a { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; }
.search-results a:hover { text-decoration: underline; }
.search-results p { margin: 6px 0 0; color: var(--muted); }
.notfound { padding: 56px 0 80px; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 10px; }
.notfound__cats { margin-top: 28px; }

/* Publicidad (solo existe si hay bloques manuales configurados) */
.ad-slot { margin: 2em 0; padding: 8px 0; min-height: 120px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ad-slot__label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* Pie */
.site-footer { background: var(--deep); color: #fffdf8; margin-top: 24px; font-size: 15px; }
.site-footer a { color: #fffdf8; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.site-footer__name { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 12px; }
.site-footer__brand p { color: #dbe3df; max-width: 40ch; margin: 0; }
.site-footer__h { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #cfc3ab; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 10px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 22px; padding-bottom: 30px; color: #cfd9d4; font-size: 13.5px; }
.site-footer__bottom p { margin: 0; max-width: 90ch; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; } }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--tint-sand); padding: 1px 6px; border-radius: 3px; }
