/* Stellate Ganglion Block Portland — calm dusk palette, serif editorial */
:root {
  color-scheme: only light;

  /* core dusk palette */
  --ink: #1c2340;
  --indigo: #2e3a8c;
  --indigo-deep: #202a6b;
  --sky: #a8b8ff;          /* decorative fill only (brand mark, gradients) */
  --mist: #eef1fb;
  --paper: #fbfbfe;

  /* text-safe companions — audited; re-check with audit_contrast.py */
  --muted-text: #5a628a;   /* lede, nav, teasers, step copy */
  --sky-text: #bcc8ff;     /* sky-family text on indigo / ink */
  --foot-text: #c6ccec;    /* footer body copy on --ink */
  --foot-dim: #b3bbe2;     /* disclaimer + copyright: small, but must read clearly */

  /* rules */
  --line: #e3e6f5;         /* decorative hairline separators */
  --line-strong: #7c84b0;  /* borders that define an interactive component */
  --quote-rule: #7b86c8;   /* the "this is quoted" marker on .article-body */

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  overflow-wrap: break-word;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; overflow-wrap: break-word; }
a { color: var(--indigo); }
p { margin-bottom: 1rem; }
img, svg { max-width: 100%; height: auto; }


/* ---- featured / related / hub pages ---- */
/* featured articles on the homepage */
.featured { padding: 3rem 0; }
.featured h2 { font-size: 1.9rem; margin-bottom: 1.4rem; }
.featured-more { margin-top: 1.2rem; }
.featured-more a { font-weight: 600; text-decoration: none; }

/* related reading on an article page */
.related { margin: 2.5rem 0 0; padding: 1.5rem 1.8rem; background: var(--mist); border-radius: 1.2rem; }
.related h2 { font-size: 1.15rem; margin-bottom: .7rem; }
.related ul { list-style: none; display: grid; gap: .55rem; }
.related li a { text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line-strong); }
.related li a:hover { border-bottom-color: var(--indigo); }

/* hub pages */
.hub { max-width: 760px; margin: 0 auto; padding: 3rem 0; }
.hub h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 1rem; }
.hub .hub-lede { font-size: 1.15rem; color: var(--muted-text); margin-bottom: 2rem; }
.hub h2 { font-size: 1.6rem; margin: 2.4rem 0 .8rem; }
.hub h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
.hub ul, .hub ol { margin: 0 0 1.2rem 1.3rem; }
.hub li { margin-bottom: .5rem; }
.hub table { width: 100%; border-collapse: collapse; margin: 1.2rem 0 1.8rem; font-size: .95rem; }
.hub th, .hub td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.hub th { font-family: var(--serif); font-weight: 600; }
.hub dl { margin-bottom: 1.4rem; }
.hub dt { font-family: var(--serif); font-weight: 600; margin-top: 1rem; }
.hub dd { margin-left: 0; color: var(--muted-text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* skip link — hidden until keyboard focus, never display:none */
.skip-link {
  position: absolute;
  top: .5rem;
  left: .75rem;
  z-index: 999;
  transform: translateY(calc(-100% - 1rem));
  background: var(--indigo);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: .7rem 1.2rem;
  border-radius: .6rem;
  box-shadow: 0 6px 20px rgba(28, 35, 64, .35);
}
.skip-link:focus { transform: translateY(0); }

/* focus-visible — replaces, never removes, the default outline */
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 3px; }
a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.skip-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cta-band a:focus-visible { outline-color: #fff; }
.site-footer a:focus-visible { outline-color: var(--sky-text); }
.faq summary:focus-visible { outline-offset: 2px; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .55rem; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--sky), var(--indigo)); display: inline-block; flex: none; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.4rem; }
.site-header nav a { text-decoration: none; color: var(--muted-text); font-size: .95rem; font-weight: 500; }
.site-header nav a:hover { color: var(--indigo); }
.nav-cta { background: var(--indigo); color: #fff !important; padding: .5rem 1.1rem; border-radius: 999px; }
.nav-cta:hover { background: var(--indigo-deep); }

/* hero */
.hero { text-align: center; padding: 4.5rem 1rem 3.5rem; background: radial-gradient(ellipse at 50% 0%, var(--mist) 0%, var(--paper) 75%); border-radius: 0 0 2rem 2rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); max-width: 780px; margin: 0 auto 1.2rem; }
.hero .lede { font-size: 1.15rem; color: var(--muted-text); max-width: 640px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* buttons */
.btn { display: inline-block; text-decoration: none; padding: .8rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-deep); }
.btn-secondary { border: 1.5px solid var(--indigo); color: var(--indigo); }
.btn-secondary:hover { background: var(--mist); }

/* sections */
section { padding: 3rem 0; }
.section-label { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--indigo); margin-bottom: .6rem; }
section h2 { font-size: 1.9rem; margin-bottom: 1rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.step { background: var(--mist); border-radius: 1.2rem; padding: 1.5rem; }
.step .num { font-family: var(--serif); font-size: 2rem; color: var(--indigo); display: block; margin-bottom: .4rem; }
.step h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.step p { font-size: .93rem; color: var(--muted-text); margin: 0; }

.who-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; margin-top: 1.4rem; }
.who-list li { background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: 1rem 1.2rem; font-size: .95rem; }
.who-list strong { display: block; font-family: var(--serif); font-size: 1.05rem; margin-bottom: .2rem; }

.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { font-weight: 600; cursor: pointer; font-size: 1.02rem; }
.faq details p { margin: .8rem 0 0; color: var(--muted-text); }

.cta-band { background: linear-gradient(120deg, var(--indigo-deep), var(--indigo)); color: #fff; border-radius: 1.5rem; text-align: center; padding: 3rem 1.5rem; margin: 2rem 0 3rem; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--sky-text); max-width: 560px; margin: 0 auto 1.6rem; }
.cta-band .btn-primary { background: #fff; color: var(--indigo-deep); }
.cta-band .btn-primary:hover { background: var(--mist); color: var(--indigo-deep); }

/* articles list */
.articles-hero { padding: 3rem 0 1rem; max-width: 700px; }
.articles-hero h1 { font-size: 2.3rem; margin-bottom: .8rem; }
.articles-hero p { color: var(--muted-text); }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; padding-bottom: 3rem; }
.post-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line-strong); border-radius: 1.2rem; padding: 1.6rem 1.8rem; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: 0 10px 30px rgba(46, 58, 140, .12); transform: translateY(-2px); border-color: var(--indigo); }
.post-card h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.post-date { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-text); margin-bottom: .3rem; }
.post-teaser { color: var(--muted-text); font-size: .95rem; margin-bottom: .6rem; }
.post-more { color: var(--indigo); font-weight: 600; font-size: .9rem; }

/* article page */
.article-page { max-width: 720px; margin: 0 auto; padding: 3rem 0; }
.article-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--indigo); }
.article-page h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: .5rem 0; }
.article-date { color: var(--muted-text); font-size: .9rem; margin-bottom: 2rem; }
.article-date time { color: inherit; font-style: normal; white-space: nowrap; }

/* the excerpt is a <blockquote>: reset the UA margin/indent, then mark it as
   quoted material with a calm left rule — still long-form reading, not a pull-quote */
blockquote.article-body {
  margin: 0;
  padding: .25rem 0 .25rem 1.5rem;
  border-left: 3px solid var(--quote-rule);
  font-size: 1.06rem;
  quotes: none;
}
blockquote.article-body p { font-size: 1em; }
blockquote.article-body p:last-child { margin-bottom: 0; }
blockquote.article-body::before,
blockquote.article-body::after { content: none; }

.read-full { background: var(--mist); border-radius: 1.2rem; padding: 1.8rem; margin-top: 2rem; }
.read-full p { font-size: .95rem; color: var(--muted-text); }
.read-full .btn { margin: .3rem .6rem .3rem 0; }
.source-link { margin: .9rem 0 0; font-size: .95rem; }
.source-link a { color: var(--indigo); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; }
.source-link a:hover { color: var(--indigo-deep); }
.back-link { margin-top: 2rem; }
.back-link a { text-decoration: none; font-weight: 600; }

/* original site-authored commentary under the quoted excerpt */
.commentary { margin: 2rem 0 0; }
.commentary h2 { font-size: 1.35rem; margin: 1.6rem 0 .6rem; }
.commentary p { color: var(--ink); }

/* about + 404 */
.about-page, .notfound { max-width: 700px; margin: 0 auto; padding: 3.5rem 0; }
.about-page h1, .notfound h1 { font-size: 2.2rem; margin-bottom: 1.2rem; }

/* footer */
.site-footer { background: var(--ink); color: var(--foot-text); margin-top: 2rem; padding: 3rem 0; font-size: .92rem; }
.site-footer a { color: var(--sky-text); }
.foot-brand { font-family: var(--serif); font-size: 1.2rem; color: #fff; }
.disclaimer { font-size: .8rem; color: var(--foot-dim); margin-top: 1.2rem; line-height: 1.65; }
.copyright { font-size: .8rem; color: var(--foot-dim); }

/* ---- responsive ---- */
/* intermediate step: 3+ column grids drop to 2 across the tablet band */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { gap: 2rem; }
}
@media (max-width: 720px) {
  .steps, .who-list, .two-col { grid-template-columns: minmax(0, 1fr); }
  .site-header .wrap { flex-direction: column; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .cta-band { padding: 2.25rem 1.25rem; }
  .post-card { padding: 1.35rem 1.25rem; }
  .read-full { padding: 1.35rem 1.25rem; }
}
@media (max-width: 400px) {
  .site-header nav { gap: .9rem; justify-content: center; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  blockquote.article-body { padding-left: 1rem; }
}

/* ---- print ---- */

/* ---- featured images ---- */
.article-figure { margin: 0 0 2rem; }
.article-figure img { width: 100%; height: auto; display: block; border-radius: 1.2rem; }
.post-card { display: grid; grid-template-columns: 200px 1fr; gap: 1.4rem; align-items: start; }
.post-card .post-thumb { grid-row: 1 / span 4; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: .9rem; }
.post-card > :not(.post-thumb) { grid-column: 2; }
.featured .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.featured .post-card { display: flex; flex-direction: column; gap: 0; }
.featured .post-card .post-thumb { aspect-ratio: 16 / 9; margin-bottom: .9rem; border-radius: .9rem; }
@media (max-width: 720px) {
  .post-card { grid-template-columns: minmax(0, 1fr); }
  .post-card .post-thumb { grid-row: auto; aspect-ratio: 16 / 9; margin-bottom: .6rem; }
  .post-card > :not(.post-thumb) { grid-column: 1; }
  .featured .post-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ---- narrow-screen safety ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2rem 0 1.8rem; }
.table-scroll table { margin: 0; min-width: 100%; }
.post-thumb, .article-figure img { max-width: 100%; min-width: 0; }
.post-card { min-width: 0; }


/* ---- nav submenu (keeps the bar on one line; no JS) ---- */
.submenu { position: relative; }
.submenu > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
}
.submenu > summary::-webkit-details-marker { display: none; }
.submenu > summary::after { content: "\25BE"; font-size: .7em; line-height: 1; transform: translateY(1px); }
.submenu[open] > summary::after { transform: rotate(180deg) translateY(-1px); }
.submenu-panel {
  position: absolute; top: calc(100% + .55rem); left: 0; z-index: 60;
  min-width: 15rem; display: grid; gap: .1rem; padding: .5rem;
  background:#fff;border:1px solid var(--line-strong);border-radius:.9rem;box-shadow:0 12px 32px rgba(28,35,64,.16);
}
.submenu-panel a { display: block; padding: .5rem .7rem; white-space: nowrap; color:var(--muted-text);text-decoration:none;font-size:.93rem;border-radius:.55rem; }
.submenu-panel a:hover, .submenu-panel a:focus-visible { background:var(--mist);color:var(--indigo); }
@media (max-width: 720px) {
  .submenu { width: 100%; }
  .submenu-panel { position: static; min-width: 0; width: 100%; margin-top: .4rem; }
  .submenu-panel a { white-space: normal; }
}


.site-header .submenu > summary { color: var(--muted-text); font-size: .95rem; font-weight: 500; }
.site-header .submenu > summary:hover, .site-header .submenu[open] > summary { color: var(--indigo); }
.site-header .submenu-panel a:hover, .site-header .submenu-panel a:focus-visible { background: var(--mist); color: var(--indigo); }

@media print {
  :root { --muted-text: #333; --line: #999; }
  html { scroll-behavior: auto; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; line-height: 1.5; }
  .skip-link, .site-header, .site-header nav, .nav-cta,
  .cta-band, .hero-ctas, .back-link, .read-full .btn { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  section, .article-page, .about-page, .notfound { padding: .75rem 0; }
  .hero { background: none !important; border-radius: 0; padding: 0 0 1rem; text-align: left; }
  h1, h2, h3 { color: #000 !important; page-break-after: avoid; }
  p, blockquote.article-body { orphans: 3; widows: 3; }
  a { color: #000 !important; text-decoration: underline; }
  .section-label, .article-eyebrow, .post-more { color: #000 !important; }
  .hero .lede, .step p, .post-teaser, .post-date, .article-date,
  .articles-hero p, .faq details p, .read-full p { color: #333 !important; }
  .step, .who-list li, .read-full, .post-card {
    background: #fff !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
    transform: none !important;
  }
  blockquote.article-body { border-left: 2px solid #666; }
  .faq details { border-bottom: 1px solid #999; }
  .site-footer { background: #fff !important; color: #000 !important; border-top: 1px solid #999; padding: 1rem 0 0; margin-top: 1rem; }
  .site-footer a, .foot-brand, .disclaimer, .copyright { color: #000 !important; }
  .disclaimer { font-size: 9pt; }
  .source-link a::after { content: " (" attr(href) ")"; font-weight: 400; word-break: break-all; }
}

/* Homepage row teasing the "What is SGB?" explainer */
.explainer-row { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center;
  justify-content: space-between; margin: 2.4rem 0; padding: 1.6rem 1.8rem;
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; }
.explainer-copy { flex: 1 1 22rem; min-width: 0; }
.explainer-kicker { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-text); margin-bottom: .3rem; }
.explainer-row h2 { font-size: 1.35rem; margin: 0 0 .45rem; }
.explainer-row p { margin: 0; color: var(--muted-text); }
.explainer-more { white-space: nowrap; font-weight: 600; }
