/* ---------- Ghost.zero — shared styles ---------- */
/* Palette pulled from the brand logo: mint bg, white ghost body, neon mint eyes, pink tongue. */

:root {
  --bg:           #BAE5BD;          /* page mint */
  --bg-soft:      #D6F0D7;          /* lighter mint for hero gradients */
  --card:         #FBFBF7;          /* warm off-white (ghost body) */
  --card-edge:    #E7E9DD;          /* subtle card border */
  --ink:          #1F2A1F;          /* warm near-black */
  --ink-soft:     #4D5A4D;          /* secondary text */
  --ink-faint:    #7C8A7C;          /* tertiary, dates, meta */
  --brand:        #4DAE6B;          /* deeper mint for headers + accents */
  --brand-deep:   #2E7A48;          /* hover/active states */
  --neon:         #9FE89A;          /* eye glow — highlights, badges */
  --pink:         #FF95A0;          /* tongue — CTAs */
  --pink-deep:    #E97380;          /* CTA hover */
  --warn-bg:      #FFE9B5;          /* amber for "warning" callouts */
  --warn-edge:    #E0B65C;
  --danger-bg:    #FFD4D9;          /* soft red for "what NOT to do" */
  --danger-edge:  #E08793;
  --shadow:       0 6px 24px rgba(31, 42, 31, 0.08);
  --shadow-soft:  0 2px 10px rgba(31, 42, 31, 0.05);
  --radius:       14px;
  --radius-sm:    8px;

  --font-display: "Fredoka", "Nunito", system-ui, -apple-system, sans-serif;
  --font-body:    "Nunito", system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(186, 229, 189, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31, 42, 31, 0.06);
}
.topnav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
  justify-content: space-between;
}
.brand-mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark img { width: 38px; height: 38px; object-fit: contain; }
.brand-mark .brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
}
.topnav-links { display: flex; gap: 14px; }
.topnav-links a {
  color: var(--ink-soft); text-decoration: none; font-weight: 600;
  font-size: 14px; padding: 6px 10px; border-radius: 6px;
}
.topnav-links a:hover { color: var(--brand-deep); background: rgba(255,255,255,0.55); }
.topnav-links a.active { color: var(--brand-deep); background: rgba(255,255,255,0.85); }

/* ---------- hero ---------- */
.hero {
  padding: 56px 20px 40px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  text-align: center;
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero img.ghost {
  width: clamp(240px, 42vw, 420px);
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(31, 42, 31, 0.18));
  animation: floaty 5.5s ease-in-out infinite;
  margin-bottom: 4px;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero img.ghost.mini-only { display: none; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  margin: 14px 0 8px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.hero p.kicker {
  font-size: 17px; color: var(--ink-soft);
  max-width: 580px; margin: 0 auto 12px;
}
.verified {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--card-edge);
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; color: var(--ink-soft);
  font-weight: 600;
}
.verified::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px rgba(77, 174, 107, 0.22);
}

/* ---------- main layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 32px 20px 80px; }
.layout {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 980px) {
  .layout { grid-template-columns: 240px 1fr; }
}

/* ---------- sidebar / ToC ---------- */
.toc {
  position: sticky; top: 78px; align-self: start;
  background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius); padding: 18px 18px;
  font-size: 14.5px;
  max-height: calc(100vh - 100px); overflow-y: auto;
  box-shadow: var(--shadow-soft);
}
.toc h4 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); margin: 0 0 10px;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 6px 8px; color: var(--ink-soft);
  text-decoration: none; border-radius: 6px;
  line-height: 1.35;
}
.toc a:hover { background: var(--bg-soft); color: var(--brand-deep); }
.toc a.active { background: var(--bg-soft); color: var(--brand-deep); font-weight: 700; }

@media (max-width: 979px) {
  .toc { position: static; max-height: none; }
}

/* ---------- article ---------- */
article.body {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
@media (max-width: 600px) {
  article.body { padding: 24px 20px; }
}

article.body h2 {
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(22px, 3.5vw, 28px);
  margin: 32px 0 12px; line-height: 1.2;
  color: var(--brand-deep);
  letter-spacing: -0.01em;
}
article.body h2:first-child { margin-top: 0; }
article.body h2::before {
  content: ""; display: inline-block;
  width: 6px; height: 22px; background: var(--neon);
  border-radius: 3px; margin-right: 12px; vertical-align: -3px;
}
article.body h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 20px; margin: 28px 0 8px;
  color: var(--ink);
}
article.body h4 {
  font-weight: 700; font-size: 16px; margin: 20px 0 6px;
  color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em;
}
article.body p { margin: 12px 0; }
article.body strong { color: var(--ink); font-weight: 700; }
article.body em { color: var(--ink-soft); font-style: italic; }
article.body ul, article.body ol { padding-left: 22px; margin: 12px 0; }
article.body li { margin: 6px 0; }

article.body a {
  color: var(--brand-deep); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgba(46, 122, 72, 0.4);
}
article.body a:hover { text-decoration-color: var(--brand-deep); }

article.body code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--bg-soft); padding: 2px 6px; border-radius: 4px;
}

/* tables */
article.body table {
  width: 100%; border-collapse: collapse;
  margin: 18px 0;
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
article.body th, article.body td {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--card-edge);
}
article.body th {
  background: var(--bg-soft);
  font-weight: 700; color: var(--brand-deep);
}
article.body tr:last-child td { border-bottom: none; }

/* callouts */
.callout {
  border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 18px 0;
  border-left: 4px solid var(--brand);
  background: rgba(159, 232, 154, 0.18);
}
.callout.warn { background: var(--warn-bg); border-left-color: var(--warn-edge); }
.callout.danger { background: var(--danger-bg); border-left-color: var(--danger-edge); }
.callout-title {
  font-weight: 700; font-size: 14px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink); margin-bottom: 4px;
}
.callout p:last-child { margin-bottom: 0; }
.callout p:first-child { margin-top: 0; }

/* CTA button */
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--pink); color: var(--ink);
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; padding: 12px 22px;
  border-radius: 999px; text-decoration: none;
  border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 149, 160, 0.45);
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}
.cta:hover {
  background: var(--pink-deep); transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(233, 115, 128, 0.5);
}
.cta::after { content: "→"; font-size: 18px; }
.cta-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card); color: var(--brand-deep);
  border: 2px solid var(--brand); font-weight: 700;
  padding: 10px 20px; border-radius: 999px; text-decoration: none;
}
.cta-secondary:hover { background: var(--bg-soft); }

/* path card */
.path-card {
  background: var(--card); border: 1px solid var(--card-edge);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  padding: 22px 24px; margin: 16px 0;
  box-shadow: var(--shadow-soft);
}
.path-card h3 { margin-top: 0; }
.path-card .deadline {
  display: inline-block; background: var(--danger-bg);
  color: var(--ink); font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--danger-edge);
}

/* footer */
footer.site {
  background: var(--bg-soft); margin-top: 60px;
  padding: 36px 20px; text-align: center;
  border-top: 1px solid rgba(31, 42, 31, 0.08);
}
footer.site .ghost-mini { width: 48px; height: 48px; object-fit: contain; opacity: 0.9; }
footer.site p { font-size: 13px; color: var(--ink-faint); margin: 8px 0; max-width: 540px; margin-left: auto; margin-right: auto; }
footer.site a { color: var(--brand-deep); }

/* utility */
.text-meta { font-size: 13px; color: var(--ink-faint); }
.divider { height: 1px; background: var(--card-edge); margin: 28px 0; border: 0; }
.muted { color: var(--ink-faint); }

/* print */
@media print {
  .topnav, .toc, footer.site, .cta, .no-print { display: none !important; }
  body { background: #fff; }
  article.body { box-shadow: none; border: none; padding: 0; }
}
