/* ============================================================
   APEX BANKING ADVISOR — single stylesheet
   Used by: index.html, article.html, subscribers/*, auth/*
   ============================================================ */

/* ===== Tokens ===== */
:root {
  --bg:           #1a1814;
  --bg-deep:      #13110d;
  --bg-panel:     #1f1c17;
  --bg-darker:    #0e0c09;

  --gold:         #c9a861;
  --gold-soft:    #a89368;
  --gold-deep:    #8a7550;
  --gold-dim:     #6b5e44;

  --wax:          #8c2a1f;
  --wax-light:    #a8392a;
  --wax-deep:     #6b1d15;

  --cotton:       #e8dcc0;
  --cotton-soft:  #cbbf9f;
  --cotton-dim:   #b8a47a;

  --ink:          #1a1814;
  --rule:         rgba(201,168,97,0.35);

  --footer-bg:    #0a0907;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cotton);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Ambient light + grain (no animations) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 78% 18%, rgba(244,228,193,0.07) 0%, rgba(201,168,97,0.03) 35%, transparent 70%),
    radial-gradient(ellipse at 15% 85%, rgba(140,42,31,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.79  0 0 0 0 0.66  0 0 0 0 0.38  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 2;
}
main, header, footer, .topbar, .container { position: relative; z-index: 3; }

/* Vitruvian grid fixed background */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(201,168,97,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201,168,97,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Layout container ===== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 60px;
}
@media (max-width: 760px) {
  .container { padding: 0 24px; }
}

/* ===== Top utility bar (email + linkedin) ===== */
.topbar {
  background: var(--bg-deep);
  border-bottom: 0.5px solid var(--rule);
}
.topbar .inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 7px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold-soft);
  font-weight: 500;
  font-style: italic;
}
.topbar a {
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}
.topbar a:hover { color: var(--wax-light); }
.topbar svg { width: 14px; height: 14px; fill: currentColor; }
@media (max-width: 760px) {
  .topbar .inner { padding: 10px 24px; font-size: 13px; }
}

/* ===== Brass rule ===== */
.brass-rule {
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.brass-rule + .brass-rule { margin-top: 4px; opacity: 0.3; }

/* ===== Header (brand + nav) — compact ===== */
header {
  padding-top: 14px;
  padding-bottom: 10px;
}
.eyebrow {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 6px;
  font-style: italic;
  font-weight: 500;
  font-family: 'Cormorant Garamond', serif;
}
.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}
.brand h1, .brand .brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: 2px;
  color: var(--cotton);
  line-height: 1;
}
.brand a.brand-name { text-decoration: none; }
.brand .tagline {
  color: var(--cotton-dim);
  font-size: 14px;
  letter-spacing: 4px;
  font-style: italic;
  font-weight: 500;
  margin-top: 6px;
  font-family: 'Cormorant Garamond', serif;
}
nav ul { list-style: none; display: flex; gap: 32px; flex-wrap: wrap; }
nav a {
  color: var(--cotton-dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 3px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
nav a:hover { color: var(--gold); }
@media (max-width: 760px) {
  .brand-row { flex-direction: column; align-items: flex-start; }
  nav ul { gap: 18px; }
}

/* ===== Hero (index.html v2) — split portrait + login ===== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: stretch;
  padding: 18px 0 28px;
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 12px 0 24px; }
}

/* ---- LEFT: full painting frame + quote below ---- */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-portrait {
  position: relative;
  aspect-ratio: 3002 / 3731;
  background: var(--bg-deep);
  border: 1px solid var(--gold);
  overflow: hidden;
}
.hero-portrait .frame-inner {
  position: absolute;
  inset: 8px;
  border: 0.5px solid var(--gold);
  opacity: 0.5;
  pointer-events: none;
  z-index: 5;
}
.hero-portrait .painting-full {
  position: absolute;
  inset: 0;
  background-image: url("img/rembrandt-galilee.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: saturate(0.95) contrast(1.05);
}

/* Quote block BELOW the painting */
.hero-quote {
  margin: 0;
  text-align: center;
  padding: 12px 16px 0;
}
.hero-quote .quote-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 16px;
  opacity: 0.7;
}
.hero-quote blockquote {
  margin: 0;
  padding: 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.35;
  color: var(--wax-light);
  letter-spacing: 0.3px;
}
.hero-quote figcaption {
  margin-top: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-style: italic;
}

/* ---- RIGHT: commercial pitch block ---- */
.pitch-block {
  /*display: flex;*/
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
}
.pitch-block .kicker {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 5px;
  font-style: italic;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.pitch-block h2 {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(32px, 4vw, 44px);
  color: var(--cotton);
  line-height: 1.05;
  letter-spacing: -0.3px;
  margin-top: 4px;
}
.pitch-block h2 em { font-style: italic; }
.pitch-block .lede {
  text-align: center;
  color: var(--cotton-dim);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  margin-top: 10px;
  font-family: 'Cormorant Garamond', serif;
}
.pitch-block .pitch-body {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 0.5px solid var(--rule);
}
.pitch-block .pitch-body p {
  color: var(--cotton-soft);
  font-size: 17px;
  line-height: 1.55;
  margin-top: 14px;
}
.pitch-block .pitch-body p:first-child {
  margin-top: 0;
}
.pitch-block .pitch-body p.pitch-emphasis {
  font-style: italic;
  color: var(--cotton);
}
.pitch-block .pitch-cta {
  display: inline-block;
  margin: 28px auto 0;
  background: var(--wax);
  color: var(--cotton);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 5px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  border: 0.5px solid var(--wax);
  padding: 16px 28px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}
.pitch-block .pitch-cta:hover {
  background: var(--wax-light);
  border-color: var(--wax-light);
}

/* Keep old login styles available for /auth/ pages (registration is left for later) */
.login-portico {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
}
.login-portico .kicker {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 5px;
  font-style: italic;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
}
.login-portico h2 {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(32px, 4vw, 42px);
  color: var(--cotton);
  margin-top: 12px;
  letter-spacing: 0.5px;
  line-height: 1.05;
}
.login-portico .lede {
  text-align: center;
  color: var(--cotton-dim);
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  margin-top: 10px;
  font-family: 'Cormorant Garamond', serif;
}

form.login {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}
form.login .field label {
  display: block;
  color: var(--gold-soft);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 4px;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 8px;
}
form.login .field input {
  width: 100%;
  background: var(--bg-deep);
  border: 0.5px solid var(--gold);
  color: var(--cotton);
  padding: 14px 16px;
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  letter-spacing: 0.5px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
form.login .field input::placeholder {
  color: var(--gold-dim);
  font-style: italic;
}
form.login .field input:focus {
  outline: none;
  border-color: var(--wax-light);
  background: #1a1611;
}
form.login button {
  background: var(--wax);
  color: var(--cotton);
  border: 0.5px solid var(--wax);
  padding: 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 5px;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 4px;
}
form.login button:hover { background: var(--wax-light); }
form.login .helper {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--gold-soft);
  margin-top: 4px;
}
form.login .helper a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 0.5px solid var(--gold);
  padding-bottom: 2px;
}
form.login .helper a:hover { color: var(--wax-light); border-color: var(--wax-light); }
form.login .form-error {
  background: rgba(140,42,31,0.15);
  border-left: 2px solid var(--wax-light);
  padding: 12px 14px;
  color: var(--cotton);
  font-style: italic;
  font-size: 15px;
}
form.login .form-success {
  background: rgba(201,168,97,0.08);
  border-left: 2px solid var(--gold);
  padding: 12px 14px;
  color: var(--cotton);
  font-style: italic;
  font-size: 15px;
}

/* ===== Hero intro (text block above services) ===== */
.hero-intro {
  padding: 0 0 28px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: end;
}
@media (max-width: 900px) {
  .hero-intro { grid-template-columns: 1fr; gap: 24px; }
}
.hero-intro .kicker {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  letter-spacing: 4px;
  font-style: italic;
  font-weight: 500;
  display: block;
  margin-bottom: 16px;
}
.hero-intro h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(40px, 5.5vw, 58px);
  line-height: 1.05;
  color: var(--cotton);
  letter-spacing: -0.5px;
}
.hero-intro h2 em { font-style: italic; }
.hero-intro .sub-latin {
  color: var(--cotton-dim);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
  margin-top: 14px;
  font-family: 'Cormorant Garamond', serif;
}
.hero-intro p {
  color: var(--cotton-soft);
  font-size: 18px;
  margin-top: 18px;
  max-width: 600px;
}

/* ===== Section rule ===== */
.section-rule {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 28px 0 16px;
}
.section-rule .num {
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  letter-spacing: 5px;
  font-weight: 500;
}
.section-rule .lbl {
  color: var(--cotton-dim);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-weight: 500;
}
.section-rule .line { flex: 1; height: 1px; background: var(--rule); }

/* ===== Services ===== */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  padding-bottom: 24px;
}
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, 1fr); gap: 36px; } }
@media (max-width: 560px)  { .services { grid-template-columns: 1fr; gap: 32px; } }

.service .roman {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 3px;
}
.service h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 28px;
  color: var(--cotton);
  margin-top: 14px;
  letter-spacing: 0.5px;
}
.service .latin {
  color: var(--cotton-dim);
  font-size: 15px;
  letter-spacing: 2px;
  font-style: italic;
  font-weight: 500;
  font-family: 'Cormorant Garamond', serif;
  margin-top: 4px;
}
.service .rule-short { width: 40px; height: 1px; background: var(--gold); margin: 12px 0 14px; }
.service p { color: var(--cotton-soft); font-size: 17px; line-height: 1.5; }
.service .ornament {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
  opacity: 0.65;
}
.service .ornament svg { width: 110px; height: 80px; }

/* ===== Method / Author ===== */
.method-section {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: center;
  padding: 12px 0 28px;
}
@media (max-width: 900px) { .method-section { grid-template-columns: 1fr; gap: 28px; } }

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-deep);
  border: 1px solid var(--gold);
  padding: 12px;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 0.5px solid var(--gold);
  opacity: 0.5;
  pointer-events: none;
}
.portrait-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 65% 28%, rgba(212,176,106,0.55) 0%, rgba(58,42,24,0.4) 45%, rgba(15,14,11,0) 78%),
    linear-gradient(160deg, #2a1f12 0%, #0f0e0b 100%);
  overflow: hidden;
}
.portrait-inner svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait-frame .caption {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 4px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
}

.method-text h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--cotton);
  line-height: 1.1;
}
.method-text .sub {
  color: var(--cotton-dim);
  font-size: 14px;
  letter-spacing: 4px;
  font-weight: 500;
  font-family: 'Cormorant Garamond', serif;
  margin-top: 10px;
  text-transform: uppercase;
}
.method-text p {
  color: var(--cotton-soft);
  font-size: 18px;
  margin-top: 18px;
  max-width: 640px;
}
.method-text p + p { margin-top: 12px; }

.linked-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 24px;
  border: 0.5px solid var(--wax-light);
  color: var(--wax-light);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 500;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.linked-pill:hover {
  background: var(--wax);
  border-color: var(--wax);
  color: var(--cotton);
}
.linked-pill svg { width: 14px; height: 14px; fill: currentColor; }

/* ===== Scriptorium CTA ===== */
.scriptorium-cta { padding: 12px 0 28px; text-align: center; }
.scriptorium-cta h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 4vw, 36px);
  color: var(--cotton);
}
.scriptorium-cta .sub {
  color: var(--cotton-dim);
  font-size: 14px;
  letter-spacing: 5px;
  font-weight: 500;
  margin-top: 10px;
  font-family: 'Cormorant Garamond', serif;
  text-transform: uppercase;
}
.scriptorium-cta a {
  display: inline-block;
  margin-top: 18px;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  letter-spacing: 5px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 0.5px solid var(--gold);
  padding-bottom: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.scriptorium-cta a:hover { color: var(--wax-light); border-color: var(--wax-light); }

/* ---- Scriptorium article list ---- */
.scriptorium-list {
  margin-top: 28px;
  display: grid;
  gap: 0;
  text-align: left;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.scriptorium-entry {
  display: block;
  padding: 22px 0;
  border-bottom: 0.5px solid var(--rule);
  text-decoration: none;
  transition: background 0.2s;
}
.scriptorium-entry:first-child { border-top: 0.5px solid var(--rule); }
.scriptorium-entry:hover .entry-title { color: var(--gold); }
.entry-meta {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--gold-deep);
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.entry-meta em {
  color: var(--wax-light);
  font-style: italic;
  text-transform: lowercase;
  letter-spacing: 2px;
}
.entry-title {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--cotton);
  line-height: 1.2;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.entry-lede {
  display: block;
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  color: var(--cotton-soft);
  line-height: 1.5;
  font-style: italic;
}
.scriptorium-all {
  display: inline-block;
  margin-top: 24px;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 4px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 0.5px solid var(--gold);
  padding-bottom: 5px;
  transition: color 0.2s, border-color 0.2s;
}
.scriptorium-all:hover { color: var(--wax-light); border-color: var(--wax-light); }

/* ===== Ex foro publico (X feed) ===== */
.x-section { padding: 24px 0 40px; }
.x-section .heading-block {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}
.x-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(26px, 3.5vw, 34px);
  color: var(--cotton);
}
.x-section .note {
  color: var(--cotton-dim);
  font-size: 14px;
  letter-spacing: 3px;
  font-weight: 500;
  font-family: 'Cormorant Garamond', serif;
  text-transform: uppercase;
  font-style: italic;
}
.x-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}
@media (max-width: 1000px) { .x-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .x-grid { grid-template-columns: 1fr; } }

.x-card {
  background: var(--bg-panel);
  border: 0.5px solid var(--rule);
  padding: 12px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}
.x-card:hover { border-color: var(--gold); }
.x-card .handle-tag {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 3px;
  font-weight: 500;
  color: var(--gold);
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--rule);
  text-transform: lowercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.x-card .handle-tag .roman-mark { color: var(--wax-light); font-style: italic; font-weight: 500; }
.x-embed-host {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  overflow: hidden;
}
.x-embed-host blockquote.twitter-tweet,
.x-embed-host .twitter-tweet-rendered { margin: 0 !important; max-width: 100% !important; }
.x-loading {
  color: var(--cotton-dim);
  font-size: 14px;
  font-style: italic;
  font-weight: 500;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 1px;
  text-align: center;
}

/* ===== Imago commentata (section iv) ===== */
.imago-section {
  padding: 12px 0 28px;
}
.imago-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 900px) {
  .imago-grid { grid-template-columns: 1fr; gap: 22px; }
}

.imago-frame {
  position: relative;
  margin: 0;
  background: var(--bg-deep);
  border: 1px solid var(--gold);
  padding: 12px;
}
.imago-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 0.5px solid var(--gold);
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
}
.imago-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-darker);
}
.imago-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.95) contrast(1.05);
}

.imago-text {
  padding: 4px 8px;
}
.imago-kicker {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 5px;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
}
.imago-text h4 {
  margin: 10px 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 38px);
  color: var(--cotton);
  line-height: 1.1;
  letter-spacing: -0.3px;
}
.imago-text h4 em { font-style: italic; }
.imago-credit {
  margin-top: 8px;
  color: var(--cotton-dim);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 1px;
}
.imago-blurb {
  margin-top: 16px;
  color: var(--cotton-soft);
  font-size: 17px;
  line-height: 1.5;
  max-width: 540px;
}
.imago-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 4px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 0.5px solid var(--gold);
  padding-bottom: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.imago-link:hover { color: var(--wax-light); border-color: var(--wax-light); }
.imago-link svg { display: inline-block; }

/* ===== Archive page (articles/index.html) ===== */
.archive-hero {
  padding: 24px 0 18px;
  text-align: center;
}
.archive-eyebrow {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 6px;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
}
.archive-hero h1 {
  margin-top: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(40px, 5.5vw, 60px);
  line-height: 1.05;
  color: var(--cotton);
  letter-spacing: -0.5px;
}
.archive-hero h1 em { font-style: italic; }
.archive-lede {
  margin: 14px auto 0;
  max-width: 640px;
  color: var(--cotton-soft);
  font-style: italic;
  font-size: 17px;
  font-family: 'Cormorant Garamond', serif;
}
.archive-rule {
  height: 1px;
  background: var(--rule);
  margin: 18px 0 8px;
}
.archive-list {
  max-width: 820px;
  margin: 0 auto 28px;
  padding: 0 12px;
}
.archive-entry {
  padding: 26px 0;
}
.archive-empty {
  text-align: center;
  color: var(--cotton-dim);
  font-style: italic;
  margin: 40px 0;
}

/* ===== Footer (darker, larger) ===== */
footer.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--gold-deep);
  margin-top: 18px;
  padding: 32px 0 28px;
  position: relative;
  z-index: 3;
}
footer.site-footer .inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 760px) {
  footer.site-footer .inner { padding: 0 24px; grid-template-columns: 1fr; gap: 22px; }
}
footer.site-footer .col h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 4px;
  font-weight: 500;
  text-transform: uppercase;
  font-style: italic;
  margin-bottom: 14px;
}
footer.site-footer .col p,
footer.site-footer .col a {
  color: var(--cotton-soft);
  font-size: 16px;
  font-family: 'EB Garamond', serif;
  line-height: 1.4;
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
}
footer.site-footer .col a:hover { color: var(--gold); }
footer.site-footer .signature {
  border-top: 0.5px solid var(--rule);
  margin-top: 28px;
  padding-top: 18px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-soft);
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ============================================================
   ARTICLE template — codex page
   ============================================================ */
.top-bar.codex {
  border-bottom: 0.5px solid var(--rule);
}
.top-bar.codex .inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.top-bar.codex a.brand {
  color: var(--cotton);
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  letter-spacing: 1.5px;
  text-decoration: none;
}
.top-bar.codex a.brand em { font-style: italic; color: var(--gold); }
.top-bar.codex nav { display: flex; gap: 28px; }
@media (max-width: 760px) {
  .top-bar.codex .inner { padding: 18px 24px; }
  .top-bar.codex nav { gap: 18px; }
}

.codex-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 60px 72px;
  position: relative;
}
@media (max-width: 760px) { .codex-page { padding: 36px 24px 56px; } }

.folio-crumbs {
  display: flex;
  justify-content: space-between;
  color: var(--gold-deep);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 5px;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
  border-top: 0.5px solid var(--rule);
  border-bottom: 0.5px solid var(--rule);
  padding: 12px 0;
  margin-bottom: 40px;
}

.topic-tag {
  display: inline-block;
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 0.5px solid var(--wax-light);
}

.codex-page h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 58px);
  line-height: 1.08;
  color: var(--cotton);
  letter-spacing: -0.5px;
  margin-top: 24px;
}
.codex-page h1 em { font-style: italic; }

.meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  color: var(--cotton-dim);
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  letter-spacing: 2px;
  font-style: italic;
  font-weight: 500;
  flex-wrap: wrap;
}
.meta-row .sep { color: var(--gold); }
.meta-row .reading-time::before { content: "— "; color: var(--gold); }

.lede {
  margin-top: 36px;
  font-size: 23px;
  line-height: 1.45;
  color: var(--cotton);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  padding-left: 22px;
  border-left: 1px solid var(--wax-light);
}

.h-rule {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 48px 0 36px;
}
.h-rule .line { flex: 1; height: 1px; background: var(--rule); }
.h-rule .lozenge { width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); }
.h-rule .lozenge.wax { background: var(--wax-light); }

.codex-page .prose { position: relative; }

.codex-page .prose > p:first-of-type::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 82px;
  line-height: 0.85;
  float: left;
  margin: 8px 14px 0 0;
  padding: 14px 18px;
  color: var(--gold);
  background: var(--bg-deep);
  border: 0.5px solid var(--gold);
  font-style: italic;
}

.codex-page p { margin-top: 18px; color: var(--cotton-soft); font-size: 19px; line-height: 1.55; }
.codex-page p:first-child { margin-top: 0; }

.codex-page a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 0.5px solid var(--gold);
  transition: color 0.2s, border-color 0.2s;
}
.codex-page a:hover { color: var(--wax-light); border-color: var(--wax-light); }

.codex-page h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 34px;
  color: var(--cotton);
  margin-top: 48px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.codex-page h2 .small-num {
  color: var(--wax-light);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 3px;
  margin-right: 14px;
  vertical-align: 4px;
  font-weight: 500;
}
.codex-page h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 26px;
  color: var(--cotton);
  margin-top: 36px;
  margin-bottom: 4px;
}

.codex-page strong { color: var(--cotton); font-weight: 500; }
.codex-page em { color: var(--cotton); }

.codex-page ul, .codex-page ol {
  margin: 18px 0 18px 28px;
  color: var(--cotton-soft);
  font-size: 19px;
}
.codex-page li { margin-bottom: 8px; padding-left: 6px; }
.codex-page ul li::marker { color: var(--gold); }
.codex-page ol li::marker { color: var(--wax-light); font-style: italic; }

.codex-page blockquote {
  margin: 40px 0;
  padding: 26px 32px;
  border-left: 2px solid var(--gold);
  background: rgba(201,168,97,0.04);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 23px;
  line-height: 1.45;
  color: var(--cotton);
  position: relative;
}
.codex-page blockquote::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 12px;
  font-size: 64px;
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  line-height: 1;
}
.codex-page blockquote cite {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--gold-deep);
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
}

.codex-page code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.85em;
  background: var(--bg-panel);
  border: 0.5px solid var(--rule);
  padding: 2px 8px;
  color: var(--gold);
}
.codex-page pre {
  margin: 24px 0;
  padding: 22px;
  background: var(--bg-deep);
  border: 0.5px solid var(--rule);
  border-left: 2px solid var(--gold);
  overflow-x: auto;
}
.codex-page pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--cotton-soft);
  font-size: 15px;
  line-height: 1.6;
}

.codex-page figure { margin: 40px 0; }
.codex-page figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 0.5px solid var(--gold);
  filter: saturate(0.9) contrast(1.05);
}
.codex-page figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--cotton-dim);
  letter-spacing: 1px;
}
.codex-page figcaption::before { content: "— "; color: var(--gold); }
.codex-page figcaption::after  { content: " —"; color: var(--gold); }

.codex-page hr {
  border: 0;
  height: 28px;
  margin: 32px 0;
  background-image: radial-gradient(circle, var(--gold) 1.5px, transparent 2px);
  background-size: 24px 28px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.5;
}

.codex-page table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 16px;
}
.codex-page th, .codex-page td {
  border-bottom: 0.5px solid var(--rule);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}
.codex-page th {
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
}

.colophon {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 0.5px solid var(--rule);
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.colophon .mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--wax-light);
  transform: rotate(45deg);
  margin: 0 12px;
  vertical-align: 1px;
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 4px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 0.5px solid var(--gold);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.back-link:hover { color: var(--wax-light); border-color: var(--wax-light); }

/* ============================================================
   SUBSCRIBERS area
   ============================================================ */
.sub-hero {
  padding: 32px 0 24px;
  border-bottom: 0.5px solid var(--rule);
  margin-bottom: 28px;
}
.sub-hero .kicker {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 5px;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
}
.sub-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(34px, 5vw, 48px);
  color: var(--cotton);
  margin-top: 10px;
  line-height: 1.05;
}
.sub-hero .welcome {
  color: var(--cotton-dim);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  margin-top: 8px;
}
.sub-hero .logout {
  float: right;
  margin-top: -50px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 500;
  color: var(--gold-deep);
  text-decoration: none;
  text-transform: uppercase;
}
.sub-hero .logout:hover { color: var(--wax-light); }
@media (max-width: 760px) {
  .sub-hero .logout { float: none; margin-top: 16px; display: inline-block; }
}

.sub-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
}
@media (max-width: 900px) { .sub-grid { grid-template-columns: 1fr; gap: 28px; } }

.panel {
  background: var(--bg-panel);
  border: 0.5px solid var(--rule);
  padding: 24px 26px;
}
.panel h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 24px;
  color: var(--cotton);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.panel .sub {
  color: var(--cotton-dim);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 500;
  font-style: italic;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.entry {
  padding: 16px 0;
  border-bottom: 0.5px solid var(--rule);
}
.entry:last-child { border-bottom: 0; }
.entry .date {
  color: var(--gold-deep);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 3px;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
}
.entry .title {
  display: block;
  margin-top: 6px;
  color: var(--cotton);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  text-decoration: none;
  line-height: 1.25;
}
.entry .title:hover { color: var(--gold); }
.entry .tag {
  display: inline-block;
  margin-top: 6px;
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
}

.dl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--rule);
  gap: 14px;
}
.dl-row:last-child { border-bottom: 0; }
.dl-row .meta { flex: 1; }
.dl-row .meta .name {
  color: var(--cotton);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  display: block;
}
.dl-row .meta .kind {
  color: var(--gold-deep);
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 3px;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
}
.dl-row a.dl-btn {
  background: transparent;
  border: 0.5px solid var(--gold);
  color: var(--gold);
  padding: 8px 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 4px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.dl-row a.dl-btn:hover { background: var(--gold); color: var(--ink); }

/* ============================================================
   REGISTER page (auth/register.html)
   ============================================================ */
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-box {
  width: 100%;
  max-width: 460px;
  background: var(--bg-panel);
  border: 1px solid var(--gold);
  padding: 40px 36px;
}
.auth-box .arch {
  height: 28px;
  background:
    radial-gradient(ellipse 80% 100% at center top, transparent 0%, transparent 40%, var(--gold) 41%, transparent 42%);
  opacity: 0.5;
  margin-bottom: 10px;
}
.auth-box .kicker {
  color: var(--wax-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 5px;
  font-style: italic;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
}
.auth-box h2 {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 34px;
  color: var(--cotton);
  margin-top: 8px;
}
.auth-box .lede {
  text-align: center;
  color: var(--cotton-dim);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  margin-top: 8px;
  font-family: 'Cormorant Garamond', serif;
}
.auth-box form.login { margin-top: 22px; }
.auth-box .alt-link {
  text-align: center;
  margin-top: 16px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--gold-soft);
}
.auth-box .alt-link a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 0.5px solid var(--gold);
  padding-bottom: 2px;
}
.auth-box .alt-link a:hover { color: var(--wax-light); border-color: var(--wax-light); }
