/* ============================================================
   The Private Encyclopaedia - Britannica-inspired theme
   Dark is default; light available via data-theme toggle.
   All local, no external fonts or scripts.
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg: #121212;
  --bg-deep: #0c0c0d;
  --panel: #1b1b1e;
  --panel-2: #222226;
  --ink: #e9e5dc;
  --ink-strong: #f7f4ec;
  --muted: #9b968b;
  --rule: #34343a;
  --rule-soft: #2a2a2f;
  --blue: #79aee3;
  --blue-bright: #a3c9ef;
  --gold: #c9a227;
  --gold-soft: #a8892f;
  --red: #c25b4a;
  --serif: Georgia, "Palatino Linotype", "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --masthead-ink: #f7f4ec;
  --masthead-muted: #9b968b;
  --book-stage-glow: #26262b;
  --book-toolbar-top: rgba(12, 12, 13, 0.92);
  --book-toolbar-fade: rgba(12, 12, 13, 0.6);
  --book-nav-bg: rgba(27, 27, 30, 0.75);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-deep: #141416;
  --panel: #ffffff;
  --panel-2: #faf8f3;
  --ink: #2a261c;
  --ink-strong: #14120e;
  --muted: #6d675c;
  --rule: #d4cec0;
  --rule-soft: #e5e0d4;
  --blue: #0b3d91;
  --blue-bright: #1456c4;
  --gold: #9a7b1a;
  --gold-soft: #b8952e;
  --red: #9a3b2e;
  --shadow: 0 8px 24px rgba(40, 32, 16, 0.10);
  --masthead-ink: #f7f4ec;
  --masthead-muted: #9b968b;
  --book-stage-glow: #ebe4d4;
  --book-toolbar-top: rgba(244, 241, 234, 0.94);
  --book-toolbar-fade: rgba(244, 241, 234, 0.55);
  --book-nav-bg: rgba(255, 255, 255, 0.85);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-bright); text-decoration: underline; }

/* ---------- Masthead (Britannica-style black bar) ---------- */

.masthead {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--masthead-ink);
  white-space: nowrap;
}
.wordmark a { color: var(--masthead-ink); }
.wordmark a:hover { color: var(--gold); text-decoration: none; }
.wordmark .amp { color: var(--gold); }
.masthead-tag {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--masthead-muted);
}
.masthead-nav {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.masthead-nav a { color: var(--masthead-ink); margin-left: 1.4rem; }
.masthead-nav a:hover { color: var(--gold); text-decoration: none; }
.masthead-nav a.active { color: var(--gold); }

.theme-toggle {
  appearance: none;
  margin-left: 1.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 3px;
  background: transparent;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
}
.theme-toggle:hover {
  background: rgba(201, 162, 39, 0.12);
  color: #e0c35a;
}
.book-toolbar .theme-toggle {
  margin-left: 0;
}

.gilt-rule {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 18%, var(--gold) 50%, var(--gold-soft) 82%, transparent);
  opacity: 0.75;
}

/* ---------- Shared page scaffolding ---------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.breadcrumb {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { margin: 0 0.5rem; color: var(--rule); }

footer.site-footer {
  border-top: 1px solid var(--rule-soft);
  margin-top: 4rem;
  padding: 1.6rem 1.5rem 2.4rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Library (home) ---------- */

.library-hero {
  text-align: center;
  padding: 2.2rem 0 1rem;
}
.library-hero h1 {
  font-weight: 400;
  font-size: 2.4rem;
  margin: 0 0 0.6rem;
  color: var(--ink-strong);
}
.library-hero p {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 3rem 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-soft);
}

/* Bookshelf */
.shelf {
  display: flex;
  align-items: flex-end;
  gap: 2.2rem;
  padding: 1.5rem 2rem 0;
  border-bottom: 10px solid #241a10;
  box-shadow: 0 14px 22px -14px rgba(0, 0, 0, 0.8);
  margin-bottom: 2.5rem;
  overflow-x: auto;
}
.shelf-book {
  display: block;
  width: 168px;
  height: 240px;
  flex: 0 0 auto;
  border-radius: 3px 8px 8px 3px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.18) 7%, rgba(255,255,255,0.06) 9%, transparent 12%),
    linear-gradient(160deg, #4a2e20 0%, #3a2318 55%, #2c1a11 100%);
  border: 1px solid #1d1109;
  box-shadow: var(--shadow);
  color: var(--ink-strong);
  padding: 1.6rem 1rem 1.2rem 1.4rem;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.shelf-book:hover {
  transform: translateY(-8px);
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65);
}
.shelf-book .vol-no {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
  padding: 0.3rem 0;
  display: inline-block;
}
.shelf-book .vol-title {
  font-size: 1.12rem;
  line-height: 1.3;
  margin-top: 0.9rem;
  color: #f3e9c9;
}
.shelf-book .vol-sub {
  position: absolute;
  bottom: 1.1rem;
  left: 1.4rem;
  right: 1rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  color: #cbb98a;
  line-height: 1.45;
}

/* Article index cards */
.entry-list { display: grid; gap: 1.1rem; }
.entry-card {
  background: var(--panel);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--gold-soft);
  border-radius: 6px;
  padding: 1.3rem 1.5rem;
  display: flex;
  gap: 1.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.entry-card img {
  width: 130px;
  height: 88px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--rule);
  flex: 0 0 auto;
}
.entry-main { flex: 1 1 260px; }
.entry-kicker {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.3rem;
}
.entry-title {
  font-size: 1.35rem;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.entry-title a { color: var(--ink-strong); }
.entry-title a:hover { color: var(--blue-bright); text-decoration: none; }
.entry-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.entry-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 0 0 auto;
}
.btn {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border-radius: 3px;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--blue); color: var(--blue-bright); }
.btn.gold { border-color: var(--gold-soft); color: var(--gold); }
.btn.gold:hover { border-color: var(--gold); color: #e8cc6a; }

/* ---------- Article page (encyclopedia entry) ---------- */

.article-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 3rem;
}
@media (max-width: 860px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-rail { position: static !important; order: 2; }
}

.article-rail {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  font-family: var(--sans);
}
.toc {
  background: var(--panel);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  padding: 1.2rem 1.3rem;
}
.toc h3 {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 0.42rem 0;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.4;
}
.toc li:first-child a { border-top: none; }
.toc a:hover { color: var(--blue-bright); text-decoration: none; }
.rail-links { margin-top: 1.1rem; display: grid; gap: 0.55rem; }

.article-head { margin-bottom: 2rem; }
.article-kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.8rem;
}
.article-head h1 {
  font-size: 2.7rem;
  font-weight: 400;
  line-height: 1.12;
  color: var(--ink-strong);
  margin: 0 0 0.9rem;
  letter-spacing: -0.01em;
}
.article-note {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.article-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  padding-bottom: 1.4rem;
  border-bottom: 3px double var(--rule);
}

article.entry h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-strong);
  margin: 3rem 0 1.1rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--rule-soft);
  line-height: 1.3;
}
article.entry h2::before {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 1rem;
}
article.entry p { margin: 0 0 1.25rem; }

.lines {
  margin: 1.4rem 0 1.6rem;
  padding: 0.9rem 0 0.9rem 1.4rem;
  border-left: 3px solid var(--gold-soft);
}
.lines p { margin: 0 0 0.35rem; }
.objection { font-weight: 700; color: var(--ink-strong); margin: 1.8rem 0 0.5rem; }

article.entry figure { margin: 2.4rem 0; }
article.entry figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
article.entry figcaption {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.65rem;
  text-align: center;
}

section.sources {
  margin-top: 4rem;
  padding: 1.8rem 1.75rem;
  background: var(--panel);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
}
section.sources h2 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  color: var(--ink-strong);
}
.sources-note {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
section.sources ol { margin: 0; padding-left: 1.3rem; font-size: 0.92rem; }
section.sources li { margin-bottom: 0.8rem; }

/* ---------- Book view ---------- */

body.book-mode {
  background:
    radial-gradient(ellipse at 50% -20%, var(--book-stage-glow) 0%, var(--bg) 62%);
  min-height: 100vh;
  overflow: hidden;
}

.book-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: linear-gradient(var(--book-toolbar-top), var(--book-toolbar-fade) 70%, transparent);
}
.book-toolbar-end {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.book-toolbar a { color: var(--ink); }
.book-toolbar a:hover { color: var(--gold); text-decoration: none; }
.book-toolbar .book-title { color: var(--gold); letter-spacing: 0.2em; }

.toolbar-action {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.toolbar-action:hover { color: var(--gold); }
.toolbar-action:disabled {
  opacity: 0.45;
  cursor: wait;
}

.rail-links .btn {
  width: 100%;
  cursor: pointer;
  background: transparent;
}
.rail-links button.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.book-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book {
  position: relative;
  perspective: 2400px;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.7));
}

.page {
  position: absolute;
  top: 0;
  width: var(--page-w);
  height: var(--page-h);
  background: linear-gradient(105deg, #efe6d2 0%, #e7dcc4 60%, #ddd0b4 100%);
  color: #2b2417;
  overflow: hidden;
}
.page.left  { left: 0; border-radius: 6px 0 0 6px; border-right: 1px solid #c9bc9e; box-shadow: inset -26px 0 30px -24px rgba(60, 40, 10, 0.55); }
.page.right { left: var(--page-w); border-radius: 0 6px 6px 0; box-shadow: inset 26px 0 30px -24px rgba(60, 40, 10, 0.55); }

.page-inner {
  position: absolute;
  inset: 0;
  padding: var(--page-pad-v) var(--page-pad-h);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.58;
  overflow: hidden;
}
.page-inner p { margin: 0 0 0.85em; text-align: justify; hyphens: auto; }
.page-inner .lines { margin: 0.9em 0; padding: 0.4em 0 0.4em 1em; border-left: 2px solid #9c8a5e; }
.page-inner .lines p { margin: 0 0 0.25em; text-align: left; }
.page-inner .objection { font-weight: 700; margin: 1.1em 0 0.35em; }
.page-inner h2 {
  font-size: 1.22em;
  font-weight: 700;
  color: #5a3d22;
  margin: 0.4em 0 0.8em;
  line-height: 1.3;
}
.page-inner figure { margin: 0.9em 0; }
.page-inner figure img {
  display: block;
  max-width: 100%;
  max-height: 300px;
  margin: 0 auto;
  border: 1px solid #b6a67f;
  filter: sepia(0.14);
}
.page-inner figcaption {
  font-family: var(--sans);
  font-size: 0.68em;
  color: #6d5f45;
  text-align: center;
  margin-top: 0.5em;
  line-height: 1.4;
}
.page-inner .book-sources { font-size: 0.82em; }
.page-inner .book-sources li { margin-bottom: 0.7em; }
.page-inner a { color: #274e78; text-decoration: underline; }

.page-num {
  position: absolute;
  bottom: 0.85rem;
  width: 100%;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: #85764f;
}
.page-header {
  position: absolute;
  top: 0.8rem;
  left: var(--page-pad-h);
  right: var(--page-pad-h);
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #97865b;
  display: flex;
  justify-content: space-between;
}

/* Cover pages */
.page.cover {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 235, 170, 0.10), transparent 60%),
    linear-gradient(150deg, #4a2e20 0%, #3a2318 55%, #2a1910 100%);
  color: #f3e9c9;
  border: 1px solid #1d1109;
}
.cover-inner {
  position: absolute;
  inset: 16px;
  border: 2px solid var(--gold-soft);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.6rem;
}
.cover-inner .vol-no {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
  padding: 0.45rem 0.6rem;
}
.cover-inner h1 {
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 1.6rem 0 1rem;
  color: #f6ecc8;
}
.cover-inner .cover-sub {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #cbb98a;
  line-height: 1.6;
}
.cover-inner .cover-site {
  position: absolute;
  bottom: 1.4rem;
  left: 0;
  right: 0;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* Book table of contents page */
.book-toc h2 {
  font-size: 1.25em;
  color: #5a3d22;
  text-align: center;
  margin: 0.6em 0 1.4em;
}
.book-toc ol { list-style: none; margin: 0; padding: 0; }
.book-toc li { margin-bottom: 0.9em; }
.book-toc button {
  all: unset;
  cursor: pointer;
  display: flex;
  width: 100%;
  align-items: baseline;
  gap: 0.6em;
  font-family: var(--serif);
  font-size: 1em;
  color: #2b2417;
}
.book-toc button:hover { color: #274e78; }
.book-toc .dots { flex: 1; border-bottom: 1px dotted #9c8a5e; transform: translateY(-4px); }
.book-toc .pg { font-family: var(--sans); font-size: 0.8em; color: #6d5f45; }

/* Flipping sheet */
.sheet {
  position: absolute;
  top: 0;
  left: var(--page-w);
  width: var(--page-w);
  height: var(--page-h);
  transform-style: preserve-3d;
  transform-origin: left center;
  z-index: 30;
  pointer-events: none;
}
.sheet .face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  overflow: hidden;
  background: linear-gradient(105deg, #efe6d2 0%, #e7dcc4 60%, #ddd0b4 100%);
}
.sheet .face.front { border-radius: 0 6px 6px 0; box-shadow: inset 26px 0 30px -24px rgba(60,40,10,0.55); }
.sheet .face.back  { transform: rotateY(180deg); border-radius: 6px 0 0 6px; box-shadow: inset -26px 0 30px -24px rgba(60,40,10,0.55); }
.sheet.flipping { transition: transform 0.65s cubic-bezier(0.35, 0.1, 0.25, 1); }

/* Nav arrows + edge click zones */
.book-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  background: var(--book-nav-bg);
  border: 1px solid var(--rule);
  color: var(--ink);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  transition: color 0.15s, border-color 0.15s, opacity 0.2s;
}
.book-nav:hover { color: var(--gold); border-color: var(--gold-soft); }
.book-nav:disabled { opacity: 0.25; cursor: default; }
.book-nav.prev { left: 2.2vw; }
.book-nav.next { right: 2.2vw; }

.book-status {
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 40;
}

/* Hidden measurer for pagination */
#measurer {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  left: -99999px;
  top: 0;
  width: calc(var(--page-w) - 2 * var(--page-pad-h));
  height: auto;
}

/* ---------- Password gate ---------- */

html.pe-locked,
html.pe-locked body {
  overflow: hidden !important;
}
html.pe-locked body > :not(#pe-gate) {
  visibility: hidden !important;
}

#pe-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 50% -10%, #26262b 0%, var(--bg-deep) 55%, var(--bg) 100%);
  visibility: visible !important;
}
.pe-gate-card {
  width: min(26rem, 100%);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.75rem 1.6rem 1.6rem;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: var(--serif);
}
.pe-gate-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.pe-gate-card h1 {
  margin: 0 0 0.65rem;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--ink-strong);
}
.pe-gate-card > p {
  margin: 0 0 1.25rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}
.pe-gate-label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
#pe-gate-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--ink-strong);
  font-family: var(--sans);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
#pe-gate-input:focus {
  outline: 2px solid var(--gold-soft);
  outline-offset: 1px;
}
.pe-gate-error {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--red);
}
.pe-gate-btn {
  appearance: none;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  background: transparent;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.pe-gate-btn:hover {
  background: rgba(201, 162, 39, 0.12);
}
