@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,700;1,500&display=swap");

:root {
  --bg: #07100f;
  --bg-deep: #030706;
  --panel: #0d1715;
  --panel-soft: #13201d;
  --text: #f4f8f3;
  --muted: rgba(244, 248, 243, .63);
  --faint: rgba(244, 248, 243, .14);
  --line: rgba(244, 248, 243, .12);
  --gold: #d6ad45;
  --green: #17d17b;
  --green-deep: #04492e;
  --paper: #f8f7ef;
  --ink: #14211d;
  --shadow: 0 24px 80px rgba(0, 0, 0, .36);
}

[data-theme="light"] {
  --bg: #f7f5eb;
  --bg-deep: #ede9da;
  --panel: #ffffff;
  --panel-soft: #f0eee3;
  --text: #15201c;
  --muted: rgba(21, 32, 28, .66);
  --faint: rgba(21, 32, 28, .12);
  --line: rgba(21, 32, 28, .14);
  --gold: #926d13;
  --green: #068f55;
  --green-deep: #d7f5e5;
  --shadow: 0 22px 60px rgba(69, 55, 24, .14);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  background: radial-gradient(circle at 50% 40%, rgba(23, 209, 123, .16), transparent 34%), #020403;
  transition: opacity .45s ease, visibility .45s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  display: none;
}

.heart-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
}

.heart {
  position: relative;
  width: 40px;
  height: 40px;
  background: var(--green);
  transform: rotate(-45deg);
  animation: heartbeat 1.12s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(23, 209, 123, .75));
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
}

.heart::before { top: -20px; left: 0; }
.heart::after { top: 0; left: 20px; }

.pulse-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(23, 209, 123, .65);
  border-radius: 50%;
  animation: ring 1.12s ease-out infinite;
}

.loader p {
  margin: 0;
  color: rgba(255,255,255,.72);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

@keyframes heartbeat {
  0%, 100% { transform: rotate(-45deg) scale(.92); }
  14% { transform: rotate(-45deg) scale(1.17); }
  28% { transform: rotate(-45deg) scale(.97); }
  42% { transform: rotate(-45deg) scale(1.11); }
  70% { transform: rotate(-45deg) scale(.92); }
}

@keyframes ring {
  0% { transform: scale(.54); opacity: .9; }
  100% { transform: scale(1.65); opacity: 0; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 74px;
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  align-items: center;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: 156px;
  height: 56px;
  object-fit: contain;
  background: rgba(255,255,255,.96);
  border-radius: 6px;
  padding: 3px 8px;
}

.research-corner {
  position: absolute;
  top: -4px;
  left: 122px;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--green);
}

.edition-title {
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 27px;
  font-weight: 500;
  color: var(--text);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  position: relative;
}

.icon-button,
.menu-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--panel);
  display: grid;
  place-items: center;
}

.theme-icon {
  font-size: 18px;
}

.menu-button {
  gap: 4px;
  border-radius: 8px;
}

.menu-button span {
  display: block;
  width: 17px;
  height: 1px;
  background: var(--text);
}

.dropdown-menu {
  position: absolute;
  top: 55px;
  right: 0;
  width: min(285px, calc(100vw - 32px));
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  display: none;
}

.dropdown-menu.open {
  display: grid;
}

.dropdown-menu a,
.dropdown-menu button {
  width: 100%;
  padding: 12px 13px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--faint);
  color: var(--text);
  background: transparent;
  border-radius: 4px;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--panel-soft);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero {
  position: relative;
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.home-hero {
  min-height: calc(86vh - 74px);
  background:
    radial-gradient(circle at 72% 28%, rgba(23, 209, 123, .16), transparent 28%),
    radial-gradient(circle at 18% 16%, rgba(214, 173, 69, .14), transparent 25%),
    linear-gradient(135deg, #030506 0%, #071a15 42%, #05060a 100%);
}

[data-theme="light"] .home-hero,
[data-theme="light"] .insight-hero {
  background:
    radial-gradient(circle at 72% 28%, rgba(6, 143, 85, .16), transparent 28%),
    radial-gradient(circle at 18% 16%, rgba(146, 109, 19, .12), transparent 25%),
    linear-gradient(135deg, #fbfaf4 0%, #eef6ee 48%, #f4eedf 100%);
}

.celestial-field {
  position: absolute;
  inset: 0;
  opacity: .48;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.75) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(23, 209, 123, .55) 0 1px, transparent 1.5px);
  background-size: 86px 86px, 137px 137px;
  animation: drift 24s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-86px, -86px, 0); }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.hero-content.narrow {
  width: min(820px, calc(100% - 32px));
}

.eyebrow,
.section-kicker {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  line-height: 1.06;
  margin: 0;
}

h1 {
  font-size: 98px;
  max-width: 980px;
  margin-top: 18px;
}

.hero-subtitle,
.lead {
  margin: 22px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.58;
}

.primary-cta,
.newsletter-form button,
.publish-form button,
.dialog-card button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  margin-top: 30px;
  border-radius: 999px;
  border: 1px solid rgba(23, 209, 123, .46);
  background: linear-gradient(135deg, var(--green), #b6e66a);
  color: #05110b;
  font-weight: 800;
  box-shadow: 0 16px 44px rgba(23, 209, 123, .2);
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 0;
}

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

.section-heading-row h2,
.section h2 {
  font-size: 54px;
}

.section-heading-row a {
  color: var(--gold);
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.featured-section {
  padding-top: 44px;
}

.feature-card,
.explore-card,
.library-row,
.vision-panels article,
.belief,
.dialog-card,
.publish-form,
.admin-lists > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--panel) 84%, transparent));
  box-shadow: var(--shadow);
}

.feature-card {
  min-height: 260px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card span,
.explore-card span,
.library-row span,
.vision-panels span {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 700;
}

.feature-card h3 {
  margin-top: 18px;
  font-size: 27px;
}

.feature-card p,
.views-layout p,
.newsletter-section p,
.about-section p,
.vision-section p,
.legal-section p,
.reader p {
  color: var(--muted);
  line-height: 1.82;
}

.views-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.views-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: start;
}

.views-layout h2,
.newsletter-section h2 {
  font-size: 70px;
  margin-top: 12px;
}

.statement-stack {
  display: grid;
  gap: 14px;
}

blockquote {
  margin: 0;
  padding: 22px;
  border-left: 2px solid var(--green);
  background: var(--panel);
  color: var(--text);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  line-height: 1.3;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.support-links a,
.secondary-button,
.reader-actions button,
.google-button {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
}

.newsletter-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, .8fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.newsletter-form label,
.dialog-card label,
.publish-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.newsletter-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}

textarea {
  resize: vertical;
}

.newsletter-form button {
  margin-top: 0;
}

.form-status {
  min-height: 20px;
  color: var(--green);
  font-size: 13px;
}

.horizontal-cards {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.explore-card {
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.explore-card strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}

.explore-card em {
  color: var(--muted);
  font-style: normal;
}

.intelligence-hero {
  background:
    radial-gradient(circle at 50% 47%, rgba(23, 209, 123, .18), transparent 28%),
    radial-gradient(circle at 70% 22%, rgba(214, 173, 69, .16), transparent 22%),
    linear-gradient(135deg, #020403 0%, #081a25 50%, #030706 100%);
}

.bulb-stage {
  position: absolute;
  right: clamp(24px, 9vw, 130px);
  top: 50%;
  width: min(42vw, 440px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  opacity: .88;
}

.bulb-glow {
  position: absolute;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 209, 123, .72), rgba(23, 209, 123, .08) 62%, transparent);
  filter: blur(8px);
  animation: glow 2.2s ease-in-out infinite;
}

.bulb {
  position: relative;
  z-index: 2;
  width: 94px;
}

.bulb-top {
  width: 94px;
  height: 112px;
  border: 3px solid rgba(232, 255, 231, .86);
  border-radius: 52% 52% 44% 44%;
  background: radial-gradient(circle at 50% 36%, rgba(23,209,123,.5), rgba(255,255,255,.12) 48%, rgba(255,255,255,.02));
  box-shadow: inset 0 0 34px rgba(23, 209, 123, .5), 0 0 70px rgba(23, 209, 123, .55);
}

.bulb-base {
  width: 50px;
  height: 40px;
  margin: -5px auto 0;
  border-radius: 8px 8px 14px 14px;
  background: repeating-linear-gradient(180deg, #d6ad45 0 7px, #806220 7px 12px);
}

.glitter-orbit {
  position: absolute;
  border: 1px solid rgba(214, 173, 69, .32);
  border-radius: 50%;
  animation: orbit 11s linear infinite;
}

.glitter-orbit::before,
.glitter-orbit::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff7b0;
  box-shadow: 0 0 18px #fff7b0;
}

.glitter-orbit::before { top: 18%; left: 8%; }
.glitter-orbit::after { right: 14%; bottom: 12%; }
.orbit-one { width: 76%; height: 76%; }
.orbit-two { width: 95%; height: 48%; animation-duration: 8s; transform: rotate(19deg); }
.orbit-three { width: 46%; height: 94%; animation-duration: 14s; animation-direction: reverse; }

@keyframes glow {
  0%, 100% { transform: scale(.92); opacity: .72; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes orbit {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

.insight-hero {
  min-height: 64vh;
  background: linear-gradient(135deg, #070808 0%, #112018 46%, #050609 100%);
}

.library-search {
  max-width: 320px;
}

.library-list {
  display: grid;
  gap: 10px;
}

.library-row {
  width: 100%;
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  text-align: left;
  color: var(--text);
}

.library-row h3 {
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 5px;
}

.library-row p {
  margin: 0;
  color: var(--muted);
}

.library-row time {
  color: var(--gold);
  font-size: 13px;
  white-space: nowrap;
}

.reader {
  max-width: 860px;
}

.reader-meta {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
}

.reader h1 {
  font-size: 76px;
}

.reader-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.reader-body {
  font-size: 18px;
}

.reader-body p {
  margin: 0 0 20px;
}

.two-column,
.vision-panels,
.admin-console {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.about-section h1,
.vision-section h1,
.legal-section h1,
.admin-section h1 {
  font-size: 82px;
}

.belief-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.belief {
  padding: 18px;
  text-align: left;
  color: var(--text);
}

.belief span {
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
}

.belief strong,
.belief em {
  display: block;
}

.belief strong {
  margin: 12px 0;
}

.belief em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.vision-panels article {
  padding: 28px;
}

.vision-panels h2 {
  font-size: 44px;
  margin-top: 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  margin-top: 20px;
}

.metric-strip div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.metric-strip div:last-child {
  border-right: 0;
}

.metric-strip strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  color: var(--green);
}

.metric-strip span {
  color: var(--muted);
}

.legal-section {
  max-width: 820px;
}

.admin-gate {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin-top: 22px;
}

.admin-console {
  display: none;
  align-items: start;
}

.admin-console.visible {
  display: grid;
}

.publish-form {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.publish-form button {
  border-radius: 8px;
  margin-top: 0;
}

.admin-lists {
  display: grid;
  gap: 14px;
}

.admin-lists > div {
  padding: 18px;
}

.admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--faint);
}

.admin-item:last-child {
  border-bottom: 0;
}

.admin-item button {
  border: 1px solid rgba(255, 92, 92, .42);
  color: #ff8a8a;
  background: transparent;
  border-radius: 999px;
  padding: 7px 12px;
}

.email-list {
  color: var(--muted);
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.admin-note {
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.site-footer div,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.site-footer span,
.site-footer a {
  color: var(--muted);
}

.social-link {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--panel);
}

.social-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.social-link svg path,
.social-link svg rect,
.social-link svg circle {
  vector-effect: non-scaling-stroke;
}

.social-link:hover {
  color: var(--green);
  border-color: rgba(23, 209, 123, .42);
}

.dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
}

.dialog-card {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  padding: 26px;
  display: grid;
  gap: 14px;
  color: var(--text);
}

.dialog-card h2 {
  font-size: 34px;
}

.dialog-message {
  color: var(--muted);
  line-height: 1.55;
  margin: -4px 0 2px;
}

.dialog-card button[type="submit"] {
  border-radius: 8px;
  margin-top: 4px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--text);
}

.google-button {
  width: 100%;
  border-radius: 8px;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 155px 1fr 104px;
  }

  .brand img {
    width: 132px;
  }

  .research-corner {
    display: none;
  }

  .feature-grid,
  .views-layout,
  .newsletter-section,
  .two-column,
  .vision-panels,
  .admin-console {
    grid-template-columns: 1fr;
  }

  .belief-grid,
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bulb-stage {
    opacity: .28;
    right: -40px;
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 68px;
    grid-template-columns: 90px 1fr 94px;
    padding: 8px 12px;
  }

  .brand img {
    width: 84px;
    height: 42px;
    padding: 2px 4px;
  }

  .edition-title {
    font-size: 15px;
  }

  .hero {
    min-height: calc(100vh - 68px);
  }

  h1 {
    font-size: 45px;
  }

  .feature-grid,
  .belief-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .newsletter-form > div,
  .library-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}

@media print {
  .site-header,
  .site-footer,
  .reader-actions,
  .loader {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .page {
    display: none !important;
  }

  #reader-page {
    display: block !important;
  }

  .reader p {
    color: #222;
  }
}
