/* alm-components.css — Nav, buttons, cards, footer, cookie banner */

/* ============================================================
   NAV
   ============================================================ */
.alm-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--alm-nav-height);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--alm-transition), border-color var(--alm-transition);
}

.alm-nav--scrolled {
  background: var(--alm-bg-dark);
  border-bottom-color: var(--alm-border-dark);
}

/* Light-top pages: nav always solid */
body.alm-page--light-top .alm-nav {
  background: var(--alm-bg-dark);
  border-bottom-color: var(--alm-border-dark);
}

/* Dark-top pages: nav transparent until scrolled */
body.alm-page--dark-top .alm-nav {
  background: transparent;
  border-bottom-color: transparent;
}
body.alm-page--dark-top .alm-nav.alm-nav--scrolled {
  background: var(--alm-bg-dark);
  border-bottom-color: var(--alm-border-dark);
}

.alm-nav__inner {
  max-width: var(--alm-container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

.alm-nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
}

.alm-nav__logo img {
  height: 28px;
  width: auto;
  max-width: 160px;
}

.alm-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.alm-nav__item {
  position: relative;
}

.alm-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--alm-fg-dark-secondary);
  border-radius: 6px;
  transition: color var(--alm-transition), background var(--alm-transition);
  cursor: pointer;
  background: transparent;
  border: none;
  white-space: nowrap;
}

.alm-nav__link:hover {
  color: var(--alm-fg-dark-primary);
  background: rgba(255,255,255,0.06);
}

.alm-nav__link--active {
  color: var(--alm-fg-dark-primary);
}

.alm-nav__link svg.alm-nav__chevron {
  width: 12px;
  height: 12px;
  transition: transform var(--alm-transition);
}

.alm-nav__item:hover .alm-nav__chevron,
.alm-nav__item.alm-nav__item--open .alm-nav__chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.alm-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--alm-bg-dark);
  border: 1px solid var(--alm-border-dark);
  border-radius: 8px;
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--alm-transition), transform var(--alm-transition);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
}

.alm-nav__item:hover .alm-nav__dropdown,
.alm-nav__item.alm-nav__item--open .alm-nav__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.alm-nav__dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: var(--alm-fg-dark-secondary);
  transition: color var(--alm-transition), background var(--alm-transition);
}

.alm-nav__dropdown a:hover {
  color: var(--alm-fg-dark-primary);
  background: rgba(255,255,255,0.06);
}

/* Nav CTA */
.alm-nav__cta {
  margin-left: 16px;
  flex-shrink: 0;
}

/* Hamburger */
.alm-nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 8px;
  padding: 8px;
  border-radius: 6px;
  transition: background var(--alm-transition);
}

.alm-nav__hamburger:hover { background: rgba(255,255,255,0.08); }

.alm-nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--alm-fg-dark-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.alm-nav--mobile-open .alm-nav__hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.alm-nav--mobile-open .alm-nav__hamburger span:nth-child(2) {
  opacity: 0;
}
.alm-nav--mobile-open .alm-nav__hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.alm-nav__mobile-menu {
  display: none;
  position: fixed;
  top: var(--alm-nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--alm-bg-dark);
  overflow-y: auto;
  padding: 24px;
  z-index: 999;
}

.alm-nav--mobile-open .alm-nav__mobile-menu {
  display: block;
}

.alm-nav__mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alm-nav__mobile-links a,
.alm-nav__mobile-links button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--alm-fg-dark-primary);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--alm-transition);
}

.alm-nav__mobile-links a:hover,
.alm-nav__mobile-links button:hover {
  background: rgba(255,255,255,0.08);
}

.alm-nav__mobile-sub {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alm-nav__mobile-sub a {
  font-size: 0.875rem;
  color: var(--alm-fg-dark-secondary);
  padding: 8px 16px;
}

.alm-nav__mobile-cta {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--alm-border-dark);
}

@media (max-width: 1024px) {
  .alm-nav__links { display: none; }
  .alm-nav__cta { display: none; }
  .alm-nav__hamburger { display: flex; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.alm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 7px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--alm-transition), border-color var(--alm-transition), color var(--alm-transition), box-shadow var(--alm-transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

/* Primary: accent-aa-on-light bg, white text — works on any bg */
.alm-btn--primary {
  background: var(--alm-accent-aa-on-light);
  border-color: var(--alm-accent-aa-on-light);
  color: #FFFFFF;
}
.alm-btn--primary:hover {
  background: #163fa0;
  border-color: #163fa0;
  box-shadow: 0 4px 12px rgba(26,79,190,0.3);
}

/* Outline on dark */
.alm-btn--outline-dark {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: var(--alm-fg-dark-primary);
}
.alm-btn--outline-dark:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
}

/* Outline on light */
.alm-btn--outline-light {
  background: transparent;
  border-color: var(--alm-border-light);
  color: var(--alm-fg-light-primary);
}
.alm-btn--outline-light:hover {
  border-color: var(--alm-accent-aa-on-light);
  color: var(--alm-accent-aa-on-light);
}

/* Ghost on dark */
.alm-btn--ghost-dark {
  background: transparent;
  border-color: transparent;
  color: var(--alm-fg-dark-secondary);
}
.alm-btn--ghost-dark:hover {
  color: var(--alm-fg-dark-primary);
  background: rgba(255,255,255,0.06);
}

/* Text link on light */
.alm-btn--text-light {
  background: transparent;
  border-color: transparent;
  color: var(--alm-accent-aa-on-light);
  padding-left: 0;
  padding-right: 0;
}
.alm-btn--text-light:hover {
  color: #163fa0;
  text-decoration: underline;
}

/* Small button */
.alm-btn--sm {
  padding: 7px 16px;
  font-size: 0.875rem;
}

/* Large button */
.alm-btn--lg {
  padding: 13px 28px;
  font-size: 1rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.alm-card {
  background: var(--alm-bg-white);
  border: 1px solid var(--alm-border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow var(--alm-transition), border-color var(--alm-transition);
}

.alm-card:hover {
  box-shadow: 0 6px 20px rgba(12,26,46,0.10);
  border-color: var(--alm-accent-aa-on-light);
}

.alm-card__body {
  padding: var(--alm-space-4);
}

.alm-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--alm-bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--alm-space-2);
  font-size: 1.25rem;
  color: var(--alm-accent-aa-on-light);
}

.alm-card--dark {
  background: var(--alm-bg-dark-alt);
  border-color: var(--alm-border-dark);
}

.alm-card--dark:hover {
  border-color: var(--alm-accent-aa-on-dark);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ============================================================
   BADGE / TAG
   ============================================================ */
.alm-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--alm-bg-surface);
  color: var(--alm-fg-light-secondary);
  border: 1px solid var(--alm-border-light);
}

.alm-section--dark .alm-tag,
.alm-section--dark-alt .alm-tag {
  background: rgba(255,255,255,0.08);
  color: var(--alm-fg-dark-secondary);
  border-color: var(--alm-border-dark);
}

/* ============================================================
   BLOG CARDS
   ============================================================ */
.alm-blog-card {
  background: var(--alm-bg-white);
  border: 1px solid var(--alm-border-light);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--alm-transition), border-color var(--alm-transition);
}

.alm-blog-card:hover {
  box-shadow: 0 6px 20px rgba(12,26,46,0.10);
  border-color: var(--alm-accent-aa-on-light);
}

.alm-blog-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  height: auto;
}

.alm-blog-card__body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.alm-blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.alm-blog-card__date {
  font-size: 0.8125rem;
  color: var(--alm-fg-light-tertiary);
}

.alm-blog-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--alm-fg-light-primary);
  margin-bottom: 8px;
  line-height: 1.45;
}

.alm-blog-card__summary {
  font-size: 0.875rem;
  color: var(--alm-fg-light-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.alm-blog-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--alm-accent-aa-on-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--alm-transition);
  align-self: flex-start;
}

.alm-blog-card__link:hover {
  gap: 8px;
  text-decoration: underline;
}

/* Article cover: natural ratio, no crop */
.alm-blog-article__cover {
  width: 100%;
  height: auto;
  max-width: 760px;
  margin: 0 auto;
  border-radius: 10px;
  display: block;
}

/* ============================================================
   INLINE CODE / TERMINAL MOCK
   ============================================================ */
.alm-term {
  border-radius: 10px;
  overflow: hidden;
  background: #0A1628;
  border: 1px solid #1E3050;
  font-family: var(--alm-font-mono);
}

.alm-term__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0f1e35;
  border-bottom: 1px solid #1E3050;
}

.alm-term__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.alm-term__dot--red    { background: #FF5F57; }
.alm-term__dot--yellow { background: #FEBC2E; }
.alm-term__dot--green  { background: #28C840; }

.alm-term__title {
  font-size: 0.75rem;
  color: #5C7A9B;
  margin-left: 8px;
  font-family: var(--alm-font-mono);
}

.alm-term__body {
  padding: 16px 20px;
  white-space: normal;
  line-height: 1.45;
  font-size: 0.8125rem;
  color: #90A8C3;
  overflow-x: auto;
}

.alm-term__body code {
  font-family: var(--alm-font-mono);
  font-size: inherit;
  display: block;
}

.alm-tt-prompt { color: #4ADE80; }
.alm-tt-cmd    { color: #EEF2F8; }
.alm-tt-meta   { color: #5C7A9B; }
.alm-tt-key    { color: #60A5FA; }
.alm-tt-val    { color: #93C5FD; }
.alm-tt-hash   { color: #A78BFA; }
.alm-tt-ok     { color: #4ADE80; }
.alm-tt-info   { color: #90A8C3; }

/* Code block (docs) */
.alm-code-block {
  border-radius: 8px;
  overflow: hidden;
  background: #0A1628;
  border: 1px solid #1E3050;
  margin: 16px 0;
}

.alm-code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #0f1e35;
  border-bottom: 1px solid #1E3050;
  font-size: 0.75rem;
  color: #5C7A9B;
  font-family: var(--alm-font-mono);
}

.alm-code-block__body {
  padding: 16px;
  overflow-x: auto;
}

.alm-code-block__body pre {
  white-space: pre;
  margin: 0;
  font-family: var(--alm-font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #EEF2F8;
}

/* Method badges */
.alm-method {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--alm-font-mono);
}
.alm-method--get    { background: #164e29; color: #4ADE80; }
.alm-method--post   { background: #1e3a8a; color: #60A5FA; }
.alm-method--delete { background: #4b1616; color: #FCA5A5; }

/* ============================================================
   STEP / PROCESS
   ============================================================ */
.alm-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--alm-space-3);
}

.alm-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--alm-space-3);
  background: var(--alm-bg-white);
  border: 1px solid var(--alm-border-light);
  border-radius: 12px;
  position: relative;
}

.alm-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--alm-bg-surface);
  border: 1px solid var(--alm-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--alm-accent-aa-on-light);
}

.alm-step__icon {
  font-size: 1.5rem;
  color: var(--alm-accent-aa-on-light);
}

.alm-step__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--alm-fg-light-primary);
}

.alm-step__text {
  font-size: 0.875rem;
  color: var(--alm-fg-light-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .alm-steps { grid-template-columns: 1fr; }
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.alm-testimonial {
  background: var(--alm-bg-white);
  border: 1px solid var(--alm-border-light);
  border-radius: 12px;
  padding: var(--alm-space-4);
  position: relative;
}

.alm-testimonial__quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--alm-fg-light-secondary);
  margin-bottom: var(--alm-space-3);
  font-style: italic;
}

.alm-testimonial__quote::before {
  content: '\201C';
  font-size: 2rem;
  color: var(--alm-accent-aa-on-light);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
  font-style: normal;
}

.alm-testimonial__attribution {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alm-testimonial__role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--alm-fg-light-primary);
}

.alm-testimonial__org {
  font-size: 0.8125rem;
  color: var(--alm-fg-light-tertiary);
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.alm-trust-bar {
  background: var(--alm-bg-dark-alt);
  border-top: 1px solid var(--alm-border-dark);
  border-bottom: 1px solid var(--alm-border-dark);
  padding: 20px 24px;
}

.alm-trust-bar__inner {
  max-width: var(--alm-container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: center;
  align-items: center;
}

.alm-trust-bar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--alm-fg-dark-secondary);
}

.alm-trust-bar__item i {
  color: var(--alm-accent-aa-on-dark);
  font-size: 1rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .alm-trust-bar__inner { gap: 12px 24px; }
  .alm-trust-bar__item { font-size: 0.8125rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.alm-footer {
  background: var(--alm-bg-dark);
  border-top: 1px solid var(--alm-border-dark);
  padding-top: var(--alm-space-12);
  padding-bottom: 0;
}

.alm-footer__inner {
  max-width: var(--alm-container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--alm-space-6);
}

.alm-footer__logo {
  margin-bottom: var(--alm-space-3);
}

.alm-footer__logo img {
  height: 28px;
  width: auto;
}

.alm-footer__blurb {
  font-size: 0.875rem;
  color: var(--alm-fg-dark-secondary);
  line-height: 1.65;
  margin-bottom: var(--alm-space-3);
  max-width: 280px;
}

.alm-footer__address {
  font-size: 0.8125rem;
  color: var(--alm-fg-dark-tertiary);
  line-height: 1.8;
  font-style: normal;
}

.alm-footer__address a {
  color: var(--alm-fg-dark-secondary);
  transition: color var(--alm-transition);
}

.alm-footer__address a:hover {
  color: var(--alm-fg-dark-primary);
}

.alm-footer__col-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--alm-fg-dark-primary);
  margin-bottom: var(--alm-space-2);
}

.alm-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.alm-footer__links a {
  font-size: 0.875rem;
  color: var(--alm-fg-dark-secondary);
  transition: color var(--alm-transition);
}

.alm-footer__links a:hover {
  color: var(--alm-fg-dark-primary);
}

.alm-footer__bottom {
  margin-top: var(--alm-space-8);
  border-top: 1px solid var(--alm-border-dark);
  padding: 20px 24px;
  max-width: var(--alm-container);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.alm-footer__copy {
  font-size: 0.8125rem;
  color: var(--alm-fg-dark-tertiary);
}

.alm-footer__bottom-links {
  display: flex;
  gap: 20px;
}

.alm-footer__bottom-links a {
  font-size: 0.8125rem;
  color: var(--alm-fg-dark-tertiary);
  transition: color var(--alm-transition);
}

.alm-footer__bottom-links a:hover {
  color: var(--alm-fg-dark-secondary);
}

@media (max-width: 900px) {
  .alm-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .alm-footer__inner { grid-template-columns: 1fr; }
  .alm-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--alm-bg-dark-alt);
  border-top: 1px solid var(--alm-border-dark);
  padding: 14px 24px;
}

.cookie-banner__inner {
  max-width: var(--alm-container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-banner__text {
  font-size: 0.875rem;
  color: var(--alm-fg-dark-secondary);
  line-height: 1.5;
}

.cookie-banner__text a {
  color: var(--alm-accent-aa-on-dark);
  text-decoration: underline;
}

.cookie-banner__actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}

.cookie-banner__btn {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background var(--alm-transition), border-color var(--alm-transition);
}

.cookie-banner__btn--primary {
  background: var(--alm-accent-aa-on-light);
  border-color: var(--alm-accent-aa-on-light);
  color: #FFFFFF;
}

.cookie-banner__btn--primary:hover {
  background: #163fa0;
}

@media (max-width: 600px) {
  .cookie-banner__inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   SECTION HEADINGS PATTERNS
   ============================================================ */
.alm-section-head {
  margin-bottom: var(--alm-space-6);
}

.alm-section-head--center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--alm-space-6);
}

.alm-section--dark .alm-eyebrow,
.alm-section--dark-alt .alm-eyebrow {
  color: var(--alm-accent-aa-on-dark);
}

.alm-section--light .alm-eyebrow,
.alm-section--white .alm-eyebrow,
.alm-section--surface .alm-eyebrow {
  color: var(--alm-accent-aa-on-light);
}

.alm-section--dark .alm-section-head h2,
.alm-section--dark-alt .alm-section-head h2,
.alm-section--dark .alm-h2,
.alm-section--dark-alt .alm-h2 {
  color: var(--alm-fg-dark-primary);
}

.alm-section--light .alm-section-head h2,
.alm-section--white .alm-section-head h2,
.alm-section--surface .alm-section-head h2,
.alm-section--light .alm-h2,
.alm-section--white .alm-h2,
.alm-section--surface .alm-h2 {
  color: var(--alm-fg-light-primary);
}

.alm-section--dark p,
.alm-section--dark-alt p,
.alm-section--dark li {
  color: var(--alm-fg-dark-secondary);
}

.alm-section--light p,
.alm-section--white p,
.alm-section--surface p,
.alm-section--light li,
.alm-section--white li,
.alm-section--surface li {
  color: var(--alm-fg-light-secondary);
}

/* ============================================================
   DOCS LAYOUT
   ============================================================ */
.alm-docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--alm-space-8);
  align-items: start;
}

.alm-docs-sidebar {
  position: sticky;
  top: calc(var(--alm-nav-height) + 24px);
}

.alm-docs-sidebar__nav {
  background: var(--alm-bg-surface);
  border: 1px solid var(--alm-border-light);
  border-radius: 10px;
  padding: 16px 0;
}

.alm-docs-sidebar__heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--alm-fg-light-tertiary);
  padding: 8px 20px 4px;
}

.alm-docs-sidebar__links {
  list-style: none;
}

.alm-docs-sidebar__links a {
  display: block;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: var(--alm-fg-light-secondary);
  transition: color var(--alm-transition), background var(--alm-transition);
  border-left: 2px solid transparent;
}

.alm-docs-sidebar__links a:hover,
.alm-docs-sidebar__links a.alm-docs-active {
  color: var(--alm-accent-aa-on-light);
  background: rgba(26,79,190,0.06);
  border-left-color: var(--alm-accent-aa-on-light);
}

.alm-docs-content {
  min-width: 0;
}

body.alm-page--light-top .alm-docs-content h1,
body.alm-page--light-top .alm-docs-content h2,
body.alm-page--light-top .alm-docs-content h3 {
  color: var(--alm-fg-light-primary);
}

body.alm-page--light-top .alm-docs-content p,
body.alm-page--light-top .alm-docs-content li {
  color: var(--alm-fg-light-secondary);
}

body.alm-page--light-top .alm-docs-content a {
  color: var(--alm-accent-aa-on-light);
}

body.alm-page--light-top .alm-docs-content code {
  background: var(--alm-bg-surface);
  color: var(--alm-fg-light-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--alm-font-mono);
  font-size: 0.875em;
}

@media (max-width: 900px) {
  .alm-docs-layout { grid-template-columns: 1fr; }
  .alm-docs-sidebar { position: static; }
}

/* ============================================================
   API ENDPOINT TABLE
   ============================================================ */
.alm-api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 24px 0;
}

.alm-api-table th {
  background: var(--alm-bg-surface);
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--alm-fg-light-tertiary);
  border-bottom: 2px solid var(--alm-border-light);
}

.alm-api-table td {
  padding: 12px 16px;
  color: var(--alm-fg-light-secondary);
  border-bottom: 1px solid var(--alm-border-light);
  vertical-align: top;
}

.alm-api-table code {
  font-family: var(--alm-font-mono);
  font-size: 0.8125rem;
  color: var(--alm-fg-light-primary);
  background: var(--alm-bg-surface);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============================================================
   THREAT GRID (Security page)
   ============================================================ */
.alm-threat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--alm-space-3);
}

.alm-threat-card {
  background: var(--alm-bg-white);
  border: 1px solid var(--alm-border-light);
  border-radius: 10px;
  padding: var(--alm-space-3);
}

.alm-threat-card__icon {
  font-size: 1.25rem;
  color: var(--alm-accent-aa-on-light);
  margin-bottom: 12px;
}

.alm-threat-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--alm-fg-light-primary);
  margin-bottom: 8px;
}

.alm-threat-card__text {
  font-size: 0.875rem;
  color: var(--alm-fg-light-secondary);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .alm-threat-grid { grid-template-columns: 1fr; }
}

/* Controls table */
.alm-controls-table {
  background: var(--alm-bg-white);
  border: 1px solid var(--alm-border-light);
  border-radius: 10px;
  overflow: hidden;
}

.alm-controls-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.alm-controls-table th {
  background: var(--alm-bg-surface);
  padding: 12px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--alm-fg-light-tertiary);
  border-bottom: 1px solid var(--alm-border-light);
}

.alm-controls-table td {
  padding: 14px 20px;
  color: var(--alm-fg-light-secondary);
  border-bottom: 1px solid var(--alm-border-light);
  vertical-align: top;
}

.alm-controls-table tr:last-child td { border-bottom: none; }

.alm-controls-table td:first-child {
  font-weight: 600;
  color: var(--alm-fg-light-primary);
  width: 22%;
}

/* Subpage hero */
.alm-subhero {
  padding-top: calc(var(--alm-nav-height) + 56px);
  padding-bottom: 56px;
  background: var(--alm-bg-light);
}

.alm-subhero--dark {
  padding-top: calc(var(--alm-nav-height) + 56px);
  padding-bottom: 56px;
  background: var(--alm-bg-dark);
}

.alm-subhero__inner {
  max-width: var(--alm-container);
  margin: 0 auto;
  padding: 0 24px;
}

.alm-subhero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.alm-subhero--dark .alm-subhero__eyebrow,
.alm-section--dark .alm-subhero__eyebrow {
  color: var(--alm-accent-aa-on-dark);
}

.alm-subhero .alm-subhero__eyebrow {
  color: var(--alm-accent-aa-on-light);
}

.alm-subhero__h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 700px;
}

.alm-subhero .alm-subhero__h1 {
  color: var(--alm-fg-light-primary);
}

.alm-subhero--dark .alm-subhero__h1 {
  color: var(--alm-fg-dark-primary);
}

.alm-subhero__sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  max-width: 580px;
}

.alm-subhero .alm-subhero__sub {
  color: var(--alm-fg-light-secondary);
}

.alm-subhero--dark .alm-subhero__sub {
  color: var(--alm-fg-dark-secondary);
}

.alm-subhero__ctas {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Split layout for subpages (hero with right visual) */
.alm-subhero__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.alm-subhero__visual {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .alm-subhero__split { grid-template-columns: 1fr; }
  .alm-subhero__visual { justify-content: flex-start; }
}
