/* ======= CSS RESET (trimmed) ======= */
*,
*::before,
*::after {
  box-sizing: border-box
}

body {
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-size: 100% !important;
  background-blend-mode: overlay !important;
  background-repeat: no-repeat !important;
  background-position: 50% 0 !important;
  background-attachment: fixed !important;
}

img {
  max-width: 100%;
  display: block;
  height: auto
}

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

button {
  font: inherit
}

/* ======= THEME ======= */
:root {
  --bg: #0e0f12;
  /* dark background for comfy reading */
  --surface: #14161b;
  /* cards & header */
  --text: #e9ecf1;
  /* primary text */
  --muted: #b6bdc7;
  /* secondary text */
  --brand: #4ea1ff;
  /* links & accents */
  --accent: #ffbf69;
  /* subtle accents (e.g., highlights) */
  --border: #242936;
  /* outlines */
  --ok: #2ecc71;
  --warn: #f1c40f;
  --bad: #e74c3c;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .25);
  --content-w: 1100px;
  --sidebar-w: 320px;
  --gutter: 28px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  background-image: url(/assets/img/hero/infosprout.png);
}

/* ======= LAYOUT ======= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 22, 27, .8);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--border)
}

.wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 20px
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
  display: inline-block
}

.nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted)
}

.nav a:hover {
  background: #1b1e25;
  color: var(--text)
}

.page {
  display: grid;
  grid-template-columns: 1fr minmax(260px, var(--sidebar-w));
  gap: var(--gutter);
  align-items: start;
  padding: 28px 0
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr
  }
}

/* ======= BREADCRUMBS ======= */
.breadcrumbs {
  font-size: .9rem;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0 6px
}

.breadcrumbs a {
  color: var(--muted)
}

.breadcrumbs a:hover {
  color: var(--text)
}

/* ======= ARTICLE ======= */
article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow)
}

.article-header {
  padding: 28px;
  padding-bottom: 0
}

.kicker {
  color: var(--brand);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .85rem
}

h1 {
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
  line-height: 1.25;
  margin: .3em 0 .2em
}

.read-time>svg {
  width: 24px;
  height: 24px;
  border: 1px solid var(--text);
  border-radius: 50%;
}

.meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .95rem
}

.meta .chip {
  background: #1b1f2a;
  color: #c5ccda;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px
}

.hero {
  margin-top: 18px
}

.hero img {
  border-radius: var(--radius-sm)
}

.hero figcaption {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 8px
}

.article-body {
  padding: 0 28px 28px;
}

.article-body p {
  margin: 1em 0;
  font-size: 1.04rem;
  text-align: justify;
}

.article-body h2 {
  margin: 1.6em 0 .6em;
  font-size: 1.4rem
}

.article-body h3 {
  margin: 1.2em 0 .4em;
  font-size: 1.18rem
}

.article-body pre,
.article-body code {
  font-family: var(--mono)
}

.article-body blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--brand);
  background: #12141a;
  border-radius: 0 12px 12px 0
}

/* in-article ad slots */
.ad {
  border: 1px dashed #334;
  border-radius: 14px;
  background: #0f1218;
  color: #9bb0d1;
  text-align: center;
  padding: 14px;
  font-size: .95rem;
  margin: 22px 0
}

/* ======= FAQ (Article-owned) ======= */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #11141a;
  margin: 28px 0
}

.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border)
}

.faq-items {
  padding: 6px 10px
}

details.faq-item {
  border-radius: 12px;
  overflow: hidden
}

details.faq-item+details.faq-item {
  margin-top: 8px
}

.faq .pill {
  color: var(--muted);
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 12px;
  border-radius: 12px;
  outline: none
}

summary::-webkit-details-marker {
  display: none
}

summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(78, 161, 255, .45)
}

.faq-q {
  font-weight: 600
}

.faq-a {
  padding: 0 12px 14px;
  color: #cbd4e1
}

/* ======= Cross-link Questions (to other articles) ======= */
.crossfaq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0f1218;
  margin: 22px 0
}

.crossfaq h2 {
  font-size: 1.15rem;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border)
}

.crossfaq ul {
  list-style: none;
  margin: 0;
  padding: 10px
}

.crossfaq li {
  margin: 6px 0
}

.crossfaq a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cfe1ff;
  border: 1px solid transparent
}

.crossfaq a:hover {
  background: #121827;
  border-color: #283146
}

/* ======= SIDEBAR ======= */
.sidebar {
  position: sticky;
  top: 86px
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden
}

.card h3 {
  font-size: 1.05rem;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: #dbe6f7
}

.card .inner {
  padding: 12px 16px
}

.toc {
  max-height: 60vh;
  overflow: auto
}

.toc a {
  display: block;
  padding: 8px 6px;
  color: #cfe1ff;
  border-left: 2px solid transparent
}

.toc a:hover {
  background: #121827;
  border-left-color: var(--brand)
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #1b1f2a;
  border: 1px solid var(--border);
  color: #c5ccda;
  font-size: .92rem
}

/* ======= FOOTER NAV ======= */
.article-footer {
  padding: 0 28px 28px
}

.prevnext {
  display: flex;
  gap: 14px;
  flex-wrap: wrap
}

.pn {
  flex: 1 1 280px;
  border: 1px solid var(--border);
  background: #0f1218;
  border-radius: 14px;
  padding: 14px 16px
}

.pn small {
  color: var(--muted);
  display: block;
  margin-bottom: 6px
}

/* ======= UTIL ======= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

.muted {
  color: var(--muted)
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10131a;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand)
}

.site-footer {
  background: #14161b;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0;
  color: var(--muted);
  font-size: .95rem
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px
}

.footer-nav a {
  color: var(--muted);
  padding: 4px 0
}

.footer-nav a:hover {
  color: var(--text)
}

.footer-meta {
  flex: 1 1 100%
}

.footer-meta p {
  margin: 0;
  color: var(--muted)
}
