:root{
  --corteza:#E2C38F;
  --corteza-hondo:#D4A86A;
  --tostado:#7A4A22;
  --hollin:#2A1C12;
  --crema:#F7EEDC;
  --achiote:#A23E22;
  --achiote-hondo:#7F2E18;
  --molle:#4F6A3A;
  --linea:rgba(42,28,18,.22);
  --serif-t:"Fondamento","Palatino Linotype","Book Antiqua",Georgia,serif;
  --serif-c:"Caudex","Iowan Old Style","Georgia",serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--crema);
  background-image:repeating-linear-gradient(115deg,rgba(122,74,34,.035) 0 1px,transparent 1px 9px);
  color:var(--hollin);
  font-family:var(--serif-c);
  font-size:1.08rem;
  line-height:1.66;
}
img,svg{max-width:100%;height:auto}
a{color:var(--achiote-hondo);text-underline-offset:3px;text-decoration-thickness:1px}
a:hover{color:var(--achiote)}
h1,h2,h3{font-family:var(--serif-t);font-weight:400;line-height:1.22;color:var(--hollin)}
h1{font-size:clamp(1.9rem,4.4vw,2.85rem);margin:.2em 0 .5em}
h2{font-size:clamp(1.42rem,2.8vw,1.85rem);margin:2.1em 0 .6em;padding-bottom:.35em;border-bottom:1px dashed var(--linea)}
h3{font-size:1.2rem;margin:1.6em 0 .4em}
p{margin:0 0 1.05em}
ul,ol{padding-left:1.25em}
li{margin-bottom:.4em}

.GourdShell{min-height:100vh;display:flex;flex-direction:column}

/* cabecera */
.RimBar{background:var(--hollin);color:var(--crema);border-bottom:4px solid var(--corteza-hondo);position:relative}
.RimBar::after{content:"";position:absolute;left:0;right:0;bottom:-10px;height:6px;
  background:repeating-linear-gradient(90deg,var(--tostado) 0 6px,transparent 6px 14px);opacity:.55}
.RimInner{max-width:1240px;margin:0 auto;padding:.7rem 1.25rem;display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.BrandGlyph{display:flex;align-items:center;gap:.6rem;color:var(--crema);text-decoration:none;font-family:var(--serif-t);font-size:1.28rem;margin-right:auto}
.BrandGlyph:hover{color:var(--corteza)}
.BrandGlyph svg{width:38px;height:38px;flex:0 0 38px}
.BrandGlyph small{display:block;font-family:var(--serif-c);font-size:.72rem;letter-spacing:.06em;color:var(--corteza);opacity:.9}
.MenuToggle{position:absolute;opacity:0;pointer-events:none}
.MenuLabel{display:none;cursor:pointer;border:1px solid var(--corteza);color:var(--crema);padding:.35rem .7rem;border-radius:3px;font-size:.95rem}
.StrandNav{display:flex;gap:.2rem;flex-wrap:wrap;align-items:center}
.StrandNav a{color:var(--crema);text-decoration:none;padding:.35rem .6rem;border-radius:2px;font-size:.97rem}
.StrandNav a:hover,.StrandNav a[aria-current="page"]{background:rgba(226,195,143,.16);color:var(--corteza)}

/* botón de salida al operador */
.CarvedBtn{display:inline-block;background:var(--achiote);color:#FFF8EC;text-decoration:none;
  font-family:var(--serif-t);font-size:1.03rem;padding:.62rem 1.15rem;border-radius:999px;
  border:2px solid var(--achiote-hondo);box-shadow:inset 0 0 0 2px rgba(255,248,236,.25);line-height:1.25}
.CarvedBtn:hover{background:var(--achiote-hondo);color:#FFF8EC}
.RimBar .CarvedBtn{font-size:.95rem;padding:.42rem .95rem}

/* marco */
.PageFrame{width:100%;max-width:1240px;margin:0 auto;padding:2.2rem 1.25rem 3rem;
  display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:3rem;align-items:start;flex:1}
.ProseColumn{max-width:760px;width:100%;justify-self:center}
.SideRing{position:sticky;top:1.2rem;border:1px solid var(--linea);background:rgba(226,195,143,.18);
  border-radius:50% 50% 14px 14px/70px 70px 14px 14px;padding:4.2rem 1.2rem 1.3rem;font-size:.95rem}
.SideRing p{font-family:var(--serif-t);font-size:1.05rem;margin-bottom:.4rem}
.RingList{list-style:none;padding:0;margin:0}
.RingList li{border-top:1px dotted var(--linea);padding:.35rem 0;margin:0}
.RingList a{text-decoration:none}

.TrailPath{font-size:.9rem;color:var(--tostado);margin-bottom:.4rem}
.TrailPath ol{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.3rem}
.TrailPath li{margin:0}
.TrailPath li+li::before{content:"\00BB";margin-right:.3rem;color:var(--corteza-hondo)}
.StampDate{font-size:.92rem;color:var(--tostado);margin-bottom:1.4rem}

.LeadPanel{background:#FBF5E8;border:1px solid var(--linea);border-left:6px solid var(--tostado);padding:1.1rem 1.25rem;margin:0 0 1.6rem;border-radius:4px}
.LeadPanel p:last-child{margin-bottom:0}

.IncisionRule{border:0;height:22px;margin:2.2rem 0;
  background:url("spiral-band.svg") center/auto 22px repeat-x}

.BridgeLine{margin:2rem 0;padding:1.1rem 1.2rem;border:1px dashed var(--tostado);border-radius:12px;
  display:flex;flex-wrap:wrap;gap:.9rem 1.2rem;align-items:center;justify-content:space-between;background:rgba(255,248,236,.6)}
.BridgeLine p{margin:0;flex:1 1 260px}

.LedgerWrap{overflow-x:auto;margin:0 0 1.4rem;border:1px solid var(--linea);border-radius:6px;background:#FFFBF3}
.FactLedger{border-collapse:collapse;width:100%;min-width:480px;font-size:.98rem}
.FactLedger th,.FactLedger td{padding:.55rem .75rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--linea)}
.FactLedger thead th{background:var(--hollin);color:var(--crema);font-family:var(--serif-t);font-weight:400}
.FactLedger tbody th{font-weight:700;width:34%}
.FactLedger tr:last-child td,.FactLedger tr:last-child th{border-bottom:0}
.FactLedger caption{caption-side:bottom;text-align:left;font-size:.86rem;color:var(--tostado);padding:.5rem .75rem}

.NoteBurn{background:#F3E2C4;border-radius:6px;padding:1rem 1.15rem;margin:1.4rem 0;border:1px solid var(--corteza-hondo)}
.NoteBurn strong{font-family:var(--serif-t);font-weight:400;font-size:1.06rem}
.NoteBurn p:last-child{margin-bottom:0}

.StepCoil{counter-reset:coil;list-style:none;padding:0}
.StepCoil li{counter-increment:coil;position:relative;padding:.1rem 0 .7rem 3rem;margin:0}
.StepCoil li::before{content:counter(coil);position:absolute;left:0;top:0;width:2.1rem;height:2.1rem;border-radius:50%;
  border:2px solid var(--tostado);display:grid;place-items:center;font-family:var(--serif-t);color:var(--tostado);background:#FBF5E8}

.PanelPair{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1rem 0 1.4rem}
.PanelGourd{border:1px solid var(--linea);border-radius:40px 40px 8px 8px;padding:1rem 1.1rem;background:#FFFBF3}
.PanelGourd h3{margin-top:0}
.PanelGourd p:last-child,.PanelGourd ul:last-child{margin-bottom:0}

.AskList{margin:1rem 0}
.AskItem{border-bottom:1px solid var(--linea);padding:.2rem 0}
.AskItem summary{cursor:pointer;font-family:var(--serif-t);font-size:1.12rem;padding:.55rem 0;list-style:none}
.AskItem summary::-webkit-details-marker{display:none}
.AskItem summary::before{content:"\25CC";color:var(--achiote);margin-right:.5rem}
.AskItem[open] summary::before{content:"\25C9"}
.AskItem div{padding:0 0 .7rem 1.5rem}

/* pie */
.FootBand{background:var(--hollin);color:#EADBC0;margin-top:auto;border-top:6px double var(--corteza-hondo);font-size:.95rem}
.FootGrid{max-width:1240px;margin:0 auto;padding:2rem 1.25rem 1.4rem;display:grid;grid-template-columns:1.4fr 1fr;gap:2rem}
.FootBand a{color:var(--corteza)}
.FootBand nav a{display:inline-block;margin:0 .8rem .4rem 0}
.FootDisclosure{border-left:3px solid var(--achiote);padding-left:.9rem}
.FootNote{max-width:1240px;margin:0 auto;padding:0 1.25rem 1.6rem;font-size:.86rem;opacity:.85}

.MissingSpiral{text-align:center;padding:2rem 0}
.MissingSpiral svg{width:180px;height:180px}

@media (max-width:1060px){
  .PageFrame{grid-template-columns:minmax(0,1fr);gap:1.5rem}
  .SideRing{position:static;order:-1;border-radius:14px;padding:1rem 1.1rem}
  .ProseColumn{max-width:780px}
}
@media (max-width:820px){
  .MenuLabel{display:inline-block}
  .StrandNav{display:none;width:100%;flex-direction:column;align-items:stretch;padding:.4rem 0}
  .StrandNav a{padding:.6rem .4rem;border-top:1px solid rgba(226,195,143,.2)}
  .MenuToggle:checked ~ .StrandNav{display:flex}
  .RimInner>.CarvedBtn{order:3}
  .FootGrid{grid-template-columns:1fr}
  .PanelPair{grid-template-columns:1fr}
}
@media (max-width:480px){
  body{font-size:1.02rem}
  .RimInner{gap:.6rem}
  .BrandGlyph{font-size:1.1rem}
  .BrandGlyph small{display:none}
  .RimBar .CarvedBtn{font-size:.86rem;padding:.38rem .7rem}
  .PageFrame{padding:1.4rem 1rem 2.4rem}
  .BridgeLine{padding:.9rem}
}
