/* ============================================================
   99creatix /tools/ hub: "the bench".
   Layered over legal.css (hero sizes, numbered column) and the
   shared chrome. Selectors are doubled (.c99.c99-hub) to outrank
   the homepage layer that prints later in the site CSS.
   Rules of the system: zero radius, blue for numerals only,
   dark bands carry data, mono for labels.
   ============================================================ */

/* ---- hero ---- */
.c99.c99-hub .opening .hero { padding-block: clamp(2.4rem, 6vw, 4.2rem) clamp(4.2rem, 9vw, 6.5rem); }
.c99.c99-hub .hero .lede { max-width: 58ch; margin-top: 1.3rem; }
.c99.c99-hub .hero .lede b { color: var(--panel-ink); font-weight: 500; }

/* ---- the bench: paper, like the rest of the site, with the dark hero behind its top edge ---- */
.c99.c99-hub .band--bench { padding-block: 0 clamp(1.5rem, 3vw, 2.5rem); position: relative; z-index: 3; }
.c99.c99-hub .bench {
  position: relative; margin: calc(-1 * clamp(2.2rem, 5vw, 4rem)) 0 0;
  border: 1px solid var(--rule); background: var(--paper);
  box-shadow: 0 40px 80px -40px rgba(11,12,14,0.45);
}
.c99.c99-hub .bench__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); background: var(--paper);
}
.c99.c99-hub .bench__bar .tag { color: var(--ink-soft); }
.c99.c99-hub .bench__bar .tag i { font-style: normal; color: var(--blue); }
.c99.c99-hub .bench__shake {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0;
  padding: 0.5rem 0.9rem; min-height: 36px; cursor: pointer; transition: background .18s ease, color .18s ease;
}
.c99.c99-hub .bench__shake:hover { background: var(--ink); color: var(--paper); }
.c99.c99-hub .bench__shake:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.c99.c99-hub .bench__stage {
  position: relative; overflow: hidden; background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(11,12,14,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,12,14,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}
/* the floor the tiles land on */
.c99.c99-hub .bench--live .bench__stage::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink);
}
.c99.c99-hub .bench__hint {
  margin: 0; padding: 0.65rem 1rem; border-top: 1px solid var(--rule);
  color: var(--ink-soft); font-size: 0.6rem; letter-spacing: 0.12em;
}

/* ---- tiles: one per tool, real links, each in its own colour ---- */
.c99.c99-hub .bench { --tile-w: 236px; --tile-h: 120px; --tile-wl: 292px; }
.c99.c99-hub .tile {
  position: relative; overflow: hidden; box-sizing: border-box; width: var(--tile-w); height: var(--tile-h);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0.8rem 0.95rem 0.75rem;
  --tone: var(--panel-2); --tone-ink: var(--panel-ink);
  background: var(--tone); color: var(--tone-ink); border: 0;
  text-decoration: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
  box-shadow: 0 14px 30px -16px rgba(11,12,14,0.55);
  transition: box-shadow .2s ease, filter .2s ease;
}
.c99.c99-hub .tile[data-tone="blue"]   { --tone: #1B3BD8; --tone-ink: #F4F5FF; }
.c99.c99-hub .tile[data-tone="ink"]    { --tone: #0B0C0E; --tone-ink: #EDEDEA; }
.c99.c99-hub .tile[data-tone="sun"]    { --tone: #F2C94C; --tone-ink: #0B0C0E; }
.c99.c99-hub .tile[data-tone="coral"]  { --tone: #F0603A; --tone-ink: #FFF4F0; }
.c99.c99-hub .tile[data-tone="moss"]   { --tone: #1F8A5B; --tone-ink: #EEFBF3; }
.c99.c99-hub .tile[data-tone="violet"] { --tone: #6B4EF0; --tone-ink: #F3F0FF; }
.c99.c99-hub .tile[data-tone="teal"]   { --tone: #0FA3B1; --tone-ink: #EDFBFC; }
/* a light sweep across the tile when the pointer finds it */
.c99.c99-hub .tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0) 65%);
  transform: translateX(-130%); transition: transform .55s ease;
}
.c99.c99-hub .tile:hover::after, .c99.c99-hub .tile:focus-visible::after { transform: translateX(130%); }
.c99.c99-hub .tile--l { width: var(--tile-wl); }
.c99.c99-hub .tile:hover, .c99.c99-hub .tile:focus-visible { filter: brightness(1.07); box-shadow: 0 22px 40px -18px rgba(11,12,14,0.6); }
.c99.c99-hub .tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.c99.c99-hub .tile__k { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--tone-ink); opacity: 0.72; font-variant-numeric: tabular-nums; }
.c99.c99-hub .tile__t {
  font-family: var(--grot); font-weight: 700; text-transform: uppercase;
  font-size: 0.98rem; line-height: 1; letter-spacing: -0.025em; text-wrap: balance; margin: 0.3rem 0 auto;
}
.c99.c99-hub .tile__m { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tone-ink); opacity: 0.72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* static layout: no JS, reduced motion, and the first paint before the engine starts */
.c99.c99-hub .bench__stage { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; padding: 6px; }
.c99.c99-hub .bench__stage .tile { width: auto; height: auto; min-height: var(--tile-h); }

/* live layout: the engine owns position and rotation */
.c99.c99-hub .bench--live .bench__stage { display: block; padding: 0; height: var(--stage-h, clamp(400px, 56vh, 560px)); touch-action: pan-y; }
.c99.c99-hub .bench--live .tile {
  position: absolute; left: 0; top: 0; width: var(--tile-w); height: var(--tile-h); min-height: 0;
  will-change: transform; transform-origin: 50% 50%;
  cursor: grab; touch-action: none;
}
.c99.c99-hub .bench--live .tile--l { width: var(--tile-wl); }
.c99.c99-hub .bench--live .tile.is-held { cursor: grabbing; z-index: 5; filter: brightness(1.1); box-shadow: 0 36px 60px -20px rgba(11,12,14,0.65); }

/* ---- the list: every tool, in order ---- */
.c99.c99-hub .band--bench + .band { padding-top: clamp(1.5rem, 4vw, 3rem); }
.c99.c99-hub .band__head { max-width: 62ch; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.c99.c99-hub .band__head .tag { display: block; margin-bottom: 1rem; }
.c99.c99-hub .band__head .tag i { font-style: normal; color: var(--blue); }
.c99.c99-hub .band__head p { color: var(--ink-mute); margin: 1rem 0 0; line-height: 1.6; max-width: 56ch; }
.c99.c99-hub .toollist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.c99.c99-hub .tl { border-bottom: 1px solid var(--rule); }
.c99.c99-hub .tl__row {
  display: grid; grid-template-columns: 4.5rem 1fr 15rem 6rem; gap: 1.5rem; align-items: start;
  padding: 1.5rem 0; color: inherit; text-decoration: none; transition: background .15s ease;
}
.c99.c99-hub .tl__row:hover { background: var(--paper-2); box-shadow: 0 0 0 0.9rem var(--paper-2); }
.c99.c99-hub .tl__n { font-size: 1.5rem; line-height: 1; letter-spacing: -0.03em; }
.c99.c99-hub .tl h2 { font-size: 1.15rem; letter-spacing: -0.025em; text-transform: uppercase; margin: 0.15rem 0 0.55rem; }
.c99.c99-hub .tl p { color: var(--ink-mute); font-size: 0.95rem; line-height: 1.65; margin: 0; max-width: 60ch; }
.c99.c99-hub .tl__meta { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.9; padding-top: 0.35rem; }
.c99.c99-hub .tl__meta span { display: block; }
.c99.c99-hub .tl__go { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); justify-self: end; padding-top: 0.45rem; white-space: nowrap; }
.c99.c99-hub .tl__row:hover .tl__go { text-decoration: underline; text-underline-offset: 4px; }
.c99.c99-hub .tl__row:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* ---- the rules band: three plain promises ---- */
.c99.c99-hub .rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: clamp(2.4rem, 6vw, 4rem); }
.c99.c99-hub .rules > div { background: var(--paper); padding: 1.4rem 1.5rem 1.5rem; }
.c99.c99-hub .rules .num { display: block; font-size: 1.6rem; line-height: 1; margin-bottom: 0.9rem; }
.c99.c99-hub .rules h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: -0.015em; margin: 0 0 0.45rem; }
.c99.c99-hub .rules p { color: var(--ink-mute); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* ---- closer strip above the footer ---- */
.c99.c99-hub .hubcloser {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: clamp(2.2rem, 5vw, 3.4rem) 0 0;
}
.c99.c99-hub .hubcloser p { margin: 0.5rem 0 0; color: var(--panel-mute); max-width: 48ch; line-height: 1.55; }
.c99.c99-hub .hubcloser .h2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); }
.c99.c99-hub .hubcloser__act { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.c99.c99-hub .hubcloser .btn { background: var(--panel-ink); color: var(--panel); border-color: var(--panel-ink); }
.c99.c99-hub .hubcloser .btn:hover { background: transparent; color: var(--panel-ink); }
.c99.c99-hub .hubcloser .btn--ghost { background: transparent; color: var(--panel-ink); border-color: rgba(237,237,234,0.34); }
.c99.c99-hub .hubcloser .btn--ghost:hover { background: var(--panel-ink); color: var(--panel); }
.c99.c99-hub .bigfoot { border-top: 1px solid var(--panel-rule); margin-top: clamp(2.4rem, 5vw, 3.6rem); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .c99.c99-hub .tl__row { grid-template-columns: 3.4rem 1fr 6rem; }
  .c99.c99-hub .tl__meta { display: none; }
  .c99.c99-hub .rules { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .c99.c99-hub .bench { --tile-w: 196px; --tile-h: 108px; --tile-wl: 236px; }
  .c99.c99-hub .tile__t { font-size: 0.9rem; }
}
@media (max-width: 640px) {
  .c99.c99-hub .bench { --tile-w: 148px; --tile-h: 98px; --tile-wl: 148px; }
  .c99.c99-hub .bench__shake { white-space: nowrap; padding: 0.5rem 0.7rem; }
  .c99.c99-hub .bench--live .bench__stage { --stage-h: clamp(420px, 60vh, 560px); }
  .c99.c99-hub .tile { padding: 0.65rem 0.7rem 0.6rem; }
  .c99.c99-hub .tile__t { font-size: 0.84rem; }
  .c99.c99-hub .bench__bar .tag { font-size: 0.58rem; letter-spacing: 0.12em; }
  .c99.c99-hub .tl__row { grid-template-columns: 2.6rem 1fr; gap: 1rem; padding: 1.25rem 0; }
  .c99.c99-hub .tl__go { grid-column: 2; justify-self: start; padding-top: 0.6rem; }
  .c99.c99-hub .tl__n { font-size: 1.2rem; }
  .c99.c99-hub .tl__row:hover { box-shadow: none; background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .c99.c99-hub .tile, .c99.c99-hub .tile::after, .c99.c99-hub .tl__row, .c99.c99-hub .bench__shake { transition: none; }
}
