/*
 * Free tool pages (2026-11-28, blurto-e7g), on top of pages.css + blog.css:
 * the form, the result lists and the explainer. Light only, like the rest of
 * the site. Logical properties throughout (Arabic is right to left).
 */
.tool .lede { margin-bottom: 24px; }

.tool-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; margin: 0 0 32px; }
.tool-label { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; font-size: 20px; }
.tool-form textarea, .tool-form input[type="text"] {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; line-height: 1.5; color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; padding: 12px 14px;
}
.tool-form textarea { resize: vertical; min-height: 180px; }
.tool-form input[type="text"] { min-height: 52px; }
.tool-form textarea:focus-visible, .tool-form input:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 2px; }

.tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tool-chip {
  min-height: 44px; padding: 0 16px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
  background: var(--card); border: 2px solid var(--ink); border-radius: 999px;
}
.tool-chip:hover { background: rgba(58, 175, 169, 0.12); }
.tool-chip[aria-pressed="true"] { background: var(--teal); }
.tool-chip[aria-pressed="true"]::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-end: 8px; border-radius: 50%; background: #C0392B; animation: tool-pulse 1s ease-in-out infinite; }
.tool-count { margin-inline-start: auto; font-size: 14px; color: var(--ink-soft); }
.tool-count.over { color: #B03A2E; font-weight: 700; }

.tool-run { align-self: flex-start; min-height: 52px; padding: 0 26px; font-size: 19px; cursor: pointer; }
.tool-run:disabled { opacity: 0.6; cursor: progress; }
.tool-note { margin: 0; font-size: 14px; color: var(--ink-soft); }
.tool-status { margin: 0; min-height: 1.4em; font-weight: 600; }
.tool-status[data-kind="error"] { color: #B03A2E; }
.tool-status[data-kind="working"]::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-start: 10px; vertical-align: -2px; border: 3px solid var(--teal); border-top-color: transparent; border-radius: 50%; animation: tool-spin 0.8s linear infinite; }

.tool-result { margin: 0 0 8px; }
.tool-first { padding: 18px 20px; margin: 0 0 24px; background: #FFF6C9; rotate: -0.5deg; }
.tool-first-label { margin: 0 0 4px; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.tool-first-text { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; }
.tool-group h2 { font-size: 24px; margin: 24px 0 10px; }
.tool-list { margin: 0; padding-inline-start: 0; list-style: none; display: grid; gap: 8px; }
.tool-list li { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; line-height: 1.4; }
.tool-list.ordered { counter-reset: tool; }
.tool-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; min-height: 24px; }
.tool-list.ordered .tool-check::before { counter-increment: tool; content: counter(tool) "."; font-weight: 800; min-width: 1.4em; }
.tool-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--teal-dark); }
.tool-list li.done span { text-decoration: line-through; color: var(--ink-soft); }
.tool-list li.done { animation: tool-pop 0.25s ease-out; }
.tool-empty { font-size: 18px; font-weight: 600; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.tool-actions .cta { min-height: 44px; padding: 0 18px; font-size: 15px; cursor: pointer; }

.tool-about { margin: 48px 0 0; }
.tool-about h2 { font-size: 28px; line-height: 1.15; margin: 36px 0 12px; }
.tool-about p, .tool-about li { color: #2C2C40; line-height: 1.6; }
.tool-about ol { padding-inline-start: 24px; }
.tool-about li { margin-bottom: 8px; }
.tool-other a { color: var(--link); font-weight: 700; }

/* the free tools directory */
.tool-hub .post-list { margin-bottom: 8px; }
.tool-card { align-items: center; }
.tool-card-bird { flex: none; width: 120px; height: 120px; object-fit: contain; }
.tool-card-open { margin-top: 6px; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; color: var(--link); }
@media (max-width: 560px) {
  .tool-card { flex-direction: column; align-items: flex-start; }
  .tool-card-bird { width: 88px; height: 88px; }
}

@keyframes tool-spin { to { rotate: 360deg; } }
@keyframes tool-pulse { 50% { opacity: 0.3; } }
@keyframes tool-pop { 50% { scale: 1.02; } }
@media (prefers-reduced-motion: reduce) {
  .tool-status[data-kind="working"]::after, .tool-chip[aria-pressed="true"]::before, .tool-list li.done { animation: none; }
}
@media (max-width: 560px) {
  .tool-form { padding: 16px; }
  .tool-run { align-self: stretch; }
}
