/* Guía · "Topo de tinta": design system for the public pages (layouts/guide).
   Ported from the mockup in tmp/mockups/a-topo. Page-specific styles live in pages/. */
:root{
  --paper:#E4E7E5;      /* granito claro */
  --paper-2:#D6DAD8;    /* granito sombra */
  --sheet:#F2F3F1;      /* hoja de topo */
  --ink:#22262A;        /* grafito */
  --pencil:#565D63;     /* lápiz: ≥4.5:1 on paper, paper-2 and sheet */
  --rule:#B9BFBD;       /* trazo fino */
  --route:#C9271C;      /* línea de vía, rojo de topo */
  --lake:#2E5C7A;       /* Nahuel Huapi */
  --focus:#1F6FEB;
  --hand:"Kalam", "Comic Sans MS", cursive;
  --sans:"Archivo", system-ui, sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:400 1rem/1.55 var(--sans);font-variation-settings:"wdth" 100;
  background-image:radial-gradient(rgba(34,38,42,.05) 1px,transparent 1px);background-size:5px 5px}
a{color:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:4px}
img{max-width:100%;display:block}
.wrap{max-width:1120px;margin:0 auto;padding:0 16px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
h1,h2,h3{font-family:var(--sans);margin:0;line-height:1.08}
h2{font-size:clamp(1.6rem,4vw,2.3rem);font-weight:780;font-variation-settings:"wdth" 72;letter-spacing:-.01em}
.hand{font-family:var(--hand)}
.lede{color:var(--pencil);max-width:60ch;margin:.4rem 0 0}

/* Nav */
.nav{position:sticky;top:0;z-index:30;background:rgba(228,231,229,.94);backdrop-filter:blur(6px);border-bottom:1.5px solid var(--ink)}
.nav .wrap{display:flex;align-items:center;gap:20px;height:60px}
.logo{font-weight:800;font-variation-settings:"wdth" 70;font-size:1.35rem;text-decoration:none;display:flex;align-items:center;gap:8px}
.logo-img{width:84px;height:84px;display:block;margin:-14px 0}
.nav ul{display:none;list-style:none;margin:0 0 0 auto;padding:0;gap:22px;font-size:.95rem}
.nav ul a{text-decoration:none}.nav ul a:hover{text-decoration:underline;text-decoration-color:var(--route);text-decoration-thickness:2px}
.nav .who{margin-left:auto;display:flex;align-items:center;gap:10px}
@media(min-width:860px){.nav ul{display:flex}.nav .who{margin-left:22px}}
.btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border:1.5px solid var(--ink);border-radius:999px;font:600 .95rem var(--sans);text-decoration:none;background:transparent;color:var(--ink);cursor:pointer}
.btn.solid{background:var(--ink);color:var(--sheet)}
.btn.red{background:var(--route);border-color:var(--route);color:#fff}
.btn:hover{transform:translateY(-1px)}
.avatar{position:relative;width:40px;height:40px;border-radius:50%;background:var(--ink);color:var(--sheet);display:grid;place-items:center;font-weight:700;font-size:.9rem}
.badge-socio{position:absolute;right:-6px;bottom:-4px;background:var(--route);color:#fff;font:700 .58rem/1 var(--sans);padding:3px 5px;border-radius:6px;border:2px solid var(--paper);white-space:nowrap}

/* Hero */
.hero{position:relative;padding:28px 0 36px;overflow:hidden}
.hero-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}
@media(min-width:900px){.hero-grid{grid-template-columns:1.05fr .95fr;align-items:center;gap:40px}.hero{padding:56px 0 64px}}
.hero h1{font-size:clamp(2.6rem,9vw,5.2rem);font-weight:800;font-variation-settings:"wdth" 64;letter-spacing:-.02em}
.hero p.sub{font-size:1.15rem;max-width:44ch;margin:14px 0 22px}
.search{position:relative;max-width:560px}
.search label{display:block;font-family:var(--hand);font-size:1.05rem;color:var(--pencil);margin-bottom:4px}
.search input{width:100%;height:58px;border:2px solid var(--ink);border-radius:14px;background:var(--sheet);padding:0 18px 0 50px;font:500 1.1rem var(--sans);color:var(--ink)}
.search svg.mag{position:absolute;left:16px;bottom:17px;width:22px;height:22px}
.results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:var(--sheet);border:2px solid var(--ink);border-radius:14px;list-style:none;margin:0;padding:6px;z-index:20;max-height:300px;overflow:auto;box-shadow:6px 6px 0 var(--ink)}
.results li a{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:8px;text-decoration:none}
.results li a:hover,.results li a:focus-visible{background:var(--paper)}
.results small{color:var(--pencil)}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.chip{min-height:40px;padding:0 14px;border:1.5px dashed var(--ink);border-radius:999px;background:transparent;font:500 .92rem var(--sans);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.chip[aria-pressed="true"]{background:var(--ink);color:var(--sheet);border-style:solid}
.chip .x{font-family:var(--hand);color:var(--route);font-weight:700}
.chip[aria-pressed="true"] .x{color:#ff8a80}

/* The topo */
.topo{background:var(--sheet);border:1.5px solid var(--ink);border-radius:6px;position:relative;box-shadow:8px 8px 0 var(--paper-2)}
.topo svg{width:100%;height:auto;display:block}
.topo .cap{display:flex;flex-wrap:wrap;gap:2px 12px;justify-content:space-between;align-items:baseline;padding:8px 14px;border-top:1.5px solid var(--ink);font-size:.82rem;color:var(--pencil)}
.topo .cap b{color:var(--ink)}
.legend{list-style:none;margin:0;padding:6px 8px 10px;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:2px 10px;border-top:1px solid var(--rule)}
.legend a{display:flex;align-items:center;gap:8px;padding:6px;text-decoration:none;font-weight:650;border-radius:6px;min-height:40px}
.legend a:hover{background:var(--paper)}
.legend .n{width:22px;height:22px;flex:0 0 22px;border-radius:50%;background:var(--route);color:#fff;display:grid;place-items:center;font-size:.75rem}
.legend .g{margin-left:auto;white-space:nowrap;font-family:var(--hand);color:var(--pencil);font-weight:400}
.rline{fill:none;stroke:var(--route);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.rock{fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linecap:round}
.crack{fill:none;stroke:var(--pencil);stroke-width:1;stroke-dasharray:2 4}
.bolt{stroke:var(--ink);stroke-width:2;stroke-linecap:round}
.belay{fill:var(--sheet);stroke:var(--ink);stroke-width:2}
.tlabel{font-family:var(--hand);font-size:17px;fill:var(--ink)}
.tnum{font:700 13px var(--sans);fill:#fff}
.route-link{cursor:pointer}
.route-link:hover .rline,.route-link:focus-visible .rline{stroke-width:5}
.route-link:focus-visible{outline:none}
.route-link:focus-visible .tlabel{text-decoration:underline}
@media (prefers-reduced-motion:no-preference){
  .draw .rline{stroke-dasharray:var(--len);stroke-dashoffset:var(--len);animation:ink 1.6s cubic-bezier(.6,.1,.3,1) forwards;animation-delay:var(--d)}
  .draw .bolt,.draw .belay,.draw .tlabel,.draw .numdot{opacity:0;animation:pop .3s ease-out forwards;animation-delay:calc(var(--d) + 1.1s)}
  @keyframes ink{to{stroke-dashoffset:0}}
  @keyframes pop{to{opacity:1}}
}

/* Sections */
section.block{padding:44px 0;border-top:1.5px solid var(--ink)}
.head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:end;gap:14px;margin-bottom:22px}

/* Personal strip */
.mine{background:var(--sheet)}
/* minmax(0,…): the favorites row scrolls inside its column instead of widening the page */
.mine-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
@media(min-width:860px){.mine-grid{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}}
.favs{display:flex;gap:12px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x mandatory}
.fav{flex:0 0 190px;scroll-snap-align:start;text-decoration:none;border:1.5px solid var(--ink);border-radius:10px;overflow:hidden;background:var(--paper)}
.fav img,.fav .ph{height:110px;width:100%;object-fit:cover}
.fav div.t{padding:8px 10px;font-weight:650;font-size:.95rem}
.fav div.t small{display:block;font-weight:400;color:var(--pencil)}
.last{border:1.5px solid var(--ink);border-radius:10px;padding:16px;background:var(--paper)}
.last .hand{color:var(--route);font-size:1.1rem}
.last strong{display:block;font-size:1.25rem;font-variation-settings:"wdth" 80}
.thanks{margin-top:14px;font-family:var(--hand);font-size:1.1rem}

/* Cards */
.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media(min-width:700px){.cards{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}}
@media(max-width:699px){.card h3{font-size:1.05rem}.card .body{padding:8px 10px 10px}}
.card{text-decoration:none;background:var(--sheet);border:1.5px solid var(--ink);border-radius:4px;overflow:hidden;display:flex;flex-direction:column}
.card:hover{box-shadow:5px 5px 0 var(--ink);transform:translate(-2px,-2px)}
.card .img{aspect-ratio:4/3;background:var(--paper-2);position:relative;overflow:hidden}
.card .img>img,.card .img>svg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:saturate(.85) contrast(1.03)}
.card .count{position:absolute;left:10px;bottom:10px;background:var(--sheet);border:1.5px solid var(--ink);border-radius:999px;padding:2px 10px;font-size:.82rem;font-weight:650}
.card .body{padding:12px 14px 14px}
.card .zone{font-family:var(--hand);color:var(--pencil);font-size:.95rem;line-height:1.1}
.card h3{font-size:1.25rem;font-weight:760;font-variation-settings:"wdth" 78;margin-top:2px;overflow-wrap:anywhere;hyphens:auto}
.ph{width:100%;height:100%;display:block}
.tabs{display:inline-flex;border:1.5px solid var(--ink);border-radius:999px;padding:3px}
.tabs button{min-height:38px;padding:0 16px;border:0;border-radius:999px;background:transparent;font:600 .9rem var(--sans);cursor:pointer;color:var(--ink)}
.tabs button[aria-selected="true"]{background:var(--ink);color:var(--sheet)}
.map{background:var(--sheet);border:1.5px solid var(--ink);border-radius:6px;overflow:hidden}
.map>svg{width:100%;height:auto;display:block}
.map .pin{cursor:pointer}
.map .pin circle{fill:var(--sheet);stroke:var(--route);stroke-width:2.5}
.map .pin:hover circle,.map .pin:focus-visible circle{fill:var(--route)}
.map .pin:focus-visible{outline:none}
.map text{font-family:var(--hand);font-size:13px;fill:var(--ink)}
.empty{padding:24px;border:1.5px dashed var(--ink);border-radius:8px;text-align:center}

/* Novedades */
.news{list-style:none;margin:0;padding:0;border-top:1.5px solid var(--ink)}
.news li{display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--rule)}
.news .n{width:30px;height:30px;border-radius:50%;background:var(--route);color:#fff;display:grid;place-items:center;font-weight:700;font-size:.85rem}
.news .name{font-weight:650}
.news .meta{color:var(--pencil);font-size:.88rem}
.news .g{font-family:var(--hand);font-size:1.2rem;font-weight:700;text-align:right}
@media(min-width:860px){.news-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:40px}}

/* AEBAR */
.aebar{background:var(--ink);color:var(--sheet);border-top:0;position:relative}
.aebar .grid{display:grid;gap:26px;align-items:center}
@media(min-width:860px){.aebar .grid{grid-template-columns:260px 1fr}}
.aebar h2{font-size:clamp(1.8rem,5vw,2.8rem)}
.aebar p{max-width:56ch;color:#C9CED2}
.aebar .who-word{font-weight:800;font-variation-settings:"wdth" 64;font-size:1rem;color:#fff;border:1.5px solid #fff;border-radius:4px;padding:2px 8px;display:inline-block;margin-bottom:10px}
.aebar .acts{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:20px}
.aebar .btn{border-color:var(--sheet);color:var(--sheet)}
.aebar .btn.red{border-color:var(--route);color:#fff}
.aebar .link{background:none;border:0;color:#C9CED2;text-decoration:underline;font:500 .95rem var(--sans);min-height:44px;cursor:pointer;padding:0 6px}
.aebar .snooze{font-size:.82rem;color:#9AA2A8;margin-top:8px}
.hanger svg{width:100%;max-width:260px;height:auto}
.hanger .h{fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.facts{display:flex;flex-wrap:wrap;gap:8px 18px;margin:16px 0 0;padding:0;list-style:none;font-family:var(--hand);font-size:1.1rem;color:#fff}
.facts li::before{content:"×";color:var(--route);font-weight:700;margin-right:6px}

/* Ética */
.rules{display:grid;gap:10px;grid-template-columns:1fr}
@media(min-width:700px){.rules{grid-template-columns:1fr 1fr}}
details{border:1.5px solid var(--ink);border-radius:8px;background:var(--sheet)}
summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:12px 14px;font-weight:650;min-height:48px}
summary::-webkit-details-marker{display:none}
summary .ic{width:26px;height:26px;flex:0 0 26px}
summary::after{content:"+";margin-left:auto;font-family:var(--hand);font-size:1.4rem;color:var(--route)}
details[open] summary::after{content:"–"}
details p{margin:0;padding:0 14px 14px 52px;color:var(--pencil)}
.sos{margin-top:18px;display:flex;flex-wrap:wrap;gap:10px 28px;align-items:center;padding:14px 16px;border:2px solid var(--route);border-radius:8px;background:var(--sheet)}
.sos strong{color:var(--route);font-size:1.05rem}
.sos a{font-weight:700;font-size:1.1rem;text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.sos span{color:var(--pencil)}

/* Sponsors/footer */
.sponsors{padding:22px 0;border-top:1.5px solid var(--ink)}
.sponsors .wrap{display:flex;flex-wrap:wrap;gap:14px 30px;align-items:center}
.sponsors .lab{font-family:var(--hand);color:var(--pencil)}
.sp{font-weight:800;font-variation-settings:"wdth" 70;color:var(--pencil);font-size:1.05rem}
footer{background:var(--ink);color:#C9CED2;padding:30px 0 90px;font-size:.92rem}
footer .wrap{display:flex;flex-wrap:wrap;gap:16px 30px;justify-content:space-between}
footer a{color:#fff}

[hidden]{display:none!important}

/* ===== Shared components for the inner screens ===== */

:root{--g45:#3F7D4E;--g6:#2E5C7A;--g7:#A86A12;--g8:#C9271C;--gx:#6E767D}
.skip{position:absolute;left:-9999px}.skip:focus{left:12px;top:8px;z-index:200;background:var(--sheet);padding:8px 12px;border:2px solid var(--ink)}
.nav ul a[aria-current="page"]{text-decoration:underline;text-decoration-color:var(--route);text-decoration-thickness:3px;text-underline-offset:6px}

/* Mobile menu + account menu */
.menu{position:relative}
.menu>summary,.acct>summary{list-style:none;cursor:pointer}
.menu>summary::-webkit-details-marker,.acct>summary::-webkit-details-marker{display:none}
.menu>summary{min-height:44px;padding:0 14px;border:1.5px solid var(--ink);border-radius:999px;display:inline-flex;align-items:center;font-weight:600;font-size:.92rem}
.menu>summary::after,.acct>summary::after,.menu[open]>summary::after,.acct[open]>summary::after{content:none}
.menu .panel-menu,.acct .panel-menu{position:absolute;right:0;top:calc(100% + 8px);min-width:220px;background:var(--sheet);border:1.5px solid var(--ink);border-radius:12px;padding:6px;box-shadow:6px 6px 0 var(--ink);z-index:40}
.panel-menu a{display:flex;align-items:center;min-height:44px;padding:0 12px;border-radius:8px;text-decoration:none;font-weight:550}
.panel-menu a:hover,.panel-menu a:focus-visible{background:var(--paper)}
.panel-menu hr{border:0;border-top:1px solid var(--rule);margin:4px 6px}
.acct{position:relative;border:0;background:none}
.acct>summary{padding:0;min-height:0;display:block}
@media(min-width:860px){.menu{display:none}}

/* Page heads */
.page-head{padding:26px 0 22px}
.page-head h1{font-size:clamp(2.3rem,7.5vw,4rem);font-weight:800;font-variation-settings:"wdth" 64;letter-spacing:-.02em}
.page-head .lede{font-size:1.08rem}
.crumbs{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:.9rem;color:var(--pencil);margin:0 0 12px;padding:0;list-style:none}
.crumbs li+li::before{content:"/";margin-right:8px;color:var(--rule)}
.crumbs a{text-decoration:none}.crumbs a:hover{text-decoration:underline}
.zone-k{font-family:var(--hand);color:var(--pencil);font-size:1.15rem;line-height:1}
.ej{font-family:var(--hand);color:var(--route);font-size:.88rem;white-space:nowrap}
.meta-line{color:var(--pencil);font-size:.9rem}
.meta-line a{color:var(--ink)}
.acts-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:16px}
.btn.on{background:var(--route);border-color:var(--route);color:#fff}
.btn svg{width:18px;height:18px}
.btn.sm{min-height:36px;padding:0 12px;font-size:.85rem}
.linkish{background:none;border:0;padding:0;font:inherit;color:inherit;text-decoration:underline;cursor:pointer}

/* Layout helpers */
.split{display:grid;gap:28px}
@media(min-width:920px){.split{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:40px}.split.even{grid-template-columns:1fr 1fr}}
.stack>*+*{margin-top:28px}
.sheet{background:var(--sheet);border:1.5px solid var(--ink);border-radius:8px;padding:18px}
.sheet h2,.sheet h3{margin-bottom:12px}
h3.sub{font-size:1.3rem;font-weight:760;font-variation-settings:"wdth" 76}
.prose p{margin:0 0 1em;max-width:65ch}
.prose p:last-child{margin-bottom:0}

/* Sector cover */
.cover{position:relative;border:1.5px solid var(--ink);border-radius:6px;overflow:hidden;background:var(--paper-2);box-shadow:8px 8px 0 var(--paper-2)}
.cover img{width:100%;aspect-ratio:16/9;object-fit:cover;filter:saturate(.85) contrast(1.03)}
.cover .dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px}
.cover .dots button{width:30px;height:30px;border-radius:50%;border:1.5px solid var(--ink);background:var(--sheet);font:600 .75rem var(--sans);cursor:pointer}
.cover .dots button[aria-current="true"]{background:var(--ink);color:var(--sheet)}

/* Facts (tags) */
.facts-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0;border-top:1.5px solid var(--ink)}
.facts-grid div{padding:12px 4px;border-bottom:1px solid var(--rule)}
.facts-grid div:nth-child(odd){padding-right:14px;border-right:1px solid var(--rule)}
.facts-grid div:nth-child(even){padding-left:14px}
.facts-grid dt{font-family:var(--hand);color:var(--pencil);font-size:1rem;line-height:1.1}
.facts-grid dd{margin:2px 0 0;font-weight:650}

/* Grade chips */
.gc{display:inline-grid;place-items:center;min-width:46px;height:30px;padding:0 8px;border:1.5px solid currentColor;border-radius:999px;font:700 1rem var(--hand);white-space:nowrap;background:var(--sheet)}
.gc.g45{color:var(--g45)}.gc.g6{color:var(--g6)}.gc.g7{color:var(--g7)}.gc.g8{color:var(--g8)}.gc.gx{color:var(--gx);border-style:dashed}
.legend-g{display:flex;flex-wrap:wrap;gap:8px 16px;list-style:none;padding:0;margin:0}
.legend-g li{display:flex;align-items:center;gap:8px;font-size:.92rem}

/* Distribution bars */
.dist{display:flex;align-items:flex-end;gap:6px;height:120px;padding:0 0 4px;border-bottom:1.5px solid var(--ink)}
.dist div{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.dist i{display:block;width:100%;max-width:38px;background:repeating-linear-gradient(-45deg,var(--c,var(--ink)) 0 3px,transparent 3px 6px);border:1.5px solid var(--c,var(--ink));border-bottom:0;border-radius:3px 3px 0 0}
.dist b{font:700 .85rem var(--sans);margin-bottom:3px}
.dist-l{display:flex;gap:6px;margin-top:4px}
.dist-l span{flex:1;text-align:center;font-family:var(--hand);color:var(--pencil);font-size:.95rem}

/* Route list (topo key) */
.rlist{list-style:none;margin:0;padding:0;border-top:1.5px solid var(--ink)}
.rlist li{border-bottom:1px solid var(--rule)}
.rlist a{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 6px;text-decoration:none;min-height:56px}
.rlist a:hover,.rlist li.on a{background:var(--paper-2)}
.rlist .n{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font:700 .8rem var(--sans);border:1.5px solid var(--ink);background:var(--sheet)}
.rlist .drawn .n{background:var(--route);border-color:var(--route);color:#fff}
.rlist .nm{font-weight:650;line-height:1.25}
.rlist .mt{display:block;font-size:.84rem;color:var(--pencil);font-weight:400}

/* Photo topo */
.ptopo{position:relative;border:1.5px solid var(--ink);border-radius:6px;overflow:hidden;background:var(--paper-2)}
.ptopo svg{display:block;width:100%;height:auto}
.ptopo .rl{cursor:pointer;transition:opacity .15s}
.ptopo .rl .halo{fill:none;stroke:#fff;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.ptopo .rl .ln{fill:none;stroke:var(--route);stroke-width:4.5;stroke-linecap:round;stroke-linejoin:round}
.ptopo .rl .bx{stroke:#fff;stroke-width:2.6;stroke-linecap:round}
.ptopo .rl .nd circle{fill:var(--route);stroke:#fff;stroke-width:2.5}
.ptopo .rl .nd text{font:700 17px var(--sans);fill:#fff}
.ptopo.has-on .rl{opacity:.28}
.ptopo.has-on .rl.on{opacity:1}
.ptopo .rl.on .ln{stroke-width:7}
.ptopo .rl:focus-visible{outline:none}.ptopo .rl:focus-visible .halo{stroke:var(--focus)}
.ptopo figcaption{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;border-top:1.5px solid var(--ink);background:var(--sheet);font-size:.84rem;color:var(--pencil)}
.sticky-topo{position:sticky;top:76px}
@media(max-width:919px){.sticky-topo{position:sticky;top:60px;z-index:5}}

/* Tables */
.tbl{width:100%;border-collapse:collapse;font-size:.95rem}
.tbl th{font:400 1rem var(--hand);color:var(--pencil);text-align:left;padding:8px 8px;border-bottom:1.5px solid var(--ink)}
.tbl td{padding:12px 8px;border-bottom:1px solid var(--rule);vertical-align:middle}
.tbl tr.on td{background:var(--paper-2)}
@media(max-width:699px){
  .tbl.stack-sm thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tbl.stack-sm tr{display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:12px 4px;border-bottom:1px solid var(--rule)}
  .tbl.stack-sm td{border:0;padding:0}
  .tbl.stack-sm td[data-l]::before{content:attr(data-l) " ";font-family:var(--hand);color:var(--pencil)}
}

/* Forms */
.form{display:grid;gap:16px}
.form .row2{display:grid;gap:16px}
@media(min-width:620px){.form .row2{grid-template-columns:1fr 1fr}}
.field label,.field .lab{display:block;font-weight:650;margin-bottom:6px}
.field input[type=text],.field input[type=email],.field input[type=password],.field input[type=date],.field select,.field textarea{width:100%;min-height:50px;border:1.5px solid var(--ink);border-radius:10px;background:var(--sheet);padding:10px 14px;font:500 1rem var(--sans);color:var(--ink)}
.field textarea{min-height:110px;resize:vertical}
.field .hint{display:block;font-size:.85rem;color:var(--pencil);margin-top:5px}
.pw{position:relative}.pw button{position:absolute;right:6px;top:50%;transform:translateY(-50%);min-height:38px;border:0;background:none;font:600 .85rem var(--sans);text-decoration:underline;cursor:pointer;color:var(--ink)}
.radios{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:0}
.radios legend{font-weight:650;margin-bottom:6px;padding:0}
.radios label{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border:1.5px dashed var(--ink);border-radius:999px;cursor:pointer;font-weight:550}
.radios input{accent-color:var(--route)}
.radios label:has(input:checked){border-style:solid;background:var(--ink);color:var(--sheet)}
.toggle{display:flex;gap:14px;align-items:flex-start;cursor:pointer}
.toggle input{appearance:none;width:52px;height:30px;flex:0 0 52px;border:1.5px solid var(--ink);border-radius:999px;background:var(--paper);position:relative;cursor:pointer;margin:0}
.toggle input::after{content:"";position:absolute;left:3px;top:3px;width:21px;height:21px;border-radius:50%;background:var(--ink);transition:left .15s}
.toggle input:checked{background:var(--route);border-color:var(--route)}
.toggle input:checked::after{left:25px;background:#fff}

/* Profile tabs */
.ptabs{display:flex;gap:4px;border-bottom:1.5px solid var(--ink);margin-bottom:26px;overflow-x:auto}
.ptabs a{padding:12px 14px;min-height:48px;display:inline-flex;align-items:center;text-decoration:none;font-weight:650;border-bottom:4px solid transparent;margin-bottom:-1.5px;white-space:nowrap}
.ptabs a[aria-current="page"]{border-bottom-color:var(--route)}

/* Stats */
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border:1.5px solid var(--ink);border-radius:8px;background:var(--sheet);overflow:hidden}
.stats div{padding:14px 12px;border-left:1px solid var(--rule)}
.stats div:first-child{border-left:0}
.stats b{display:block;font-size:clamp(1.6rem,6vw,2.6rem);font-weight:800;font-variation-settings:"wdth" 64;line-height:1}
.stats span{font-family:var(--hand);color:var(--pencil);font-size:1rem;line-height:1.1;display:block;margin-top:4px}

/* Comments */
.comments{list-style:none;margin:0;padding:0}
.comments li{display:grid;grid-template-columns:40px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid var(--rule)}
.comments .av{width:40px;height:40px;border-radius:50%;background:var(--paper-2);border:1.5px solid var(--ink);display:grid;place-items:center;font-weight:700;font-size:.85rem}
.comments .who{font-weight:650}
.comments .on{color:var(--pencil);font-size:.88rem}
.comments p{margin:4px 0 0;max-width:65ch}
.prompt{border:1.5px dashed var(--ink);border-radius:10px;padding:16px;background:var(--sheet);display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.prompt p{margin:0}

/* AEBAR inline (nudge, card) */
.nudge{border:2px solid var(--ink);border-radius:10px;background:var(--ink);color:var(--sheet);padding:16px 18px;display:grid;gap:10px}
.nudge p{margin:0;color:#D5D9DC;max-width:60ch}
.nudge strong{color:#fff;font-size:1.1rem}
.nudge .btn{border-color:var(--sheet);color:var(--sheet)}
.nudge .btn.red{border-color:var(--route);color:#fff}
.nudge .linkish{color:#C9CED2;min-height:44px}
.stamp{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:132px;height:132px;border:3px double var(--route);border-radius:50%;color:var(--route);transform:rotate(-8deg);text-align:center;font-weight:800;font-variation-settings:"wdth" 64;line-height:1.05;padding:10px}
.stamp small{font-family:var(--hand);font-weight:400;font-size:.95rem}
.aebar-card{display:grid;gap:16px;align-items:center}
@media(min-width:620px){.aebar-card{grid-template-columns:auto 1fr}}

/* Pricing */
.tiers{display:grid;gap:16px}
@media(min-width:860px){.tiers{grid-template-columns:repeat(3,1fr)}}
.tier{background:var(--sheet);border:1.5px solid var(--ink);border-radius:8px;padding:20px;display:flex;flex-direction:column;gap:10px;position:relative}
.tier.pop{border:2.5px solid var(--route);box-shadow:8px 8px 0 var(--paper-2)}
.tier .badge{position:absolute;top:-14px;left:18px;background:var(--route);color:#fff;font:700 .8rem var(--sans);padding:4px 10px;border-radius:999px}
.tier .price{font-size:2rem;font-weight:800;font-variation-settings:"wdth" 64;line-height:1}
.tier .price small{font:400 1rem var(--hand);color:var(--pencil)}
.tier .save{font-family:var(--hand);color:var(--route)}
.bigstats{display:grid;grid-template-columns:repeat(2,1fr);gap:0;border-top:1.5px solid var(--ink)}
@media(min-width:760px){.bigstats{grid-template-columns:repeat(4,1fr)}}
.bigstats div{padding:16px 10px 16px 0;border-bottom:1px solid var(--rule)}
.bigstats b{display:block;font-size:2.4rem;font-weight:800;font-variation-settings:"wdth" 62;line-height:1}
.bigstats span{font-family:var(--hand);color:var(--pencil)}

/* Auth */
.auth{display:grid;gap:24px;padding-top:30px;padding-bottom:56px}
@media(min-width:880px){.auth{grid-template-columns:1fr 1fr;align-items:start;gap:48px}}
.auth .card-a{background:var(--sheet);border:1.5px solid var(--ink);border-radius:10px;padding:24px;box-shadow:8px 8px 0 var(--paper-2)}
.auth h1{font-size:clamp(2rem,6vw,3rem);font-weight:800;font-variation-settings:"wdth" 64;margin-bottom:6px}
.benefits{list-style:none;padding:0;margin:14px 0 0;display:grid;gap:10px}
.benefits li{display:flex;gap:10px;align-items:flex-start;font-size:1.05rem}
.benefits li::before{content:"×";color:var(--route);font:700 1.3rem/1 var(--hand);margin-top:1px}
.reason{border-left:4px solid var(--route);background:var(--sheet);padding:10px 14px;margin-bottom:16px;font-weight:600}

/* Changelog */
.days{list-style:none;padding:0;margin:0}
.days>li{display:grid;gap:8px 28px;padding:18px 0;border-top:1.5px solid var(--ink)}
@media(min-width:760px){.days>li{grid-template-columns:160px 1fr}}
.days .d{font-family:var(--hand);font-size:1.3rem;line-height:1.1}
.days ul{list-style:none;margin:0;padding:0}
.days ul li{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:8px 0;border-bottom:1px solid var(--rule)}
.days ul li:last-child{border-bottom:0}
.tag-k{font:700 .75rem var(--sans);padding:3px 8px;border-radius:999px;border:1.5px solid var(--ink);height:fit-content;white-space:nowrap}
.tag-k.new{background:var(--route);border-color:var(--route);color:#fff}
.tag-k.topo{border-style:dashed}

/* 404 */
.nf{display:grid;gap:24px;padding-top:40px;padding-bottom:70px;align-items:center}
@media(min-width:880px){.nf{grid-template-columns:1fr 1fr}}
.rlist.idx a{grid-template-columns:minmax(0,1fr) auto}
@media(max-width:699px){.tbl.stack-sm td.ttl{order:-1;grid-column:1/-1;font-size:1.05rem}.tbl.stack-sm td:last-child{grid-column:1/-1;text-align:left!important;margin-top:6px}}
details.menu,details.acct{border:0;background:none;border-radius:0}
.benefits li::before{content:"✓";font-family:var(--sans);font-size:1.05rem;margin-top:2px}
.acct .badge-socio{bottom:-11px;right:-14px;font-size:.55rem}

/* ===== Rails additions ===== */
.flash{max-width:1120px;margin:14px auto 0;padding:0 16px;display:grid;gap:8px}
.flash p{margin:0;padding:12px 16px;border:1.5px solid var(--ink);border-radius:8px;background:var(--sheet);font-weight:600}
.flash .alert{border-color:var(--route);border-width:2px}
.panel-menu form{margin:0}
.panel-menu button{display:flex;align-items:center;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:8px;background:none;font:550 1rem var(--sans);color:var(--ink);cursor:pointer;text-align:left}
.panel-menu button:hover,.panel-menu button:focus-visible{background:var(--paper)}
.avatar{border:0;cursor:pointer}
main{display:block}
html{scroll-padding-top:76px}
.card .count.saved{left:auto;right:10px}
.card .range .hand{font-size:1.05rem;color:var(--ink)}
.card .range{margin-top:4px}
.sponsors a.sp{text-decoration:none}
.sponsors .sp-logo{height:34px;width:auto;filter:grayscale(1);opacity:.75}
.sponsors .sp-cta{margin-left:auto;font-size:.9rem}
.map .leaflet-container{font-family:var(--sans)}
/* Photos sit over an ink sketch; if a photo fails (image-status) the sketch shows through. */
[data-image-failed] > img{display:none}
.fav .ph-wrap{position:relative;display:block;height:110px}
.fav .ph-wrap>img,.fav .ph-wrap>svg{position:absolute;inset:0;height:100%;width:100%;object-fit:cover}
.nav .main-links{margin-left:auto}
.nav .main-links ul{margin:0}
.nav .sign-up{display:none}
@media(min-width:860px){.nav .sign-up{display:inline-flex}}
/* Toast (e.g. "Link copiado" from the share button, clipboard controller). */
.guide-toast{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:14px;max-width:min(28rem,calc(100% - 32px));padding:10px 10px 10px 16px;background:var(--ink);color:var(--sheet);border-radius:10px;box-shadow:6px 6px 0 var(--paper-2);font-weight:600}
.guide-toast button{min-width:44px;min-height:44px;border:0;background:none;color:var(--sheet);font:inherit;cursor:pointer}

/* Phone held sideways (short screen): the header doesn't follow the scroll, and topo photos fit
   the screen height. The frame shrinks to the photo so the route lines stay on it. */
@media(orientation:landscape) and (max-height:500px){
  .nav{position:static}
  .sticky-topo{position:static}
  .gcar-frame{width:fit-content;max-width:100%;margin-inline:auto}
  .gcar-frame>img{width:auto;max-width:100%;max-height:calc(100svh - 24px)}
}

/* "Leer todo": long text shows its first lines (read-more controller) */
.read-more.clamped .read-more-body{max-height:11.5em;overflow:hidden;-webkit-mask-image:linear-gradient(#000 65%,transparent);mask-image:linear-gradient(#000 65%,transparent)}
.read-more-btn{display:inline-flex;align-items:center;min-height:44px;padding:0;border:0;background:none;font:700 .95rem var(--sans);color:var(--ink);text-decoration:underline;text-decoration-color:var(--route);text-decoration-thickness:2px;text-underline-offset:4px;cursor:pointer}

/* Home on one column (phones, portrait tablets): the decorative topo only fits beside the search;
   below it, real content (your sectors, sector photos) comes right after the search. */
@media(max-width:899px){.hero .topo{display:none}.hero{padding-bottom:12px}}
.mine .empty a{font-weight:650;text-decoration:underline;text-decoration-color:var(--route);text-decoration-thickness:2px;text-underline-offset:4px;white-space:nowrap}
/* Sector map (Leaflet, home + /sectores) in the "Topo de tinta" style:
   muted granite tiles, red topo pins with the route count, solid ink clusters. */
.ink-tiles{filter:grayscale(.85) sepia(.12) contrast(.92) brightness(1.04)}
.map .leaflet-container{background:var(--paper-2);font-family:var(--sans)}

/* Sector pin */
.ink-pin{background:none;border:0}
.ink-pin__dot{display:grid;place-items:center;width:var(--s);height:var(--s);border-radius:50%;
  background:var(--route);color:#fff;border:2.5px solid var(--sheet);box-shadow:0 0 0 1.5px var(--ink),2px 3px 0 rgba(34,38,42,.35);
  font:700 .78rem/1 var(--sans);font-variation-settings:"wdth" 80;transition:transform .12s}
.ink-pin:hover .ink-pin__dot,.ink-pin:focus-visible .ink-pin__dot{transform:scale(1.15)}
.ink-pin:focus-visible{outline:none}
.ink-pin:focus-visible .ink-pin__dot{box-shadow:0 0 0 1.5px var(--ink),0 0 0 5px var(--focus)}

/* Cluster */
.ink-cluster{background:none;border:0}
.ink-cluster__disc{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--s);height:var(--s);border-radius:50%;
  background:var(--ink);color:var(--sheet);border:3px solid var(--sheet);box-shadow:0 0 0 1.5px var(--ink),0 0 0 7px rgba(34,38,42,.18);line-height:1}
.ink-cluster__disc b{font-weight:800;font-size:1.05rem;font-variation-settings:"wdth" 80}
.ink-cluster__disc small{font-family:var(--hand);font-size:.68rem;color:#C9CED2;margin-top:1px}
.ink-cluster:hover .ink-cluster__disc{background:#000}

/* Popup */
.ink-popup .leaflet-popup-content-wrapper{background:var(--sheet);color:var(--ink);border:1.5px solid var(--ink);border-radius:8px;box-shadow:5px 5px 0 var(--ink)}
.ink-popup .leaflet-popup-tip{background:var(--sheet);border:1.5px solid var(--ink);box-shadow:none}
.ink-popup .leaflet-popup-content{margin:12px 34px 12px 14px;display:flex;flex-direction:column;gap:2px;font:400 .95rem/1.35 var(--sans)}
.ink-popup__name{font-size:1.1rem;font-weight:780;font-variation-settings:"wdth" 78}
.ink-popup__meta{font-family:var(--hand);color:var(--pencil);font-size:1rem}
.ink-popup .ink-popup__go{margin-top:6px;align-self:flex-start;display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;background:var(--ink);color:var(--sheet);font-weight:650;text-decoration:none}
.ink-popup .ink-popup__go:hover{background:#000}
.ink-popup a.leaflet-popup-close-button{width:40px;height:40px;font:400 1.5rem/40px var(--hand);color:var(--route)}

/* Zoom buttons + attribution */
.map .leaflet-bar{border:1.5px solid var(--ink);border-radius:8px;box-shadow:3px 3px 0 var(--ink);overflow:hidden}
.map .leaflet-bar a{background:var(--sheet);color:var(--ink);border-bottom:1px solid var(--rule);font-weight:700}
.map .leaflet-bar a:last-child{border-bottom:0}
.map .leaflet-bar a:hover{background:var(--paper)}
.map .leaflet-control-attribution{background:rgba(242,243,241,.85);color:var(--pencil);font-size:.7rem}
.map .leaflet-control-attribution a{color:var(--lake)}
/* Pages group: auth, novedades, recomendaciones, sobre, comentarios, anunciar, 404. */
.page-pad{padding-bottom:56px}
.wrap.narrow{max-width:820px}

/* Auth */
.auth.solo{grid-template-columns:minmax(0,560px);justify-content:center}
.auth-benefits h2{margin:6px 0 4px}
.auth .card-a h1{margin-bottom:6px}
.auth .card-a .form{margin-top:14px}
.auth .form .btn.solid{justify-content:center;width:100%}
.auth .form input[type=submit]{min-height:48px}
.auth-aside{margin:-6px 0 0}
.auth-switch{margin:0}
.auth-links{display:flex;flex-direction:column;gap:6px;margin-top:16px}
.auth-links a{min-height:32px;display:inline-flex;align-items:center}
.pw input{padding-right:84px!important}
.pw .hidden{display:none}
.field .hint.err{color:var(--route);font-weight:600}
.field input[aria-invalid=true]{border-color:var(--route);border-width:2px}
.form-errors{border-left:4px solid var(--route);background:var(--sheet);padding:10px 14px;border-radius:0 8px 8px 0}
.form-errors p{margin:0;font-weight:700}
.form-errors ul{margin:6px 0 0;padding-left:18px}
.check{display:inline-flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--route)}
.danger-zone{margin-top:28px;padding-top:18px;border-top:1px solid var(--rule)}
.danger-zone h2{font-size:1.2rem;margin-bottom:10px}

/* Changelog entries (also used by a sector's "Historial") */
.changelog-days ul li{display:block}
.changelog-days h2.d{font-weight:400;letter-spacing:0;font-variation-settings:normal}
.cl-entry{display:grid;grid-template-columns:78px minmax(0,1fr);gap:10px;align-items:start}
.cl-entry .tag-k{justify-self:start;margin-top:2px}
.tag-k.draw{border-style:dashed}
.tag-k.new.draw{border-style:solid}
.cl-body p{margin:0}
.cl-title{line-height:1.35}
.cl-link{text-decoration-thickness:1px;text-underline-offset:2px}
.cl-link:hover{text-decoration-color:var(--route);text-decoration-thickness:2px}
.cl-ctx{color:var(--pencil);font-size:.92rem}
.cl-ctx .cl-link{color:var(--ink)}
.cl-meta{color:var(--pencil);font-size:.85rem}
.cl-changes{list-style:none;margin:4px 0 0;padding:0;font-size:.92rem}
.cl-changes li{display:flex!important;flex-wrap:wrap;gap:4px;align-items:baseline;padding:1px 0!important;border:0!important}
.cl-attr{font-weight:650}
.cl-changes del{color:var(--pencil)}
.cl-changes ins{text-decoration:none;font-family:var(--hand);font-size:1.05rem;color:var(--route)}
.back-row{margin-top:22px}
.page-pad>.empty{margin:0}

/* Recomendaciones: the shared rules as an always-open list, emergency numbers first */
.rules-page{display:flex;flex-direction:column}
.rules-page .sos{order:-1;margin:0 0 26px}
.rules-page .rules{grid-template-columns:1fr;gap:0;border-top:1.5px solid var(--ink)}
.rules-page details{position:relative;border:0;border-bottom:1px solid var(--rule);border-radius:0;background:none;padding:16px 0 16px 64px;min-height:78px}
.rules-page summary{display:block;padding:0;min-height:0;font-size:1.25rem;font-weight:760;font-variation-settings:"wdth" 76;cursor:default;pointer-events:none}
.rules-page summary::after,.rules-page details[open] summary::after{content:none}
.rules-page summary .ic{position:absolute;left:2px;top:16px;width:46px;height:46px;padding:10px;border:1.5px solid var(--ink);border-radius:50%;background:var(--sheet)}
.rules-page details p{padding:2px 0 0;max-width:60ch}

/* Sobre */
.about-intro{font-size:1.15rem}
.about-intro strong{color:var(--ink)}
.about section.block:first-child{border-top:0;padding-top:28px}
.about section.block h2{margin-bottom:12px}
.about .aebar{border-radius:10px;padding:28px 24px;margin:10px 0}
.about .aebar p strong{color:#fff}
.about .member-thanks{font-size:1.2rem;color:#fff;margin-top:16px}
.about .contact{margin-top:16px}
.about .contact a{color:var(--ink)}
.about .meta-line{margin-top:12px}
.about .bye{font-size:1.4rem;text-align:center;margin-top:30px}

/* Comentarios */
.comments.feed{border-top:1.5px solid var(--ink)}
.comments.feed a.who{text-decoration-thickness:1px}
.comments.feed .on a{color:var(--ink)}
.comments.feed p{white-space:pre-line;overflow-wrap:anywhere}

/* Anunciar */
.pitch-lede{font-size:1.12rem}
.pitch section.block:first-child{border-top:1.5px solid var(--ink)}
.pitch section.block>h2{margin-bottom:14px}
.pitch .bigstats+.lede{margin-top:16px}
.placement{align-items:center}
.placement h2{margin-bottom:12px}
.preview{border-style:dashed}
.preview .hand{color:var(--pencil)}
.preview-sp{display:flex;gap:14px;align-items:center;margin-top:10px}
.preview-sp p{margin:2px 0 0;color:var(--pencil)}
.logo-box{width:56px;height:56px;flex:0 0 56px;border:1.5px solid var(--ink);border-radius:8px;display:grid;place-items:center;font-weight:800;font-size:.75rem}
.current-sponsors{margin-top:24px}
.current-sponsors h3{font-weight:400;color:var(--pencil);font-size:1.05rem;margin-bottom:8px}
.current-sponsors ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px}
.current-sponsors li{display:flex;align-items:center;gap:8px;padding:6px 12px;border:1.5px solid var(--ink);border-radius:999px;background:var(--sheet);font-weight:600;font-size:.92rem}
.current-sponsors img{height:24px;width:24px;object-fit:contain}
.pitch .tiers{margin-top:8px}
.pitch .tabs{flex-wrap:wrap}
.pitch .tabs button{min-height:44px}
.tier-desc{margin:0;color:var(--pencil)}
.pricing-note{margin-top:14px}
.faq details p{padding-left:14px}
.pitch-cta{text-align:center;padding:30px 18px;margin-top:10px}
.pitch-cta h2{margin-bottom:8px}
.pitch-cta .lede{margin:0 auto 16px}
.pitch-cta .meta-line{margin:14px 0 0}
.pitch-cta .meta-line a{color:var(--ink)}

/* 404 */
.nf h1{font-size:clamp(2.4rem,8vw,4.4rem);font-weight:800;font-variation-settings:"wdth" 64;margin:4px 0 12px}
.nf .lede{margin-bottom:22px}
.nf .search{margin-bottom:6px}
.nf .topo{margin:0}
.nf .cap .hand{font-size:1rem;color:var(--ink)}

/* shared/_alert */
.flash-alert{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:28rem;padding:10px 14px;margin-bottom:16px;border:1.5px solid var(--ink);border-radius:8px;background:var(--sheet);font-weight:600}
.flash-alert button{min-width:44px;min-height:44px;border:0;background:none;font-size:1rem;cursor:pointer;color:var(--ink)}

/* Inline links are underlined (the layout's Tailwind preflight removes it) */
.auth-aside a,.auth-switch a,.auth-links a,.cl-link,.about .prose a,.about .contact a,.about-intro a,
.comments.feed .on a,.comments.feed a.who,.pitch-cta .meta-line a{text-decoration:underline}
.about .aebar p{margin:12px 0 0}
.about .aebar h2{margin-bottom:0}
.about .aebar+.block{border-top:0}
.wrap.nf{padding-left:16px;padding-right:16px}

/* One column (phones, tablets): the form first, the "why sign up" list after it. */
@media(max-width:879px){.auth .card-a{order:-1}}
/* Profile (/perfil, /perfil/ascensos, /perfil/favoritos) and public climber page (/escaladores/:slug). */
.profile-head{padding-bottom:0}
.profile-tabs{margin-top:22px}
.profile-body{padding-bottom:56px}
.profile-section{margin-top:34px}
.profile-section:first-child{margin-top:0}
.profile-section>h2.sub,.profile-section>h3.sub,.climber-grid h2.sub{font-size:1.6rem;margin-bottom:12px}
.count-note{font:400 1rem var(--hand);color:var(--pencil)}
.profile-body .sheet>p{margin:0 0 12px}
.profile-body .meta-line{margin:14px 0 0}
.profile-body .empty p{margin:0 0 12px}
.profile-body .empty p:last-child{margin-bottom:0}

/* Form */
.profile-body .form .sheet{display:block}
.profile-year{max-width:260px}
.field input:disabled{background:var(--paper-2);color:var(--pencil);cursor:not-allowed}
.field input[aria-invalid="true"]{border-color:var(--route);border-width:2px}
.field input+p{color:var(--route);font-size:.85rem;margin:5px 0 0}
.toggle .hint{display:block}
.profile-link{margin:12px 0 0}
.profile-link a{display:inline-block;padding:10px 0;margin:-10px 0}
.profile-actions{margin:0}
.profile-errors{border:2px solid var(--route);border-radius:8px;background:var(--sheet);padding:12px 16px;color:var(--route)}
.profile-errors p{margin:0 0 4px}
.profile-errors ul{margin:0;padding-left:20px}

/* AEBAR membership */
.aebar-member{border:2px solid var(--route)}
.aebar-member .aebar-card h2{margin-bottom:8px}
.aebar-since{margin:0 0 8px}
.aebar-member .meta-line{margin:0}
.profile-body aside .acts-row{margin:0}
.profile-body aside .meta-line a{display:inline-block;padding:10px 0;margin:-10px 0}

/* Favorites */
.fav-card{position:relative;display:flex;flex-direction:column}
.fav-card>.card{flex:1}
.pfav-remove{position:absolute;top:10px;right:10px;margin:0;}
.pfav-remove .btn{background:var(--sheet)}
.profile-body .btn.sm{min-height:44px}
.profile-body .tbl td.act{text-align:right;white-space:nowrap}
.profile-body .tbl td.act form{display:inline-block;margin:0}
.profile-body .tbl td.act .btn+form{margin-left:6px}
.profile-body .tbl td:not(.act) a{display:inline-block;padding:10px 0;margin:-10px 0}

/* Ascents */
@media(max-width:699px){.stats b.stat-word{font-size:clamp(1.1rem,5vw,1.6rem);overflow-wrap:anywhere}}
.profile-charts{margin-top:28px}
.profile-charts .dist{height:150px}
.top-grade{margin:0}
.top-grade .hand{font-size:2.6rem;font-weight:700;color:var(--route);line-height:1}
.profile-charts .meta-line{margin:4px 0 0}
.grade-text{font-weight:700}

/* Public climber page */
.climber-id{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.climber-avatar{width:96px;height:96px;border-radius:50%;background:var(--ink);color:var(--sheet);display:grid;place-items:center;font-size:2rem;font-weight:800;flex:0 0 96px}
.climber-head h1{font-size:clamp(2.2rem,7vw,3.6rem)}
.climber-head .meta-line{margin:4px 0 0;font-size:1rem}
.climber-stamp{width:110px;height:110px;margin-left:auto}
.climber-bio{max-width:60ch;margin:18px 0 0;font-size:1.05rem;white-space:pre-line}
.climber-grid{margin-top:30px}
.climber-ascents a{grid-template-columns:minmax(0,1fr) auto}
.climber-cards{grid-template-columns:1fr 1fr}
@media(max-width:699px){.climber-stamp{width:96px;height:96px;margin-left:0}}
.set-routes{margin-bottom:28px}
.set-routes .zone-k{margin:18px 0 6px;font-size:1.1rem}
.set-routes .zone-k a{text-decoration:none}
.set-routes .zone-k a:hover{text-decoration:underline}
/* Subsector (areas/subareas/show) and route (areas/routes/show) pages. */

/* Heads */
.subarea-head{padding-bottom:14px}
.title-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.hidden-tag{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1.5px dashed var(--route);border-radius:999px;color:var(--route);font:700 .85rem var(--sans)}
.page-head .meta-line{margin:8px 0 0}
.page-head .hand{font-size:1.05rem;color:var(--ink)}
.back-link{display:inline-flex;align-items:center;min-height:44px;margin-bottom:2px}

/* Subsector: topo + key */
.subarea-split{margin-top:6px}
.picked{min-height:1.6em;margin:8px 0 0}
.rl-head{margin-bottom:10px;align-items:center}
.on-topo .n{display:inline-grid;place-items:center;min-width:28px;height:22px;border-radius:999px;background:var(--route);color:#fff;font:700 .8rem var(--sans);margin-right:2px}
.rlist .marks{color:var(--route);font-size:.85rem;margin-left:2px}
.rlist .gc-pair{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.rlist .gc-pair .gc{min-width:0;height:26px;font-size:.9rem}
.gc-pair{display:inline-flex;flex-wrap:wrap;gap:6px}
.rlist+details{margin-top:18px}

/* Photos */
.photos{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media(min-width:700px){.photos{grid-template-columns:repeat(3,1fr);gap:18px}}
.photo{position:relative;aspect-ratio:4/3;border:1.5px solid var(--ink);border-radius:4px;overflow:hidden;background:var(--paper-2)}
.photo>img,.photo>svg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
section.block>h2{margin-bottom:16px}
.access-block>#access{padding:0}

/* Route */
.route-head{padding-bottom:12px}
.route-head .split{align-items:end}
.route-head h1{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.route-head h1 .num{width:52px;height:52px;border-radius:50%;background:var(--route);color:#fff;display:inline-grid;place-items:center;font-size:1.6rem;font-variation-settings:"wdth" 90;flex:none}
.route-head h1 .grade{font-family:var(--hand);font-weight:700;font-size:.75em;color:var(--route)}
.route-head .acts-row{justify-content:flex-start}
.route-acts turbo-frame{display:contents}
.route-acts form{margin:0}
.route-nav{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin:6px 0 22px}
.route-nav .btn{max-width:100%;min-width:0}
.route-nav .btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.route-nav .next{margin-left:auto}
.route-topo{margin:0}
.route-topo .cap{display:flex;justify-content:space-between;gap:10px}
.route-body h2.sub{font-size:1.6rem;margin-bottom:6px}
.route-body .facts-grid{margin-top:10px}
.tbl .pitch-desc td{padding-top:0;color:var(--pencil);font-size:.9rem}
.tbl tr.has-desc td{border-bottom:0}
#ascent_feedback:empty{display:none}
#ascent_feedback{margin-top:14px}
.your-ascents{padding:14px 16px}
.your-ascents .hand{color:var(--route);font-size:1.1rem}
.your-ascents p{margin:2px 0 0}

/* "Lo hice" dialog */
.ascent-dialog{position:fixed;inset:0;z-index:1100;overflow-y:auto;display:grid;place-items:center;padding:24px 16px}
.ascent-dialog.hidden{display:none}
.ascent-dialog .backdrop{position:fixed;inset:0;background:rgba(34,38,42,.55)}
.ascent-dialog .sheet{position:relative;z-index:1;width:100%;max-width:560px;box-shadow:8px 8px 0 var(--ink)}
.ascent-dialog .sheet>h2{font-size:1.6rem}
.ascent-dialog .close{position:absolute;top:8px;right:8px;width:44px;height:44px;border:0;background:none;font-size:1.4rem;cursor:pointer;color:var(--ink)}
.ascent-list{list-style:none;margin:0 0 18px;padding:0;border-top:1.5px solid var(--ink)}
.ascent-list>li{padding:12px 0;border-bottom:1px solid var(--rule)}
.ascent-list .row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.ascent-list .row p{margin:0}
.ascent-list .notes{color:var(--pencil);overflow-wrap:anywhere;margin-top:4px}
.ascent-list details{margin-top:8px;border:0;background:none}
.ascent-list details>summary{min-height:44px;display:inline-flex;align-items:center;padding:0;text-decoration:underline;cursor:pointer}
.ascent-list details[open]>summary{margin-bottom:8px}
.icon-btn{display:inline-grid;place-items:center;width:44px;height:44px;border:1.5px solid var(--ink);border-radius:50%;background:var(--sheet);color:var(--route);cursor:pointer}
.ascent-dialog h3{font-size:1.15rem;margin-bottom:10px}
.form .errors{border:2px solid var(--route);border-radius:10px;padding:10px 14px;color:var(--route);background:var(--sheet)}
.form .errors p{margin:0}
.btn .count{font-size:.8rem;background:rgba(255,255,255,.25);border-radius:999px;padding:0 6px}

/* Favorites */
.btn.fav-sm{min-height:44px;width:44px;padding:0;justify-content:center}
.fav-count{display:inline-flex;align-items:center;gap:4px;font-size:.85rem;color:var(--pencil)}
.fav-count i{color:var(--route)}
.fav-remove{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1.5px solid var(--route);background:var(--route);color:#fff;cursor:pointer}

/* Comments */
.comments-block{margin-top:40px}
.comments{display:block}
.comments .comment{display:grid;grid-template-columns:40px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid var(--rule)}
.comments .comment p.body{white-space:pre-line}
.comments .comment .who a{text-decoration:none}.comments .comment .who a:hover{text-decoration:underline}
.comment-acts{display:flex;gap:4px 14px;flex-wrap:wrap;margin-top:4px}
.comment-acts a,.comment-acts button{display:inline-flex;align-items:center;min-height:44px;font-size:.88rem;color:var(--pencil)}
.comment-acts form{margin:0}
.comments-empty{color:var(--pencil);padding:10px 0;margin:0}
.comment-form{margin-top:14px;max-width:640px}
.comment-edit{grid-column:1/-1}
.comments-loading{color:var(--pencil);font-family:var(--hand);padding:14px 0}

/* Watermark over topo photos */
.wm{position:absolute;right:8px;bottom:8px;background:rgba(34,38,42,.45);color:rgba(255,255,255,.8);font-size:.72rem;padding:2px 8px;border-radius:4px;pointer-events:none;user-select:none}
.acts-row.flush{margin:0}
.tbl tbody th{font:inherit;color:inherit;text-align:left;padding:12px 8px;border-bottom:1px solid var(--rule);vertical-align:middle}
.tbl tr.has-desc th{border-bottom:0}
#ascent_feedback>*+*{margin-top:12px}
/* Topo photo frame (like .ptopo, whose svg rule would blow up the carousel's icons) */
.topo-photo{position:relative;border:1.5px solid var(--ink);border-radius:6px;overflow:hidden;background:var(--paper-2);margin:0}
.topo-photo>figcaption{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;border-top:1.5px solid var(--ink);background:var(--sheet);font-size:.84rem;color:var(--pencil)}
.route-topo,.subarea-split .topo-photo{align-self:start}
.route-body .split>*,.subarea-split>*{min-width:0}
.route-body .prose,.subarea-split .rlist .nm{overflow-wrap:anywhere}
@media(max-width:480px){.tbl th,.tbl td{padding-left:4px;padding-right:4px}}
/* The carousel draws its own frame; inside a topo frame it would double the border. */
.topo-photo .gcar{border:0;border-radius:0}

/* Topo hint: tapping a list row opens the route on touch screens, so only mention the list where hover exists. */
.hint-touch{display:none}
@media(hover:none) and (pointer:coarse){.hint-touch{display:inline}.hint-pointer{display:none}}

/* Route page on phones: get the topo onto the first screen. The back link already says where you
   are (no breadcrumb), prev/next stays at the bottom only, and the actions share one row. */
@media(max-width:699px){
  .route-head .crumbs{display:none}
  .route-body>.route-nav:first-child{display:none}
  .route-acts{flex-wrap:nowrap;margin-top:12px}
  .route-acts>*,.route-acts turbo-frame>*{flex:1 1 0;min-width:0}
  .route-acts .btn{width:100%;justify-content:center;padding-inline:8px}
}

/* The dialog itself takes focus when it opens (so it's announced); no ring around the whole sheet. */
.ascent-dialog .sheet:focus{outline:none}

/* Subsector route filters (Todas / En el topo / Me faltan) */
.rfilter{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin:0 0 10px}
.rfilter .seg{display:inline-flex;border:1.5px solid var(--ink);border-radius:999px;padding:3px}
.rfilter .seg button{min-height:38px;padding:0 14px;border:0;border-radius:999px;background:transparent;font:600 .9rem var(--sans);color:var(--ink);cursor:pointer}
.rfilter .seg button[aria-pressed="true"]{background:var(--ink);color:var(--sheet)}
.rfilter .meta-line{margin:0}
.rfilter-empty{margin:8px 0 14px}

/* Prev/next route: a visible "Vía anterior / Vía siguiente" label over the name */
.route-nav .btn{min-height:52px;padding-block:6px}
.route-nav .lbl{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.route-nav .lbl small{font:400 .8rem var(--hand);color:var(--pencil)}
.route-nav .lbl>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.route-nav .next .lbl{align-items:flex-end;text-align:right}

/* Phones: Lo hice / Guardar / Compartir stay at the bottom of the screen, within thumb reach,
   and the topo comes right after the title. */
@media(max-width:699px){
  .route-acts{position:fixed;left:0;right:0;bottom:0;z-index:25;margin:0;padding:8px 12px calc(8px + env(safe-area-inset-bottom));
    background:rgba(228,231,229,.96);backdrop-filter:blur(6px);border-top:1.5px solid var(--ink)}
  .route-body{padding-bottom:76px}
}

/* Phones: "Lo hice" opens as a bottom sheet (scrolls inside when the form is long) */
@media(max-width:699px){
  .ascent-dialog{place-items:end stretch;padding:0;overflow:hidden}
  .ascent-dialog .sheet{max-width:none;max-height:92dvh;overflow-y:auto;overscroll-behavior:contain;border-radius:18px 18px 0 0;border-bottom:0;
    box-shadow:0 -6px 0 var(--ink);padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  .ascent-dialog .sheet::before{content:"";display:block;width:44px;height:5px;border-radius:3px;background:var(--rule);margin:-4px auto 12px}
}
@media(max-width:699px) and (prefers-reduced-motion:no-preference){
  .ascent-dialog:not(.hidden) .sheet{animation:sheet-up .22s ease-out}
  @keyframes sheet-up{from{transform:translateY(40px);opacity:.5}}
}
/* The "Enlace copiado" toast sits above the fixed action bar instead of over it */
@media(max-width:699px){body:has(.route-acts) .guide-toast{bottom:calc(84px + env(safe-area-inset-bottom))}}
/* Sector screens: /sectores (areas/index), a sector (areas/show) and its historial, plus the shared
   pieces they own: breadcrumb, carousel, image placeholder/loader, route rows and sponsor slot. */

/* ===== Shared: breadcrumb, image fallback, carousel ===== */
.crumbs-nav .crumbs{align-items:center}
.crumbs-nav .crumbs a{display:inline-flex;align-items:center;min-height:44px}
.crumbs-nav .crumbs li[aria-current]{color:var(--ink)}

.img-ph{display:none;position:absolute;inset:0;z-index:2;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  background:var(--paper-2);color:var(--pencil);font-family:var(--hand);font-size:1rem;text-align:center;padding:12px}
.img-ph svg{width:64px;height:40px;color:var(--ink)}
[data-image-failed]>.img-ph{display:flex}
.gcar-frame[data-image-failed],.photo[data-image-failed]{min-height:180px}
.img-loader{display:none;position:absolute;inset:0;z-index:3;align-items:center;justify-content:center;background:var(--paper-2);pointer-events:none}
.img-loader svg{width:30px;height:30px;color:var(--pencil);animation:img-spin 1s linear infinite}
[data-image-loading]>.img-loader{display:flex}
@keyframes img-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.img-loader svg{animation:none}}

.gcar{position:relative;width:100%;overflow:hidden;border:1.5px solid var(--ink);border-radius:6px;background:var(--paper-2)}
.gcar>.carousel-radio{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.gcar .carousel-inner{display:flex;width:100%;touch-action:pan-y pinch-zoom;transition:transform .5s ease-in-out}
@media (prefers-reduced-motion:reduce){.gcar .carousel-inner{transition:none}}
.gcar .carousel-item{flex:1 0 100%;width:100%;margin:0}
.gcar-frame{position:relative;width:100%}
.gcar-frame>img{width:100%;height:auto;display:block}
.gcar-frame[data-image-loading]>img:not([width]){aspect-ratio:4/3}
.gcar-canvas{position:absolute;top:0;left:0;z-index:10}
.gcar .hidden{display:none}
.gcar-btn{position:absolute;top:10px;z-index:20;display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;justify-content:center;padding:0 12px;
  border:1.5px solid var(--ink);border-radius:999px;background:var(--sheet);color:var(--ink);font:600 .85rem var(--sans);cursor:pointer}
.gcar-btn svg{width:18px;height:18px}
.gcar-btn:hover{background:var(--ink);color:var(--sheet)}
.gcar-zoom{right:10px;padding:0}
.gcar-toggle{left:10px}
.gcar-toggle[aria-pressed="true"]{background:var(--ink);color:var(--sheet)}
.gcar-mark{position:absolute;right:10px;bottom:10px;z-index:15;background:rgba(34,38,42,.45);color:rgba(255,255,255,.8);font-size:.72rem;padding:2px 8px;border-radius:4px;pointer-events:none;user-select:none}
[data-image-failed]>.gcar-btn,[data-image-failed]>.gcar-mark,[data-image-failed]>.gcar-canvas,[data-image-loading]>.gcar-btn{display:none}
.gcar figcaption{padding:8px 12px;font-size:.88rem;color:var(--pencil);background:var(--sheet);border-top:1px solid var(--rule)}
.gcar .carousel-controls{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;padding:8px;background:var(--sheet);border-top:1.5px solid var(--ink)}
.gcar .carousel-controls label{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1.5px solid var(--ink);background:var(--sheet);font:600 .8rem var(--sans);cursor:pointer}
.gcar .prev-button,.gcar .next-button{display:none;position:absolute;top:40%;transform:translateY(-50%);z-index:25;width:44px;height:44px;place-items:center;
  border:1.5px solid var(--ink);border-radius:50%;background:var(--sheet);color:var(--ink);font-size:18px;cursor:pointer;user-select:none}
.gcar .prev-button:hover,.gcar .next-button:hover{background:var(--ink);color:var(--sheet)}
.gcar .prev-button{left:10px}.gcar .next-button{right:10px}

/* ===== Route rows (area/route/*/_card) ===== */
.rlist .nm .marks{display:inline-flex;gap:4px;margin-left:6px;vertical-align:middle}
.rlist .mk{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--g45);color:#fff;font:700 .7rem var(--sans)}
.rlist .mk.fav{background:var(--route)}
.rlist .mk.hidden{display:none}
.rlist .mt span+span{margin-left:0}

/* ===== /sectores ===== */
.sectors-tools{margin-top:22px;align-items:end}
.sectors-tools .search{max-width:none}
.search .clear{position:absolute;right:6px;bottom:7px;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--pencil)}
.search .clear svg{width:20px;height:20px}
.search .clear:hover{color:var(--ink)}
.search input::-webkit-search-cancel-button{display:none}
.grade-filter{padding:14px 16px;gap:10px}
.grade-filter .row2{gap:10px;grid-template-columns:1fr 1fr}
.grade-filter .field label{font-family:var(--hand);font-weight:400;color:var(--pencil);margin-bottom:2px}
.grade-filter .acts-row{margin-top:0}
.search-frame{display:block;margin-top:10px}
.search-frame:empty{display:none}
.sresults{padding:6px 14px 10px;box-shadow:6px 6px 0 var(--ink);max-height:60vh;overflow:auto}
.sres-h{font:400 1rem var(--hand);color:var(--pencil);margin:10px 0 4px}
.sres{list-style:none;margin:0;padding:0;border-top:1.5px solid var(--ink)}
.sres li{border-bottom:1px solid var(--rule)}
.sres a{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px;padding:8px 6px;text-decoration:none}
.sres a:hover,.sres a:focus-visible{background:var(--paper)}
.sres .nm{font-weight:650;line-height:1.25}
.sres .mt{display:block;font-size:.84rem;color:var(--pencil);font-weight:400}
.sres small{color:var(--pencil);white-space:nowrap}
.sresults-empty p{margin:0}

.sectors-list{padding-top:26px}
.go-to{display:flex;flex-wrap:wrap;gap:0 14px;align-items:center;margin:-6px 0 20px}
.go-to .hand{color:var(--pencil)}
.go-to a{display:inline-flex;align-items:center;min-height:44px}
.zone-group{margin-bottom:30px;scroll-margin-top:80px}
.zone-group>h3{margin-bottom:12px}
.zone-group>h3 .n{font-weight:400;color:var(--pencil);font-size:1.05rem}
.card .in-range{display:inline-block;margin:8px 0 0;padding:1px 10px;border-radius:999px;background:var(--route);color:#fff;font-size:.82rem;font-weight:650}
.card .sector-favs{margin:4px 0 0;font-size:.82rem}
.card .sector-favs span[aria-hidden]{color:var(--route)}
.sectors-list .empty{margin-bottom:24px}
.sectors-list .empty p{margin:0 0 12px}

/* ===== Sector page ===== */
.sector-head{padding-bottom:10px}
.sector-head .split{align-items:end}
.sector-head h1{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.sector-head h1 .tag-k{font-size:.85rem;font-variation-settings:normal;letter-spacing:0}
.sector-head .last-update{margin:8px 0 0}
.sector-acts{justify-content:flex-start}
.sector-acts turbo-frame{display:contents}
.sector-acts form{margin:0}
.section-links{margin:14px 0 0}
.sector-body{padding-bottom:56px}
.sector-body>.split>.stack{min-width:0}
.sector-body h2{margin-bottom:12px}
.sector-body .head h2{margin-bottom:0}
.sector-body .head{margin-bottom:14px}
.sector-body .head .n{font-weight:400;font-size:1.2rem;color:var(--pencil)}
.description h2{font-size:1.6rem}
.description .prose{max-width:65ch}
.description .prose>div>p:last-child,.description .prose .trix-content>*:last-child{margin-bottom:0}

/* Cover: photos in the guide's frame; the carousel draws its own border */
.cover.cover-empty{aspect-ratio:16/9}
.cover.cover-empty>svg{width:100%;height:100%;display:block}
section.cover{border:0;background:none;box-shadow:none;overflow:visible}
.cover-car{box-shadow:8px 8px 0 var(--paper-2)}
.cover-car .gcar-frame>img{aspect-ratio:16/9;object-fit:cover;filter:saturate(.85) contrast(1.03)}
.cover-car .carousel-controls{position:absolute;left:0;right:0;bottom:10px;background:none;border:0;padding:0;pointer-events:none}
.cover-car .carousel-controls label{pointer-events:auto}
.cover-car:has(figcaption) .carousel-controls{bottom:46px}

#routes>.gcar{margin-bottom:16px}


/* Aside sheets */
.sector-body aside .facts-grid dd .gc{height:26px;min-width:40px;font-size:.95rem}
.access-sheet .sketch{width:100%;height:auto;border:1px solid var(--rule);border-radius:6px;margin:14px 0 12px}
.access-sheet .prose{overflow-wrap:anywhere}
.access-sheet .coords{margin:10px 0 0}
.access-sheet .acts-row{margin-top:6px}
.access-sheet .gmap{display:block;width:100%;height:260px;border:1.5px solid var(--ink);border-radius:6px;margin-top:14px}
.legend-sheet .legend-g{margin-bottom:14px}
.legend-sheet .legend-g .gc{min-width:40px}
.legend-sub{font:400 1.05rem var(--hand);color:var(--pencil);margin:16px 0 8px}
.abbr{margin:0;display:grid;gap:6px}
.abbr div{display:grid;grid-template-columns:minmax(80px,auto) 1fr;gap:10px;font-size:.92rem}
.abbr dt{font-weight:700}
.abbr dd{margin:0;color:var(--pencil)}
.sponsor-slot.empty-slot{border-style:dashed}
.sponsor-slot h2{font-size:1.1rem}
.sponsor-slot p{margin:0 0 12px}
.sponsor-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.sponsor-list a{display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 10px;border:1px solid var(--rule);border-radius:8px;text-decoration:none}
.sponsor-list a:hover{border-color:var(--ink)}
.sponsor-list .logo{width:40px;height:40px;object-fit:contain;flex:none}
.sponsor-list .nm{font-weight:650;line-height:1.25}
.sponsor-list .mt{display:block;font-size:.84rem;color:var(--pencil);font-weight:400}

/* ===== Historial ===== */
.history{padding-bottom:56px}
.history .days ul li{grid-template-columns:1fr}
.history .days ul li>*{min-width:0}
.go-to a,.sector-head .meta-line a{text-decoration:underline;text-underline-offset:3px}
.go-to a:hover{text-decoration-color:var(--route);text-decoration-thickness:2px}
.sector-body .description h2{font-size:1.6rem;margin-bottom:10px}

/* One-column sector page (phones, portrait tablets): how to get there comes right after the
   description, not after every subsector and the comments. Both columns become one sequence
   (display:contents) so the blocks can be reordered without rendering anything twice. */
@media(max-width:919px){
  .sector-body>.split>.stack{display:contents}
  .sector-body>.split>.stack>*{margin-top:0;order:2}
  .sector-body>.split>.stack>.cover,.sector-body>.split>.stack>#description{order:0}
  .sector-body>.split>aside>.sheet:first-child,.sector-body>.split>aside>#access{order:1}
  .sector-body>.split>aside>#legend{order:3}
  .sector-body>.split>.stack>#comments{order:4}
  .sector-body>.split>aside>.sponsor-slot{order:5}
}

/* Subsectors on the sector page: compact tiles (name, routes, grades; a small photo if there is one) */
.sub-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.sub-tile{display:flex;align-items:center;min-height:64px;padding:10px 14px;background:var(--sheet);border:1.5px solid var(--ink);border-radius:8px;border-left:5px solid var(--route);text-decoration:none}
.sub-tile:hover{background:var(--paper-2)}
.sub-tile .txt{display:flex;flex-direction:column;min-width:0}
.sub-tile strong{font-size:1.08rem;font-weight:750;font-variation-settings:"wdth" 82;line-height:1.2;overflow-wrap:anywhere;hyphens:auto}
.sub-tile .meta-line{font-size:.85rem;margin:3px 0 0;color:var(--pencil)}
/*
 * Stylesheet of the public layout (layouts/guide). Kept out of app/assets/stylesheets on
 * purpose: that folder is required into application.css, which the admin uses.
 *


 */
