/* ==========================================================================
   Guides hub — guides.css (1 Dec 2026)
   Loaded only on /guides (src/routes/guides.tsx), after base.css and public.css.
   Colours come from the theme tokens in base.css, so light and dark both work.
   Movement stays in motion.css: cards use .card-stretch (lift on hover, press
   on tap) and the lists keep .guide-cards, so motion.js reveals them.
   Phones: one column; tablets: two; desktop: three.
   ========================================================================== */

/* -------------------------------------------------------------- jump pills */
.hub-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: clamp(1.4rem, 3vw, 2rem);
}
.hub-jump-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.hub-jump ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hub-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}
.hub-jump a:hover {
  background: var(--ink);
  color: var(--paper);
}
.hub-jump a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* -------------------------------------------------------------- shared */
.hub .guide-cards {
  gap: 14px;
}
.hub [id] {
  scroll-margin-top: 90px;
}
.hub-card,
.hub-tile,
.hub-start-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow-wrap: break-word;
}
/* One link per card; its ::after covers the card, so the whole card is clickable. */
.hub h3 a,
.hub h4 a {
  color: var(--ink);
  text-decoration: none;
}
.hub .card-stretch h4 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.hub .card-stretch h3 a:focus-visible,
.hub .card-stretch h4 a:focus-visible {
  outline: none;
}
.hub .card-stretch:hover h3 a,
.hub .card-stretch:hover h4 a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.hub .card-stretch:active {
  background: var(--paper-2);
}
.hub-card p,
.hub-tile p,
.hub-start-card p {
  margin: 0;
  color: var(--ink-2);
}
.hub-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: auto !important;
  padding-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-3) !important;
}
.hub-tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------- start here */
.hub-start-title {
  font-size: 12.5px;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 1.4rem;
}
.hub .hub-start-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 20px;
}
@media (min-width: 720px) {
  .hub .hub-start-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.hub-start-card {
  border: 3px solid var(--red);
  padding: clamp(24px, 3vw, 32px) clamp(18px, 3vw, 30px) clamp(18px, 2.4vw, 24px);
  gap: 0.5rem;
}
.hub-start-label {
  position: absolute;
  left: 20px;
  top: -14px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--red);
  color: #0f0e11;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hub-start-card h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0;
  max-width: 24ch;
}
.hub-start-card > p {
  font-size: 1.0625rem;
  max-width: 52ch;
}
.hub-start-inside {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0.8rem 0 0;
  border-top: 1.5px solid var(--rule);
  display: grid;
  gap: 0.3rem;
  font-size: 0.9375rem;
  color: var(--ink);
}
.hub-start-inside li {
  position: relative;
  padding-left: 1.1rem;
}
.hub-start-inside li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hub-start-card .card-arrow {
  margin: 0 0 0 auto;
  padding: 0;
}
/* On phones the list of sections is left out, so the two cards stay short. */
@media (max-width: 599px) {
  .hub-start-inside {
    display: none;
  }
}

/* -------------------------------------------------------------- parts and topics */
.hub-part {
  margin-top: clamp(3rem, 7vw, 4.6rem);
}
.hub-part-head {
  padding-top: 0.9rem;
  border-top: 2px solid var(--rule-strong);
  margin-bottom: 0.4rem;
}
.hub-part-head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  margin: 0 0 0.35rem;
}
.hub-part-head p {
  margin: 0;
  color: var(--ink-2);
  max-width: 60ch;
}
.hub-topic {
  margin-top: clamp(1.6rem, 3.4vw, 2.2rem);
}
.hub-topic-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-bottom: 0.85rem;
}
.hub-topic-head h3 {
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.7vw, 21px);
  margin: 0;
}
.hub-topic-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

/* -------------------------------------------------------------- cards */
.hub .hub-grid {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .hub .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .hub .hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.hub-card {
  padding: 18px 20px 16px;
  gap: 0.35rem;
}
.hub-card h4 {
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.25;
  margin: 0;
}
.hub-card > p:not(.hub-card-meta) {
  font-size: 0.9375rem;
  line-height: 1.5;
}
@media (max-width: 639px) {
  .hub-card {
    padding: 14px 16px 13px;
  }
}

/* Industry guides: small tiles, two across on phones, four on wide screens. */
.hub .hub-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 900px) {
  .hub .hub-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.hub-tile {
  padding: 14px 16px;
  gap: 0.2rem;
}
.hub-tile h4 {
  font-size: 1.0625rem;
  margin: 0;
}
.hub-tile p {
  font-size: 0.875rem;
  line-height: 1.4;
}
@media (max-width: 399px) {
  .hub-tile {
    padding: 12px 12px;
  }
  .hub-tile h4 {
    font-size: 1rem;
  }
}

/* -------------------------------------------------------------- blog line */
.hub-blog {
  margin: clamp(2.6rem, 6vw, 3.6rem) 0 0;
  padding: 16px 18px;
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius-lg);
  color: var(--ink-2);
}
.hub-blog .hub-tag {
  margin-right: 6px;
  vertical-align: 1px;
}
.hub-blog a {
  font-weight: 700;
  white-space: nowrap;
}
