/* StagBane- design tokens (single source of truth)
   Aesthetic: Atlassian-native + band signature.
   These same tokens are inlined per preview card so each renders standalone,
   and they intentionally match docs-site-mock / marketing-mock so brand, docs,
   and marketing stay coherent. */
:root {
  /* core */
  --sp-primary:        #0052CC;
  --sp-primary-hover:  #0747A6;
  --sp-primary-tint:   #DEEBFF;
  --sp-ink:            #172B4D;
  --sp-muted:          #5E6C84;
  --sp-line:           #DFE1E6;
  --sp-surface:        #F4F5F7;
  --sp-white:          #FFFFFF;

  /* four-band signature palette- lozenge style (tint bg + dark text + dot).
     Pairs are WCAG-AA checked (see foundations/colors.html). */
  --sp-critical-solid: #DE350B;
  --sp-critical-bg:    #FFEBE6;
  --sp-critical-text:  #BF2600;

  --sp-stale-solid:    #FF8B00;
  --sp-stale-bg:       #FFF7E6;
  --sp-stale-text:     #974F0C;

  --sp-watch-solid:    #FFC400;
  --sp-watch-bg:       #FFF7D6;
  --sp-watch-text:     #6B5900;

  --sp-healthy-solid:  #36B37E;
  --sp-healthy-bg:     #E3FCEF;
  --sp-healthy-text:   #006644;

  /* type */
  --sp-sans: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --sp-mono: ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;

  /* scale */
  --sp-radius: 8px;
  --sp-radius-pill: 999px;
  --sp-shadow: 0 1px 2px rgba(9,30,66,.08), 0 0 1px rgba(9,30,66,.16);
  --sp-shadow-raised: 0 4px 8px -2px rgba(9,30,66,.12), 0 0 1px rgba(9,30,66,.20);
}

/* Dark theme. Opt-in via a manual toggle that sets data-theme="dark" on <html>
   (not prefers-color-scheme- the chosen trigger is an explicit control, mirroring
   the app's settings drawer). Design-system mocks only for now; the shipping Custom
   UI queue stays light until a separate decision ports this over. The four-band hues
   keep their identity- tints deepen, text lightens. Text-on-tint pairs were recomputed
   for dark and clear WCAG-AA (see foundations/colors.html); confirm with an automated
   checker before any public use. */
:root[data-theme="dark"] {
  /* core */
  --sp-primary:        #579DFF;
  --sp-primary-hover:  #85B8FF;
  --sp-primary-tint:   #09326C;
  --sp-ink:            #DEE4EA;
  --sp-muted:          #9BA5B0;
  --sp-line:           #3C434A;
  --sp-surface:        #282E33;
  --sp-white:          #1D2125;   /* base canvas- token name kept for parity */

  /* four-band signature palette (dark) */
  --sp-critical-solid: #FF5630;
  --sp-critical-bg:    #5D1B0E;
  --sp-critical-text:  #FF9C8A;

  --sp-stale-solid:    #FFAB00;
  --sp-stale-bg:       #4A3415;
  --sp-stale-text:     #FFC284;

  --sp-watch-solid:    #FFC400;
  --sp-watch-bg:       #45400F;
  --sp-watch-text:     #FFE48A;

  --sp-healthy-solid:  #57D9A3;
  --sp-healthy-bg:     #133D2C;
  --sp-healthy-text:   #7EE2B8;

  /* scale- shadows read against a dark canvas */
  --sp-shadow:        0 1px 2px rgba(0,0,0,.40), 0 0 1px rgba(0,0,0,.55);
  --sp-shadow-raised: 0 6px 16px -4px rgba(0,0,0,.55), 0 0 1px rgba(0,0,0,.60);
}


/* StagBane site styles. Tokens come from ../design-system/tokens.css, which is
   prepended at build time- everything here must reference var(--sp-*) so the
   dark theme works. No hardcoded palette values outside the tokens file. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sp-sans);
  color: var(--sp-ink);
  background: var(--sp-white);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--sp-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--sp-primary); outline-offset: 2px; border-radius: 2px; }
img, svg { max-width: 100%; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--sp-primary); color: var(--sp-white); padding: 8px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* Header ------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--sp-line); background: var(--sp-white); }
.site-header-in {
  max-width: 1080px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--sp-ink); }
.brand:hover { text-decoration: none; }
.brand .word { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand .word .p { color: var(--sp-primary); }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--sp-muted); font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: 6px;
}
.site-header nav a:hover { background: var(--sp-surface); color: var(--sp-ink); text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--sp-primary); font-weight: 600; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  font: inherit; font-size: 13px; color: var(--sp-muted);
  background: none; border: 1px solid var(--sp-line); border-radius: 6px;
  padding: 6px 10px; cursor: pointer;
}
.theme-toggle:hover { background: var(--sp-surface); color: var(--sp-ink); }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-block; background: var(--sp-primary); color: var(--sp-white);
  font-weight: 700; font-size: 15px; border: 1px solid var(--sp-primary);
  border-radius: 9px; padding: 11px 20px; cursor: pointer;
}
.btn:hover { background: var(--sp-primary-hover); border-color: var(--sp-primary-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--sp-primary); border-color: var(--sp-primary); }
.btn-ghost:hover { background: var(--sp-primary-tint); color: var(--sp-primary); }
.btn-header { font-size: 13px; padding: 8px 14px; }

/* Main layout -------------------------------------------------------------- */
main { max-width: 1000px; margin: 0 auto; padding: 0 24px 80px; }
main.wide { max-width: 1160px; }
.page-head { padding: 56px 0 8px; max-width: 720px; }
.page-head h1 { font-size: 38px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
.page-sub { font-size: 18px; color: var(--sp-muted); margin: 0 0 16px; }

.section { padding: 48px 0 8px; }
.sec-h { font-size: 28px; letter-spacing: -0.01em; margin: 0 0 8px; }
.sec-sub { color: var(--sp-muted); max-width: 64ch; margin: 0 0 28px; }
.center { text-align: center; }
.center .sec-sub { margin-left: auto; margin-right: auto; }

/* Hero --------------------------------------------------------------------- */
.hero { padding: 72px 0 36px; text-align: center; max-width: 860px; margin: 0 auto; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--sp-primary); margin: 0 0 14px;
}
.hero h1 { font-size: 46px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero .lead { font-size: 19px; color: var(--sp-muted); max-width: 62ch; margin: 0 auto 26px; }
.cta-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.micro { font-size: 13px; color: var(--sp-muted); margin-top: 14px; }

/* Chip strip (trust band under hero) ---------------------------------------- */
.chip-strip {
  background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 12px;
  padding: 14px 0; margin: 28px 0 0;
}
.chip-strip .in { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--sp-ink);
  background: var(--sp-white); border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius-pill); padding: 6px 14px;
}

/* Card grids ----------------------------------------------------------------- */
.steps, .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 8px; padding: 0; list-style: none; }
.steps { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.step, .card { border: 1px solid var(--sp-line); border-radius: 12px; padding: 22px; background: var(--sp-white); }
.step .n { font-family: var(--sp-mono); font-size: 12px; color: var(--sp-primary); font-weight: 700; }
.step h3, .card h3 { margin: 8px 0 6px; font-size: 17px; }
.card h3:first-child { margin-top: 0; }
.step p, .card p { margin: 0 0 8px; font-size: 14px; color: var(--sp-muted); }
.step p:last-child, .card p:last-child { margin-bottom: 0; }
.card.feature-lead { grid-column: 1 / -1; background: var(--sp-surface); }
.card.feature-lead p { font-size: 15px; }

/* Explain / rule example ------------------------------------------------------ */
.explain {
  background: var(--sp-surface); border: 1px solid var(--sp-line);
  border-radius: 14px; padding: 28px; text-align: center; margin: 20px 0;
}
.rule-example {
  display: inline-block; font-size: 15px; background: var(--sp-white);
  border: 1px solid var(--sp-line); border-radius: 10px; padding: 12px 16px; margin-top: 10px;
}

/* Band pills ------------------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; border-radius: var(--sp-radius-pill); padding: 3px 12px;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.critical { background: var(--sp-critical-bg); color: var(--sp-critical-text); }
.pill.critical::before { background: var(--sp-critical-solid); }
.pill.stale { background: var(--sp-stale-bg); color: var(--sp-stale-text); }
.pill.stale::before { background: var(--sp-stale-solid); }
.pill.watch { background: var(--sp-watch-bg); color: var(--sp-watch-text); }
.pill.watch::before { background: var(--sp-watch-solid); }
.pill.healthy { background: var(--sp-healthy-bg); color: var(--sp-healthy-text); }
.pill.healthy::before { background: var(--sp-healthy-solid); }

/* Quote strip (community problem evidence) ------------------------------------- */
.quote-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.quote {
  border: 1px solid var(--sp-line); border-left: 3px solid var(--sp-primary);
  border-radius: 0 12px 12px 0; padding: 18px 20px; background: var(--sp-white); margin: 0;
}
.quote p { margin: 0 0 10px; font-size: 15px; }
.quote cite { font-style: normal; font-size: 13px; color: var(--sp-muted); }
.quote-framing { font-size: 14px; color: var(--sp-muted); margin: 0 0 10px; }

/* Horizontal band for a SINGLE quote- full content width, no grid dead space. */
.quote-band {
  display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap;
  border-left: 3px solid var(--sp-primary); background: var(--sp-surface);
  border-radius: 0 10px 10px 0; padding: 12px 18px; margin: 0 0 22px;
}
.quote-band p { margin: 0; font-size: 14.5px; flex: 1 1 46ch; }
.quote-band cite { font-style: normal; font-size: 13px; color: var(--sp-muted); white-space: nowrap; }

/* Pricing ---------------------------------------------------------------------- */
.price-card {
  border: 1px solid var(--sp-line); border-radius: 14px; padding: 30px;
  text-align: center; max-width: 460px; margin: 24px auto; background: var(--sp-white);
  box-shadow: var(--sp-shadow);
}
.price-card .amt { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.price-card .amt span { font-size: 15px; color: var(--sp-muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 20px; color: var(--sp-muted); font-size: 14.5px; }
.price-card li { margin: 6px 0; }

/* FAQ ---------------------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--sp-line); padding: 4px 0; }
.faq-item summary { font-size: 16.5px; font-weight: 600; padding: 12px 0; cursor: pointer; }
.faq-item summary:hover { color: var(--sp-primary); }
.faq-item p, .faq-item li { color: var(--sp-muted); font-size: 15px; }
.faq-item > p { margin-top: 0; }

/* Tables --------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border: 1px solid var(--sp-line); padding: 8px 12px; text-align: left; vertical-align: top; }
th { background: var(--sp-surface); }

/* CTA band ---------------------------------------------------------------------------- */
.cta-band {
  background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 14px;
  padding: 36px 28px; text-align: center; margin: 48px 0 0;
}
.cta-band h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.01em; }
.cta-band p { color: var(--sp-muted); margin: 0 0 20px; }

/* Docs ------------------------------------------------------------------------------ */
.docs-layout { display: flex; gap: 40px; padding-top: 40px; }
.docs-sidebar { width: 230px; flex: 0 0 230px; position: sticky; top: 24px; align-self: flex-start; }
.docs-brand { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--sp-muted); margin: 4px 10px 10px; }
.docs-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.docs-link { display: block; padding: 7px 10px; border-radius: 6px; color: var(--sp-ink); font-size: 14px; }
.docs-link:hover { background: var(--sp-surface); text-decoration: none; }
.docs-link[aria-current="page"] { background: var(--sp-primary-tint); color: var(--sp-primary); font-weight: 600; }

.docs-article { flex: 1; min-width: 0; max-width: 760px; }
.docs-article h1 { font-size: 32px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.01em; }
.docs-article h2 { font-size: 22px; margin: 36px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--sp-line); }
.docs-article h3 { font-size: 17.5px; margin: 26px 0 8px; }
.docs-article p, .docs-article li { font-size: 15.5px; }
.docs-article code {
  background: var(--sp-surface); padding: 2px 5px; border-radius: 4px;
  font-size: 13.5px; font-family: var(--sp-mono);
}
.docs-article pre { background: var(--sp-surface); padding: 14px 16px; border-radius: 8px; overflow: auto; }
.docs-article pre code { background: none; padding: 0; }
.docs-article blockquote {
  margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--sp-primary);
  background: var(--sp-surface); color: var(--sp-muted); border-radius: 0 6px 6px 0;
}
.docs-article blockquote p { margin: 4px 0; }
.docs-article hr { border: none; border-top: 1px solid var(--sp-line); margin: 32px 0; }
.docs-article ul, .docs-article ol { padding-left: 22px; }
.docs-article li { margin: 4px 0; }
.docs-article img { border: 1px solid var(--sp-line); border-radius: 8px; }

/* Blog -------------------------------------------------------------------------------- */
.post-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 18px; }
.post-card { border: 1px solid var(--sp-line); border-radius: 12px; padding: 22px; }
.post-card h2 { margin: 4px 0 8px; font-size: 21px; }
.post-card p { margin: 0; color: var(--sp-muted); font-size: 15px; }
.post-date { font-size: 13px; color: var(--sp-muted); margin: 0 0 4px; }
.blog-article { margin: 40px auto 0; }
.blog-article .post-footer { border-top: 1px solid var(--sp-line); margin-top: 36px; padding-top: 16px; font-size: 14.5px; }

/* Footer ------------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--sp-line); margin-top: 40px; background: var(--sp-surface); }
.site-footer-in { max-width: 1080px; margin: 0 auto; padding: 28px 24px; text-align: center; color: var(--sp-muted); font-size: 13.5px; }
.site-footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.site-footer a { color: var(--sp-muted); }
.site-footer a:hover { color: var(--sp-primary); }
.footer-note { margin: 6px 0 0; }

/* Responsive ------------------------------------------------------------------------------ */
@media (max-width: 860px) {
  .hero h1 { font-size: 34px; }
  .page-head h1 { font-size: 30px; }
  .steps, .cards, .cards.two, .quote-strip { grid-template-columns: 1fr; }
  .docs-layout { flex-direction: column; gap: 12px; }
  .docs-sidebar { width: 100%; flex: none; position: static; }
  .docs-sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .header-actions { margin-left: 0; }
}
