/* Academy tools: the homepage quick-tool buttons (index.html #tools) and the link banner on
   free-tools.html. The tools themselves are listed on academy-tools.html (tools-kit.css). */
.qt-strip { padding: 34px 0 10px; }
.qt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.qt-head h2 { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.45rem); }
.qt-all { font-weight: 700; font-size: 0.92rem; color: var(--accent-2); text-decoration: none; white-space: nowrap; }
.qt-all:hover { text-decoration: underline; }
.qt-row { display: flex; flex-wrap: wrap; gap: 10px; }
.qt-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; text-decoration: none;
  font-size: 0.9rem; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.qt-chip:hover, .qt-chip:focus-visible { border-color: var(--accent); transform: translateY(-2px); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); outline: none; }
.qt-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--accent-2); background: color-mix(in srgb, var(--accent) 16%, var(--bg-elevated)); flex-shrink: 0; }
.qt-ic svg { width: 17px; height: 17px; }
/* Phones: one swipeable row instead of many wrapped lines. */
@media (max-width: 640px) {
  .qt-strip { padding-top: 26px; }
  .qt-row { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .qt-row::-webkit-scrollbar { display: none; }
  .qt-chip { flex-shrink: 0; scroll-snap-align: start; }
}

/* free-tools.html: link to the Academy tools page */
.at-banner {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.at-banner:hover, .at-banner:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.at-banner .at-ic { grid-row: auto; flex-shrink: 0; }
.at-banner-text { flex: 1; min-width: 0; }
.at-banner-text strong { display: block; font-size: 1.02rem; margin-bottom: 2px; }
.at-banner-text span { color: var(--text-muted); font-size: 0.88rem; }
.at-banner-go { font-weight: 700; color: var(--accent-2); white-space: nowrap; }
@media (max-width: 520px) { .at-banner-go { display: none; } }

/* academy-tools.html: the ten tools in 2 balanced rows of 5 on computers, 2 compact
   columns on phones. Each tool type has its own colour (--tc). */
.at-grid-page { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .at-grid-page { gap: 14px; } } /* 2 columns until there is room for 5: never a lone card on the last row */
@media (min-width: 1000px) { .at-grid-page { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; } }
.at-grid-page .at-card {
  --tc: var(--accent-2);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 16px 16px; min-height: 100%;
  border-radius: 18px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 9%, var(--surface)), var(--surface) 60%);
  border: 1px solid color-mix(in srgb, var(--tc) 22%, var(--border));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.at-grid-page .at-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tc); opacity: 0.85; }
.at-grid-page .at-card:hover, .at-grid-page .at-card:focus-visible {
  transform: translateY(-4px); border-color: var(--tc); outline: none;
  box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--tc) 70%, transparent);
}
.at-grid-page .at-ic {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 4px; grid-row: auto;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 15%, var(--bg-elevated)); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
}
.at-grid-page .at-ic svg { width: 24px; height: 24px; }
.at-grid-page .at-card strong { font-size: 1.02rem; line-height: 1.25; }
.at-grid-page .at-card > span:not(.at-ic) { font-size: 0.86rem; line-height: 1.45; }
.at-go { margin-top: auto; padding-top: 6px; font-style: normal; font-weight: 700; font-size: 0.84rem; color: var(--tc); }
.at-grid-page .at-card:hover .at-go { text-decoration: underline; }
/* Colour by type: photos (blue/cyan), documents and text (green), voice (orange), writing (purple), video (pink). */
.at-grid-page .at-card[href="remove-background.html"], .at-grid-page .at-card[href="passport-photo.html"] { --tc: #38bdf8; }
.at-grid-page .at-card[href="resize-photo.html"], .at-grid-page .at-card[href="sharpen-photo.html"] { --tc: #22d3ee; }
.at-grid-page .at-card[href="product-photo.html"] { --tc: #60a5fa; }
.at-grid-page .at-card[href="pdf-tools.html"], .at-grid-page .at-card[href="photo-to-text.html"] { --tc: #34d399; }
.at-grid-page .at-card[href="voice-to-text.html"] { --tc: #fb923c; }
.at-grid-page .at-card[href="cv-writer.html"] { --tc: #a78bfa; }
.at-grid-page .at-card[href="download-video.html"] { --tc: #f472b6; }
[data-theme="light"] .at-grid-page .at-card[href="remove-background.html"], [data-theme="light"] .at-grid-page .at-card[href="passport-photo.html"] { --tc: #0284c7; }
[data-theme="light"] .at-grid-page .at-card[href="resize-photo.html"], [data-theme="light"] .at-grid-page .at-card[href="sharpen-photo.html"] { --tc: #0891b2; }
[data-theme="light"] .at-grid-page .at-card[href="product-photo.html"] { --tc: #2563eb; }
[data-theme="light"] .at-grid-page .at-card[href="pdf-tools.html"], [data-theme="light"] .at-grid-page .at-card[href="photo-to-text.html"] { --tc: #059669; }
[data-theme="light"] .at-grid-page .at-card[href="voice-to-text.html"] { --tc: #ea580c; }
[data-theme="light"] .at-grid-page .at-card[href="cv-writer.html"] { --tc: #7c3aed; }
[data-theme="light"] .at-grid-page .at-card[href="download-video.html"] { --tc: #db2777; }
@media (max-width: 520px) {
  .at-grid-page .at-card { padding: 14px 12px 12px; gap: 6px; }
  .at-grid-page .at-ic { width: 40px; height: 40px; border-radius: 12px; }
  .at-grid-page .at-ic svg { width: 20px; height: 20px; }
  .at-grid-page .at-card strong { font-size: 0.94rem; }
  .at-grid-page .at-card > span:not(.at-ic) { font-size: 0.8rem; }
}

/* The link to the Free Tools directory, under the grid */
.at-more {
  margin-top: 22px; display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px dashed color-mix(in srgb, var(--accent-2) 45%, var(--border));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.at-more:hover, .at-more:focus-visible { border-style: solid; border-color: var(--accent-2); transform: translateY(-2px); outline: none; }
.at-more-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, var(--bg-elevated)); }
.at-more-ic svg { width: 22px; height: 22px; }
.at-more-text { flex: 1; min-width: 0; }
.at-more-text strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.at-more-text span { color: var(--text-muted); font-size: 0.88rem; }
.at-more-go { font-weight: 700; color: var(--accent-2); white-space: nowrap; }
@media (max-width: 560px) { .at-more-go { display: none; } }
