/* =====================================================================
   manual.hipicalasrozas.com — readability overrides
   Branch: ui/manual-readability-2026-07-28
   Author: Hermes (Macmini / WhatsApp)
   Based on: ui-ux-pro-max skill + frontend-design (Anthropic) +
             screenshot audit + CSS audit of mkdocs-material 9.x

   DIAGNOSIS SUMMARY (high → low severity):
   1. Admonition titles low-contrast (cyan on cyan)
   2. Line length too long (~95 chars on wide screens)
   3. Line-height too tight for procedural text
   4. Inter font not optimized for accessibility
   5. TOC sidebar too small (0.7rem)
   6. Active-tab indicator weak
   7. Floating "back to top" button cramped padding
   8. Footer typography too small

   CHANGES HERE:
   - max-width on body content (line length)
   - line-height on paragraphs
   - admonition title color (use primary palette for contrast)
   - admonition icon color (deeper tone for visibility)
   - TOC sidebar bump
   - active-tab weight bump
   - floating button padding
   - footer typography
   ===================================================================== */

/* 1. LINE LENGTH — limit to ~75 characters */
.md-typeset {
  max-width: 38rem;        /* ~75 chars at 16px */
}

.md-typeset p,
.md-typeset ul,
.md-typeset ol {
  line-height: 1.65;       /* up from default ~1.5 — better for prose */
}

/* 2. ADMONITION TITLES — fix cyan-on-cyan contrast
   Default icon color for info/tip admonitions blends into the bg.
   Use the primary palette color (deep purple) for solid contrast. */
.md-typeset .admonition.info,
.md-typeset .admonition.tip {
  border-color: var(--md-primary-fg-color);
}

.md-typeset .admonition.info > .admonition-title,
.md-typeset .admonition.tip > .admonition-title,
.md-typeset .admonition.note > .admonition-title {
  background-color: var(--md-primary-fg-color--light);
  color: var(--md-primary-fg-color);
}

.md-typeset .admonition.info > .admonition-title::before,
.md-typeset .admonition.tip > .admonition-title::before,
.md-typeset .admonition.note > .admonition-title::before {
  color: var(--md-primary-fg-color);
}

/* 3. TOC SIDEBAR — bump font size for readability */
.md-nav {
  font-size: 0.8rem;      /* up from default 0.7rem */
  line-height: 1.4;
}

.md-nav__link {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* 4. ACTIVE TAB — clearer indicator */
.md-tabs__link--active {
  font-weight: 600;
}

/* 5. FLOATING "BACK TO TOP" — better padding */
.md-top {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

/* 6. FOOTER TYPOGRAPHY */
.md-footer__link {
  font-size: 0.75rem;      /* up from default 0.7rem */
}

.md-footer__title {
  font-weight: 600;
}

/* 7. TABLE IMPROVEMENTS — better cell padding for procedural reading */
.md-typeset table:not([class]) th {
  padding: 0.75rem 1rem;
  font-weight: 600;
}

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

/* 8. HEADINGS — give H3 more breathing room before subsequent paragraphs */
.md-typeset h3 {
  margin-top: 2rem;
}

/* 9. LINKS — make underlined for clarity (no more "which is the link?") */
.md-typeset a:not(.md-button):not(.md-tabs__link):not(.md-nav__link) {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* 10. DARK MODE — slightly softer primary so cyan-on-cyan stays legible */
[data-md-color-scheme="slate"] {
  --md-typeset-a-color: var(--md-primary-fg-color);
}

/* 11. ACCESSIBILITY — respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 12. KBD element — used inline in markdown. Make it look like a key. */
.md-typeset kbd {
  background-color: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 4px;
  padding: 0.05em 0.4em;
  font-family: var(--md-code-font);
  font-size: 0.85em;
  box-shadow: 0 1px 0 var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color);
}
