/* Zeal Publishers — /tools (Job 21): the free tools as the house's reference shelf.
 * Loaded only by landing/tools/hub.html, after site.css (picker cv-*, chapters, crumbs) and anims.css (the .an
 * plate and its draw/pop/fade/grow primitives). Every class here is prefixed tx-; shared classes are only
 * re-sized under .tx-* parents, so no other page changes. Motion: transform/opacity/stroke only, once;
 * reduced motion lands on the final frame (base.css), and the plates wait until their card is in view. */

/* ======================= HERO ======================= */
.tx-hero { padding-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.tx-hero__grid { display: grid; gap: clamp(2rem, 1.4rem + 2.5vw, 3rem); padding-top: clamp(1.25rem, .8rem + 1.8vw, 2.5rem); }
.tx-hero__grid > * { min-width: 0; }
/* the breadcrumb's links get a 44px hit area here without moving the line */
.tx-hero .s-crumbs a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.tx-hero__title {
  max-width: 11em; margin-top: 1.1rem; font-size: clamp(2.35rem, 1.15rem + 4.3vw, 5rem);
  font-weight: 500; line-height: .99; letter-spacing: -.036em; text-wrap: balance;
}
.tx-hero__lede { margin-top: 1.5rem; max-width: 35rem; }
.tx-hero__jump { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; margin-top: 1.6rem; list-style: none; padding: 0; }
.tx-jump {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; color: var(--z-green);
  text-decoration: none; border-bottom: 1.5px solid rgba(6,69,48,.25); transition: border-color var(--z-dur-2), color var(--z-dur-2);
}
.tx-jump svg { width: 1rem; height: 1rem; transform: rotate(90deg); transition: transform var(--z-dur-2) var(--z-ease-out); }
.tx-jump:hover { color: var(--accent-ink); border-color: var(--z-amber); }
.tx-jump:hover svg { transform: rotate(90deg) translateX(3px); }
@media (min-width: 1100px) {
  .tx-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: clamp(3rem, 5vw, 5.5rem); align-items: center; }
  .tx-hero__copy { padding-bottom: 2rem; }
}

/* The picker: the homepage's C card (cv-teaser / cv-opt). JS shows one answer; without JS all are listed. */
.tx-pick { padding: clamp(1.25rem, .9rem + 1.4vw, 2rem); }
.tx-pick__title { font-weight: 500; }
.tx-pick__opts { grid-template-columns: 1fr; gap: .45rem; margin-top: 1.1rem; }
.tx-opt { min-height: 50px; padding: .55rem .85rem .45rem; }
@media (min-width: 560px) and (max-width: 1099px) {
  .tx-pick__opts { grid-template-columns: 1fr 1fr; }
  .tx-pick__opts .tx-opt:last-of-type { grid-column: 1 / -1; }
}
.tx-res-wrap { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1.5px dashed var(--line-strong); }
.tx-res--none { font-family: var(--z-font-display); font-style: italic; font-size: var(--z-fs-md); line-height: 1.5; color: var(--fg-strong); }
.tx-res__k { display: none; font-size: var(--z-fs-2xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.tx-res .cv-res__title { font-weight: 500; }
.tx-res__go { margin-top: 1rem; white-space: normal; text-align: left; line-height: 1.25; padding-block: .6rem .5rem; }
.tx-res__also { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; margin-top: .55rem; font-size: var(--z-fs-sm); }
.tx-res__ak { width: 100%; margin-top: .35rem; font-size: var(--z-fs-2xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.tx-res__also a {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; color: var(--z-green);
  text-decoration: underline; text-decoration-color: rgba(6,69,48,.3); text-underline-offset: .22em;
}
.tx-res__also a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.js .tx-res { display: none; }
.js .tx-res.is-on { display: block; animation: cv-in .5s var(--z-ease-out); }
.js .is-picked .tx-res--none { display: none; }
.no-js .tx-pick__opts, .no-js .tx-res--none { display: none; }
.no-js .tx-res__k { display: block; margin-bottom: .3rem; }
.no-js .tx-res + .tx-res { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* ======================= I. THE FEATURED TOOLS ======================= */
.tx-feat { padding-top: clamp(3rem, 2rem + 3vw, 5.5rem); }
.tx-feat__head .z-lede { max-width: 34rem; }
.tx-fgrid { display: grid; gap: clamp(1.25rem, .9rem + 1.2vw, 2rem); list-style: none; padding: 0; }
@media (min-width: 760px) {
  .tx-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-f:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .tx-fgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tx-f { grid-column: span 2; }
  .tx-f--lead { grid-column: span 3; }
  .tx-f:last-child:nth-child(odd) { grid-column: span 2; }
}
.tx-f { position: relative; min-width: 0; }
.tx-f__card {
  position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 8px; background: #FBF8F1;
  box-shadow: inset 0 0 0 1px rgba(40,40,40,.1), var(--z-shadow-2);
  transition: box-shadow var(--z-dur-3) var(--z-ease-out), transform var(--z-dur-3) var(--z-ease-out);
}
.tx-f__plate { padding: 12px 12px 0; }
.tx-f .an { aspect-ratio: 8 / 5; box-shadow: inset 0 0 0 1px rgba(6,69,48,.28), inset 0 0 0 8px var(--z-parchment), inset 0 0 0 9px rgba(6,69,48,.3); }
.tx-f__body { display: flex; flex-direction: column; flex: 1; padding: clamp(1.1rem, .9rem + .8vw, 1.6rem) clamp(1.15rem, .9rem + 1vw, 1.75rem) clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.tx-f__who { font-size: var(--z-fs-2xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.tx-f__name { margin-top: .5rem; font-size: var(--z-fs-lg); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; color: var(--z-green); text-wrap: balance; }
.tx-f__q { margin-top: .6rem; max-width: 30rem; font-family: var(--z-font-display); font-style: italic; font-size: var(--z-fs-md); line-height: 1.45; color: var(--z-charcoal); text-wrap: pretty; }
.tx-f__takes {
  display: flex; align-items: flex-start; gap: .55rem; margin-top: auto; padding-top: 1.1rem; line-height: 1.4;
  font-size: var(--z-fs-sm); font-weight: 500; color: var(--fg-muted);
}
.tx-f__takes::before {   /* a small clock face */
  content: ""; flex: none; width: 15px; height: 15px; margin-top: .15em; border-radius: 50%; border: 1.5px solid var(--accent-ink);
  background: linear-gradient(var(--accent-ink), var(--accent-ink)) 50% 2.5px / 1.5px 4.5px no-repeat,
              linear-gradient(var(--accent-ink), var(--accent-ink)) 7.25px 5.5px / 3.5px 1.5px no-repeat;
}
.tx-f__note {
  margin-top: .75rem; padding: .5rem .75rem .4rem; border-radius: 4px; border-left: 3px solid var(--z-amber);
  background: var(--z-amber-tint); font-size: var(--z-fs-xs); font-weight: 500; line-height: 1.4; color: var(--z-amber-ink);
}
.tx-f__go { align-self: flex-start; margin-top: 1.1rem; }
@media (min-width: 1100px) { .tx-f--lead .tx-f__name { font-size: var(--z-fs-xl); } }
/* the lone last card on tablets: plate beside the words */
@media (min-width: 760px) and (max-width: 1099px) {
  .tx-f:last-child:nth-child(odd) .tx-f__card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .tx-f:last-child:nth-child(odd) .tx-f__plate { padding: 12px 0 12px 12px; align-self: center; }
}
@media (max-width: 559px) {
  .tx-f__plate { padding: 8px 8px 0; }
  .tx-f__go { align-self: stretch; }
}

/* "Start here": the picker's answer tags its card */
.tx-f__rib {
  display: none; position: absolute; top: 0; right: clamp(1rem, 3vw, 1.75rem); z-index: 2; transform: translateY(-50%);
  padding: .4rem .85rem .3rem; border-radius: 4px; font-size: var(--z-fs-xs); font-weight: 600; letter-spacing: .04em;
  background: var(--z-amber); color: var(--z-green-950); box-shadow: 0 8px 16px -10px rgba(2,29,19,.6);
}
.tx-f.is-start .tx-f__rib { display: block; animation: cv-in .5s var(--z-ease-out); }
.tx-f.is-start .tx-f__card { box-shadow: inset 0 0 0 2px var(--z-amber), 0 30px 50px -28px rgba(2,29,19,.45); transform: translateY(-4px); }

/* the plate waits for its card to come into view (JS + full motion only) */
@media (prefers-reduced-motion: no-preference) {
  .js .tx-f:not(.is-play) .an * { animation-play-state: paused; }
}

/* ---------- The plates (landing/tools/_hub_plates.html): shapes + their own one-shot motion ---------- */
.tx-panel, .tx-card { fill: var(--z-white); filter: drop-shadow(0 10px 14px rgba(2,29,19,.16)); }
.tx-k { font-family: var(--z-font-body); font-size: 12px; font-weight: 600; letter-spacing: .16em; fill: var(--z-ink-muted); }
.tx-k--mid { text-anchor: middle; }
.tx-k--ink { fill: var(--z-amber-ink); }
.tx-trk { fill: rgba(6,69,48,.13); }
.tx-fill { fill: var(--z-green); }
.tx-line { stroke: rgba(6,69,48,.35); stroke-width: 2; stroke-linecap: round; }
.tx-row { font-family: var(--z-font-body); font-size: 16px; font-weight: 600; fill: var(--z-green); }
.tx-row--sm { font-size: 14px; }
.tx-chip { fill: var(--z-white); stroke: rgba(6,69,48,.22); }
.tx-chiptx { font-family: var(--z-font-display); font-style: italic; font-size: 15px; fill: var(--z-green); text-anchor: middle; }
/* sliders: the knob travels as its fill grows */
.tx-knob circle { fill: var(--z-white); stroke: var(--z-green); stroke-width: 3; }
.tx-knob { animation: tx-slide .9s var(--z-ease-out) var(--d, .4s) both; }
@keyframes tx-slide { from { transform: translateX(0); } to { transform: translateX(var(--x)); } }
.tx-knob--2 { animation: tx-slide2 3s var(--z-ease-in-out) var(--d, .4s) both; }
@keyframes tx-slide2 { 0% { transform: translateX(0); } 40%, 62% { transform: translateX(var(--a)); } 100% { transform: translateX(var(--b)); } }
/* gw: the range opens from its middle, then clients add up to the payback flag */
.tx-range { fill: var(--z-amber); transform-box: fill-box; transform-origin: center; animation: an-grow-x .8s var(--z-ease-out) var(--d) both; }
.tx-cap { fill: var(--z-green); }
.tx-dot { fill: var(--z-white); stroke: var(--z-green); stroke-width: 2.5; }
.tx-dot--won { fill: var(--z-amber); stroke: var(--z-amber-press); }
.tx-flag path { fill: none; stroke: var(--z-green); stroke-width: 2.5; stroke-linecap: round; }
.tx-flag .tx-flag__f { fill: var(--z-amber); stroke: none; }
/* authority: twelve answers, then the needle finds the score */
.tx-q { fill: rgba(6,69,48,.13); animation: tx-on .3s var(--z-ease-out) var(--d) both; }
@keyframes tx-on { to { fill: var(--z-green); } }
.tx-gtrack { fill: none; stroke: rgba(6,69,48,.12); stroke-width: 18; stroke-linecap: round; }
.tx-garc { fill: none; stroke: var(--z-amber); stroke-width: 18; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: tx-arc 1.3s var(--z-ease-out) var(--d) both; }
@keyframes tx-arc { from { stroke-dashoffset: 1; } to { stroke-dashoffset: var(--to); } }
.tx-tick { fill: none; stroke: rgba(6,69,48,.4); stroke-width: 2; stroke-linecap: round; }
.tx-needle { transform-box: view-box; transform-origin: 240px 222px; animation: tx-needle 1.3s var(--z-ease-spring) var(--d) both; }
.tx-needle path { stroke: var(--z-green); stroke-width: 4; stroke-linecap: round; }
@keyframes tx-needle { from { transform: rotate(-90deg); } to { transform: rotate(var(--r)); } }
.tx-hub { fill: var(--z-green); }
.tx-hub__in { fill: var(--z-amber); }
/* ai: the answer that triggers a rule is traced to KDP's words */
.tx-ai { fill: var(--z-amber); }
.tx-trace { fill: none; stroke: var(--z-amber); stroke-width: 2.5; stroke-linecap: round; }
.tx-hl { fill: var(--z-amber-tint); }
.tx-quote { font-family: var(--z-font-display); font-style: italic; font-size: 19px; fill: var(--z-green); text-anchor: middle; }
.tx-verdict { fill: var(--z-amber); }
.tx-verdict__t { font-family: var(--z-font-body); font-size: 14px; font-weight: 600; fill: var(--z-green-950); text-anchor: middle; }
/* royalty: the price moves and each platform's share follows; the spine widens with the pages */
.tx-bar { transform-box: fill-box; transform-origin: left center; animation: tx-bar 3s var(--z-ease-in-out) var(--d) both; }
.tx-bar--1 { fill: var(--z-green); } .tx-bar--2 { fill: var(--z-sage); } .tx-bar--3 { fill: var(--z-amber); }
@keyframes tx-bar { 0% { transform: scaleX(0); } 40%, 62% { transform: scaleX(var(--a)); } 100% { transform: scaleX(var(--b)); } }
.tx-wrap { fill: var(--z-green); }
.tx-bcode { fill: var(--z-white); }
.tx-spine { fill: var(--z-green-600); transform-box: fill-box; transform-origin: left center; animation: tx-spine 1.4s var(--z-ease-in-out) var(--d) both; }
@keyframes tx-spine { from { transform: scaleX(.35); } }
.tx-front { animation: tx-front 1.4s var(--z-ease-in-out) var(--d) both; }
@keyframes tx-front { from { transform: translateX(-19.5px); } }
.tx-dim { fill: none; stroke: var(--z-amber-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tx-out, .tx-in { text-anchor: middle; }
.tx-out { animation: tx-out .4s var(--z-ease-out) var(--d) both; }
.tx-in { animation: an-fade .5s var(--z-ease-out) var(--d) both; }
@keyframes tx-out { to { opacity: 0; } }
/* audiobook: words become a waveform, then the paths to choose from */
.tx-abar { fill: var(--z-sage); opacity: .5; animation: an-lit .3s linear calc(.9s + var(--i) * 95ms) both; }
.tx-head { fill: var(--z-green); animation: tx-head 2.3s linear .9s both; }
@keyframes tx-head { from { transform: translateX(0); } to { transform: translateX(288px); } }
.tx-sel { fill: none; stroke: var(--z-amber); stroke-width: 2.5; }

/* ======================= II. THE INDEX: a typeset back-of-book index ======================= */
.tx-ix__cols { display: grid; gap: 2.25rem clamp(1.75rem, 1rem + 2.5vw, 3.5rem); }
@media (min-width: 700px) { .tx-ix__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tx-ix__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tx-ix__g { min-width: 0; }
.tx-ix__h {
  display: flex; align-items: center; gap: .6rem; padding-bottom: .65rem; border-bottom: 1.5px solid var(--z-green);
  font-family: var(--z-font-body); font-size: var(--z-fs-2xs); font-weight: 600; letter-spacing: var(--z-track-caps);
  text-transform: uppercase; color: var(--accent-ink); break-after: avoid;
}
.tx-ix__n {
  display: grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: .1rem .3rem 0; border: 1px solid currentColor;
  border-radius: 999px; font-family: var(--z-font-display); font-size: .8rem; letter-spacing: 0;
}
.tx-ix__list { list-style: none; padding: 0; }
.tx-ix__e {
  position: relative; padding: .8rem .15rem .85rem; border-bottom: 1px solid var(--line-strong); break-inside: avoid;
  transition: padding var(--z-dur-3) var(--z-ease-out), background-color var(--z-dur-2);
}
.tx-ix__a {
  font-family: var(--z-font-display); font-size: var(--z-fs-md); font-weight: 500; line-height: 1.3; color: var(--z-green);
  text-decoration: none;
}
.tx-ix__a::after { content: ""; position: absolute; inset: 0; border-radius: 4px; }   /* the whole row is the link */
.tx-ix__a:focus-visible { outline: none; }
.tx-ix__a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.tx-ix__line { margin-top: .25rem; font-size: var(--z-fs-sm); line-height: 1.5; color: var(--fg-muted); }
.tx-ix__e:hover { padding-left: .55rem; background: var(--z-parchment-50); }
.tx-ix__e:hover .tx-ix__a { color: var(--accent-ink); }
.tx-tag {
  display: inline-block; margin-left: .15rem; padding: .14rem .36rem .02rem; border-radius: 3px; background: var(--z-purple-tint);
  vertical-align: .2em; font-family: var(--z-font-body); font-size: .625rem; font-weight: 600; letter-spacing: .1em; line-height: 1.35;
  color: var(--z-purple-ink);
}
@media (min-width: 1100px) { .tx-ix__a { font-size: 1.125rem; } }
@media (max-width: 699px) {
  .tx-ix__cols { gap: 1.75rem; }
  .tx-ix__e { padding: .65rem .1rem .7rem; }
  .tx-ix__a { font-size: var(--z-fs-base); }
  .tx-ix__line { margin-top: .15rem; font-size: .875rem; line-height: 1.45; }
}

/* Play: the three games as tiles with their small pictures */
.tx-play { margin-top: clamp(1rem, .5rem + 1.5vw, 2rem); }
.tx-play__list { display: grid; gap: 1rem; margin-top: 1.1rem; list-style: none; padding: 0; }
@media (min-width: 900px) { .tx-play__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.tx-tile {
  position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 1.1rem; align-items: start;
  padding: 1.1rem 1.25rem 1.2rem 1rem; border-radius: 8px; background: var(--z-cream);
  box-shadow: inset 0 0 0 1px rgba(40,40,40,.1), var(--z-shadow-1);
  transition: transform var(--z-dur-3) var(--z-ease-out), box-shadow var(--z-dur-3) var(--z-ease-out);
}
.tx-tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(40,40,40,.1), var(--z-shadow-2); }
.tx-art { width: 92px; height: auto; margin-top: .15rem; }
.tx-tile__k { font-size: var(--z-fs-2xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.tx-tile__a {
  display: inline-block; margin-top: .3rem; font-family: var(--z-font-display); font-size: var(--z-fs-md); font-weight: 500;
  line-height: 1.25; color: var(--z-green); text-decoration: none;
}
.tx-tile__a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.tx-tile__a:focus-visible { outline: none; }
.tx-tile__a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.tx-tile:hover .tx-tile__a { color: var(--accent-ink); }
.tx-tile__line { margin-top: .3rem; font-size: var(--z-fs-sm); line-height: 1.5; color: var(--fg-muted); }
.tx-art__seal { transform-box: fill-box; transform-origin: center; }
.tx-art__loop { stroke-dasharray: 1; stroke-dashoffset: 0; }
.tx-tile:hover .tx-art__seal { animation: tx-stamp .7s var(--z-ease-spring); }
.tx-tile:hover .tx-art__loop { animation: tx-loop .7s ease-out; }
.tx-tile:hover .tx-art__type { animation: tx-ink .6s ease-out; }
@keyframes tx-stamp { 0% { transform: scale(1.8); opacity: 0; } 60% { transform: scale(.92); opacity: 1; } }
@keyframes tx-loop { from { stroke-dashoffset: 1; } }
@keyframes tx-ink { 40% { transform: translateY(1px); opacity: .7; } }
@media (max-width: 420px) { .tx-tile { grid-template-columns: 68px minmax(0, 1fr); gap: .9rem; } .tx-art { width: 68px; } }

/* ======================= CLOSE: rather just talk? ======================= */
.tx-close { padding-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.tx-close__panel {
  position: relative; display: grid; gap: 2rem; padding: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); border-radius: 24px; overflow: hidden;
  background-image: radial-gradient(70% 90% at 0% 100%, rgba(239,154,16,.18), transparent 60%), radial-gradient(50% 60% at 100% 0%, rgba(160,130,197,.16), transparent 70%);
}
@media (min-width: 1000px) { .tx-close__panel { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: 4rem; } }
.tx-close__title { margin-top: 1rem; font-size: var(--z-fs-2xl); line-height: 1.05; max-width: 15em; }
.tx-close__text { margin-top: 1.1rem; max-width: 32rem; font-size: var(--z-fs-md); color: var(--z-green-200); }
.tx-close__acts { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.tx-close__phone {
  display: inline-flex; align-items: center; gap: .8rem; min-height: 48px; font-family: var(--z-font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); letter-spacing: -.02em; color: var(--z-cream); text-decoration: none;
}
.tx-close__phone svg { flex: none; width: 2.6rem; height: 2.6rem; padding: .6rem; border-radius: 50%; background: var(--z-amber); color: var(--z-green-950); }
.tx-close__phone:hover { color: var(--z-amber); }
@media (max-width: 559px) {
  .tx-close__panel { border-radius: 16px; }
  .tx-close__acts { align-items: stretch; }
  .tx-close__acts .z-btn { width: 100%; }
}

/* ---------- Reduced motion: every state static and readable ---------- */
@media (prefers-reduced-motion: reduce) {
  .tx-f__card, .tx-ix__e, .tx-tile, .tx-jump, .tx-jump svg { transition: none; }
  .tx-tile:hover, .tx-f.is-start .tx-f__card { transform: none; }
  .tx-ix__e:hover { padding-left: .15rem; }
}
