/* ── Fonts — Inter loaded via mkdocs.yml extra_css ─────────────────── */

/* ── Theme variables ──────────────────────────────────────────────── */

:root {
  --md-text-font: "Inter";
  --md-code-font: "Roboto Mono";
  --md-primary-fg-color: #1136A8;
  --md-primary-fg-color--light: #3358C0;
  --md-primary-fg-color--dark: #0D2A8A;
  --md-accent-fg-color: #1136A8;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

[data-md-color-scheme="slate"] {
  --md-default-fg-color: rgba(255, 255, 255, 0.9);
  --md-default-fg-color--light: rgba(255, 255, 255, 0.7);
  --md-default-fg-color--lighter: rgba(255, 255, 255, 0.5);
  --md-typeset-color: rgba(255, 255, 255, 0.9);
}

[data-md-color-scheme="slate"] .md-typeset {
  color: rgba(255, 255, 255, 0.9);
}

[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3,
[data-md-color-scheme="slate"] .md-typeset h4,
[data-md-color-scheme="slate"] .md-typeset h5,
[data-md-color-scheme="slate"] .md-typeset h6 {
  color: #fff;
}

[data-md-color-scheme="slate"] .md-typeset p,
[data-md-color-scheme="slate"] .md-typeset li,
[data-md-color-scheme="slate"] .md-typeset td {
  color: rgba(255, 255, 255, 0.87);
}

/* ── Header — minimal top bar (white, no blue banner) ─────────────── */

.md-header {
  background: #fff;
  color: #333;
  box-shadow: 0 1px 0 #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 10;
}

[data-md-color-scheme="slate"] .md-header {
  background: #1e1e2e;
  color: #ccc;
  box-shadow: 0 1px 0 #333;
}

.md-header__button {
  color: #555;
}

[data-md-color-scheme="slate"] .md-header__button {
  color: #aaa;
}

/* Hide the site title text in header — logo has it */
.md-header__topic {
  display: none;
}

/* Header logo — small in the top bar */
.md-header__button.md-logo {
  display: none;
}

/* Search bar styling */
.md-search__input {
  background: #f4f5f7;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-md-color-scheme="slate"] .md-search__input {
  background: #2a2a3c;
  border-color: #444;
}

/* GitHub icon in header */
.md-header__source {
  color: #555;
}

[data-md-color-scheme="slate"] .md-header__source {
  color: #aaa;
}

/* ── Left sidebar ─────────────────────────────────────────────────── */

.md-sidebar--primary {
  border-right: 1px solid #eee;
  height: 100vh;
}

[data-md-color-scheme="slate"] .md-sidebar--primary {
  border-right-color: #333;
}

/* Remove the partial top separator from scrollbar area */
.md-sidebar--primary .md-sidebar__scrollwrap {
  border-top: none;
}

.md-sidebar__inner {
  border-top: none;
}

/* Logo at top of sidebar */
.md-sidebar--primary .md-sidebar__inner::before {
  content: "";
  display: block;
  width: 200px;
  height: 110px;
  background: url("../assets/asp_blue.png") no-repeat center / contain;
  margin: 1rem auto 0.75rem;
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-sidebar__inner::before {
  background-image: url("../assets/asp_white.png");
}

/* Sidebar nav styling */
.md-nav__title {
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  padding: 0.4rem 0.6rem;
}

.md-nav__item .md-nav__link {
  font-size: 0.82rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
  color: #444;
}

[data-md-color-scheme="slate"] .md-nav__item .md-nav__link {
  color: #bbb;
}

.md-nav__item .md-nav__link:hover {
  background: #f0f2f5;
  color: #111;
}

[data-md-color-scheme="slate"] .md-nav__item .md-nav__link:hover {
  background: #2a2a3c;
  color: #eee;
}

.md-nav__item .md-nav__link--active,
.md-nav__item .md-nav__link--active:hover {
  background: #eef1f8;
  color: #0F2B8E !important;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active:hover {
  background: #1e2a4a;
  color: #7da2f7 !important;
}

/* ── Hide right sidebar (TOC integrated into left) ────────────────── */

.md-sidebar--secondary {
  display: none;
}

/* ── Integrated TOC in left sidebar — collapse subsections ────────── */

/* TOC nested lists: hidden by default, revealed on hover */
.md-sidebar--primary .md-nav--secondary .md-nav {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.md-sidebar--primary .md-nav--secondary .md-nav__item:hover > .md-nav,
.md-sidebar--primary .md-nav--secondary .md-nav__item--active > .md-nav {
  max-height: 30rem;
  opacity: 1;
}

/* Indent nested TOC items */
.md-sidebar--primary .md-nav--secondary .md-nav .md-nav__link {
  padding-left: 1.8rem;
  font-size: 0.76rem;
  color: #777;
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-nav--secondary .md-nav .md-nav__link {
  color: #888;
}

.md-sidebar--primary .md-nav--secondary .md-nav .md-nav__link:hover {
  color: var(--md-primary-fg-color);
}

/* Style the TOC section title */
.md-sidebar--primary .md-nav--secondary > .md-nav__title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  padding-top: 0.8rem;
  border-top: 1px solid #eee;
  margin-top: 0.6rem;
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-nav--secondary > .md-nav__title {
  border-top-color: #333;
  color: #666;
}

/* ── Page transitions ─────────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.md-content {
  animation: fadeIn 0.2s ease-out;
}

/* ── Content area — use more width ────────────────────────────────── */

.md-content__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

/* ── Typography ───────────────────────────────────────────────────── */

.md-typeset h1 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.md-typeset h2 {
  font-weight: 600;
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e8e8e8;
}

[data-md-color-scheme="slate"] .md-typeset h2 {
  border-bottom-color: #333;
}

.md-typeset h3 {
  font-weight: 600;
  margin-top: 2rem;
}

/* ── Links ────────────────────────────────────────────────────────── */

.md-typeset a {
  transition: color 0.15s ease;
}

.md-typeset a:hover {
  color: var(--md-primary-fg-color--dark);
}

/* ── Code blocks ──────────────────────────────────────────────────── */

.md-typeset pre {
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

[data-md-color-scheme="slate"] .md-typeset pre {
  border-color: #333;
}

.md-typeset pre code {
  font-size: 0.75rem;
  line-height: 1.5;
}

.md-typeset code {
  border-radius: 4px;
  font-size: 0.78em;
}

/* ── Tables ───────────────────────────────────────────────────────── */

.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  font-size: 0.82rem;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  border-color: #333;
}

.md-typeset table:not([class]) th {
  background: #f6f7f9;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #555;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: #262636;
  color: #aaa;
}

.md-typeset table:not([class]) tr:nth-child(2n) {
  background: #fafbfc;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(2n) {
  background: #1e1e2e;
}

/* ── Admonitions ──────────────────────────────────────────────────── */

.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
  border-width: 1px;
  box-shadow: none;
}

/* ── Homepage-specific styles ─────────────────────────────────────── */

/* Hero */
.asp-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.asp-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  border-bottom: none;
}

.asp-hero .asp-subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: #555;
  max-width: 40rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

[data-md-color-scheme="slate"] .asp-hero .asp-subtitle {
  color: #aaa;
}

.asp-hero .asp-cta {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.asp-hero .asp-cta a {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.asp-hero .asp-cta a.asp-cta-primary {
  background: #0F2B8E;
  color: #fff !important;
}

.asp-hero .asp-cta a.asp-cta-primary:hover {
  background: #0A2070;
  color: #fff !important;
}

.asp-hero .asp-cta a.asp-cta-secondary {
  background: #f2f3f5;
  color: #333 !important;
  border: 1px solid #ddd;
}

.asp-hero .asp-cta a.asp-cta-secondary:hover {
  background: #e8e9eb;
  color: #111 !important;
}

[data-md-color-scheme="slate"] .asp-hero .asp-cta a.asp-cta-secondary {
  background: #2a2a3c;
  color: #ddd !important;
  border-color: #444;
}

[data-md-color-scheme="slate"] .asp-hero .asp-cta a.asp-cta-primary {
  background: #1a3faa;
  color: #fff !important;
}

[data-md-color-scheme="slate"] .asp-hero .asp-cta a.asp-cta-primary:hover {
  background: #2550c0;
  color: #fff !important;
}

/* Card grid */
.asp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.asp-card {
  background: #f8f9fb;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  padding: 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-md-color-scheme="slate"] .asp-card {
  background: #1e1e2e;
  border-color: #333;
}

.asp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="slate"] .asp-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.asp-card .asp-card-icon {
  display: block;
  margin-bottom: 0.5rem;
  color: #1136A8;
}

.asp-card .asp-card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

[data-md-color-scheme="slate"] .asp-card .asp-card-icon {
  color: #7da2f7;
}

.asp-card .asp-card-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  color: #1a1a1a;
}

[data-md-color-scheme="slate"] .asp-card .asp-card-title {
  color: #eee;
}

.asp-card .asp-card-title a {
  color: inherit;
  text-decoration: none;
}

.asp-card .asp-card-title a:hover {
  color: var(--md-primary-fg-color);
}

.asp-card .asp-card-desc {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.5;
}

[data-md-color-scheme="slate"] .asp-card .asp-card-desc {
  color: #999;
}

.asp-card .asp-card-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

.asp-card .asp-card-badge.capability {
  background: #e8f0fe;
  color: #1136A8;
}

[data-md-color-scheme="slate"] .asp-card .asp-card-badge.capability {
  background: #1e2a4a;
  color: #7da2f7;
}

.asp-card .asp-card-badge.extension {
  background: #fef3e0;
  color: #b06e00;
}

[data-md-color-scheme="slate"] .asp-card .asp-card-badge.extension {
  background: #3a2e1a;
  color: #e0a840;
}

/* Section headers */
.asp-section-header {
  margin-top: 2.5rem;
  margin-bottom: 0.25rem;
}

.asp-section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  border-bottom: none;
  margin-bottom: 0.2rem;
}

.asp-section-subtext {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1.25rem;
}

[data-md-color-scheme="slate"] .asp-section-subtext {
  color: #888;
}

/* Principles list */
.asp-principles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.asp-principle {
  padding: 1.1rem;
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 8px;
}

[data-md-color-scheme="slate"] .asp-principle {
  background: #1e1e2e;
  border-color: #333;
}

.asp-principle strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
}

[data-md-color-scheme="slate"] .asp-principle strong {
  color: #eee;
}

.asp-principle span {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.5;
}

[data-md-color-scheme="slate"] .asp-principle span {
  color: #999;
}

/* Quick start */
.asp-quickstart {
  background: #f8f9fb;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

[data-md-color-scheme="slate"] .asp-quickstart {
  background: #1e1e2e;
  border-color: #333;
}

.asp-quickstart pre {
  margin: 0.75rem 0 0;
  border: none !important;
}

/* Links grid */
.asp-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

.asp-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

[data-md-color-scheme="slate"] .asp-link {
  background: #1e1e2e;
  border-color: #333;
  color: #ccc;
}

.asp-link:hover {
  border-color: var(--md-primary-fg-color--light);
  color: var(--md-primary-fg-color);
  background: #f6f8fe;
}

[data-md-color-scheme="slate"] .asp-link:hover {
  background: #1e2a4a;
  color: #7da2f7;
  border-color: #4466aa;
}

.asp-link .asp-link-icon {
  display: flex;
  color: #1136A8;
}

.asp-link .asp-link-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

[data-md-color-scheme="slate"] .asp-link .asp-link-icon {
  color: #7da2f7;
}
