@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');

/* ============================================================
   PULSETECH DOCS: refined terminal
   ============================================================
   Ports the design language of mypulsetech.com (see assets/pulse.css)
   onto Material for MkDocs, adapted for long-form reference reading:

   - Marketing site shouts: 76px display type, full-page scanlines, glow.
   - Docs whisper: the terminal vocabulary moves into the *chrome*
     (nav, labels, code frames, callout titles) and stays out of body copy,
     which keeps its comfortable Inter and generous line-height.

   Loaded after extra.css, so it wins ties. Delete this file and its
   extra_css entry in mkdocs.yml to revert the whole look.
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */

[data-md-color-scheme="slate"] {
  --pt-bg:          #070809;
  --pt-bg-elev:     #0c0e11;
  --pt-surface:     #11141a;
  --pt-surface-2:   #161a22;
  --pt-border:      #1e242d;
  --pt-border-lit:  #2c3540;
  --pt-accent:      #3b9dd4;
  --pt-accent-lit:  #5fb6e8;
  --pt-glow:        rgba(59, 157, 212, 0.16);
  --pt-glow-strong: rgba(59, 157, 212, 0.30);
  --pt-text:        #eef2f6;
  --pt-text-dim:    #97a3b0;
  --pt-text-faint:  #59636e;
  --pt-amber:       #ffaa00;
  --pt-green:       #22c55e;
  --pt-red:         #ff3366;
  --pt-on-accent:   #04111c;
}

/* Light mode is the same system on paper rather than on a screen: identical
   structure and mono chrome, ink and hairlines instead of glow. */
[data-md-color-scheme="default"] {
  --pt-bg:          #ffffff;
  --pt-bg-elev:     #f8fafc;
  --pt-surface:     #ffffff;
  --pt-surface-2:   #f1f5f9;
  --pt-border:      #e2e8f0;
  --pt-border-lit:  #cbd5e1;
  --pt-accent:      #2d8abc;
  --pt-accent-lit:  #1f6d97;
  --pt-glow:        rgba(45, 138, 188, 0.14);
  --pt-glow-strong: rgba(45, 138, 188, 0.22);
  --pt-text:        #0f172a;
  --pt-text-dim:    #475569;
  --pt-text-faint:  #7c8899;
  --pt-amber:       #b45309;
  --pt-green:       #15803d;
  --pt-red:         #be123c;
  --pt-on-accent:   #ffffff;
}

:root {
  --pt-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --pt-display: 'Space Grotesk', 'Inter', sans-serif;
}

::selection { background: var(--pt-accent); color: var(--pt-on-accent); }

/* ── Header + tabs: near-black bar, hairline, mono nav ───── */

.md-header {
  background-color: var(--pt-bg) !important;
  border-bottom: 1px solid var(--pt-border) !important;
  box-shadow: none !important;
}
.md-header__title { font-family: var(--pt-display); letter-spacing: -0.01em; }

.md-tabs {
  background-color: var(--pt-bg) !important;
  border-bottom: 1px solid var(--pt-border);
}
.md-tabs__link {
  font-family: var(--pt-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 1;
  color: var(--pt-text-dim);
  transition: color 0.2s;
}
.md-tabs__link:hover,
.md-tabs__link--active { color: var(--pt-accent); }

/* Active tab gets the accent rule, not a heavy underline. */
.md-tabs__item--active { position: relative; }
.md-tabs__item--active::after {
  content: '';
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0;
  height: 1px;
  background: var(--pt-accent);
  box-shadow: 0 0 12px var(--pt-glow-strong);
}

/* ── Sidebar + TOC: mono section labels ─────────────────── */

.md-nav__title {
  font-family: var(--pt-mono);
  font-size: 11px !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pt-text-faint) !important;
}
.md-nav__link { transition: color 0.2s; }
.md-nav__link--active,
.md-nav__link:hover { color: var(--pt-accent) !important; }

/* Second-level nav gets a hairline spine, like a file tree. */
.md-sidebar--primary .md-nav__list .md-nav__list {
  border-left: 1px solid var(--pt-border);
  margin-left: 0.6rem;
  padding-left: 0.35rem;
}

/* ── Typography: display headings, mono accents ─────────── */

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: var(--pt-display);
  letter-spacing: -0.02em;
  color: var(--pt-text);
}

.md-typeset h1 {
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

/* The signature: section headings are marked with a short accent rule, the
   same device the marketing site uses for `// section tag`. */
.md-typeset h2 {
  font-weight: 600;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--pt-border);
  position: relative;
}
.md-typeset h2::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 34px; height: 1px;
  background: var(--pt-accent);
  box-shadow: 0 0 12px var(--pt-glow-strong);
}
.md-typeset h1 + h2 { margin-top: 1.6rem; }

.md-typeset h3 { font-weight: 600; }

.md-typeset a { color: var(--pt-accent); }
.md-typeset a:hover { color: var(--pt-accent-lit); }

/* ── Code: terminal window frames ───────────────────────── */

.md-typeset .highlight,
.md-typeset .highlighttable {
  border: 1px solid var(--pt-border);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--pt-bg-elev);
}

/* Window chrome: three dots on a hairline bar. Drawn with gradients so no
   markup changes are needed; every fenced block gets it for free. */
.md-typeset .highlight::before,
.md-typeset .highlighttable::before {
  content: '';
  display: block;
  height: 34px;
  background-color: var(--pt-surface);
  background-image:
    radial-gradient(circle 4.5px at 16px 17px, var(--pt-red) 100%, transparent 0),
    radial-gradient(circle 4.5px at 33px 17px, var(--pt-amber) 100%, transparent 0),
    radial-gradient(circle 4.5px at 50px 17px, var(--pt-green) 100%, transparent 0);
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--pt-border);
}

.md-typeset .highlight pre,
.md-typeset .highlighttable pre { margin: 0; }
.md-typeset .highlight > pre > code { border-radius: 0; }
.md-typeset pre > code { font-size: 0.76rem; line-height: 1.75; }

/* A ```python title="app.py" fence renders a filename, so sit it in the bar. */
.md-typeset .highlight span.filename {
  position: absolute;
  top: 0; left: 68px; right: 2.4rem;
  height: 34px;
  line-height: 34px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-family: var(--pt-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--pt-text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Copy button belongs in the chrome bar, not floating over the code. */
.md-typeset .highlight .md-clipboard {
  top: 0;
  height: 34px;
  color: var(--pt-text-faint);
}
.md-typeset .highlight:hover .md-clipboard { color: var(--pt-accent); }

/* Inline code reads as a token, not a highlighted phrase. */
.md-typeset code:not(pre code) {
  font-size: 0.8em;
  padding: 0.15em 0.4em;
  border: 1px solid var(--pt-border);
  border-radius: 4px;
  background: var(--pt-surface-2);
  color: var(--pt-accent);
}

/* ── Admonitions: labelled terminal callouts ────────────── */

.md-typeset .admonition,
.md-typeset details {
  border: 1px solid var(--pt-border);
  border-left: 3px solid var(--pt-accent);
  border-radius: 7px;
  background: var(--pt-surface);
  box-shadow: none;
  font-size: 0.76rem;
}
.md-typeset .admonition-title,
.md-typeset summary {
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0.7rem 0.9rem 0.2rem 2.4rem !important;
  font-family: var(--pt-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-text-dim);
}
.md-typeset .admonition-title::before,
.md-typeset summary::before {
  top: 0.72rem !important;
  left: 0.9rem !important;
  width: 1rem; height: 1rem;
}
.md-typeset .admonition > :last-child,
.md-typeset details > :last-child { margin-bottom: 0.7rem; }

/* Semantic colours drive the left edge and the icon only. */
.md-typeset .admonition.warning,
.md-typeset .admonition.caution,
.md-typeset details.warning { border-left-color: var(--pt-amber); }
.md-typeset .admonition.danger,
.md-typeset .admonition.failure,
.md-typeset .admonition.bug,
.md-typeset details.danger { border-left-color: var(--pt-red); }
.md-typeset .admonition.tip,
.md-typeset .admonition.success,
.md-typeset .admonition.example,
.md-typeset details.tip { border-left-color: var(--pt-green); }

/* ── Tables: mono headers, hairlines ────────────────────── */

.md-typeset table:not([class]) {
  border: 1px solid var(--pt-border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.74rem;
}
.md-typeset table:not([class]) th {
  background: var(--pt-surface) !important;
  font-family: var(--pt-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pt-text-dim) !important;
  border-bottom: 1px solid var(--pt-border);
}
.md-typeset table:not([class]) td { border-top: 1px solid var(--pt-border); }
.md-typeset table:not([class]) tr:hover td { background: var(--pt-bg-elev); }

/* ── Buttons: mono, uppercase, accent glow ──────────────── */

.md-typeset .md-button {
  font-family: var(--pt-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 7px;
  border: 1px solid var(--pt-border-lit);
  padding: 0.62em 1.4em;
  transition: all 0.2s;
}
.md-typeset .md-button:hover {
  border-color: var(--pt-accent);
  color: var(--pt-accent);
  background: transparent;
  box-shadow: 0 0 22px var(--pt-glow);
}
.md-typeset .md-button--primary {
  background: var(--pt-accent);
  border-color: var(--pt-accent);
  color: var(--pt-on-accent);
}
.md-typeset .md-button--primary:hover {
  background: var(--pt-accent-lit);
  border-color: var(--pt-accent-lit);
  color: var(--pt-on-accent);
  box-shadow: 0 0 34px var(--pt-glow-strong);
  transform: translateY(-1px);
}

/* ── Home page: the one place the marketing voice is loud ── */

.md-typeset .hero {
  position: relative;
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  overflow: hidden;
  padding: 3.4rem 2rem !important;
  background:
    radial-gradient(ellipse at 50% 0%, var(--pt-glow), transparent 62%),
    var(--pt-bg-elev);
}

/* Scanlines: the site's signature texture, confined to this one block so it
   never sits behind a page of reference text. */
.md-typeset .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
    transparent, transparent 3px,
    rgba(0, 0, 0, 0.07) 3px, rgba(0, 0, 0, 0.07) 4px);
  opacity: 0.5;
}
[data-md-color-scheme="default"] .md-typeset .hero::after { opacity: 0.18; }

.md-typeset .hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  border: 0;
  margin-bottom: 0.7rem;
}
.md-typeset .hero p {
  font-family: var(--pt-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pt-accent) !important;
}

/* Product cards: accent strip on top, lift and glow on hover. */
.md-typeset .product-card {
  position: relative;
  --pt-card-pad: 1.5rem;
  padding: var(--pt-card-pad);
  background: var(--pt-surface) !important;
  border: 1px solid var(--pt-border) !important;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.md-typeset .product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--pt-accent);
  opacity: 0.55;
  transition: opacity 0.2s;
}
.md-typeset .product-card:hover {
  transform: translateY(-4px);
  border-color: var(--pt-border-lit) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), 0 0 30px var(--pt-glow);
}
.md-typeset .product-card:hover::before { opacity: 1; }

.md-typeset .product-card h3 {
  font-family: var(--pt-display);
  font-size: 1.15rem;
  border: 0;
  padding-top: 0;
  gap: 0.6rem;
  /* Room reserved for the anchored badge, so a long name can never run under
     it. Nothing wraps: the badge is out of flow. */
  padding-right: 6.6rem;
  min-height: 34px;
  min-width: 0;
}

/* Four products in a 250px-min grid gave three cramped columns, which is what
   pushed PulseRoster's badge out. Two roomy columns fit 4 cards as a 2x2 and
   leave the heading line plenty of width. */
.md-typeset .product-grid {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}
@media screen and (max-width: 760px) {
  .md-typeset .product-grid { grid-template-columns: 1fr; }
}

/* extra.css tightens card padding on tablet; keep the badge anchor in step. */
@media screen and (max-width: 960px) {
  .md-typeset .product-card { --pt-card-pad: 1.25rem; padding: var(--pt-card-pad); }
}

.md-typeset .product-card h3 img.product-logo {
  width: 34px;
  height: 34px;
}
.md-typeset .product-card h3::before { display: none; }

/* Live release-stage badge, stamped onto the card heading by
   javascripts/status-badges.js.
   Pinned to the card's top-right corner rather than laid out after the product
   name: name lengths differ ("PulseID" vs "PulseRoster"), so in normal flow the
   badge lands in a different place on every card and squeezes the longest one.
   Anchored, it is in exactly the same spot on all four, whatever they're called. */
.md-typeset .product-card h3 .pt-status {
  position: absolute;
  top: calc(var(--pt-card-pad) + 8px);
  right: var(--pt-card-pad);
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  flex-shrink: 0;
  padding: 0.22em 0.5em;
  border: 1px solid var(--pt-border-lit);
  border-radius: 999px;
  font-family: var(--pt-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-text-dim);
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.md-typeset .product-card h3 .pt-status:hover {
  border-color: var(--pt-accent);
  color: var(--pt-accent);
}
.md-typeset .product-card h3 .pt-status img {
  width: 12px;
  height: 12px;
  display: block;
}

/* Pre-release stages are worth reading at a glance; operational is not. */
.md-typeset .product-card h3 .pt-status--beta { color: #a78bfa; border-color: rgba(139, 92, 246, 0.45); }
.md-typeset .product-card h3 .pt-status--alpha { color: #e879f9; border-color: rgba(217, 70, 239, 0.45); }
.md-typeset .product-card h3 .pt-status--degraded,
.md-typeset .product-card h3 .pt-status--partial { color: var(--pt-amber); border-color: rgba(255, 170, 0, 0.45); }
.md-typeset .product-card h3 .pt-status--major { color: var(--pt-red); border-color: rgba(255, 51, 102, 0.5); }

[data-md-color-scheme="default"] .md-typeset .product-card h3 .pt-status--beta { color: #6d28d9; }
[data-md-color-scheme="default"] .md-typeset .product-card h3 .pt-status--alpha { color: #a21caf; }


/* The bolded line under each product name is a label, not a sentence. */
.md-typeset .product-card > p:first-of-type strong {
  font-family: var(--pt-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-text-faint);
}

/* ── Search + footer ────────────────────────────────────── */

.md-search__form { border-radius: 7px; }
.md-search__input { font-family: var(--pt-mono); font-size: 13px; }
.md-search-result__meta {
  font-family: var(--pt-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.md-footer-meta {
  background-color: var(--pt-bg) !important;
  border-top: 1px solid var(--pt-border);
}
.md-copyright {
  font-family: var(--pt-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--pt-text-faint);
}

/* ── Mobile ─────────────────────────────────────────────── */

@media screen and (max-width: 600px) {
  .md-typeset .hero { padding: 2.2rem 1.2rem !important; }
  .md-typeset h2 { margin-top: 1.8rem; }
  .md-typeset .highlight::before,
  .md-typeset .highlighttable::before { height: 30px; }
  .md-typeset .highlight span.filename { height: 30px; line-height: 30px; }
}
