:root {
  color-scheme: light;
  --paper: #f8f2e8;
  --card: #fffdfa;
  --ink: #26211d;
  --muted: #65574a;
  --rust: #8e3919;
  --line: #e7d9c8;
  --gold: #ffd88d;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; line-height: 1.6; }
a { color: var(--rust); }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button, .topic, .local-toc a, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #a04c1f; outline-offset: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
.shell { width: min(70rem, 100% - 2rem); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.mast { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; min-height: 44px; align-items: center; }
.wordmark img { display: block; width: 80px; height: auto; }
.mast nav { display: flex; gap: .5rem; }
.mast nav a { display: grid; place-items: center; min-height: 44px; padding: .25rem .65rem; color: var(--ink); font-weight: 650; text-decoration: none; }
.mast nav a:hover { text-decoration: underline; }
.skip { position: absolute; z-index: 10; background: #fff; padding: .5rem .9rem; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.hero { position: relative; margin-top: 1.4rem; padding: clamp(1.55rem, 5vw, 4.25rem); color: white; background: #342116; border-radius: 1.25rem; }
.kicker { margin: 0 0 .7rem; font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--rust); }
.hero .kicker { color: var(--gold); }
h1, h2 { text-wrap: balance; }
.hero h1, .chapter-head h1 { margin: 0; font: 700 clamp(2rem, 5.8vw, 4.4rem)/1.06 Georgia, serif; }
.hero .motto { margin: .85rem 0 0; color: #fbdfb4; font: italic 1.12rem/1.55 Georgia, serif; }
.install { margin-top: 1rem; min-height: 44px; padding: .35rem 1rem; border: 0; background: var(--gold); color: #342116; border-radius: .55rem; font-weight: 750; }
.search { padding-block: 1.45rem .35rem; }
.search label { display: block; margin-bottom: .35rem; font-weight: 750; }
.search-input { display: flex; flex-wrap: wrap; gap: .45rem; }
.search-input input { width: 0; flex: 1 1 12rem; min-height: 48px; padding: .4rem .7rem; border: 1px solid #ae9d89; border-radius: .65rem; background: white; color: var(--ink); }
.search-input button { min-height: 48px; padding: .4rem 1rem; color: white; background: var(--rust); border: 0; border-radius: .65rem; font-weight: 750; }
.results { margin-top: .75rem; background: var(--card); border: 1px solid var(--line); border-radius: .8rem; padding: .25rem 1rem; }
.results ul { list-style: none; padding: 0; }
.results li { border-top: 1px solid var(--line); padding: .7rem 0; }
.results a { display: inline-block; min-height: 44px; font-weight: 700; }
.results p { margin: .25rem 0; }
.results #estado { margin: .65rem 0; }
.results small { display: block; color: var(--muted); }
.index { margin-top: 1.25rem; }
.index h2, .supplement h2 { font: 700 1.9rem/1.16 Georgia, serif; margin: 0 0 .8rem; }
.index h3 { margin: 1.4rem 0 .55rem; font-size: .83rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rust); }
.topics, .local-toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; list-style: none; margin: 0; padding: 0; }
.topic, .local-toc a { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: .65rem; min-height: 55px; height: 100%; padding: .6rem .85rem; background: var(--card); border: 1px solid var(--line); border-radius: .6rem; text-decoration: none; color: var(--ink); font-weight: 650; line-height: 1.3; }
.topic:hover, .local-toc a:hover { border-color: var(--rust); }
.topic small, .local-toc small, .page-label { font-size: .79rem; color: var(--muted); white-space: nowrap; font-weight: 600; }
.arrow { color: var(--rust); font-size: 1.2rem; }
.supplement, .install-help { margin-top: 1.5rem; padding: 1rem clamp(.9rem, 3vw, 1.6rem); border: 1px solid var(--line); background: var(--card); border-radius: .9rem; }
.legend { padding-left: 0; list-style: none; }
.legend b { display: inline-block; min-width: 1.4rem; color: var(--rust); }
.back { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
.chapter { max-width: 53rem; }
.chapter-head { padding: 1rem 0 1.35rem; }
.chapter-head h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); }
.local-toc { margin: 0 0 1rem; }
.local-toc ul { padding-top: .45rem; }
.local-toc a { grid-template-columns: minmax(0,1fr) auto; font-size: .91rem; }
.lesson { background: var(--card); border: 1px solid var(--line); border-radius: .9rem; padding: clamp(1rem,4vw,2rem); margin-bottom: 1rem; overflow-wrap: anywhere; scroll-margin-top: .65rem; }
.lesson:target { border-color: #a14e25; }
.lesson h2 { margin: .1rem 0 .85rem; font: 700 clamp(1.32rem, 3vw, 2rem)/1.22 Georgia, serif; }
.lesson h3 { margin: 1.1rem 0 .3rem; font-size: 1rem; color: var(--rust); }
.lesson p { margin: .46rem 0; }
.illustration { margin: .9rem auto; }
.illustration img { display: block; margin-inline: auto; border-radius: .35rem; }
.table-scroll { overflow-x: auto; margin: .9rem 0; }
table { width: 100%; border-collapse: collapse; line-height: 1.45; }
td, th { text-align: start; vertical-align: top; padding: .45rem .6rem; border-bottom: 1px solid var(--line); min-width: 4rem; overflow-wrap: normal; }
th { background: #f0e2d1; }
tr:nth-child(even) { background: #fcf6ee; }
summary { min-height: 44px; padding-block: .6rem; font-weight: 700; color: var(--rust); }
.facsimile { margin-top: .65rem; border-top: 1px solid var(--line); }
.facsimile img { width: min(100%, 42rem); display: block; margin-inline: auto; background: white; }
.image-link { display: inline-flex; min-height: 44px; align-items: center; gap: .4rem; font-size: .92rem; }
.adjacent { display: flex; flex-wrap: wrap; gap: .55rem; }
.adjacent a { display: flex; align-items: center; min-height: 44px; background: var(--card); border: 1px solid var(--line); padding: .45rem .7rem; border-radius: .55rem; font-weight: 650; }
footer { margin-top: 2rem; border-top: 1px solid var(--line); padding-block: 1rem; color: var(--muted); font-size: .84rem; }
footer .shell { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; }
@media (max-width: 43rem) {
  .topics, .local-toc ul { grid-template-columns: 1fr; }
  .lesson td, .lesson th { padding: .4rem .45rem; min-width: 3.5rem; }
}
.uniform-list { padding-inline-start: 1.6rem; }
.uniform-list li { margin-bottom: .55rem; padding: .5rem .65rem; background: #f5eadb; border-radius: .45rem; }
.uniform-list li::marker { font-weight: 750; color: var(--rust); }
