/* v1.55 — App Directory Native Polish. Isolated to the app-directory routes.
   No new dependencies, no nested cards, and no global change to home tiles. */
/* v1.56: the universal 680px .app-shell is authoritative.
   This stylesheet only styles children of the directory, never shell tokens. */
body:is([data-page="apps"],[data-page="app-category"]) .main-content { padding-top:16px; padding-bottom:26px; }
body:is([data-page="apps"],[data-page="app-category"]) .page-heading {
  padding:24px 0 21px; margin:0;
}
body:is([data-page="apps"],[data-page="app-category"]) .page-heading h1 {
  font-size:clamp(26px,calc(30px * var(--hub-font-scale)),38px);
  letter-spacing:-.032em; margin-bottom:8px;
}
body:is([data-page="apps"],[data-page="app-category"]) .page-heading > p:not(.eyebrow) {
  margin:0; max-width:58ch; color:var(--muted); font-size:calc(14px * var(--hub-font-scale));
}
body:is([data-page="apps"],[data-page="app-category"]) .page-heading .eyebrow { margin-bottom:9px; }
body[data-page="apps"] .app-discovery { min-width:0; margin:2px 0 26px; }
body[data-page="apps"] .app-taxonomy-nav { margin:3px 0 18px; }
body[data-page="apps"] .app-taxonomy-label { font-size:12px; font-weight:700; color:var(--muted); margin-right:4px; }
body[data-page="apps"] .app-search {
  width:100%; min-width:0; min-height:52px; padding:0 8px 0 15px;
  border-radius:15px; background:var(--surface-solid); border:1px solid var(--line);
  display:flex; align-items:center; gap:11px; box-shadow:0 7px 22px rgba(12,71,49,.045);
}
body[data-page="apps"] .app-search:focus-within {
  border-color:var(--jade); box-shadow:0 0 0 3px rgba(20,142,104,.13);
}
body[data-page="apps"] .app-search-icon .svg-icon { width:20px;height:20px; }
body[data-page="apps"] .app-search input {
  flex:1; min-width:0; width:100%; height:50px; color:var(--ink);
  font-size:max(16px,calc(14px * var(--hub-font-scale)));
  border:0; background:transparent; outline:0; box-shadow:none; padding:0;
}
body[data-page="apps"] .app-search input::-webkit-search-cancel-button { display:none; }
body[data-page="apps"] .app-search input::placeholder { color:var(--muted); opacity:.9; }
body[data-page="apps"] .app-search-clear {
  display:grid;place-items:center;flex:none;width:38px;height:38px;
  background:transparent;border:0;border-radius:11px;color:var(--muted);
}
body[data-page="apps"] .app-search-clear[hidden] { display:none!important; }
body[data-page="apps"] .app-search-clear:hover { background:var(--paper);color:var(--jade); }
body[data-page="apps"] .app-search-clear .svg-icon { width:18px;height:18px; }
.app-visually-hidden {position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
body[data-page="apps"] .app-category-filters { margin:13px 0 2px;padding:0 0 5px;gap:8px; }
body[data-page="apps"] .app-category-filters button {
  min-height:38px; padding:7px 14px; color:var(--deep);
  border-radius:999px;background:var(--surface-solid);border-color:var(--line);
}
body[data-page="apps"] .app-category-filters button.is-active {
  color:var(--white); background:var(--jade); border-color:var(--jade);
}
body[data-page="apps"] .app-directory-summary {
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:8px 14px; margin:20px 0 13px;
}
body[data-page="apps"] .app-section-title {
  margin:0; color:var(--deep); font-size:clamp(16px,calc(18px * var(--hub-font-scale)),24px);
  letter-spacing:-.02em;line-height:1.35;
}
body[data-page="apps"] .app-result-count { margin:0; font-size:calc(12px * var(--hub-font-scale));white-space:nowrap; }
body:is([data-page="apps"],[data-page="app-category"]) .app-directory-grid {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;
  margin-top:0; padding:0; min-width:0;
}
body:is([data-page="apps"],[data-page="app-category"]) .app-directory-grid > * { min-width:0; }
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory {
  min-width:0; min-height:0; border:1px solid var(--line);
  border-radius:18px; background:var(--surface-solid);
  box-shadow:0 8px 25px rgba(10,77,54,.05);
  overflow:hidden; display:flex; flex-direction:column;
  transition:transform .17s ease,border-color .17s ease,box-shadow .17s ease;
}
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory:hover {
  transform:translateY(-2px);border-color:var(--jade);
  box-shadow:0 15px 28px rgba(10,77,54,.1);
}
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-tile--directory {
  display:flex;flex:1;flex-direction:column;align-items:center;justify-content:flex-start;
  text-align:center; min-height:225px; width:100%; min-width:0;
  padding:19px 14px 14px;gap:11px;
  border:0;background:transparent;box-shadow:none;transform:none;border-radius:0;
}
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-tile--directory:focus-visible,
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-detail-link:focus-visible {outline:3px solid var(--gold);outline-offset:-4px;}
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-icon {
  width:62px;height:62px;min-width:62px;border-radius:19px;
  display:grid;place-items:center;margin:0;
  background:linear-gradient(140deg,#07876a,#085440);color:#f7dda7;
  box-shadow:0 6px 15px rgba(5,91,66,.16);
}
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-icon .svg-icon { width:29px;height:29px;stroke-width:1.8; }
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-icon img {height:100%;width:100%;object-fit:cover;}
body:is([data-page="apps"],[data-page="app-category"]) .app-card-copy {display:flex;flex-direction:column;gap:6px;align-items:center;min-width:0;width:100%;}
body:is([data-page="apps"],[data-page="app-category"]) .app-card-copy strong {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
  overflow:hidden;overflow-wrap:anywhere;width:100%;min-height:2.8em;
  font-size:clamp(13px,calc(14px * var(--hub-font-scale)),19px);
  line-height:1.4;letter-spacing:-.015em;color:var(--deep);font-weight:700;
}
body:is([data-page="apps"],[data-page="app-category"]) .app-tile-summary {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
  overflow:hidden;min-width:0;width:100%;overflow-wrap:anywhere;
  color:var(--muted);font-size:clamp(11px,calc(12px * var(--hub-font-scale)),15px);line-height:1.45;
}
body:is([data-page="apps"],[data-page="app-category"]) .app-open-cta {
  display:flex;align-items:center;justify-content:center;gap:7px;
  margin-top:auto;width:100%;min-height:39px;padding:8px 6px;
  border:1px solid var(--line);border-radius:12px;
  background:var(--paper);color:var(--jade-strong);
  font-size:calc(12px * var(--hub-font-scale));font-weight:700;line-height:1.25;
}
body:is([data-page="apps"],[data-page="app-category"]) .app-open-cta .inline-icon {width:14px;height:14px;}
body:is([data-page="apps"],[data-page="app-category"]) .app-tile--directory:hover .app-open-cta {background:var(--jade);color:var(--white);border-color:var(--jade);}
body:is([data-page="apps"],[data-page="app-category"]) .app-tile--directory.disabled .app-open-cta {opacity:.7;}
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-detail-link {
  min-height:44px; padding:9px; background:transparent;
  color:var(--muted); font-size:calc(12px * var(--hub-font-scale));
  font-weight:600; border-top:1px solid var(--line);
}
body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-detail-link:hover {color:var(--jade);background:var(--paper);}
body[data-page="apps"] .app-directory-empty {
  display:flex;align-items:center;flex-direction:column;text-align:center;
  gap:8px;padding:28px 18px;margin-top:12px;border:1px dashed var(--line);
  border-radius:17px;background:var(--surface);
}
body[data-page="apps"] .app-directory-empty[hidden] {display:none!important;}
body[data-page="apps"] .app-directory-empty strong {font-size:16px;color:var(--deep);}
body[data-page="apps"] .app-directory-empty p {max-width:42ch;margin:0;color:var(--muted);font-size:13px;}
body[data-page="apps"] .app-directory-empty-icon {display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--paper);color:var(--jade);}
body[data-page="apps"] .app-filter-reset {min-height:44px;margin-top:8px;padding:9px 18px;border-radius:12px;border:1px solid var(--jade);background:var(--jade);color:var(--white);font-weight:700;}
body[data-page="app-category"] .app-taxonomy-nav {margin:8px 0 22px;}
body[data-page="app-category"] .app-category-cover {max-height:260px;}
/* v1.59: App Directory inherits the shared bottom navigation at every viewport width.
   Do not hide it at desktop widths: the app shell remains 680px. */
@media (max-width:649px) {
  body:is([data-page="apps"],[data-page="app-category"]) .page-heading {padding:18px 0 18px;}
  body:is([data-page="apps"],[data-page="app-category"]) .page-heading h1 {font-size:clamp(24px,calc(26px * var(--hub-font-scale)),32px);}
  body:is([data-page="apps"],[data-page="app-category"]) .app-directory-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory {border-radius:15px;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-tile--directory {min-height:216px;padding:14px 10px 11px;gap:10px;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-icon {width:54px;height:54px;min-width:54px;border-radius:16px;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-icon .svg-icon {width:26px;height:26px;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-detail-link {min-height:44px;}
  body[data-page="apps"] .app-directory-summary {margin-top:17px;}
  body[data-page="apps"] .app-search {min-height:48px;}
  body[data-page="apps"] .app-search input {height:47px;}
  body[data-page="apps"] .app-category-filters {margin:10px 0 0;}
}
@media (max-width:360px) {
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-tile--directory {padding-inline:7px;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory .app-icon {width:50px;height:50px;min-width:50px;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-card-copy strong {font-size:clamp(12px,calc(13px * var(--hub-font-scale)),17px);}
}
@media (prefers-reduced-motion:reduce) {
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory {transition:none;}
  body:is([data-page="apps"],[data-page="app-category"]) .app-entry--directory:hover {transform:none;}
}
