:root {
  --bg: #050b16;
  --panel: rgba(14, 28, 50, 0.78);
  --text: #f4f7fc;
  --muted: #9fafc6;
  --line: rgba(255, 255, 255, 0.1);
  --brand: #6ef0c8;
  --blue: #7db0ff;
  --amber: #ffd27a;
  --max: 820px;
  --max-wide: 1180px;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 50% at 12% -8%, rgba(70, 150, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 4%, rgba(47, 199, 162, 0.16), transparent 50%),
    linear-gradient(180deg, #07101f 0%, #050b16 45%, #040914 100%);
}
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #fff;
  color: #000;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap {
  width: min(calc(100% - 2rem), var(--max-wide));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 11, 22, 0.72);
  backdrop-filter: blur(18px) saturate(1.3);
}
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #061510;
  font-weight: 900;
  font-size: 0.78rem;
  background: linear-gradient(145deg, #8ff5d6, var(--brand) 45%, #3fd4ad);
  box-shadow: 0 0 0 5px rgba(112, 225, 194, 0.1);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.button-primary,
.button-secondary,
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 750;
  border: 1px solid transparent;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button-primary,
.nav-cta {
  color: #04150f;
  background: linear-gradient(180deg, #8ef4d4, var(--brand));
  box-shadow: 0 12px 28px rgba(47, 199, 162, 0.25);
}
.button-primary:hover,
.nav-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #a4f8df, #7eefd0);
}
.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.button-secondary:hover {
  border-color: rgba(112, 225, 194, 0.5);
  background: rgba(112, 225, 194, 0.08);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, h3 {
  margin-top: 0;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #fff 20%, #c9d7ec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 2.5rem 0 0.9rem;
}
h3 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.55rem;
}
.lede, .prose p, .prose li {
  color: var(--muted);
}
.lede {
  font-size: 1.12rem;
  max-width: 62ch;
}
.prose a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(110, 240, 200, 0.35);
}
.prose a:hover {
  color: #a4f8df;
  border-bottom-color: rgba(164, 248, 223, 0.8);
}
.prose a[href*="flow-chart.io"] { color: var(--brand); }

.hero-article {
  padding: 4.5rem 0 2rem;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: #7f90a8;
  font-size: 0.9rem;
  margin: 1rem 0 0;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.breadcrumbs a {
  color: #cfe0ff;
  text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { opacity: 0.55; }

.disclosure {
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 210, 122, 0.28);
  border-radius: 16px;
  background: rgba(255, 210, 122, 0.08);
  color: #ffe8b8;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.disclosure strong { color: #fff6dc; }

.answer-box,
.callout,
.related-card,
.guide-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
}
.answer-box {
  padding: 1.25rem 1.35rem;
  margin: 1.5rem 0 2rem;
  border-color: rgba(110, 240, 200, 0.3);
  background:
    radial-gradient(circle at 0% 0%, rgba(47, 199, 162, 0.12), transparent 50%),
    var(--panel);
}
.answer-box h2 {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.65rem;
}
.answer-box p { margin: 0.4rem 0; color: var(--muted); }
.answer-box p strong { color: var(--text); }

.callout {
  padding: 1.1rem 1.2rem;
  margin: 1.5rem 0;
}
.callout p { margin: 0.35rem 0; color: var(--muted); }

.article-body {
  padding-bottom: 3rem;
}
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 1.25rem 0 1.75rem;
  background: var(--panel);
}
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}
th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}
th {
  color: #dce7f7;
  background: #102039;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
td:first-child, th:first-child { color: var(--text); font-weight: 750; }
tbody tr:last-child td { border-bottom: 0; }

.cta-band {
  margin: 2.5rem 0 1rem;
  padding: 1.6rem;
  border-radius: 22px;
  border: 1px solid rgba(112, 225, 194, 0.3);
  text-align: center;
  background: linear-gradient(135deg, rgba(47, 199, 162, 0.12), rgba(115, 167, 255, 0.08));
}
.cta-band h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0.4rem 0 0.7rem;
}
.cta-band p { color: var(--muted); margin: 0 auto 1.1rem; max-width: 52ch; }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 3rem;
}
.guide-card {
  padding: 1.25rem;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
  display: block;
}
.guide-card:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 240, 200, 0.4);
}
.guide-card .label {
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.guide-card h3 {
  margin: 0.55rem 0 0.45rem;
  color: var(--text);
}
.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.related {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 2rem;
}
.related-card {
  padding: 1rem 1.15rem;
  text-decoration: none;
  display: block;
  transition: border-color 150ms ease;
}
.related-card:hover { border-color: rgba(110, 240, 200, 0.4); }
.related-card strong { display: block; color: var(--text); margin-bottom: 0.2rem; }
.related-card span { color: var(--muted); font-size: 0.92rem; }

footer.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
footer a { color: #d8e4f5; text-decoration: none; }
footer a:hover { color: var(--brand); }
footer a[href*="flow-chart.io"] { color: var(--brand); font-weight: 750; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.7rem;
}
.faq summary {
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] {
  border-color: rgba(110, 240, 200, 0.28);
  background: rgba(110, 240, 200, 0.04);
}
.faq details p {
  margin: 0;
  padding: 0 1.1rem 1rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .guides-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
