/* ==========================================================================
   Coggno help center — Home (Guided)
   Values taken from the redesign canvas. Namespaced .cg- throughout.
   Depends on coggno-tokens.css.
   ========================================================================== */

.cg-home { font-family: var(--font-primary); color: var(--fg-1); background: #fff; }
.cg-home *, .cg-home *::before, .cg-home *::after { box-sizing: border-box; }
.cg-home h1, .cg-home h2, .cg-home h3, .cg-home p, .cg-home ul { margin: 0; }
.cg-home ul { list-style: none; padding: 0; }

.cg-vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.cg-shell { max-width: 1405px; margin: 0 auto; padding-inline: 48px; }

.cg-eyebrow {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--coggno-product-blue);
}

/* --- hero ---------------------------------------------------------------- */

.cg-hero { background: var(--coggno-navy); color: #fff; }
.cg-hero__inner {
  max-width: 1405px;
  margin: 0 auto;
  padding: 64px 48px 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.cg-hero__eyebrow {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--coggno-sky);
}
.cg-hero__title {
  font-size: 46px;
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: #fff;
  max-width: 18ch;
}
.cg-hero__sub {
  font-size: 17px;
  line-height: var(--lh-body);
  color: #c6d6e8;
  max-width: 62ch;
}

.cg-hero__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 680px;
  padding: 6px 6px 6px 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.cg-hero__search-icon { color: var(--fg-2); flex: none; }
.cg-hero__search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 0;
  background: none;
  font: 400 16px/1 var(--font-primary);
  color: var(--fg-1);
  -webkit-appearance: none;
  appearance: none;
}
.cg-hero__search-input:focus { outline: none; }
.cg-hero__search-input::placeholder { color: var(--input-placeholder); }
.cg-hero__search-btn {
  flex: none;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--coggno-primary-blue);
  color: #fff;
  font: 600 15px/1 var(--font-primary);
  cursor: pointer;
}
.cg-hero__search-btn:hover { background: var(--coggno-product-blue-hover); }

.cg-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cg-chips a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 13px;
  color: #dce8f5;
  text-decoration: none;
}
.cg-chips a:hover { background: rgba(255, 255, 255, .22); color: #fff; text-decoration: none; }

/* --- role tracks (overlap the hero) -------------------------------------- */

.cg-tracks { max-width: 1405px; margin: 0 auto; padding: 0 48px; }
.cg-tracks__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: -52px;
}
.cg-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--coggno-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.cg-track:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.cg-track__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
}
.cg-track--blue   .cg-track__icon { background: #e4edfb; color: #2964ae; }
.cg-track--green  .cg-track__icon { background: #e2f5e9; color: #24a854; }
.cg-track--purple .cg-track__icon { background: #ece6fa; color: #6b46c1; }
.cg-track--amber  .cg-track__icon { background: #fdf0dd; color: #b26b06; }
.cg-track__title { font-size: 17px; font-weight: 600; }
.cg-track__desc  { font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.cg-track__more  { font-size: 14px; font-weight: 600; color: var(--coggno-product-blue); margin-top: auto; }

/* --- browse by topic ----------------------------------------------------- */

.cg-topics { max-width: 1405px; margin: 0 auto; padding: 64px 48px 0; }
.cg-topics__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.cg-topics__title {
  font-size: 32px;
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin-top: 8px;
}
.cg-topics__all {
  font-size: 14px; font-weight: 600; color: var(--coggno-product-blue);
  white-space: nowrap; background: none; border: 0; padding: 0;
  font-family: inherit; cursor: pointer;
}
.cg-topics__all::after {
  content: " \2192"; display: inline-block; transition: transform .18s ease;
}
.cg-topics__all.is-open::after { transform: rotate(90deg); }
.cg-topics__all:hover { text-decoration: underline; }
.cg-topics__all:focus-visible { outline: 2px solid var(--coggno-product-blue); outline-offset: 3px; border-radius: 4px; }

/* --- all-topics dropdown ---------------------------------------------
   A menu hung off the "View all topics" link, not a section of the page:
   the six curated cards below stay the design's focus. Built from Guide's
   own category and section tree, so it needs no upkeep. */
.cg-alltopics__wrap { position: relative; flex: none; }

.cg-alltopics {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(760px, calc(100vw - 96px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--coggno-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.cg-alltopics__grid { column-count: 3; column-gap: 28px; }
.cg-alltopics__cat {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  min-width: 0;
  margin: 0 0 18px;
}
.cg-alltopics__catname {
  margin: 0 0 8px;
  padding-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
  line-height: var(--lh-tight);
  border-bottom: 1px solid var(--coggno-border-subtle);
}
.cg-alltopics__catname a { color: var(--coggno-navy); text-decoration: none; }
.cg-alltopics__catname a:hover { color: var(--coggno-product-blue); }
.cg-alltopics__secs { list-style: none; margin: 0; padding: 0; }
.cg-alltopics__secs li { margin: 0 0 4px; }
.cg-alltopics__secs a {
  font-size: 13px; line-height: 1.45; color: var(--fg-2); text-decoration: none;
}
.cg-alltopics__secs a:hover { color: var(--coggno-product-blue); text-decoration: underline; }

@media (max-width: 1100px) {
  .cg-alltopics { width: min(560px, calc(100vw - 64px)); }
  .cg-alltopics__grid { column-count: 2; }
}
@media (max-width: 860px) {
  /* The head stacks here, so the menu can no longer hang off the link:
     drop it into the flow at full width instead. */
  .cg-alltopics__wrap { position: static; width: 100%; }
  .cg-alltopics {
    position: static;
    width: 100%;
    max-height: 60vh;
    margin-top: 12px;
    padding: 18px;
  }
  .cg-alltopics__grid { column-count: 1; }
}

.cg-topics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.cg-topic {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--coggno-border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.cg-topic:hover { border-color: var(--coggno-soft-blue); box-shadow: var(--shadow-md); }

.cg-topic__head { display: flex; align-items: center; gap: 14px; }
.cg-topic__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
}
.cg-topic__title { font-size: 18px; font-weight: 600; color: var(--coggno-text-primary); }
.cg-topic__title a { color: inherit; text-decoration: none; }
.cg-topic__title a:hover { color: var(--coggno-product-blue); text-decoration: none; }
.cg-topic__count { font-size: 13px; font-weight: 500; color: var(--coggno-text-secondary); margin-top: 3px; }
.cg-topic__desc  { font-size: 15px; line-height: var(--lh-body); color: var(--coggno-text-gray); }
.cg-topic__rule  { height: 1px; background: var(--coggno-light-blue); }

.cg-topic__links { display: flex; flex-direction: column; gap: 9px; }
.cg-topic__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--coggno-text-primary);
  text-decoration: none;
}
.cg-topic__links a:hover { color: var(--coggno-product-blue); text-decoration: underline; }

.cg-topic--blue   .cg-topic__icon { background: #e4edfb; color: #2964ae; }
.cg-topic--green  .cg-topic__icon { background: #e2f5e9; color: #24a854; }
.cg-topic--purple .cg-topic__icon { background: #ece6fa; color: #6b46c1; }
.cg-topic--amber  .cg-topic__icon { background: #fdf0dd; color: #b26b06; }
.cg-topic--teal   .cg-topic__icon { background: #ddf2f2; color: #0f9b9b; }
.cg-topic--red    .cg-topic__icon { background: #fde7e3; color: #d93a17; }

/* --- release notes ------------------------------------------------------- */

.cg-release { max-width: 1405px; margin: 0 auto; padding: 56px 48px 0; }
.cg-release__panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  padding: 32px;
  background: var(--coggno-light-blue);
  border-radius: var(--radius-xl);
}
.cg-release__intro { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cg-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--coggno-product-blue);
  color: #fff;
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.cg-release__title { font-size: 24px; font-weight: 700; line-height: var(--lh-tight); }
.cg-release__sub   { font-size: 14px; line-height: 1.55; color: var(--fg-3); }

.cg-release__list { display: flex; flex-direction: column; gap: 10px; }
/* the promoted list can be long — show the four most recent */
.cg-release__item:nth-child(n+5) { display: none; }
.cg-release__item a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
}
.cg-release__item a:hover { box-shadow: var(--shadow-sm); text-decoration: none; }
.cg-release__date {
  flex: none;
  min-width: 54px;
  font-size: 13px;
  font-weight: 600;
  color: var(--coggno-text-secondary);
}
.cg-release__date:empty { display: none; }
.cg-release__headline {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--coggno-text-primary);
}
.cg-release__tag {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #dde7f9;
  color: var(--coggno-primary-blue);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cg-release__tag:empty { display: none; }
.cg-release__item a:hover .cg-release__headline { color: var(--coggno-product-blue); }

@media (max-width: 700px) {
  .cg-release__item a { flex-wrap: wrap; gap: 8px 12px; }
  .cg-release__headline { flex: 1 1 100%; order: 3; }
}

/* --- videos -------------------------------------------------------------- */

.cg-videos { max-width: 1405px; margin: 0 auto; padding: 56px 48px 0; }
.cg-videos__head { margin-bottom: 24px; }
.cg-videos__title { font-size: 28px; font-weight: 700; margin-top: 8px; letter-spacing: var(--tracking-tight); }
.cg-videos__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.cg-video[hidden] { display: none !important; }
.cg-video { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.cg-video h3 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.cg-video__role { font-size: 13px; color: var(--coggno-text-secondary); margin-top: -4px; }
.cg-videos[hidden] { display: none !important; }
.cg-video:hover h3 { color: var(--coggno-product-blue); }
.cg-video__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: #dfe6ef center/cover no-repeat;
  overflow: hidden;
}
.cg-video__thumb::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(1, 40, 80, .82);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .25);
}
.cg-video__thumb::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}
.cg-video:hover .cg-video__thumb::after { background: var(--coggno-product-blue); }

/* --- contact cta --------------------------------------------------------- */

.cg-cta { max-width: 1405px; margin: 0 auto; padding: 64px 48px 72px; }
.cg-cta__panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  padding: 40px 44px;
  background: var(--coggno-navy);
  border-radius: var(--radius-xl);
  color: #fff;
}
.cg-cta__title { font-size: 26px; font-weight: 700; line-height: var(--lh-tight); }
.cg-cta__sub   { font-size: 16px; color: #b9c8e8; margin-top: 8px; }
.cg-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cg-btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font: 600 15px/1 var(--font-primary);
  text-decoration: none;
}
.cg-btn--light { background: #fff; color: var(--coggno-navy); }
.cg-btn--light:hover { background: #e9f2ff; color: var(--coggno-navy); text-decoration: none; }
.cg-btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.cg-btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .cg-tracks__grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-topics__grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-videos__grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-release__panel { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 860px) {
  .cg-hero__inner { padding: 48px 20px 68px; }
  .cg-hero__title { font-size: 34px; }
  .cg-hero__sub   { font-size: 16px; }
  .cg-hero__search { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .cg-hero__search-icon { display: none; }
  .cg-hero__search-input { flex: 1 1 100%; height: 40px; padding-inline: 8px; }
  .cg-hero__search-btn { flex: 1 1 100%; }

  .cg-tracks  { padding-inline: 20px; }
  .cg-topics  { padding: 48px 20px 0; }
  .cg-release { padding: 40px 20px 0; }
  .cg-videos  { padding: 40px 20px 0; }
  .cg-cta     { padding: 48px 20px 56px; }

  .cg-topics__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cg-topics__title { font-size: 26px; }
  .cg-videos__title { font-size: 24px; }
  .cg-cta__panel { padding: 28px 24px; gap: 24px; }
  .cg-cta__title { font-size: 22px; }
}

@media (max-width: 560px) {
  .cg-tracks__grid { grid-template-columns: 1fr; margin-top: -40px; }
  .cg-topics__grid { grid-template-columns: 1fr; }
  .cg-videos__grid { grid-template-columns: 1fr; }
  .cg-cta__actions .cg-btn { flex: 1 1 100%; text-align: center; }
}

/* --- mobile home (1g) ----------------------------------------------------
   The phone artboard condenses the page: two-up role tracks with no body
   copy, topics as a simple list, and no quick-search chips.              */
@media (max-width: 560px) {
  .cg-chips { display: none; }

  .cg-tracks__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: -34px; }
  .cg-track { padding: 16px 14px; gap: 10px; align-items: flex-start; }
  .cg-track__desc, .cg-track__more { display: none; }
  .cg-track__title { font-size: 14px; }
  .cg-track__icon { width: 38px; height: 38px; }

  .cg-topics__grid { gap: 0; border: 1px solid var(--coggno-border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
  .cg-topic {
    flex-direction: row; align-items: center; gap: 14px;
    padding: 14px 16px; border: 0; border-radius: 0;
  }
  .cg-topic + .cg-topic { border-top: 1px solid #eef1f4; }
  .cg-topic:hover { box-shadow: none; }
  .cg-topic__head { flex: 1 1 auto; min-width: 0; }
  .cg-topic__desc, .cg-topic__rule, .cg-topic__links { display: none; }
  .cg-topic__title { font-size: 15px; }
  .cg-topic::after {
    content: ""; flex: none; width: 8px; height: 8px;
    border-right: 2px solid #9da9cc; border-top: 2px solid #9da9cc;
    transform: rotate(45deg);
  }
}
