/* Alemán Por Derecho: "Requisitos" guide page-only rules. No italics. */

/* hero: oat, compact, no image */
.page-req .page-hero .t-h1 { font-size: clamp(2.25rem, 5.6vw, 4.5rem); line-height: 1.08; text-wrap: balance; max-width: 52rem; }
.req-hero__wrap { padding-top: 7.5rem; padding-bottom: 3.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.req-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.req-hero__meta { font-size: 0.875rem; line-height: 1.4; color: var(--obsidian-lighter); }
.req-hero__note { max-width: 40rem; font-size: 0.875rem; line-height: 1.5; padding-left: 0.75rem; border-left: 2px solid var(--marigold-500); }
.req-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.875rem; line-height: 1.4; }
.req-crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--obsidian-lighter); }
.req-crumbs a { text-decoration: underline; text-underline-offset: 3px; }
@media screen and (max-width: 991px) { .req-hero__wrap { padding-top: 4.5rem; } }
@media screen and (max-width: 767px) { .req-hero__wrap { padding-top: 3.5rem; padding-bottom: 2rem; } }

/* body layout: sticky table of contents + article */
.req-body { background: var(--white); padding: 4rem 0 6rem; }
.req-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 4rem; align-items: start; }
.req-toc { position: sticky; top: 10rem; align-self: start; }
.req-toc__toggle { display: none; }
.req-toc__list { display: flex; flex-direction: column; border-left: 1px solid var(--oat-300); }
.req-toc__list a { display: block; padding: 0.5rem 0 0.5rem 1rem; margin-left: -1px; border-left: 2px solid transparent; font-size: 0.9375rem; line-height: 1.35; color: var(--obsidian-lighter); transition: color 0.2s, border-color 0.2s; }
.req-toc__list a:hover { color: var(--obsidian); }
.req-toc__list a.is-active { color: var(--obsidian); font-weight: 600; border-left-color: var(--juniper-800); }

/* article typography */
.req-article { max-width: 68ch; font-size: 1.125rem; line-height: 1.75; color: var(--obsidian); }
.req-sec { scroll-margin-top: 10rem; padding-bottom: 3rem; }
.req-sec h2 { font-family: var(--font-display); font-optical-sizing: auto; font-weight: 500; font-size: clamp(1.75rem, 3.2vw, 2.375rem); line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 1.25rem; text-wrap: balance; }
.req-sec h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; margin: 1.75rem 0 0.75rem; }
.req-sec p + p, .req-sec p + .req-box, .req-sec p + .req-table-wrap, .req-sec .req-table-wrap + p, .req-sec .req-box + p { margin-top: 1.25rem; }
.req-sec a:not(.btn__pad) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.req-sec [lang="de"] { font-style: normal; }

.req-box { background: var(--juniper-50); border-left: 3px solid var(--juniper-800); border-radius: var(--r-8); padding: 1.25rem 1.5rem; font-size: 1rem; line-height: 1.6; }
.req-box__title { font-weight: 600; margin-bottom: 0.5rem; }
.req-box ul { display: flex; flex-direction: column; gap: 0.5rem; }
.req-box li, .req-list li { position: relative; padding-left: 1.25rem; }
.req-box li::before, .req-list li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--juniper-800); }
.req-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }

/* date table */
.req-table-wrap { border: 1px solid var(--oat-300); border-radius: var(--r-10); overflow: hidden; }
.req-table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.req-table th, .req-table td { padding: 0.9rem 1.1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--oat-300); }
.req-table thead th { background: var(--oat-50); border-top: 0; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.req-table tbody th { font-weight: 500; width: 52%; }
.req-table td { font-weight: 600; }
.req-table .req-table__arrow { width: 2rem; padding-left: 0; padding-right: 0; text-align: center; color: var(--juniper-800); }
.req-table thead th:nth-child(2) { width: 2rem; padding: 0; }
@media screen and (max-width: 479px) { .req-table th, .req-table td { padding: 0.75rem 0.65rem; font-size: 0.9375rem; } .req-table tbody th { width: 48%; } }

/* inline CTA (juniper) */
.req-cta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem 1.5rem; background: var(--oat-50); color: var(--obsidian); border-radius: var(--r-14); padding: 1.5rem 1.75rem; margin: 0 0 3rem; font-size: 1rem; line-height: 1.4; }
.req-cta__img { width: 4.5rem; height: 4.5rem; border-radius: var(--r-10); object-fit: cover; }
.req-cta__title { font-family: var(--font-display); font-weight: 500; font-size: 1.375rem; line-height: 1.2; }
.req-cta__text { margin-top: 0.25rem; color: var(--obsidian-lighter); }
@media screen and (max-width: 767px) { .req-cta { grid-template-columns: auto 1fr; padding: 1.25rem; } .req-cta .btn { grid-column: 1 / -1; } }

/* FAQ inside the article */
.req-faq .faq__q { font-size: 1.125rem; line-height: 1.3; }
.req-faq .faq__rtx { font-size: 1rem; line-height: 1.6; }

/* sources */
ol.req-sources { list-style: none; counter-reset: src; padding: 0; }
.req-sources { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; font-size: 1rem; line-height: 1.5; }
.req-sources a { overflow-wrap: anywhere; }
ol.req-sources a { display: inline-block; min-height: 24px; line-height: 24px; }
ol.req-sources > li { counter-increment: src; position: relative; padding-left: 2.25rem; scroll-margin-top: 10rem; }
ol.req-sources > li::before { content: counter(src); position: absolute; left: 0; top: 0.1rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--sky-light); color: var(--obsidian); font-size: 0.8125rem; font-weight: 600; line-height: 1.5rem; text-align: center; }
ol.req-sources > li:target { background: var(--marigold-100); border-radius: 0.5rem; box-shadow: 0 0 0 0.375rem var(--marigold-100); }
.req-sources__date { display: block; margin-top: 0.125rem; font-size: 0.9375rem; color: var(--obsidian-lighter); }

/* hero source line: calm, readable, links to #fuentes */
.req-hero__sources { max-width: 40rem; font-size: 1rem; line-height: 1.5; color: var(--obsidian); }
.req-hero__sources a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.req-hero__sources-label { font-weight: 600; }

/* inline numbered citations: upright, small, with a comfortable tap target */
.cite { font-size: 0.72em; line-height: 0; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; vertical-align: baseline; position: relative; top: -0.55em; margin-left: 0.1em; white-space: nowrap; }
.cite a, .req-sec .cite a:not(.btn__pad) { display: inline; position: relative; padding: 0 0.25em; line-height: 1; text-decoration: none; color: var(--juniper-800); }
/* invisible 44px touch target around each number; inline box keeps the number glued to the word before it */
.cite a::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.75rem; height: 1.75rem; transform: translate(-50%, -50%); }
.cite a:hover, .cite a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.cite + .cite { margin-left: 0; }
/* adjacent cites read "1, 2", not "12"; the comma sits outside the link hit area.
   Only on .cite--seq: `.cite + .cite` also matches cites with text between them. */
.cite--seq::before { content: ","; margin-left: -0.2em; margin-right: 0.05em; }
.req-table-src { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--obsidian-lighter); }

/* tablet and mobile: collapsible table of contents above the article */
@media screen and (max-width: 991px) {
  .req-body { padding: 2rem 0 4rem; }
  .req-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .req-toc { position: static; border: 1px solid var(--oat-300); border-radius: var(--r-10); background: var(--oat-50); }
  .req-toc__toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 0.9rem 1.1rem; font-weight: 600; font-size: 1rem; }
  .req-toc__chev { width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--obsidian); border-bottom: 2px solid var(--obsidian); transform: rotate(45deg); transition: transform 0.2s; margin-top: -0.2rem; }
  .req-toc__toggle[aria-expanded="true"] .req-toc__chev { transform: rotate(-135deg); margin-top: 0.2rem; }
  .req-toc__list { display: none; border-left: 0; padding: 0 1.1rem 0.75rem; }
  .req-toc.is-open .req-toc__list { display: flex; }
  .req-toc__list a { border-left: 0; padding-left: 0; margin-left: 0; }
  .req-toc__list a.is-active { text-decoration: underline; text-underline-offset: 4px; }
  .req-article { max-width: none; font-size: 1.0625rem; }
  .req-sec { scroll-margin-top: 10rem; padding-bottom: 2.25rem; }
  ol.req-sources > li { scroll-margin-top: 10rem; }
  .cite a::after { width: 2.75rem; height: 2.75rem; }
  .cite + .cite a::after { width: 1.75rem; }
  .req-crumbs ol { gap: 1rem; font-size: 0.9375rem; }
  .req-crumbs li + li::before { margin-right: 1rem; }
  .req-crumbs li { display: flex; align-items: center; }
  .req-crumbs a { padding: 0.8rem 0.5rem; margin: -0.8rem -0.5rem; }
  .req-toc__toggle { min-height: 3rem; }
  .req-toc__list a { display: flex; align-items: center; min-height: 2.75rem; padding-top: 0.25rem; padding-bottom: 0.25rem; font-size: 1rem; }
  .req-hero__meta { font-size: 0.9375rem; }
  .req-hero__note { font-size: 0.9375rem; }
}
@media screen and (max-width: 479px) {
  .req-body { padding-top: 1.5rem; }
  .req-sec h2 { margin-bottom: 1rem; }
  .req-box { padding: 1rem 1.1rem; }
  .req-sources { gap: 1rem; }
}
