:root {
  --bg: #061321;
  --bg-deep: #030d17;
  --panel: #0a1b2c;
  --panel-2: #0d2235;
  --line: #19384d;
  --line-soft: rgba(99, 151, 181, 0.17);
  --text: #f4f8fb;
  --muted: #8da5b8;
  --teal: #13d9c0;
  --teal-soft: rgba(19, 217, 192, 0.12);
  --gold: #e8b84a;
  --gold-bright: #ffdd79;
  --gold-soft: rgba(232, 184, 74, 0.12);
  --blue: #3ec7ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
  --radius: 14px;
  --reader-scale: 1;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); scroll-behavior: smooth; }
html[data-reader-scale="90"] { --reader-scale: 0.9; }
html[data-reader-scale="100"] { --reader-scale: 1; }
html[data-reader-scale="110"] { --reader-scale: 1.1; }
html[data-reader-scale="120"] { --reader-scale: 1.2; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% -5%, rgba(20, 128, 169, 0.17), transparent 33%),
    radial-gradient(circle at 4% 45%, rgba(232, 184, 74, 0.07), transparent 28%),
    linear-gradient(145deg, var(--bg-deep), var(--bg));
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(111, 176, 202, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 176, 202, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

img { display: block; max-width: 100%; }
img[draggable="false"] { -webkit-user-drag: none; user-select: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }
::selection { background: rgba(62, 199, 255, 0.24); color: white; }

.copy { display: none !important; }
html[data-language="en"] .copy-en,
html[data-language="hu"] .copy-hu { display: revert !important; }

.skip-link {
  position: fixed;
  z-index: 999;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--gold-bright);
  color: #241700;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Shared NextOne public navigation */
.public-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(232, 184, 74, 0.19);
  background: rgba(3, 13, 23, 0.94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}
.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-bright);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.public-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 5px 11px rgba(232, 184, 74, 0.22));
}
.public-brand b {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}
.public-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2.2vw, 30px);
}
.public-nav a {
  position: relative;
  color: #c8d4dc;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.public-nav a:hover,
.public-nav a.active { color: var(--gold-bright); }
.public-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: -11px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
}
.public-nav .public-login-link {
  padding: 8px 12px;
  border: 1px solid rgba(232, 184, 74, 0.38);
  border-radius: 7px;
  background: var(--gold-soft);
  color: var(--gold-bright);
}
.public-nav .public-login-link::after { display: none; }
.public-menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 24px;
}
.public-header-language { justify-self: end; }
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(4, 18, 29, 0.72);
  color: #607e90;
  font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
}
.language-switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7894a7;
  cursor: pointer;
  font: inherit;
}
.language-switch button:hover,
.language-switch button.active,
.language-switch button[aria-pressed="true"] { color: var(--gold-bright); }

.eyebrow,
.hero-kicker {
  margin: 0;
  color: #8ab0c2;
  font: 800 10px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  border-color: var(--gold);
  background: linear-gradient(135deg, #f7d674, #d99a25);
  box-shadow: 0 10px 34px rgba(232, 184, 74, 0.16);
  color: #241600;
}
.button.ghost { border-color: rgba(255, 255, 255, 0.18); background: rgba(4, 16, 27, 0.38); color: #e4edf3; backdrop-filter: blur(12px); }
.button.ghost:hover { border-color: rgba(232, 184, 74, 0.55); color: var(--gold-bright); }

/* Home */
.book-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.38fr);
  align-content: end;
  min-height: calc(100svh - 72px);
  padding: clamp(70px, 12vh, 130px) clamp(22px, 7vw, 108px) clamp(74px, 9vh, 104px);
  overflow: hidden;
  isolation: isolate;
}
.book-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 10, 17, 0.93) 0%, rgba(3, 12, 21, 0.67) 47%, rgba(3, 12, 21, 0.2) 78%),
    linear-gradient(0deg, var(--bg-deep) 0%, transparent 37%),
    radial-gradient(circle at 62% 42%, transparent 0, rgba(3, 12, 21, 0.12) 28%, rgba(3, 12, 21, 0.72) 100%);
  content: "";
}
.book-hero::after {
  position: absolute;
  z-index: -1;
  top: -12%;
  left: 57%;
  width: min(23vw, 330px);
  height: 124%;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 224, 255, 0.11) 42%, rgba(255, 220, 121, 0.17) 84%, transparent 100%);
  content: "";
  filter: blur(16px);
  transform: rotate(2deg);
}
.book-hero-image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.86) contrast(1.06) brightness(0.82);
  transform: scale(1.02);
}
.book-hero-grid {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(78, 186, 212, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 186, 212, 0.09) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(90deg, black, transparent 78%);
}
.book-hero-content { z-index: 1; align-self: end; max-width: 850px; }
.book-hero-content h1 {
  max-width: 890px;
  margin: 22px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 7.5vw, 112px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.86;
  text-wrap: balance;
  text-shadow: 0 10px 42px rgba(0, 0, 0, 0.55);
}
.hero-subtitle {
  margin: 20px 0 0;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.4vw, 36px);
  font-style: italic;
}
.hero-intro {
  max-width: 690px;
  margin: 26px 0 0;
  color: #c6d7e1;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.hero-meta {
  z-index: 1;
  display: grid;
  align-self: end;
  gap: 0;
  margin: 0 0 2px auto;
  width: min(100%, 310px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(4, 16, 27, 0.48);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.hero-meta div { display: grid; grid-template-columns: 110px 1fr; align-items: baseline; padding: 15px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.hero-meta div:last-child { border: 0; }
.hero-meta strong { color: var(--gold-bright); font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.hero-meta span { color: #a8bdc9; font-size: 11px; }
.scroll-cue {
  position: absolute;
  bottom: 23px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: #8fa7b6;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transform: translateX(-50%);
}
.scroll-cue i { width: 1px; height: 28px; background: linear-gradient(var(--gold), transparent); animation: pulse-line 2s ease-in-out infinite; }

.section-wrap { width: min(1440px, calc(100% - 44px)); margin-inline: auto; }
.introduction {
  display: grid;
  grid-template-columns: 170px minmax(0, 1.25fr) minmax(280px, 0.62fr);
  gap: clamp(28px, 5vw, 76px);
  padding-block: clamp(82px, 12vw, 156px);
  border-bottom: 1px solid var(--line-soft);
}
.section-label { display: flex; align-items: flex-start; gap: 13px; color: #6f94a8; font: 750 10px/1.4 ui-monospace, monospace; letter-spacing: 0.15em; text-transform: uppercase; }
.section-label span { color: var(--gold); }
.intro-copy .lead {
  margin: 0 0 28px;
  color: #f4f8fb;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3.2vw, 45px);
  letter-spacing: -0.03em;
  line-height: 1.22;
}
.intro-copy > p:not(.lead) { max-width: 790px; margin: 0 0 17px; color: #9fb4c2; font-size: 16px; line-height: 1.8; }
.author-card {
  align-self: start;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(13, 39, 58, 0.86), rgba(6, 21, 34, 0.88));
  box-shadow: var(--shadow);
}
.author-monogram {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(232, 184, 74, 0.46);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255, 221, 121, 0.23), rgba(232, 184, 74, 0.04));
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 19px;
}
.author-card h2 { margin: 8px 0 7px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.author-card p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.chapter-index { padding-block: clamp(82px, 10vw, 138px); }
.index-heading { max-width: 820px; margin: -18px 0 clamp(72px, 9vw, 116px) min(17vw, 220px); }
.index-heading h2 { margin: 16px 0 0; font-family: Georgia, serif; font-size: clamp(35px, 5vw, 70px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.03; text-wrap: balance; }
.part-section + .part-section { margin-top: clamp(90px, 10vw, 148px); }
.part-heading {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: start;
  gap: 22px;
  max-width: 760px;
  margin-bottom: 35px;
}
.part-index { color: rgba(255, 221, 121, 0.17); font-family: Georgia, serif; font-size: 88px; line-height: 0.8; }
.part-heading h2 { margin: 8px 0 9px; font-family: Georgia, serif; font-size: clamp(27px, 3vw, 43px); font-weight: 500; letter-spacing: -0.035em; }
.part-heading > div:last-child > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.chapter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.chapter-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(12, 34, 52, 0.96), rgba(7, 23, 38, 0.96));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.chapter-card:hover { border-color: rgba(232, 184, 74, 0.47); box-shadow: 0 24px 65px rgba(0, 0, 0, 0.3); transform: translateY(-6px); }
.chapter-card-image { position: relative; display: block; aspect-ratio: 1 / 0.9; overflow: hidden; background: #04111d; }
.chapter-card-image::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3, 13, 23, 0.76), transparent 52%); content: ""; }
.chapter-card-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.03); transition: filter 0.35s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1); }
.chapter-card:hover img { filter: saturate(1.03) contrast(1.02); transform: scale(1.045); }
.chapter-number { position: absolute; z-index: 2; right: 14px; bottom: 11px; color: white; font: 500 30px/1 Georgia, serif; text-shadow: 0 3px 14px rgba(0, 0, 0, 0.72); }
.chapter-card-body { display: flex; flex-direction: column; min-height: 235px; padding: 20px; }
.chapter-card h3 { margin: 10px 0 11px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.chapter-summary { margin: 0; color: #91a8b7; font-size: 12px; line-height: 1.65; }
.text-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 19px; color: var(--gold-bright); font-size: 12px; font-weight: 750; }
.text-link span { transition: transform 0.2s ease; }
.text-link:hover span { transform: translate(3px, -3px); }

.closing-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(80px, 10vw, 135px);
  padding: clamp(35px, 6vw, 74px);
  border: 1px solid rgba(232, 184, 74, 0.25);
  border-radius: 17px;
  background:
    radial-gradient(circle at 86% 12%, rgba(54, 186, 218, 0.13), transparent 27%),
    linear-gradient(145deg, rgba(13, 39, 58, 0.93), rgba(5, 18, 30, 0.98));
  box-shadow: var(--shadow);
}
.closing-section blockquote { max-width: 900px; margin: 15px 0 0; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 55px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.14; }
.closing-section .button { flex: 0 0 auto; }

/* Chapter reader */
.reading-progress { position: fixed; z-index: 120; top: 71px; right: 0; left: 0; height: 2px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold-bright)); box-shadow: 0 0 12px rgba(255, 221, 121, 0.6); }
.chapter-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); width: min(1600px, 100%); margin: 0 auto; }
.chapter-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  padding: 30px 19px 24px;
  border-right: 1px solid var(--line);
  background: rgba(3, 14, 24, 0.78);
  backdrop-filter: blur(18px);
}
.sidebar-book-link { display: flex; align-items: center; gap: 11px; padding: 0 7px 22px; border-bottom: 1px solid var(--line-soft); }
.sidebar-book-link > span:last-child { display: grid; min-width: 0; }
.sidebar-book-link small { color: #718fa1; font: 700 9px/1.4 ui-monospace, monospace; letter-spacing: 0.11em; text-transform: uppercase; }
.sidebar-book-link b { margin-top: 5px; overflow: hidden; color: #dce7ed; font-family: Georgia, serif; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.mini-mark { display: grid; place-items: center; flex: 0 0 37px; width: 37px; height: 37px; border: 1px solid rgba(232, 184, 74, 0.4); border-radius: 50%; color: var(--gold-bright); font-family: Georgia, serif; font-size: 19px; }
.sidebar-part { padding: 21px 7px 18px; }
.sidebar-part strong { display: block; margin-top: 7px; color: #d5e2e9; font-size: 12px; line-height: 1.45; }
.chapter-toc { min-height: 0; overflow-y: auto; scrollbar-color: #24485d transparent; scrollbar-width: thin; }
.chapter-toc > p { margin: 0 7px 9px; color: #607e90; font: 750 9px/1.3 ui-monospace, monospace; letter-spacing: 0.13em; text-transform: uppercase; }
.chapter-toc ol,
.mobile-toc ol { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.chapter-toc a,
.mobile-toc a { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 7px; align-items: start; padding: 8px 9px; border-radius: 7px; color: #819baa; }
.chapter-toc a span,
.mobile-toc a span { padding-top: 1px; color: #58798d; font: 700 9px/1.4 ui-monospace, monospace; }
.chapter-toc a b,
.mobile-toc a b { font-size: 10px; font-weight: 600; line-height: 1.35; }
.chapter-toc a:hover,
.chapter-toc a.active,
.mobile-toc a:hover,
.mobile-toc a.active { background: #292512; color: var(--gold-bright); }
.chapter-toc a.active { box-shadow: inset 3px 0 var(--gold); }
.chapter-main { min-width: 0; padding: 24px clamp(20px, 4vw, 62px) 78px; }
.mobile-toc { display: none; }

.chapter-hero {
  position: relative;
  min-height: min(70vh, 700px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #04111d;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.chapter-hero > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.87) contrast(1.06) brightness(0.84); }
.chapter-hero-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(2, 10, 18, 0.96) 0%, rgba(2, 10, 18, 0.67) 44%, rgba(2, 10, 18, 0.14) 78%), linear-gradient(0deg, rgba(2, 10, 18, 0.72), transparent 55%); }
.chapter-hero-copy { position: absolute; right: 0; bottom: 0; left: 0; max-width: 900px; padding: clamp(30px, 6vw, 76px); }
.chapter-hero-copy h1 { margin: 18px 0; font-family: Georgia, serif; font-size: clamp(42px, 6vw, 84px); font-weight: 500; letter-spacing: -0.055em; line-height: 0.97; text-wrap: balance; }
.chapter-hero-copy > p:not(.eyebrow) { max-width: 650px; margin: 0; color: #b8cbd7; font-size: 15px; line-height: 1.72; }
.chapter-meta { display: flex; flex-wrap: wrap; gap: 9px 22px; margin-top: 24px; color: #829cab; font: 700 10px/1.4 ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.chapter-meta span + span::before { margin-right: 22px; color: var(--gold); content: "✦"; }
.hero-chapter-number { position: absolute; top: 26px; right: 31px; color: rgba(255, 255, 255, 0.16); font: 500 clamp(70px, 10vw, 150px)/1 Georgia, serif; }

.reader-card { width: min(920px, 100%); margin: 28px auto 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(160deg, rgba(13, 34, 51, 0.98), rgba(6, 21, 34, 0.99)); box-shadow: var(--shadow); }
.reader-toolbar { position: sticky; z-index: 5; top: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; padding: 10px 18px; border-bottom: 1px solid var(--line-soft); background: rgba(7, 24, 38, 0.93); backdrop-filter: blur(14px); }
.reader-toolbar > a { color: #93aaba; font-size: 11px; font-weight: 700; }
.reader-toolbar > a:hover { color: var(--gold-bright); }
.reader-tools { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #051521; }
.reader-tools button { min-width: 32px; height: 28px; padding: 0 7px; border: 0; border-radius: 5px; background: transparent; color: #8fa7b6; cursor: pointer; }
.reader-tools button:hover { background: var(--gold-soft); color: var(--gold-bright); }
.reader-tools > span { padding: 0 6px; color: #5f7c8e; font-family: Georgia, serif; }
.reader-inner { padding: clamp(38px, 7vw, 84px) clamp(25px, 8vw, 94px) clamp(50px, 8vw, 92px); }
.chapter-opening { display: grid; grid-template-columns: 62px 1fr; gap: 22px; align-items: start; margin-bottom: clamp(42px, 7vw, 72px); padding-bottom: 29px; border-bottom: 1px solid rgba(232, 184, 74, 0.2); }
.chapter-opening > span { color: var(--gold-bright); font: italic 43px/1 Georgia, serif; }
.chapter-opening h2 { margin: 8px 0 0; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 43px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.book-prose { color: #dbe5eb; font-family: Georgia, "Times New Roman", serif; font-size: calc(18px * var(--reader-scale)); line-height: 1.92; }
.book-prose p { margin: 0 0 2.15em; }
.book-prose p:first-child::first-letter { float: left; margin: 0.12em 0.11em 0 0; color: var(--gold-bright); font-size: 3.7em; line-height: 0.72; }
.book-prose em { color: #fff1bf; }
.end-mark { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 62px; color: var(--gold-bright); }
.end-mark span { height: 1px; background: linear-gradient(90deg, transparent, rgba(232, 184, 74, 0.42)); }
.end-mark span:last-child { background: linear-gradient(90deg, rgba(232, 184, 74, 0.42), transparent); }
.end-mark i { font-style: normal; }
.chapter-sequence { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(920px, 100%); margin: 18px auto 0; }
.sequence-card { display: flex; flex-direction: column; min-height: 118px; padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 28, 43, 0.78); transition: border-color 0.2s ease, transform 0.2s ease; }
.sequence-card:hover { border-color: rgba(232, 184, 74, 0.48); transform: translateY(-3px); }
.sequence-card.next { align-items: flex-end; text-align: right; }
.sequence-label { margin-bottom: auto; color: #718e9f; font: 750 9px/1.4 ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.sequence-card strong { margin-top: 18px; color: #e4edf2; font-family: Georgia, serif; font-size: 17px; font-weight: 500; line-height: 1.25; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 92px;
  padding: 18px clamp(20px, 4vw, 58px);
  border-top: 1px solid var(--line);
  background: rgba(2, 11, 19, 0.72);
  color: #657f90;
  font-size: 11px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand img { width: 34px; height: 34px; object-fit: contain; }
.footer-brand > div { display: grid; }
.footer-brand strong { color: #b4c7d2; font-size: 10px; letter-spacing: 0.08em; }
.footer-brand span { margin-top: 3px; }
.site-footer p { margin: 0; }
.back-to-top {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(232, 184, 74, 0.36);
  border-radius: 50%;
  background: rgba(4, 17, 28, 0.9);
  color: var(--gold-bright);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(12px);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.protection-toast {
  position: fixed;
  z-index: 300;
  right: 18px;
  bottom: 78px;
  max-width: min(430px, calc(100% - 36px));
  padding: 13px 16px;
  border: 1px solid rgba(232, 184, 74, 0.4);
  border-radius: 9px;
  background: rgba(3, 13, 23, 0.97);
  box-shadow: var(--shadow);
  color: #d7e2e8;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.protection-toast.visible { opacity: 1; transform: translateY(0); }
.print-notice { display: none; }

html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes pulse-line {
  0%, 100% { opacity: 0.35; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 1180px) {
  .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .introduction { grid-template-columns: 130px minmax(0, 1fr); }
  .author-card { grid-column: 2; }
  .book-hero { grid-template-columns: 1fr; }
  .hero-meta { display: flex; width: auto; margin: 38px auto 0 0; }
  .hero-meta div { grid-template-columns: auto; gap: 4px; min-width: 140px; border-right: 1px solid rgba(255, 255, 255, 0.09); border-bottom: 0; }
  .hero-meta div:last-child { border-right: 0; }
  .chapter-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .chapter-main { padding-inline: 24px; }
}

@media (max-width: 900px) {
  .chapter-layout { display: block; }
  .chapter-sidebar { display: none; }
  .mobile-toc { display: block; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(6, 24, 38, 0.92); }
  .mobile-toc summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; color: var(--gold-bright); cursor: pointer; font-weight: 750; list-style: none; }
  .mobile-toc summary::-webkit-details-marker { display: none; }
  .mobile-toc[open] summary span { transform: rotate(45deg); }
  .mobile-toc ol { max-height: 56vh; padding: 0 9px 10px; overflow-y: auto; }
  .mobile-toc a { grid-template-columns: 30px minmax(0, 1fr); padding: 10px; }
  .mobile-toc a b { font-size: 11px; }
  .chapter-main { padding-top: 17px; }
}

@media (max-width: 820px) {
  .public-header { grid-template-columns: auto 1fr auto; gap: 12px; }
  .public-menu-toggle { display: block; grid-column: 2; grid-row: 1; justify-self: end; }
  .public-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;
    display: none;
    align-items: stretch;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(3, 13, 23, 0.98);
    box-shadow: var(--shadow);
  }
  .public-nav.open { display: grid; }
  .public-nav a { padding: 11px 12px; border-radius: 6px; }
  .public-nav a:hover { background: var(--gold-soft); }
  .public-nav a.active::after { display: none; }
  .public-header-language { grid-column: 3; grid-row: 1; }
  .book-hero { min-height: calc(100svh - 72px); padding-inline: 24px; }
  .hero-meta { display: none; }
  .book-hero-content h1 { font-size: clamp(48px, 12vw, 82px); }
  .introduction { grid-template-columns: 1fr; }
  .author-card { grid-column: auto; }
  .index-heading { margin: 42px 0 70px; }
  .closing-section { align-items: flex-start; flex-direction: column; }
  .chapter-hero { min-height: 640px; }
  .chapter-hero-shade { background: linear-gradient(0deg, rgba(2, 10, 18, 0.96) 0%, rgba(2, 10, 18, 0.62) 56%, rgba(2, 10, 18, 0.12) 100%); }
  .chapter-hero-copy { padding: 34px; }
  .chapter-hero-copy h1 { font-size: clamp(39px, 9vw, 66px); }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .public-header { min-height: 66px; padding: 8px 13px; }
  .public-brand span { display: none; }
  .public-brand img { width: 36px; height: 36px; }
  .reading-progress { top: 65px; }
  .book-hero { min-height: calc(100svh - 66px); padding: 66px 18px 72px; }
  .book-hero::before { background: linear-gradient(0deg, rgba(2, 10, 17, 0.97) 0%, rgba(3, 12, 21, 0.7) 62%, rgba(3, 12, 21, 0.3) 100%); }
  .book-hero-content h1 { font-size: clamp(44px, 15vw, 68px); line-height: 0.92; }
  .hero-intro { font-size: 14px; line-height: 1.68; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .scroll-cue { display: none; }
  .section-wrap { width: min(100% - 28px, 1440px); }
  .introduction { padding-block: 76px; }
  .intro-copy .lead { font-size: 29px; }
  .author-card { grid-template-columns: 48px 1fr; padding: 17px; }
  .author-monogram { width: 48px; height: 48px; font-size: 16px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .part-heading { grid-template-columns: 62px 1fr; }
  .part-index { font-size: 62px; }
  .chapter-card-image { aspect-ratio: 1.15 / 1; }
  .chapter-card-body { min-height: 215px; }
  .closing-section { padding: 29px 22px; }
  .closing-section blockquote { font-size: 29px; }
  .closing-section .button { width: 100%; }
  .chapter-main { padding: 13px 12px 58px; }
  .chapter-hero { min-height: 590px; border-radius: 11px; }
  .chapter-hero-copy { padding: 25px 20px; }
  .hero-chapter-number { top: 19px; right: 18px; font-size: 74px; }
  .chapter-meta span + span::before { margin-right: 10px; }
  .reader-card { border-radius: 11px; }
  .reader-toolbar { top: 66px; padding-inline: 12px; }
  .reader-inner { padding: 42px 23px 58px; }
  .chapter-opening { grid-template-columns: 43px 1fr; gap: 14px; }
  .chapter-opening > span { font-size: 33px; }
  .book-prose { font-size: calc(17px * var(--reader-scale)); line-height: 1.82; }
  .chapter-sequence { grid-template-columns: 1fr; }
  .sequence-card.next { align-items: flex-start; text-align: left; }
  .site-footer { padding-inline: 18px; }
  .back-to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  body > * { display: none !important; }
  body > .print-notice { display: block !important; margin: 20mm; color: black; font: 16pt/1.5 sans-serif; }
  html[data-language="en"] .print-notice .copy-en,
  html[data-language="hu"] .print-notice .copy-hu { display: inline !important; }
}
