/* ==========================================================================
   Cartea lui Enoh — readerul /cartea-lui-enoh/text.
   Telefonul conduce: o bară lipită sus (‹ capitolul › căutare legătură),
   cuprinsul pe cele cinci cărți, apoi un capitol pe ecran, literă mare,
   rânduri aerisite. Fără JavaScript se citește tot textul, la rând.
   ========================================================================== */

.page-enoh { background: var(--ivory); }
.enr button { appearance: none; -webkit-appearance: none; background: none; border: 0; margin: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
:where(.enr) p { margin: 0; }
.enr :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ cap */
.enr__head { padding-top: clamp(1rem, 3vh, 2rem); padding-bottom: 0.9rem; }
.enr__head .crumbs { margin-bottom: 0.7rem; }
.enr__head h1 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.05; letter-spacing: -0.02em; }
.enr__sub { margin-top: 0.35rem; font-size: 0.9375rem; color: var(--text-3); }
.enr__note { margin-top: 0.7rem; font-size: 0.875rem; line-height: 1.55; color: var(--text-2); max-width: 46rem; }
.enr__note a { color: var(--gold); border-bottom: 1px solid transparent; }
.enr__note a:hover { border-color: var(--gold); }
.enr__badge { display: inline-block; margin-right: 0.35rem; padding: 0.1rem 0.5rem; border: 1px solid var(--line); border-radius: 100px; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); background: #fff; vertical-align: 1px; }

/* ------------------------------------------------------------ bara */
.enr__bar { position: sticky; top: 68px; z-index: 30; background: color-mix(in srgb, var(--ivory) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.enr__barin { display: flex; align-items: center; gap: 0.15rem; min-height: 3.2rem; max-width: 46rem; margin-inline: auto; }
.enr__nav { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.45rem; line-height: 1; color: var(--text-2); }
.enr__nav:hover { background: var(--ivory-2); }
.enr__nav:disabled { opacity: .3; cursor: default; }
.enr__cur { flex: 1; min-width: 0; text-align: left; padding: 0.45rem 0.6rem; border-radius: 8px; }
.enr__cur:hover, .enr__cur[aria-expanded="true"] { background: var(--ivory-2); }
.enr__curn { display: block; font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enr__curn small { font-family: var(--sans); font-size: 0.75rem; color: var(--text-3); margin-left: 0.4rem; }
.enr__curn::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 0.45rem; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: translateY(-3px) rotate(45deg); }
.enr__srch, .enr__share { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.enr__srch:hover, .enr__share:hover, .enr__srch[aria-expanded="true"] { background: var(--ivory-2); color: var(--text); }
.enr__srch svg, .enr__share svg { width: 19px; height: 19px; }
.enr__share.is-ok { color: var(--gold); }

.enr__find { padding-bottom: 0.8rem; max-width: 46rem; margin-inline: auto; }
.enr__find[hidden] { display: none; }
.enr__find input { width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 1rem; color: var(--text); }
.enr__find input:focus { outline: none; border-color: var(--gold); }
.enr__fcount { margin-top: 0.5rem; font-size: 0.8125rem; color: var(--text-3); }
.enr__fres { list-style: none; margin: 0.3rem 0 0; padding: 0; max-height: min(55vh, 28rem); overflow-y: auto; overscroll-behavior: contain; }
.enr__fres li + li { border-top: 1px solid var(--ivory-3); }
.enr__fres a { display: block; padding: 0.6rem 0; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.enr__fres a b { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 0.1rem; }
.enr__fres mark, .ev mark { background: color-mix(in srgb, var(--gold) 22%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ------------------------------------------------------------ cuprins */
.enr__toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.6rem 2.4rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.toc__b h2 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; line-height: 1.25; }
.toc__b h2 span { font-family: var(--sans); font-size: 0.75rem; color: var(--text-3); margin-left: 0.3rem; }
.toc__b h2 a:hover { color: var(--gold); }
.toc__b > p { margin-top: 0.25rem; font-size: 0.8125rem; line-height: 1.5; color: var(--text-3); }
.toc__g { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr)); gap: 0.25rem; margin-top: 0.7rem; }
.toc__g a { display: flex; align-items: center; justify-content: center; height: 2.5rem; border-radius: 8px; font-size: 0.9375rem; color: var(--text-2); font-variant-numeric: tabular-nums; transition: background .15s; }
.toc__g a:hover { background: var(--ivory-2); color: var(--text); }
.toc__g a.is-on { background: var(--ink-1); color: var(--on-dark); }

/* ------------------------------------------------------------ text */
.enr__txt { padding-bottom: 2rem; }
.ebk { max-width: 42rem; margin: 0 auto; }
.ebk__h { padding: 2.4rem 0 0.6rem; border-top: 1px solid var(--line); margin-top: 1rem; }
.ebk__k { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }
.ebk__h h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.2rem); line-height: 1.1; margin-top: 0.3rem; }
.ebk__h p:last-child { margin-top: 0.4rem; font-size: 0.9375rem; color: var(--text-3); }
.ech { padding-top: 1.6rem; scroll-margin-top: 140px; }
.ech__t { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin-bottom: 0.5rem; }
.ech__h { font-family: var(--serif); font-style: italic; font-size: 1rem; line-height: 1.45; color: var(--text-3); margin: 0.9rem 0 0.6rem; }
.ev { font-family: var(--serif); font-size: 1.15rem; line-height: 1.8; color: var(--text); margin-top: 0.55rem; scroll-margin-top: 140px; }
.ev--p { padding-left: 1.1rem; }
.ev__n { display: inline-block; min-width: 1.4rem; margin-left: -0.1rem; font-family: var(--sans); font-size: 0.6875rem; font-weight: 600; color: var(--gold); vertical-align: 0.35em; font-variant-numeric: tabular-nums; }
.ev--p .ev__n { margin-left: -1.2rem; }
.ev.is-hit { background: color-mix(in srgb, var(--gold) 10%, transparent); border-radius: 6px; box-shadow: -0.5rem 0 0 color-mix(in srgb, var(--gold) 10%, transparent), 0.5rem 0 0 color-mix(in srgb, var(--gold) 10%, transparent); }
.ech__leg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.5rem; margin-top: 1.4rem; padding-top: 0.9rem; border-top: 1px dashed var(--line); font-size: 0.875rem; }
.ech__leg span { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-right: 0.2rem; }
.ech__leg a { padding: 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 100px; background: #fff; color: var(--text-2); transition: border-color .2s, color .2s; }
.ech__leg a:hover { border-color: var(--gold); color: var(--text); }

/* înainte / înapoi la capătul capitolului (le pune scriptul) */
.ech__pn { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 2rem; }
.ech__pn button { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; transition: border-color .2s; }
.ech__pn button:hover { border-color: var(--gold); }
.ech__pn button:last-child { text-align: right; align-items: flex-end; }
.ech__pn small { font-size: 0.75rem; color: var(--text-3); }
.ech__pn b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; }
.ech__pn button[disabled] { visibility: hidden; }

/* ------------------------------------------------------------ cu JavaScript: un capitol pe ecran */
.enr-js .ech { display: none; }
.enr-js .ech.is-on { display: block; }
.enr-js .ebk { display: none; }
.enr-js .ebk.is-on { display: block; }
.enr-js .ebk__h { display: none; }
.enr-js .ebk.is-first .ebk__h { display: block; }
.enr-js .enr__toc { display: none; }
.enr-js.toc-on .enr__toc { display: grid; }
.enr:not(.enr-js) .enr__bar { display: none; }

/* ------------------------------------------------------------ sursa */
.enr__src { max-width: 46rem; margin: 2rem auto 0; padding-top: 2rem; padding-bottom: 4rem; border-top: 1px solid var(--line); box-sizing: content-box; }
.enr__src h2 { font-size: 1.4rem; margin-bottom: 0.8rem; }
.enr__src p { font-size: 0.9375rem; line-height: 1.7; color: var(--text-2); }
.enr__src p + p { margin-top: 0.8rem; }
.enr__src a { color: var(--gold); }

@media (max-width: 720px) {
  .enr__bar { top: 64px; }
  .enr__head .crumbs { display: none; }
  .enr__head h1 { font-size: 2rem; }
  .enr__barin { padding-inline: max(0.25rem, calc(var(--pad, 1rem) - 0.6rem)); }
  .enr__curn { font-size: 1.05rem; }
  .enr__toc { grid-template-columns: 1fr; gap: 1.4rem; }
  .toc__g { grid-template-columns: repeat(7, 1fr); }
  .ev { font-size: 1.1rem; line-height: 1.75; }
  .ebk__h { padding-top: 1.6rem; }
}
