/* ═══════════════════════════════════════════════════════════════════════════
   Tryx Documentation — Zensical Modern Theme
   Clean, professional design with teal accent and solid typography.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Root Variables ──────────────────────────────────────────────────── */
:root {
  --tryx-radius: 8px;
  --tryx-gap: 1rem;
  --tryx-border: 1px solid var(--md-default-fg-color--lightest);
}

/* ── Typography ──────────────────────────────────────────────────────── */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  letter-spacing: -0.025em;
  font-weight: 600;
}

.md-typeset h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.35rem;
  border-bottom: var(--tryx-border);
}

.md-typeset h3 {
  margin-top: 1.5rem;
  font-weight: 500;
}

/* ── Hero Section ────────────────────────────────────────────────────── */
.tryx-hero {
  border: var(--tryx-border);
  border-radius: var(--tryx-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.04) 0%,
    rgba(13, 148, 136, 0.01) 100%
  );
}

[data-md-color-scheme="slate"] .tryx-hero {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.08) 0%,
    rgba(13, 148, 136, 0.02) 100%
  );
}

.tryx-hero h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.tryx-hero p {
  color: var(--md-default-fg-color--light);
  font-size: 0.95rem;
  max-width: 640px;
}

.tryx-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tryx-pill {
  border: var(--tryx-border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--md-accent-fg-color);
  background: rgba(13, 148, 136, 0.06);
}

[data-md-color-scheme="slate"] .tryx-pill {
  background: rgba(13, 148, 136, 0.12);
}

/* ── Feature Grid ────────────────────────────────────────────────────── */
.tryx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--tryx-gap);
  margin-top: 1rem;
}

.tryx-card {
  border: var(--tryx-border);
  border-radius: var(--tryx-radius);
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tryx-card:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.tryx-card h3 {
  margin-top: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.tryx-card p {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.5;
}

/* ── Architecture Diagram ────────────────────────────────────────────── */
.tryx-arch {
  border: var(--tryx-border);
  border-radius: var(--tryx-radius);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--md-code-bg-color);
  overflow-x: auto;
}

.tryx-arch pre {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ── Link Grid ───────────────────────────────────────────────────────── */
.tryx-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--tryx-gap);
}

.tryx-link-grid a {
  display: block;
  border: var(--tryx-border);
  border-radius: var(--tryx-radius);
  padding: 0.8rem 1rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tryx-link-grid a:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tryx-link-grid strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.tryx-link-grid span {
  font-size: 0.8rem;
  color: var(--md-default-fg-color--light);
}

/* ── Keyboard Shortcuts ──────────────────────────────────────────────── */
.tryx-kbd {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-family: var(--md-code-font);
  font-size: 0.78rem;
}

/* ── Tables ──────────────────────────────────────────────────────────── */
.md-typeset table:not([class]) {
  border-radius: var(--tryx-radius);
  overflow: hidden;
  font-size: 0.85rem;
}

.md-typeset table:not([class]) th {
  font-weight: 600;
  background: var(--md-code-bg-color);
}

.md-typeset table:not([class]) td {
  vertical-align: top;
}

/* ── Admonitions ─────────────────────────────────────────────────────── */
.md-typeset .admonition,
.md-typeset details.admonition {
  border-radius: var(--tryx-radius);
  border-left-width: 3px;
}

.md-typeset .admonition-title {
  border-radius: var(--tryx-radius) var(--tryx-radius) 0 0;
  font-weight: 600;
  font-size: 0.88rem;
}

/* ── Code Blocks ─────────────────────────────────────────────────────── */
.md-typeset pre {
  border-radius: var(--tryx-radius);
}

.md-typeset code:not(pre code) {
  border-radius: 4px;
  padding: 0.12rem 0.35rem;
  font-size: 0.84em;
}

.md-typeset .highlight .hll {
  background: rgba(13, 148, 136, 0.06);
  border-left: 2px solid var(--md-accent-fg-color);
  margin-left: -0.4rem;
  padding-left: 0.4rem;
}

/* ── Navigation ──────────────────────────────────────────────────────── */
.md-nav__link {
  transition: color 0.15s ease;
}

.md-nav__item--active > .md-nav__link {
  font-weight: 600;
}

/* ── Search ──────────────────────────────────────────────────────────── */
.md-search-result__link {
  border-radius: var(--tryx-radius);
  transition: background 0.15s ease;
}

.md-search-result__link:hover {
  background: rgba(13, 148, 136, 0.04);
}

.md-search-result__teaser {
  font-size: 0.82rem;
}

/* ── Focus States ────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Progress Bar ────────────────────────────────────────────────────── */
.md-vestigial__progress {
  height: 2px;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.md-footer {
  border-top: var(--tryx-border);
}

/* ── Scrollbar ───────────────────────────────────────────────────────── */
.md-sidebar--primary .md-nav__scrollwrap {
  scrollbar-width: thin;
}

/* ── Content Tabs ────────────────────────────────────────────────────── */
.md-typeset .tabbed-set > .tabbed-labels {
  border-bottom: var(--tryx-border);
}

.md-typeset .tabbed-set > .tabbed-labels > label {
  font-weight: 500;
}

/* ── Inline Code ─────────────────────────────────────────────────────── */
.md-typeset code {
  border-color: rgba(13, 148, 136, 0.15);
}

[data-md-color-scheme="slate"] .md-typeset code {
  border-color: rgba(13, 148, 136, 0.25);
}

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  .md-sidebar,
  .md-header,
  .md-footer {
    display: none;
  }

  .md-main__inner {
    margin: 0;
    max-width: 100%;
  }
}
