/* Card identity remains shared with mx; V2 owns focus and content rhythm. */
.directory-hero > picture { display: contents; }
#view .function-directory,
#view .function-directory .directory-hero,
#view .function-directory .directory-hero-copy,
#view .function-directory .directory-hero-meta,
#view .function-directory .directory-hero-filters {
  min-width: 0;
  max-width: 100%;
}
#view .function-directory .directory-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; height: auto; min-height: 240px; padding: 26px 28px 18px; }
#view .function-directory .directory-hero-copy { position: relative; inset: auto; max-width: none; grid-column: 1; grid-row: auto; z-index: 1; }
#view .function-directory .directory-greeting { color: #e0ece8; font-size: 13px; margin: 0 0 10px; overflow-wrap: anywhere; max-width: 100%; }
#view .function-directory .directory-hero-copy h2 { font-size: 28px; line-height: 1.4; letter-spacing: 0; }
#view .function-directory .directory-hero-copy h2 span { color: #f4df9b; }
#view .function-directory .directory-hero-meta,
#view .function-directory .directory-hero-filters { position: relative; inset: auto; grid-row: auto; grid-column: 1; z-index: 1; padding: 0; }
#view .function-directory .directory-hero-meta { gap: 22px; flex-wrap: wrap; }
/* Desktop keeps the compact button widths; mobile uses content-sized scrolling below. */
#view .function-directory .directory-hero-filters .filter { width: 74px; flex: 0 0 74px; padding-inline: 0 !important; font-size: 16px !important; font-weight: 700 !important; line-height: 20px; letter-spacing: 0; white-space: nowrap; }
#view .function-directory .directory-hero-filters .filter:first-child { width: 50px; flex-basis: 50px; }
#view .function-directory .directory-hero-filters .filter > span { display: block; white-space: nowrap; }
.home-current-tasks { margin: 0 0 22px; }
.home-current-tasks > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.home-current-tasks h2 { margin: 0; font-size: 16px; }
.home-current-tasks h2 span { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.home-current-tasks > header .text-button { min-height: 44px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--navigation-accent); }
.home-current-tasks > header svg { width: 16px; height: 16px; }
.home-task-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.home-task { display: flex; align-items: center; width: 100%; min-width: 0; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-align: left; color: var(--ink); cursor: pointer; }
.home-task:hover { border-color: var(--navigation-accent); }
.home-task:focus-visible { outline: 2px solid var(--navigation-accent); outline-offset: 2px; }
.home-task > .workflow-logo { width: 42px; height: 42px; flex: none; display: grid; place-items: center; background: var(--strong); border-radius: 8px; color: var(--navigation-accent); }
.home-task .workflow-logo svg { width: 24px; height: 24px; }
.home-task > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.home-task-copy { min-width: 0; flex: 1; }
.home-task-copy > b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 8px; font-size: 14px; }
@media (max-width: 600px) {
  #view .function-directory .directory-hero { min-height: 0; padding: 18px 14px 14px; gap: 18px; }
  #view .function-directory .directory-hero-copy h2 { font-size: 24px; }
  #view .function-directory .directory-hero-meta { gap: 14px; }
  #view .function-directory .directory-hero-filters {
    container-type: inline-size;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
  }
  #view .function-directory .directory-hero-filters .filter,
  #view .function-directory .directory-hero-filters .filter:first-child {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    height: auto;
    min-height: 40px;
    padding: 8px 12px !important;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    overflow: visible;
    text-overflow: clip;
  }
  #view .function-directory .directory-hero-filters .filter > span {
    display: block;
    white-space: nowrap;
    font-size: 16px;
    line-height: 1.35;
  }
  /* Keep at most two columns; enlarged text gives each card a full readable row. */
  #view .function-directory .catalog-grid.compact-grid {
    --catalog-mobile-gap: 12px;
    gap: var(--catalog-mobile-gap);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(8.5em, calc((100% - var(--catalog-mobile-gap)) / 2))), 1fr));
  }
  #view .function-directory .compact-grid .catalog-item {
    min-width: 0;
    grid-template-rows: minmax(var(--card-icon), auto) auto auto auto auto;
  }
  #view .function-directory .compact-grid .catalog-tag {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  .home-task { padding: 12px; gap: 10px; }
  .home-task > .workflow-logo { width: 36px; height: 40px; }
}
@media (max-width: 360px) {
  #view .function-directory .catalog-grid.compact-grid { --catalog-mobile-gap: 10px; }
}
#view .function-directory .catalog-copy b,
#view .function-directory .catalog-points,
#view .function-directory .catalog-tag { letter-spacing: 0; }
#view .function-directory .compact-grid .catalog-item::after { content: none; }
#view .function-directory .catalog-item:focus-visible { outline: 2px solid var(--navigation-accent); outline-offset: 3px; }
#view .function-directory .compact-grid .catalog-outcome { border-radius: 6px; }
#view .function-directory .catalog-grid:not(.compact-grid) .catalog-item:focus-visible { outline-offset: -2px; }
#view .tutorial-page { max-width: 800px; }
.tutorial-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px 16px; padding: 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.tutorial-number { display: grid; place-items: center; grid-row: 1 / 3; width: 40px; height: 44px; border-radius: 6px; border: 1px solid var(--line2); background: var(--soft); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--navigation-accent); }
.tutorial-step h2 { margin: 0; font-size: 18px; color: var(--ink); }
.tutorial-step p { margin: 0; font-size: 14px; line-height: 1.85; color: var(--muted); }
.tutorial-actions { display: flex; justify-content: flex-end; padding-top: 16px; }
@media (max-width: 600px) {
  .tutorial-step { gap: 6px 12px; padding: 18px 14px; }
  .tutorial-step h2 { font-size: 17px; }
  .tutorial-actions .button { width: 100%; }
}
