:root {
  --red: #ef1717;
  --red-dark: #be0f0f;
  --ink: #171717;
  --muted: #6c6c6c;
  --line: #e8e8e8;
  --paper: #ffffff;
  --soft: #f7f7f5;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Verdana, Geneva, sans-serif;
  line-height: 1.5;
}

body.rights-open {
  overflow: hidden;
}

.rights-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.98);
  transition: opacity 220ms ease;
}

.rights-splash[hidden] {
  display: none;
}

.rights-splash.is-closing {
  opacity: 0;
}

.rights-card {
  width: min(100%, 650px);
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.rights-card h2 {
  max-width: 100%;
  font-size: clamp(1.35rem, 6.3vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.rights-card > p:not(.eyebrow) {
  margin: 24px auto;
  color: var(--muted);
  line-height: 1.75;
}

.rights-card .button {
  margin-top: 4px;
}

.rights-progress {
  height: 3px;
  margin-top: 30px;
  overflow: hidden;
  background: #ededeb;
}

.rights-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform-origin: left;
  animation: rights-countdown 10s linear forwards;
}

.rights-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.7rem;
}

@keyframes rights-countdown {
  to {
    transform: scaleX(0);
  }
}

.access-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--soft);
}

.access-card {
  width: min(100%, 560px);
  padding: clamp(32px, 6vw, 60px);
  border-top: 5px solid var(--red);
  background: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
}

.access-card h1 {
  font-size: clamp(2.2rem, 7vw, 3.7rem);
}

.access-card > p:not(.eyebrow) {
  color: var(--muted);
}

.access-card form {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.access-card label {
  font-size: 0.8rem;
  font-weight: 700;
}

.access-card input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #cfcfca;
  border-radius: 0;
  font: inherit;
}

.access-card input:focus {
  border-color: var(--red);
  outline: 2px solid rgba(239, 23, 23, 0.12);
}

.access-card .button {
  margin-top: 4px;
}

.access-error {
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  background: #fff1f1;
  color: var(--red-dark) !important;
  font-weight: 700;
}

.access-back {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 28px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.language-switch:hover,
.language-switch:focus-visible {
  color: var(--red);
}

.flag {
  display: inline-block;
  width: 30px;
  height: 20px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.flag-pl {
  background: linear-gradient(to bottom, #fff 0 50%, #dc143c 50% 100%);
}

.flag-be {
  background: linear-gradient(to right, #171717 0 33.33%, #ffd90c 33.33% 66.66%, #ef3340 66.66% 100%);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.25rem;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-menu a {
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.main-menu a:hover,
.main-menu a:focus-visible {
  color: var(--red);
}

.menu-toggle {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(250px, 390px) minmax(300px, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 560px;
  height: calc(100vh - 208px);
  margin: 0 auto;
  padding: 28px 0;
}

.cover-wrap {
  position: relative;
}

.cover-wrap::before {
  content: "";
  position: absolute;
  inset: 24px -24px -24px 24px;
  z-index: -1;
  background: var(--soft);
}

.cover {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 258px);
  height: auto;
  margin: 0 auto;
  border: 1px solid #ddd;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 650px;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  line-height: 1.02;
}

h1 em {
  color: var(--red);
  font-weight: 400;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.author {
  margin: 28px 0 0;
  font-weight: 700;
}

.intro {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.2rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: 160ms ease;
}

.button-primary {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--red-dark);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.reader-section {
  padding: 100px max(24px, calc((100vw - var(--max-width)) / 2));
  background: var(--soft);
  scroll-margin-top: 78px;
}

.reader-page {
  min-height: calc(100vh - 180px);
  padding-top: 48px;
  padding-bottom: 48px;
}

.reader-page-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.reader-full-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: white;
}

.reader-full-main {
  height: calc(100vh - 58px);
  height: calc(100dvh - 58px);
}

.reader-full-body .reader-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.reader-full-body .reader-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border: 0;
  box-shadow: none;
}

.reader-full-body .viewer-stage {
  flex: 1 1 auto;
  min-height: 0;
}

.reader-full-body #viewer {
  height: 100%;
  min-height: 0;
}

.reader-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 max(16px, calc((100vw - var(--max-width)) / 2));
  border-top: 1px solid var(--line);
  background: white;
}

.reader-bottom-bar a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.reader-bottom-bar a:hover,
.reader-bottom-bar a:focus-visible {
  color: var(--red);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: clamp(2.6rem, 5vw, 4.7rem);
}

.section-heading > p {
  max-width: 430px;
  margin: 0 0 8px;
  color: var(--muted);
}

.reader-shell {
  overflow: hidden;
  border: 1px solid #dadad7;
  background: white;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.07);
}

.reader-toolbar,
.reader-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.reader-toolbar button,
.reader-toolbar select,
.reader-footer button {
  min-height: 38px;
  border: 1px solid #d8d8d8;
  border-radius: 0;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.reader-toolbar button {
  width: max-content;
  padding: 0 16px;
}

.reader-toolbar button:last-child {
  justify-self: end;
}

.reader-toolbar select {
  width: min(310px, 40vw);
  padding: 0 12px;
}

.reader-toolbar button:hover,
.reader-toolbar button:focus-visible,
.reader-footer button:hover,
.reader-footer button:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

#viewer {
  position: relative;
  height: min(74vh, 760px);
  min-height: 520px;
  background: #fff;
}

.viewer-stage {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  background: #fafafa;
}

.reader-edge {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f2f2ef;
  color: #777;
  cursor: pointer;
  transition: 150ms ease;
}

.reader-edge span {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
}

.reader-edge:hover,
.reader-edge:focus-visible {
  background: var(--red);
  color: white;
}

.reader-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}

.loader {
  width: 32px;
  height: 32px;
  border: 3px solid #eee;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.reader-footer {
  grid-template-columns: 1fr auto;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.reader-footer button {
  min-width: 76px;
  padding: 0 12px;
}

.noscript {
  padding: 16px;
  background: white;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 80px;
  align-items: end;
  padding: 28px max(24px, calc((100vw - var(--max-width)) / 2));
  border-top: 1px solid var(--line);
}

.compact-footer {
  min-height: 102px;
}

.site-footer p {
  margin: 5px 0;
}

.footer-title {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.35rem;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.contact a {
  color: var(--red);
  font-weight: 700;
}

.copyright {
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-meta {
  text-align: right;
}

.visitor-counter {
  color: var(--muted);
  font-size: 0.75rem;
}

.visitor-counter strong {
  color: var(--ink);
  font-size: 0.9rem;
}

@media (max-width: 780px) {
  .site-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .wordmark span:last-child {
    max-width: 170px;
  }

  .language-switch {
    margin: 0 12px 0 auto;
  }

  .language-switch span:last-child {
    display: none;
  }

  .menu-toggle {
    display: block;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 800;
  }

  .main-menu {
    position: absolute;
    inset: 68px 0 auto;
    display: none;
    align-items: stretch;
    padding: 10px 18px 22px;
    border-bottom: 1px solid var(--line);
    background: white;
  }

  .main-menu.is-open {
    display: grid;
  }

  .main-menu a {
    padding: 12px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    width: min(calc(100% - 36px), 520px);
    height: auto;
    padding: 42px 0 70px;
  }

  .cover-wrap {
    margin-right: 14px;
  }

  .cover-wrap::before {
    inset: 14px -14px -14px 14px;
  }

  h1 {
    font-size: clamp(2.35rem, 10.5vw, 3.8rem);
  }

  .reader-section {
    padding: 76px 14px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 16px;
  }

  .reader-toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .reader-full-main {
    height: calc(100vh - 54px);
    height: calc(100dvh - 54px);
  }

  .reader-bottom-bar {
    height: 54px;
    padding: 0 12px;
  }

  .reader-bottom-bar a {
    font-size: 0.72rem;
  }

  .reader-toolbar select {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }

  .reader-toolbar button {
    grid-row: 2;
    width: 100%;
  }

  #viewer {
    min-height: 500px;
    height: 72vh;
  }

  .viewer-stage {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }

  .reader-edge {
    position: static;
    width: 100%;
    background: #f2f2ef;
  }

  .reader-edge span {
    font-size: 2rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 380px) {
  .viewer-stage {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
  }

  .reader-edge span {
    font-size: 1.65rem;
  }
}
