/* "Titles only" / "With details" switch and folding sections (home page and All tools) */
.tv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0 4px; }
.tv-switch { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.tv-switch button { border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; min-height: 36px; font: 700 14px var(--font-body); color: var(--ink-soft); cursor: pointer; }
.tv-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tv-all { border: 0; background: none; font: 600 14px var(--font-body); color: var(--ink-soft); cursor: pointer; padding: 8px 4px; }
.tv-all:hover { color: var(--ink); }
.tv-head { cursor: pointer; user-select: none; }
.tv-fold { margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.75); color: var(--ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: transform .2s; }
.tv-fold span { display: block; transition: transform .2s; }
.tv-folded .tv-fold span { transform: rotate(-90deg); }
.tv-folded > :not(.tv-head) { display: none !important; }
html.tv-searching .tv-folded > :not(.tv-head) { display: revert !important; }
html.tv-searching .tv-folded > .tl-cards { display: grid !important; }
/* the home page's sections when folded: just the heading */
.tool-group.tv-folded { padding-bottom: 14px; }
.tool-group.tv-folded .grp { margin-bottom: 0; }

/* ---- Titles only (the default): home page tiles ---- */
html:not(.tv-detail) .tool-groups .tools { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
html:not(.tv-detail) .tool-groups .tool { position: relative; padding: 16px 8px 14px; gap: 8px; align-items: center; text-align: center; border-radius: 16px; }
html:not(.tv-detail) .tool-groups .tool .top { justify-content: center; }
html:not(.tv-detail) .tool-groups .tool h3 { font-size: 15.5px; line-height: 1.25; }
html:not(.tv-detail) .tool-groups .tool p, html:not(.tv-detail) .tool-groups .tool .go, html:not(.tv-detail) .tool-groups .tool .badge, html:not(.tv-detail) .tool-groups .tool .hx-row { display: none; }
html:not(.tv-detail) .tool-groups .tool.tv-new::after { content: ''; position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 2px #fff; }
/* ---- Titles only: All tools page tiles ---- */
html:not(.tv-detail) .tl-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
html:not(.tv-detail) .tl-c { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 8px 12px; }
html:not(.tv-detail) .tl-c .i { width: auto; font-size: 30px; }
html:not(.tv-detail) .tl-c .w { align-items: center; }
html:not(.tv-detail) .tl-c b { font-size: 15px; line-height: 1.25; }
html:not(.tv-detail) .tl-c .w span, html:not(.tv-detail) .tl-c small { display: none; }
.tl-g h2.tv-head { display: flex; align-items: center; gap: 8px; }
.tl-g .tv-fold { background: var(--surface); border: 1px solid var(--line); width: 32px; height: 32px; font-size: 16px; }
@media (max-width: 640px) {
  .tv-bar { margin: 12px 0 0; }
  .tv-switch button { padding: 6px 11px; font-size: 13px; }
  html:not(.tv-detail) .tool-groups .tools, html:not(.tv-detail) .tl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  html:not(.tv-detail) .tool-groups .tool { padding: 12px 6px 10px; gap: 6px; border-radius: 14px; }
  html:not(.tv-detail) .tool-groups .tool .icon { width: 44px; height: 44px; }
  html:not(.tv-detail) .tool-groups .tool h3, html:not(.tv-detail) .tl-c b { font-size: 14px; line-height: 1.2; }
  html:not(.tv-detail) .tl-c { padding: 12px 6px 10px; }
  .tv-fold { width: 32px; height: 32px; font-size: 16px; }
  .tool-groups .grp .gc { margin-left: 0; }
}
.tool-groups .grp.tv-head { flex-wrap: nowrap; }
.tool-groups .grp.tv-head .gn { min-width: 0; }
.tool-groups .grp.tv-head .gc { flex: none; }
