/* hub-standard.css — structure-only primitives for help-first hub pages.
 * Theme (colors, borders, gradients) provided by per-page namespace (.mh-*, .uc-*, etc).
 * Extracted from .vr-* (voluntary-return.astro) and .ch-* (children.astro) gold-standard pages.
 * NOT imported globally — pages opt in via <link rel="stylesheet" href="/hub-standard.css" />.
 */

/* ── Breadcrumb ── */
/* The global style.css has `nav { position: sticky; z-index: 100; top: 0 }`,
 * which would make a <nav class="hubstd-crumb"> stick over the site header
 * (z-index 40) on scroll. Neutralise it for our breadcrumb nav. */
.hubstd-crumb {
  position: static;
  z-index: auto;
  top: auto;
}

/* ── Layout ── */

.hubstd-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.hubstd-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0;
}

.hubstd-page-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  padding: 48px 0 80px;
  align-items: flex-start;
}

/* ── Hero ── */

.hubstd-hero {
  padding: 28px 0 48px;
  position: relative;
}

.hubstd-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 640px;
  margin-bottom: 28px;
}

.hubstd-hero-actions a,
.hubstd-hero-actions button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

/* ── TOC ── */

.hubstd-toc {
  position: sticky;
  top: 96px;
  border-radius: 14px;
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  /* default theme (override per-page if needed) */
  background: var(--snl-paper, #fff);
  border: 1px solid var(--snl-border, #E9DFCC);
}

.hubstd-toc ul,
.hubstd-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* TOC heading "На этой странице" */
.hubstd-toc__h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--snl-ink-3, #6F7A8E);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--snl-border, #E9DFCC);
}

.hubstd-toc__item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  min-height: 44px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 2px;
  text-decoration: none;
  color: var(--snl-ink-2, #42506B);
  transition: background 0.15s, color 0.15s;
}

.hubstd-toc__item:hover {
  background: var(--snl-sage-50, #EEF8F1);
  color: var(--snl-sage-700, #22604A);
}

.hubstd-toc__item.is-on {
  font-weight: 600;
  background: var(--snl-sage-100, #DFF0E6);
  color: var(--snl-sage-700, #22604A);
}

.hubstd-toc__num {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.6875rem;
  flex-shrink: 0;
  padding-top: 1px;
  color: var(--snl-ink-3, #6F7A8E);
}

.hubstd-toc__item.is-on .hubstd-toc__num {
  color: var(--snl-sage, #3E8C6B);
}

/* ── Sections ── */

.hubstd-sec-hd {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--snl-border, #E9DFCC);
}

.hubstd-sec-num {
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  flex-shrink: 0;
  color: var(--snl-sage-700, #22604A);
  background: var(--snl-sage-100, #DFF0E6);
}

.hubstd-sec-mini {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--snl-ink-3, #6F7A8E);
}

/* ── Express "no time to read" block ── */

.hubstd-express {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ECFDF5;
  border: 2px solid #10b981;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 18px 0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}

.hubstd-express:hover { transform: translateY(-1px); }
.hubstd-express__ico { font-size: 1.5rem; flex-shrink: 0; }
.hubstd-express__b { flex: 1; min-width: 0; }
.hubstd-express__k { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #065f46; }
.hubstd-express__t { display: block; font-size: 0.95rem; font-weight: 800; color: #065f46; }
.hubstd-express__s { display: block; font-size: 0.8125rem; color: #047857; margin-top: 2px; }
.hubstd-express__arrow { font-size: 1.2rem; color: #065f46; flex-shrink: 0; }

/* ── Express path card ── */

.hubstd-express {
  padding: 20px 24px;
  border-radius: 14px;
  border-style: solid;
  border-width: 1px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hubstd-express:hover {
  transform: translateY(-1px);
}

/* ── Warning callout ── */

.hubstd-warning {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-style: solid;
  border-width: 1px;
  border-left-width: 4px;
  border-radius: 14px;
  padding: 18px 22px;
  max-width: 720px;
}

.hubstd-warning__icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hubstd-warning__body {
  flex: 1;
  min-width: 0;
}

/* ── FAQ ── */

.hubstd-faq {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hubstd-faq__q {
  border-radius: 8px;
  overflow: hidden;
}

.hubstd-faq__q summary {
  padding: 16px 20px;
  font-size: 0.90625rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  user-select: none;
}

.hubstd-faq__q summary::-webkit-details-marker {
  display: none;
}

.hubstd-faq__q summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.hubstd-faq__q[open] summary::after {
  transform: rotate(45deg);
}

.hubstd-faq__body {
  padding: 0 20px 18px 48px;
  font-size: 0.84375rem;
  line-height: 1.55;
}

/* ── Bullet list ── */

.hubstd-bullets {
  list-style: none;
  margin: 0;
  padding: 22px 26px;
  border-radius: 14px;
}

.hubstd-bullets li {
  list-style: none;
  display: flex;
  gap: 14px;
  padding: 14px 0;
  align-items: flex-start;
  min-height: 44px;
}

.hubstd-bullets li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hubstd-bullets li:first-child {
  padding-top: 0;
}

.hubstd-bullets li svg {
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── Bottom safety spacer ── */

.hubstd-sticky-spacer {
  height: 80px;
}

/* ── Responsive: stack TOC on tablet/mobile ── */

@media (max-width: 1200px) {
  .hubstd-page-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hubstd-toc {
    position: static;
    max-height: none;
    order: -1;
    padding: 14px 16px;
  }

  .hubstd-toc-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hubstd-toc-list::-webkit-scrollbar {
    display: none;
  }

  .hubstd-toc__item {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.78125rem;
    margin-bottom: 0;
  }

  .hubstd-toc__num {
    display: none;
  }

  .hubstd-sec-mini {
    display: none;
  }
}

@media (max-width: 900px) {
  .hubstd-shell {
    padding: 0 18px;
  }

  .hubstd-hero {
    padding: 16px 0 28px;
  }

  .hubstd-hero-actions {
    flex-direction: column;
    gap: 8px;
  }

  .hubstd-hero-actions a,
  .hubstd-hero-actions button {
    width: 100%;
    justify-content: center;
    height: 52px;
    font-size: 0.875rem;
  }

  .hubstd-page-grid {
    padding: 24px 0 80px;
  }

  .hubstd-warning {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .hubstd-shell {
    padding: 0 14px;
  }

  .hubstd-bullets {
    padding: 2px 18px;
  }

  .hubstd-bullets li {
    padding: 14px 0;
    gap: 10px;
  }

  .hubstd-warning {
    padding: 14px 16px;
    gap: 12px;
  }

  .hubstd-faq__q summary {
    padding: 14px 16px;
    font-size: 0.84375rem;
    gap: 10px;
  }

  .hubstd-faq__body {
    padding: 0 16px 14px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hubstd-express,
  .hubstd-faq__q summary::after {
    transition: none;
  }
}
