/*
 * Catalog + landing sections.
 *
 * The layouts here mirror the marketplace reference page-by-page: the catalog
 * hero, the popular pill row, the category card grid, the skill columns, the
 * curated collections and the A–Z category index.
 *
 * Loads after site.css, so these win on equal specificity.
 */

/* ---- tabs ---------------------------------------------------------------- */

/*
 * The homepage's middle sections used to render everything at once — ten skill
 * columns, then three process steps, then plans — which read as an
 * unmanageable wall. Tabs are how the reference handles the same content, and
 * they collapse it to one view at a time without hiding anything.
 *
 * Progressive enhancement: every panel is in the markup, and the tab controls
 * are links to anchors, so the content is all reachable and indexable with
 * JavaScript disabled. JS upgrades it to an interactive tablist.
 */
.mk-tabs {
  margin: 0;
}

.mk-tabs__list {
  display: flex;
  gap: 4px;
  margin: 0 0 22px;
  padding: 0 0 1px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.mk-tabs__list::-webkit-scrollbar {
  display: none;
}

.mk-tabs__tab {
  position: relative;
  flex: 0 0 auto;
  padding: 11px 16px 13px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease;
}

.mk-tabs__tab:hover {
  color: var(--ink);
}

.mk-tabs__tab:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: -2px;
  border-radius: var(--r-sm);
}

.mk-tabs__tab[aria-selected='true'],
.mk-tabs__tab.is-active {
  color: var(--brand-700);
  font-weight: 600;
}

.mk-tabs__tab[aria-selected='true']::after,
.mk-tabs__tab.is-active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-600);
}

.mk-tabs__panel[hidden] {
  display: none;
}

.mk-tabs__panel:focus-visible {
  outline: none;
}

/* ---- section rhythm ------------------------------------------------------ */

.mk-section--flush {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Split banner under the hero: promise on one side, explanation on the other. */
.mk-split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.mk-split h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 10px 0 0;
}

.mk-split > p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}

@media (max-width: 820px) {
  .mk-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ---- popular searches ---------------------------------------------------- */

.mk-searches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.mk-searches a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}

.mk-searches a:hover {
  border-color: var(--brand-600);
  color: var(--brand-700);
}

.mk-searches svg {
  flex: 0 0 auto;
  color: var(--muted-2);
}

/* ---- skill columns ------------------------------------------------------- */

.mk-skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

/* Inside a tab panel there is one department per view, so the columns can go
   two-up with room for the description rather than ten cramped columns. */
.mk-skills--split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 760px) {
  .mk-skills--split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.mk-skills__lede {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* A row of links inside a tab panel: label on one line, price on the right.
   Replaces the old ten-column dump where every price stacked under its title. */
.mk-linkrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .12s ease, color .12s ease;
}

.mk-linkrow:hover {
  background: var(--surface-2);
  color: var(--brand-700);
}

.mk-linkrow:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: -2px;
}

.mk-linkrow span {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.mk-skills__col h3 {
  font-size: 14px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.mk-skills__col h3 a {
  color: var(--ink);
  text-decoration: none;
}

.mk-skills__col h3 a:hover {
  color: var(--brand-700);
}

.mk-skills__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mk-skills__col li a {
  display: block;
  padding: 5px 0;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
}

.mk-skills__col li em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.mk-skills__col li a:hover {
  color: var(--brand-700);
}

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

.mk-cataloghero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 260px at 15% -50%, rgba(12, 135, 234, .12), transparent 70%),
    var(--surface);
}

.mk-cataloghero h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 14px;
  max-width: 20ch;
}

.mk-cataloghero p {
  max-width: 62ch;
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---- pill row ------------------------------------------------------------ */

.mk-pillrow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mk-pillrow a {
  display: inline-block;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}

.mk-pillrow a:hover {
  border-color: var(--brand-600);
  color: var(--brand-700);
}

/* ---- category card grid -------------------------------------------------- */

.mk-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.mk-cats__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}

.mk-cats__card:hover {
  border-color: var(--brand-600);
  transform: translateY(-2px);
}

.mk-cats__card strong {
  font-size: 15.5px;
  color: var(--ink);
}

.mk-cats__card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-700);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.mk-cats__card em {
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---- A–Z category index -------------------------------------------------- */

.mk-allycats {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 32px;
}

.mk-allycats li {
  break-inside: avoid;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.mk-allycats a {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
}

.mk-allycats a:hover {
  color: var(--brand-700);
}

@media (max-width: 760px) {
  .mk-allycats {
    columns: 1;
  }
}