:root {
  --bg-cream: #c3dcf8;
  --ink: #0f2b45;
  --ink-soft: #345a78;
  --gold: #3f82bf;
  --gold-deep: #2f6799;
  --sand: #c4dcf5;
  --paper: #edf5ff;
  --panel: #d9eafe;
  --line: #9fc3e6;
  --shadow: 0 18px 45px rgba(22, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: radial-gradient(circle at 12% 10%, #edf5ff 0%, #d5e7fb 38%, #bcd8f5 100%);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

img {
  width: 100%;
  display: block;
  border-radius: 18px;
}

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

.site-shell {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
}

.site-shell::before {
  width: 340px;
  height: 340px;
  top: -120px;
  left: -100px;
  background: linear-gradient(120deg, rgba(63, 130, 191, 0.40), rgba(220, 236, 255, 0.28));
}

.site-shell::after {
  width: 460px;
  height: 460px;
  bottom: -220px;
  right: -140px;
  background: linear-gradient(120deg, rgba(22, 33, 43, 0.18), rgba(255, 255, 255, 0.38));
}

.topbar {
  width: min(1140px, 92%);
  margin: 22px auto 0;
  padding: 16px 20px;
  background: rgba(232, 243, 255, 0.9);
  border: 1px solid rgba(47, 103, 153, 0.30);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid;
  place-content: center;
  background: linear-gradient(150deg, #fff, #c4dcf5);
  color: var(--gold-deep);
  font-size: 1.2rem;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.brand-text p {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 999px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--ink);
  color: #fff;
}

main {
  width: min(1140px, 92%);
  margin: 24px auto 55px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: stretch;
}

.hero-card,
.hero-image,
.panel {
  border-radius: 24px;
  border: 1px solid rgba(47, 103, 153, 0.30);
  background: rgba(237, 245, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 34px;
}

.eyebrow {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 15px;
}

.hero-card h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 0.95;
}

.hero-card p {
  margin: 0;
  font-size: 1.14rem;
  max-width: 28ch;
  color: var(--ink-soft);
}

.cta-row {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: 0.25s ease;
}

.btn.primary {
  background: linear-gradient(120deg, #3c78b0, #5a95cc);
  color: #fff;
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(60, 120, 176, 0.28);
}

.btn.ghost {
  border-color: var(--line);
}

.btn.ghost:hover {
  background: #fff;
}

.hero-image {
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.hero-image figcaption {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.83rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}

.section {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}

.section h3 {
  margin: 0;
  font-size: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: rgba(236, 245, 255, 0.92);
  border: 1px solid rgba(47, 103, 153, 0.24);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.card h4 {
  margin: 12px 0 6px;
  font-size: 1.5rem;
}

.card p,
.card li {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
}

.meta {
  display: flex;
  justify-content: space-between;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold-deep);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(237, 245, 255, 0.9);
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
}

.stat span {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  padding: 24px;
}

.panel p,
.panel li,
.panel label,
.panel input,
.panel textarea {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 12px;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.footer {
  width: min(1140px, 92%);
  margin: 0 auto 26px;
  text-align: center;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.6s forwards;
}

.reveal:nth-child(2) { animation-delay: 0.1s; }
.reveal:nth-child(3) { animation-delay: 0.2s; }
.reveal:nth-child(4) { animation-delay: 0.3s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  .hero,
  .two-col {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
  }

  .grid-3,
  .stats {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 26px;
  }

  .hero-card p {
    max-width: unset;
  }
}

.portal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.small-note {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.milestone-list,
.note-stack {
  display: grid;
  gap: 12px;
}

.milestone-item,
.note-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  padding: 16px;
}

.milestone-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.milestone-item strong,
.note-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.milestone-item p,
.note-card p,
.note-card li {
  margin: 0;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
}

.status-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.status-done {
  border-color: #4f88b8;
  background: rgba(79, 136, 184, 0.14);
}

.status-current,
.status-live {
  border-color: #2f6799;
  background: rgba(47, 103, 153, 0.12);
}

.upload-box input[type="file"] {
  padding: 10px;
  background: rgba(255, 255, 255, 0.65);
}

.note-card .btn {
  margin-top: 12px;
}

@media (max-width: 1000px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section-head,
  .milestone-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

.article-panel {
  max-width: 860px;
  margin: 0 auto;
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.article-panel p,
.article-list li {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.article-list {
  margin: 18px 0 24px;
  padding-left: 22px;
}

.article-list li + li {
  margin-top: 10px;
}

.card h4 a {
  display: inline-block;
}

.card h4 a:hover {
  color: var(--gold-deep);
}

.auth-panel .btn {
  margin-top: 6px;
}

.auth-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

.auth-links.stacked {
  flex-direction: column;
  align-items: flex-start;
}

.auth-links a {
  color: var(--gold-deep);
}

.security-banner {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(47, 103, 153, 0.28);
  background: rgba(255, 255, 255, 0.42);
}

.security-banner strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.security-banner p {
  margin: 0;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
}

.manage-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.manage-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.46);
}

.btn.danger {
  background: #b65656;
  color: #fff;
}

.btn.danger:hover {
  box-shadow: 0 10px 22px rgba(182, 86, 86, 0.22);
}

@media (max-width: 640px) {
  .manage-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 12px;
  background: #fff;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

.status-text {
  margin-top: 14px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink-soft);
}

.status-text.error {
  color: #8a3535;
}

.setup-alert {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(47, 103, 153, 0.28);
  background: rgba(255, 255, 255, 0.5);
}

.setup-alert p {
  margin: 8px 0 0;
}

.section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.stack-form {
  display: grid;
  gap: 4px;
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--gold-deep);
}

.article-cover {
  margin: 10px 0 20px;
  max-height: 380px;
  object-fit: cover;
}

@media (max-width: 640px) {
  .section-actions {
    align-items: flex-start;
  }
}
