/* The free tools overview (tools/index.html). Page-only: the shared .t-tool and .t-pillar rules stay in tools.css. */

.t-hub { display: grid; gap: clamp(40px, 5vw, 60px); }
.t-hub .t-pillar { display: grid; gap: 18px; }
.t-hub .t-pillar-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.t-hub .t-pillar-h h2 { margin: 0; font-family: "Sora", sans-serif; font-size: clamp(1.25rem, 2.2vw, 1.5rem); }
.t-hub .t-pillar-h span { color: var(--muted); font-size: .95rem; }

/* Six columns on desktop: Calculate 3+3 then 2+2+2, Check 3+3, Decide as one full-width card. */
.t-hub .t-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.t-hub .hub-s2 { grid-column: span 2; }
.t-hub .hub-s3 { grid-column: span 3; }
.t-hub .hub-s6 { grid-column: 1 / -1; }

/* The card. Its own layout: a main column (icon, name, purpose) and a side column (Example glimpse, Open). */
.t-hub .t-tool {
  position: relative; display: flex; flex-direction: column; gap: 16px; height: 100%; min-width: 0;
  padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  color: var(--text); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: hub-in .6s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.t-hub .t-tool:hover { transform: translateY(-3px); border-color: var(--gold-text); box-shadow: 0 16px 34px -22px rgba(0, 0, 0, .55); }
.t-hub .t-tool:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 3px; }
.t-hub .hc-body { display: grid; gap: 8px; align-content: start; }
.t-hub .hub-top { display: flex; }
.t-hub .hub-top .gp-pchip { width: 44px; height: 44px; color: var(--gp-h); }
.t-hub .hub-top .gp-pico { width: 22px; height: 22px; }
.t-hub .t-tool b { font-family: "Sora", sans-serif; font-size: 1.05rem; line-height: 1.3; }
.t-hub .hub-purpose { color: var(--text-mid); font-size: .92rem; line-height: 1.5; }
.t-hub .hub-side { display: grid; gap: 12px; margin-top: auto; }
.t-hub .hub-glimpse {
  display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: .88rem; line-height: 1.45; font-variant-numeric: tabular-nums;
}
.t-hub .hub-glimpse em {
  font-style: normal; font: 600 .66rem/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text);
}
.t-hub .hub-go { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-text); font-weight: 600; font-size: .92rem; }
.t-hub .hub-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.t-hub .t-tool:hover .hub-go svg, .t-hub .t-tool:focus-visible .hub-go svg { transform: translateX(3px); }
.t-hub .t-tool:hover .gp-spark, .t-hub .t-tool:focus-visible .gp-spark { animation: hub-spark .7s ease both; transform-origin: center; }

/* Decide: one featured card, copy on the left and the example on the right. */
.t-hub .hub-s6 { flex-direction: row; align-items: stretch; gap: 32px; padding: 28px; }
.t-hub .hub-s6 .hc-body { flex: 1 1 0; gap: 10px; }
.t-hub .hub-s6 .hub-side { flex: 1 1 0; align-content: center; margin-top: 0; }
.t-hub .hub-s6 .hub-purpose { font-size: 1rem; }

/* Two columns under 900px. An odd last card takes the full row, so no row is left with one card. */
@media (max-width: 900px) {
  .t-hub .t-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-hub .hub-s2, .t-hub .hub-s3 { grid-column: span 1; }
  .t-hub .hub-odd, .t-hub .hub-s6 { grid-column: 1 / -1; }
  .t-hub .hub-s6 { flex-direction: column; gap: 18px; }
}

@media (max-width: 560px) {
  .t-hub .t-tools { grid-template-columns: minmax(0, 1fr); }
  .t-hub .hub-s2, .t-hub .hub-s3, .t-hub .hub-odd { grid-column: 1 / -1; }
  .t-hub .t-tool { padding: 18px; }
  .t-hub .hub-s6 { padding: 20px; }
}

@keyframes hub-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hub-spark { 0% { opacity: .35; transform: scale(.7); } 60% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .t-hub .t-tool, .t-hub .hub-go svg { animation: none; transition: none; }
  .t-hub .t-tool:hover { transform: none; }
  .t-hub .t-tool:hover .gp-spark, .t-hub .t-tool:focus-visible .gp-spark { animation: none; }
}
