/* ============================================================
   AI TestPilot X — MkDocs Material Design System
   Aesthetic: Industrial/Technical Dark — Space Grotesk + JetBrains Mono
   Primary: Electric Cyan #00D9FF on GitHub-dark surfaces
   ============================================================ */

/* -- Google Fonts ------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* -- Color Tokens ------------------------------------------- */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #00D9FF;
  --md-primary-fg-color--light: #33E4FF;
  --md-primary-fg-color--dark:  #00AACC;
  --md-accent-fg-color:         #00D9FF;

  /* Surfaces */
  --md-default-bg-color:        #0D1117;
  --md-default-bg-color--light: #161B22;
  --md-default-bg-color--lighter: #1C2230;
  --md-default-fg-color:        #E6EDF3;
  --md-default-fg-color--light: #8B949E;
  --md-default-fg-color--lighter: #6E7681;

  /* Code blocks */
  --md-code-bg-color:           #161B22;
  --md-code-fg-color:           #E6EDF3;
  --md-code-hl-color:           rgba(0, 217, 255, 0.15);

  /* Typeset */
  --md-typeset-color:           #E6EDF3;
  --md-typeset-a-color:         #00D9FF;

  /* Admonitions */
  --md-admonition-fg-color:     #E6EDF3;
  --md-admonition-bg-color:     #161B22;

  /* Header */
  --md-header-bg-color:         #0D1117;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color:        #0073A8;
  --md-primary-fg-color--light: #0090CC;
  --md-primary-fg-color--dark:  #005580;
  --md-accent-fg-color:         #0073A8;
  --md-default-bg-color:        #FFFFFF;
  --md-code-bg-color:           #F6F8FA;
  --md-typeset-a-color:         #0073A8;
}

/* -- Typography --------------------------------------------- */
:root {
  --tp-font-headline: 'Space Grotesk', 'DM Sans', sans-serif;
  --tp-font-body:     'DM Sans', system-ui, sans-serif;
  --tp-font-mono:     'JetBrains Mono', 'Fira Code', monospace;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: var(--tp-font-headline);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.md-typeset h1 { font-size: 2rem; line-height: 1.2; }
.md-typeset h2 { font-size: 1.4rem; }
.md-typeset h3 { font-size: 1.15rem; }

.md-typeset,
.md-nav__item,
.md-search__input {
  font-family: var(--tp-font-body);
}

.md-typeset code,
.md-typeset pre,
.highlight code {
  font-family: var(--tp-font-mono) !important;
  font-size: 0.85em;
}

/* -- Header ------------------------------------------------- */
.md-header {
  background-color: var(--md-header-bg-color, #0D1117);
  border-bottom: 1px solid rgba(0, 217, 255, 0.15);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
}

.md-header__title {
  font-family: var(--tp-font-headline);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* -- Navigation --------------------------------------------- */
[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__link:hover {
  color: #00D9FF;
}

[data-md-color-scheme="slate"] .md-tabs__link--active {
  color: #00D9FF;
  border-bottom: 2px solid #00D9FF;
}

/* -- Code blocks -------------------------------------------- */
.md-typeset pre > code {
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset pre {
  background-color: #0D1117;
  border: 1px solid rgba(0, 217, 255, 0.1);
}

/* Terminal-style blocks for bash/shell */
[data-md-color-scheme="slate"] .language-bash pre,
[data-md-color-scheme="slate"] .language-shell pre,
[data-md-color-scheme="slate"] .language-console pre {
  background-color: #010409;
  border-left: 3px solid #00D9FF;
}

/* -- Admonitions -------------------------------------------- */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background-color: #161B22;
  border-color: rgba(0, 217, 255, 0.3);
  border-radius: 6px;
}

/* -- Tables ------------------------------------------------- */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  background-color: #0D1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: #161B22;
  color: #00D9FF;
  font-family: var(--tp-font-headline);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72em;
  border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover td {
  background-color: rgba(0, 217, 255, 0.04);
}

/* -- Badges / status chips ---------------------------------- */
.tp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: var(--tp-font-mono);
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tp-badge--go       { background: rgba(35, 197, 94, 0.15); color: #23c55e; border: 1px solid rgba(35, 197, 94, 0.3); }
.tp-badge--risk     { background: rgba(234, 179, 8, 0.15);  color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.tp-badge--nogo     { background: rgba(239, 68, 68, 0.15);  color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.tp-badge--new      { background: rgba(0, 217, 255, 0.12);  color: #00D9FF; border: 1px solid rgba(0, 217, 255, 0.3); }

/* -- Hero section (home page) ------------------------------- */
.tp-hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.tp-hero__title {
  font-family: var(--tp-font-headline);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #00D9FF 0%, #FFFFFF 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.tp-hero__subtitle {
  font-size: 1.15rem;
  color: var(--md-default-fg-color--light, #8B949E);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.tp-hero__terminal {
  background: #010409;
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  text-align: left;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-family: var(--tp-font-mono);
  font-size: 0.88em;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 217, 255, 0.08);
}

.tp-hero__terminal::before {
  content: '';
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 18px 0 0 #eab308, 36px 0 0 #23c55e;
  margin-bottom: 1rem;
}

.tp-hero__terminal .prompt { color: #00D9FF; }
.tp-hero__terminal .cmd    { color: #E6EDF3; }
.tp-hero__terminal .out    { color: #8B949E; }
.tp-hero__terminal .go     { color: #23c55e; font-weight: 600; }
.tp-hero__terminal .risk   { color: #eab308; font-weight: 600; }

/* -- Feature grid ------------------------------------------- */
.tp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.tp-feature {
  background: #161B22;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.tp-feature:hover {
  border-color: rgba(0, 217, 255, 0.3);
  transform: translateY(-2px);
}

.tp-feature__icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.tp-feature__title {
  font-family: var(--tp-font-headline);
  font-weight: 600;
  font-size: 1rem;
  color: #E6EDF3;
  margin-bottom: 0.4rem;
}

.tp-feature__desc {
  font-size: 0.875rem;
  color: #8B949E;
  line-height: 1.5;
}

/* -- Exit code table ---------------------------------------- */
.tp-exit-codes {
  font-family: var(--tp-font-mono);
}

/* -- Agent pipeline ----------------------------------------- */
.tp-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tp-pipeline__step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: #161B22;
  border-left: 3px solid rgba(0, 217, 255, 0.4);
  border-radius: 0 6px 6px 0;
}

.tp-pipeline__num {
  font-family: var(--tp-font-mono);
  font-size: 0.75em;
  color: #00D9FF;
  font-weight: 700;
  min-width: 1.5rem;
  margin-top: 2px;
}

.tp-pipeline__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #E6EDF3;
}

.tp-pipeline__desc {
  font-size: 0.82rem;
  color: #8B949E;
  margin-top: 2px;
}

/* -- Footer ------------------------------------------------- */
.md-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* -- Content area ------------------------------------------- */
.md-content__inner {
  max-width: 900px;
}

/* -- Scrollbar (webkit) ------------------------------------- */
[data-md-color-scheme="slate"] ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
[data-md-color-scheme="slate"] ::-webkit-scrollbar-track { background: #0D1117; }
[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 217, 255, 0.25);
  border-radius: 3px;
}
[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 217, 255, 0.45);
}
