/* =====================================================================
   RUTA DE JADE · BASE STYLESHEET
   tokens · header · footer · type · particles · ruta · buttons · reveal
   ===================================================================== */

:root{
  --ink:        #0E1410;
  --ink-2:      #131A15;
  --ink-3:      #1A231C;
  --ink-soft:   #232E26;
  --jade:       #2F8F6B;
  --jade-deep:  #1F6A4E;
  --jade-light: #6FB59A;
  --gold:       #D4B36A;
  --gold-soft:  #B8975A;
  --cream:      #F1E8D2;
  --cream-mute: #C9C3B1;
  --paper:      #E8DCC4;
  --line:       rgba(212,179,106,.22);
  --line-2:     rgba(241,232,210,.10);
  --red:        #C25A4F;

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --rad: 2px;

  --f-display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --f-sans:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-philo:   "Italiana", "Cormorant Garamond", serif;
  --f-cjk:     "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif", serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background: var(--ink);
  color: var(--cream);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(47,143,107,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(212,179,106,.05), transparent 60%);
  min-height: 100vh;
}

/* grain overlay */
body::before{
  content:"";
  position: fixed; inset:0;
  pointer-events:none;
  z-index: 1;
  opacity:.35;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95   0 0 0 0 0.9   0 0 0 0 0.75   0 0 0 .35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/></svg>");
}

::selection{ background: var(--gold); color: var(--ink); }

/* ---------- type helpers ---------- */
.display{
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.04;
}
.italic{ font-style: italic; }
.eyebrow{
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}
.eyebrow .dash{
  display:inline-block;
  width: 28px; height:1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 14px;
  opacity:.7;
}
.muted{ color: var(--cream-mute); }
.serif-num{
  font-family: var(--f-display);
  font-weight: 300;
  font-variant-numeric: oldstyle-nums;
}
.cjk{
  font-family: var(--f-cjk);
}

/* ---------- shell ---------- */
.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
  z-index: 2;
}

/* ---------- header ---------- */
header.site{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 20, 16, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-2);
}
header.site .wrap{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: var(--cream);
}
.brand .seal{
  width: 28px; height: 28px;
  display:grid; place-items:center;
  position:relative;
}
.brand .seal svg{ width:100%; height:100%; display:block; transition: transform 1.1s cubic-bezier(.2,.7,.2,1);}
.brand:hover .seal svg{ transform: rotate(360deg); }
.brand .name{
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand .name em{
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

nav.primary{
  display:flex;
  align-items:center;
  gap: 26px;
}
nav.primary a{
  color: var(--cream-mute);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: color .2s ease;
  position: relative;
  padding: 4px 0;
}
nav.primary a:hover,
nav.primary a.active{ color: var(--cream); }
nav.primary a.active::after,
nav.primary a:hover::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px;
  height:1px; background: var(--gold); opacity:.6;
}

.lang{
  display:inline-flex;
  align-items:center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 600;
}
.lang button{
  background: transparent;
  border: 0;
  color: var(--cream-mute);
  padding: 7px 12px;
  cursor: pointer;
  font-family: var(--f-sans);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 11px;
  transition: all .2s ease;
}
.lang button.active{
  background: var(--gold);
  color: var(--ink);
}
.lang button:not(.active):hover{ color: var(--cream); }

.menu-toggle{
  display:none;
  background:transparent;
  border:1px solid var(--line);
  color: var(--cream);
  padding: 6px 10px;
  border-radius: 2px;
  cursor:pointer;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 920px){
  nav.primary{
    display:none;
    position:absolute;
    top: 100%; left:0; right:0;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line-2);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px var(--gutter) 28px;
    gap: 18px;
    z-index: 40;
  }
  nav.primary.open{ display:flex; }
  .menu-toggle{ display:inline-flex; }
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 2px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s ease;
  white-space: nowrap;
}
.btn .arrow{
  width: 14px; height: 10px;
  position: relative;
  transition: transform .25s ease;
}
.btn .arrow::before{
  content:""; position:absolute; left:0; top:50%;
  width:100%; height:1px; background: currentColor;
  transform: translateY(-50%);
}
.btn .arrow::after{
  content:""; position:absolute; right:0; top:50%;
  width:6px; height:6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.btn:hover .arrow{ transform: translateX(4px); }

.btn-primary{
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover{
  background: #E5C480;
  box-shadow: 0 8px 28px -10px rgba(212,179,106,.5);
}
.btn-ghost{
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
}
.btn-ghost:hover{
  border-color: var(--gold);
  color: var(--gold);
}
.btn-jade{
  background: var(--jade);
  color: var(--cream);
}
.btn-jade:hover{ background: var(--jade-deep); }
.btn-sm{
  padding: 9px 18px;
  font-size: 12px;
}

/* ---------- header login link ----------
   Editorial pill: thin gold hairline border, italic display serif,
   no chunky fill. Coordinates with the brand seal and lang toggle
   for visual rhythm. Applied to every header.site login anchor;
   no HTML class changes required. */
header.site nav.primary a[href$="Inicio-sesion.html"],
header.site nav.primary a[href*="Inicio-sesion.html?"],
header.site nav.primary a[href$="Registro.html"],
header.site nav.primary a[href*="Registro.html?"],
header.site nav.primary a[href$="Biblioteca.html"]:not(.user-pill),
header.site nav.primary a[href*="Biblioteca.html?"]:not(.user-pill){
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 18px;
  font-family: var(--f-display, "Cormorant Garamond", Georgia, serif);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(212,179,106,.35);
  border-radius: 999px;
  text-decoration: none;
  position: relative;
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
  white-space: nowrap;
}
header.site nav.primary a[href$="Inicio-sesion.html"]::after,
header.site nav.primary a[href*="Inicio-sesion.html?"]::after,
header.site nav.primary a[href$="Registro.html"]::after,
header.site nav.primary a[href*="Registro.html?"]::after,
header.site nav.primary a[href$="Biblioteca.html"]:not(.user-pill)::after,
header.site nav.primary a[href*="Biblioteca.html?"]:not(.user-pill)::after{
  content: "›";
  font-family: var(--f-display, "Cormorant Garamond", Georgia, serif);
  font-style: normal;
  font-size: 17px;
  line-height: 1;
  color: var(--gold);
  transition: transform .25s ease;
}
header.site nav.primary a[href$="Inicio-sesion.html"]:hover,
header.site nav.primary a[href*="Inicio-sesion.html?"]:hover,
header.site nav.primary a[href$="Registro.html"]:hover,
header.site nav.primary a[href*="Registro.html?"]:hover,
header.site nav.primary a[href$="Biblioteca.html"]:not(.user-pill):hover,
header.site nav.primary a[href*="Biblioteca.html?"]:not(.user-pill):hover{
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212,179,106,.06);
}
header.site nav.primary a[href$="Inicio-sesion.html"]:hover::after,
header.site nav.primary a[href*="Inicio-sesion.html?"]:hover::after,
header.site nav.primary a[href$="Registro.html"]:hover::after,
header.site nav.primary a[href*="Registro.html?"]:hover::after,
header.site nav.primary a[href$="Biblioteca.html"]:not(.user-pill):hover::after,
header.site nav.primary a[href*="Biblioteca.html?"]:not(.user-pill):hover::after{
  transform: translateX(3px);
}
header.site nav.primary a[href$="Inicio-sesion.html"]:focus-visible,
header.site nav.primary a[href*="Inicio-sesion.html?"]:focus-visible,
header.site nav.primary a[href$="Registro.html"]:focus-visible,
header.site nav.primary a[href*="Registro.html?"]:focus-visible,
header.site nav.primary a[href$="Biblioteca.html"]:not(.user-pill):focus-visible,
header.site nav.primary a[href*="Biblioteca.html?"]:not(.user-pill):focus-visible{
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

/* Auth pill (rdj-shell.js renders this for logged-in users — match the
   same editorial style for visual continuity). */
.rdj-user-pill__btn{
  font-family: var(--f-display, "Cormorant Garamond", Georgia, serif) !important;
  font-style: italic !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  padding: 7px 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(212,179,106,.35) !important;
  background: transparent !important;
  color: var(--cream) !important;
}
.rdj-user-pill__btn:hover{
  color: var(--gold) !important;
  border-color: var(--gold) !important;
  background: rgba(212,179,106,.06) !important;
}

/* ---------- page hero (compact, for interior pages) ---------- */
.page-hero{
  position: relative;
  padding-top: clamp(72px, 9vw, 130px);
  padding-bottom: clamp(40px, 5vw, 72px);
  overflow: hidden;
}
.page-hero .wrap{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}
.page-hero h1{
  font-size: clamp(46px, 6vw, 84px);
  margin-top: 22px;
  margin-bottom: 22px;
  line-height: 1.06;
}
.page-hero h1 em{
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.page-hero .lede{
  color: var(--cream-mute);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.7;
  max-width: 48ch;
  padding-bottom: 8px;
}
@media (max-width: 820px){
  .page-hero .wrap{ grid-template-columns: 1fr; }
}

/* ---------- section base ---------- */
section{
  position: relative;
  padding-top: clamp(64px, 8vw, 110px);
  padding-bottom: clamp(64px, 8vw, 110px);
  overflow: hidden;
}
section.tight{
  padding-top: clamp(32px, 4vw, 60px);
  padding-bottom: clamp(40px, 5vw, 72px);
}
.section-head{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(28px, 5vw, 72px);
  margin-bottom: clamp(40px, 5vw, 72px);
  align-items: end;
}
.section-head h2{
  font-size: clamp(32px, 4vw, 52px);
  margin-top: 16px;
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.section-head h2 em{ font-style: italic; color: var(--gold); font-weight: 400; }
.section-head .desc{
  color: var(--cream-mute);
  font-size: 16px;
  max-width: 56ch;
  line-height: 1.7;
}
@media (max-width: 720px){
  .section-head{ grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- ruta (gold path) ---------- */
.ruta{
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(1240px, 100%);
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.ruta svg{ width: 100%; height: 100%; display:block; }
.ruta path{
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  opacity: 0;
  transition: stroke-dashoffset 1.6s cubic-bezier(.4,0,.2,1), opacity .8s ease;
}
.ruta.lit path{ stroke-dashoffset: 0; opacity: .55; }
.ruta .dot{ fill: var(--gold); opacity:.85; }
.ruta .traveler{
  fill: var(--gold);
  filter: drop-shadow(0 0 4px rgba(212,179,106,.9));
  opacity: 0;
}
.ruta.lit .traveler{ opacity: 1; }

/* cursor glow */
.cursor-glow{
  position: fixed;
  width: 520px; height: 520px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(212,179,106,.10), rgba(47,143,107,.04) 40%, transparent 65%);
  transform: translate3d(-9999px,-9999px,0);
  left: 0; top: 0;
  z-index: 1;
  filter: blur(20px);
  mix-blend-mode: screen;
  transition: opacity .35s ease;
  opacity: 0;
  will-change: transform;
}
body.has-cursor .cursor-glow{ opacity: 1; }
@media (pointer:coarse){ .cursor-glow{ display:none; } }

/* particles */
.particles{
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.particle{
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  bottom: -10px;
  box-shadow: 0 0 6px rgba(212,179,106,.7);
  animation: drift var(--dur,28s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.particle.large{ width: 3px; height: 3px; box-shadow: 0 0 10px rgba(212,179,106,.9); }
@keyframes drift{
  0%   { transform: translate3d(0,0,0) scale(.6); opacity: 0; }
  8%   { opacity: .8; }
  92%  { opacity: .8; }
  100% { transform: translate3d(var(--dx,20px), -110vh, 0) scale(1); opacity: 0; }
}

/* reveal on scroll */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in{ opacity: 1; transform: translateY(0); }
.reveal.d1{ transition-delay: .08s; }
.reveal.d2{ transition-delay: .16s; }
.reveal.d3{ transition-delay: .24s; }
.reveal.d4{ transition-delay: .32s; }
.reveal.d5{ transition-delay: .4s; }
.reveal.d6{ transition-delay: .48s; }

/* tilt gloss (used on cards) */
.tilt{
  position: relative;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .35s ease;
}
.tilt .gloss{
  pointer-events:none;
  position: absolute; inset: 0;
  background: radial-gradient(
    300px circle at var(--mx,50%) var(--my,50%),
    rgba(212,179,106,.20),
    transparent 55%);
  opacity: 0;
  transition: opacity .35s ease;
  mix-blend-mode: screen;
  z-index: 3;
}
.tilt:hover .gloss{ opacity: 1; }

/* ---------- footer ---------- */
footer.site{
  position: relative;
  padding: 90px 0 56px;
  border-top: 1px solid var(--line-2);
  background: #0a0e0b;
  z-index: 2;
}
footer.site .grid{
  display:grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(28px, 3vw, 56px);
  margin-bottom: 56px;
}
footer.site .col h4{
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 20px;
}
footer.site .col a{
  display:block;
  color: var(--cream-mute);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color .2s ease;
}
footer.site .col a:hover{ color: var(--cream); }
footer.site .brand-block .tagline{
  color: var(--cream-mute);
  font-size: 14px;
  margin-top: 14px;
  max-width: 36ch;
  line-height: 1.6;
}
footer.site .socials{
  display:flex;
  gap: 12px;
  margin-top: 20px;
}
footer.site .socials a{
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  display:grid;
  place-items:center;
  border-radius: 999px;
  color: var(--cream-mute);
  transition: all .25s ease;
  margin: 0;
}
footer.site .socials a:hover{
  border-color: var(--gold);
  color: var(--gold);
}
footer.site .socials svg{ width: 16px; height: 16px; }
footer.site .legal{
  border-top: 1px solid var(--line-2);
  padding-top: 24px;
  display:flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--cream-mute);
  opacity: .7;
  letter-spacing: 0.04em;
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 820px){
  footer.site .grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px){
  footer.site .grid{ grid-template-columns: 1fr; }
}

/* CJK marquee band */
.marquee{
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(14,20,16,.6), rgba(19,26,21,.85), rgba(14,20,16,.6));
  overflow: hidden;
  z-index: 2;
}
.marquee::before, .marquee::after{
  content:""; position:absolute; top:0; bottom:0; width: 140px;
  z-index: 2; pointer-events:none;
}
.marquee::before{ left:0;  background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after { right:0; background: linear-gradient(-90deg, var(--ink), transparent); }
.marquee-track{
  display: inline-flex;
  align-items: center;
  gap: 56px;
  white-space: nowrap;
  animation: marqueeScroll 80s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track{ animation-play-state: paused; }
.marquee-track .item{
  font-family: var(--f-display);
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  color: var(--cream-mute);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.marquee-track .cjk{
  font-family: var(--f-cjk);
  font-style: normal;
  color: var(--gold);
  font-size: 28px;
  letter-spacing: 0;
}
.marquee-track .sep{
  width: 28px; height: 1px;
  background: var(--gold); opacity:.5;
  flex-shrink: 0;
}
@keyframes marqueeScroll{
  from{ transform: translateX(0); }
  to  { transform: translateX(-50%); }
}

/* Sello stamp (small, reusable) */
.stamp-sm{
  width: 84px; height: 84px;
  flex-shrink: 0;
}
.stamp-sm svg{ width:100%; height:100%; display:block; }

/* ---------- search modal ---------- */
.icon-btn{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream-mute);
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
  flex-shrink: 0;
}
.icon-btn:hover{ color: var(--gold); border-color: var(--gold); }
.icon-btn svg{ width: 14px; height: 14px; }

.search-overlay{
  position: fixed; inset: 0;
  background: rgba(10, 14, 11, .82);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
.search-overlay.open{ display: flex; }
.search-modal{
  width: min(620px, 92vw);
  background: var(--ink-2);
  border: 1px solid var(--gold);
  position: relative;
}
.search-modal::before{
  content:""; position:absolute; top:-1px; left:24%; right:24%;
  height:1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.search-modal .field{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-2);
}
.search-modal .field svg{ width: 18px; height: 18px; color: var(--gold); flex-shrink:0; }
.search-modal .field input{
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--cream);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  outline: none;
}
.search-modal .field input::placeholder{ color: var(--cream-mute); opacity: .5; }
.search-modal .field kbd{
  font-family: var(--f-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--cream-mute);
  background: var(--ink);
}
.search-modal .results{ padding: 14px 0; max-height: 50vh; overflow-y: auto; }
.search-modal .result{
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  text-decoration: none; color: inherit;
  border-left: 2px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.search-modal .result:hover{ background: var(--ink-3); border-left-color: var(--gold); }
.search-modal .result .gly{
  font-family: var(--f-cjk);
  font-size: 20px;
  color: var(--gold);
  opacity: .7;
}
.search-modal .result .name{
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  color: var(--cream);
  display: block;
  line-height: 1.2;
}
.search-modal .result .meta{
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-mute);
  margin-top: 2px;
  display: block;
}
.search-modal .empty{
  padding: 30px 24px;
  text-align: center;
  color: var(--cream-mute);
  font-size: 14px;
}

/* ---------- jade coin ---------- */
.coin{
  display: inline-grid; place-items: center;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #6FB59A 0%, #2F8F6B 45%, #1F6A4E 100%);
  color: var(--gold);
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  text-shadow: 0 1px 0 rgba(0,0,0,.3);
  box-shadow:
    inset 0 0 0 1px rgba(212,179,106,.7),
    inset 0 -4px 8px rgba(0,0,0,.25),
    inset 0 4px 8px rgba(255,255,255,.18),
    0 6px 14px -6px rgba(47,143,107,.7);
  flex-shrink: 0;
}
.coin::before{
  content:"";
  position:absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px dashed rgba(212,179,106,.4);
  pointer-events: none;
}
.coin .glyph{
  font-family: var(--f-cjk);
  font-style: normal;
  line-height: 1;
}
.coin.s24{ width: 24px; height: 24px; font-size: 11px; }
.coin.s32{ width: 32px; height: 32px; font-size: 14px; }
.coin.s48{ width: 48px; height: 48px; font-size: 20px; }
.coin.s64{ width: 64px; height: 64px; font-size: 26px; }
.coin.s96{ width: 96px; height: 96px; font-size: 38px; }

/* ---------- lock card (used for paywalled chapters) ---------- */
.lock-card{
  position: relative;
  text-align: center;
  padding: clamp(36px, 4vw, 60px) clamp(28px, 4vw, 48px);
  background:
    linear-gradient(180deg, rgba(212,179,106,.04) 0%, transparent 60%),
    var(--ink-2);
  border: 1px solid var(--gold);
  margin: 36px auto 0;
  max-width: 560px;
}
.lock-card::before{
  content:"";
  position: absolute; top:-1px; left:24%; right:24%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.lock-card .lock-ico{
  display: inline-grid; place-items: center;
  width: 56px; height: 56px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  margin-bottom: 20px;
}
.lock-card h3{
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 12px;
}
.lock-card p{
  color: var(--cream-mute);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 auto 22px;
}
.lock-card .badge-soon{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  margin-bottom: 20px;
  font-weight: 600;
}
.lock-card .badge-soon::before{
  content:""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.lock-card .options{
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}

/* ---------- toast (small status pill) ---------- */
.toast{
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink-2);
  border: 1px solid var(--gold);
  color: var(--cream);
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  z-index: 200;
  opacity: 0;
  transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.8);
}
.toast.show{ opacity: 1; transform: translate(-50%, 0); }
.toast .check{
  display: inline-grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  margin-right: 8px;
  vertical-align: middle;
}

/* ---------- content-page (used for legals, blog entry, faq, about, etc.) ---------- */
.content-page{
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.content-page .wrap{
  max-width: 820px;
}
.content-page .crumbs{
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-mute);
  margin-bottom: 18px;
}
.content-page .crumbs a{
  color: var(--cream-mute);
  text-decoration: none;
  transition: color .2s ease;
}
.content-page .crumbs a:hover{ color: var(--gold); }
.content-page .crumbs .sep{ margin: 0 10px; opacity: .5; }
.content-page h1{
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 8px 0 16px;
}
.content-page h1 em{ font-style: italic; color: var(--gold); font-weight: 400; }
.content-page .updated{
  font-family: var(--f-display);
  font-style: italic;
  color: var(--cream-mute);
  font-size: 14px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-2);
}
.content-page article h2{
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  color: var(--cream);
  margin: 48px 0 16px;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.content-page article h2 em{ font-style: italic; color: var(--gold); font-weight: 400; }
.content-page article h2 .num{
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  font-size: 0.7em;
  margin-right: 14px;
  opacity: .85;
}
.content-page article h3{
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 24px);
  color: var(--cream);
  margin: 32px 0 10px;
  line-height: 1.25;
}
.content-page article p{
  color: var(--cream);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 18px;
  text-wrap: pretty;
}
.content-page article p.lead{
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.5;
  color: var(--cream);
  margin-bottom: 32px;
  letter-spacing: 0;
}
.content-page article a{
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,179,106,.4);
  transition: border-color .2s ease, color .2s ease;
}
.content-page article a:hover{ color: #E5C480; border-color: var(--gold); }
.content-page article ul, .content-page article ol{
  padding-left: 0;
  margin: 0 0 22px;
  list-style: none;
}
.content-page article ul li{
  position: relative;
  padding-left: 22px;
  color: var(--cream);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 10px;
}
.content-page article ul li::before{
  content:"";
  position: absolute; left: 0; top: 12px;
  width: 12px; height: 1px;
  background: var(--gold);
  opacity: .8;
}
.content-page article ol{ counter-reset: rdj-ol; }
.content-page article ol li{
  position: relative;
  padding-left: 36px;
  counter-increment: rdj-ol;
  color: var(--cream);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.content-page article ol li::before{
  content: counter(rdj-ol, lower-roman) ".";
  position: absolute; left: 0; top: 0;
  font-family: var(--f-display);
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
  font-size: 15px;
}
.content-page article blockquote{
  border-left: 1px solid var(--gold);
  padding: 4px 0 4px 22px;
  margin: 22px 0;
  color: var(--cream-mute);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
}
.content-page article hr{
  border: 0;
  height: 1px;
  background: var(--line-2);
  margin: 40px 0;
}
.content-page article code{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  padding: 2px 6px;
  background: var(--ink-3);
  color: var(--gold);
  border: 1px solid var(--line-2);
}
.content-page article strong{ color: var(--gold); font-weight: 600; }

/* ---------- auth shell ---------- */
.auth-shell{
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  max-width: 1240px;
  margin: 0 auto;
  min-height: calc(100vh - 100px);
  position: relative;
}
@media (max-width: 860px){ .auth-shell{ grid-template-columns: 1fr; min-height: 0; padding: 40px 0 80px; max-width: 100%; } }
.auth-aside{
  position: relative;
  background:
    radial-gradient(ellipse at 35% 30%, rgba(212,179,106,.15), transparent 55%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink-3) 100%);
  padding: clamp(48px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  overflow: hidden;
  border-right: 1px solid var(--line-2);
}
.auth-aside > *{ max-width: 38ch; width: 100%; }
@media (max-width: 860px){ .auth-aside{ display: none; } }
.auth-aside::after{
  content:"";
  position: absolute;
  right: -120px; bottom: -120px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(212,179,106,.25), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(79,168,138,.3), transparent 55%);
  filter: blur(40px);
  opacity: .6;
}
.auth-aside .seal{
  width: 200px; height: 200px;
  max-width: 50%;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}
.auth-aside .seal svg{ width: 100%; height: 100%; }
.auth-aside h2{
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(34px, 3.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--cream);
  position: relative;
  z-index: 2;
}
.auth-aside h2 em{ font-style: italic; color: var(--gold); font-weight: 400; }
.auth-aside p{
  color: var(--cream-mute);
  font-size: 15px;
  line-height: 1.65;
  max-width: 38ch;
  position: relative;
  z-index: 2;
}
.auth-aside .quote{
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 16px;
  color: var(--cream-mute);
  max-width: 36ch;
  position: relative;
  z-index: 2;
}
.auth-aside .quote::before{
  content:"道";
  font-family: var(--f-cjk);
  font-style: normal;
  color: var(--gold);
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
  opacity: .85;
}
.auth-main{
  padding: clamp(40px, 6vw, 80px) clamp(28px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card{
  width: 100%;
  max-width: 420px;
}
/* Auth form is the only content the user came for — never gate it
   behind the scroll-reveal observer. */
.auth-card.reveal{ opacity: 1; transform: none; transition: none; }
.auth-card .eyebrow{ margin-bottom: 14px; }
.auth-card h1{
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin-bottom: 8px;
  color: var(--cream);
}
.auth-card h1 em{ font-style: italic; color: var(--gold); font-weight: 400; }
.auth-card .sub{
  color: var(--cream-mute);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 36px;
}
.auth-card .sub a{ color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(212,179,106,.4); }
.auth-form .field{
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 22px;
}
.auth-form .field .lbl{
  font-family: var(--f-sans);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.auth-form input{
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 12px;
  color: var(--cream);
  font-family: var(--f-sans);
  font-size: 16px;
  outline: none;
  border-radius: 0;
  transition: border-color .2s ease;
}
.auth-form input:focus{ border-bottom-color: var(--gold); }
.auth-form input.invalid{ border-bottom-color: var(--red); }
.auth-form input::placeholder{ color: var(--cream-mute); opacity: .4; }
.auth-form .row{
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  margin: 4px 0 24px;
  font-size: 13px;
  color: var(--cream-mute);
}
.auth-form .row label{
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.auth-form .row input[type=checkbox]{
  accent-color: var(--gold);
  width: 14px; height: 14px;
}
.auth-form .row a{ color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(212,179,106,.4); }
.auth-form .submit-row{
  display: flex; flex-direction: column; gap: 18px;
}
.auth-form .submit-row .btn{ width: 100%; justify-content: center; padding-top: 16px; padding-bottom: 16px; }
.auth-form .divider{
  display: flex; align-items: center; gap: 14px;
  color: var(--cream-mute);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 26px 0 18px;
}
.auth-form .divider::before,
.auth-form .divider::after{
  content:""; flex: 1; height: 1px; background: var(--line-2);
}
.auth-form .oauth-row{
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 22px;
}
.auth-form .oauth-btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.auth-form .oauth-btn:hover{ border-color: var(--gold); color: var(--gold); }
.auth-form .oauth-btn[disabled]{ opacity: .35; cursor: not-allowed; pointer-events: none; }
.auth-form .oauth-btn[disabled]:hover{ border-color: var(--line); color: var(--cream-mute); background: transparent; }
.auth-form .oauth-btn svg{ width: 16px; height: 16px; }
/* Inline-block anchors that pose as oauth buttons (Google OAuth start link) */
.auth-form a.oauth-btn{ text-decoration: none; }
.signin__oauth-btn[disabled]{ opacity: .35; cursor: not-allowed; pointer-events: none; }
.signin__oauth-btn[disabled]:hover{ border-color: var(--line); color: var(--cream); background: transparent; }
a.signin__oauth-btn{ text-decoration: none; }
.auth-card .foot-note{
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--cream-mute);
  text-align: center;
}
.auth-card .foot-note a{ color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(212,179,106,.4); }

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  .ruta path{ transition:none; }
  html{ scroll-behavior:auto; }
  .marquee-track, .particle{ animation: none !important; }
}

/* ---------- skip-to-content (a11y + SEO) ---------- */
.skip-to-main{
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 20px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
  z-index: 999;
  transition: left .15s ease;
}
.skip-to-main:focus{
  left: 8px;
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}
