/* ==========================================================================
   PromptUp Free Tools — Scoped Stylesheet
   Applied to /tools/ hub and standalone tool pages
   Pure CSS, supports light & dark theme via CSS variables from style.css
   ========================================================================== */

.tools-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.08);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-band);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-ink, var(--accent));
}

.tool-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink-primary);
}

.tool-card p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.tool-card-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-card-features svg {
  flex-shrink: 0;
  color: #10B981;
}

.tool-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-ink, var(--accent));
}

/* Tool Interactive Workbench */
.tool-workbench {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  margin-bottom: 2rem;
}

.workbench-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-line);
}

.workbench-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin: 0;
}

.sample-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.sample-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sample-chip {
  background: var(--bg-band);
  border: 1px solid var(--border-line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sample-chip:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent-ink, var(--accent));
}

.input-container {
  position: relative;
  display: flex;
  flex-direction: column;
}

.tool-textarea {
  width: 100%;
  min-height: 140px;
  padding: 1rem;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-primary);
  background: var(--bg-paper);
  border: 1px solid var(--border-line);
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.tool-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.input-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.meta-stats {
  display: flex;
  gap: 1rem;
}

.workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

/* Checklist / Breakdown in Analyzer */
.signals-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.signal-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-line);
  background: var(--bg-paper);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.signal-item.pass {
  border-left: 4px solid #10B981;
}

.signal-item.fail {
  border-left: 4px solid #F59E0B;
}

.signal-item.warn {
  border-left: 4px solid #EF4444;
}

.signal-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.signal-item.pass .signal-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.signal-item.fail .signal-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

.signal-item.warn .signal-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.signal-content {
  flex-grow: 1;
}

.signal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.signal-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-primary);
}

.signal-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signal-badge.pass {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.signal-badge.fail {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
}

.signal-badge.warn {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
}

.signal-desc {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.45;
  margin: 0;
}

.signal-suggestion {
  margin-top: 0.5rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-line);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.signal-suggestion strong {
  color: var(--ink-primary);
}

/* Side-by-Side Comparison for Optimizer & Converter */
.compare-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .compare-container {
    grid-template-columns: 1fr;
  }
}

.compare-col {
  display: flex;
  flex-direction: column;
}

.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: var(--bg-band);
  border: 1px solid var(--border-line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.compare-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
}

.compare-box {
  background: var(--bg-paper);
  border: 1px solid var(--border-line);
  border-radius: 0 0 8px 8px;
  padding: 1.15rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-primary);
  flex-grow: 1;
  min-height: 220px;
}

.compare-col.optimized .compare-header {
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.3);
}

.compare-col.optimized .compare-tag {
  color: var(--accent-ink, var(--accent));
}

.compare-col.optimized .compare-box {
  border-color: rgba(0, 113, 227, 0.3);
  background: var(--bg-card);
}

/* Selector Tabs */
.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.control-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.control-select {
  background: var(--bg-paper);
  border: 1px solid var(--border-line);
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  outline: none;
}

.control-select:focus {
  border-color: var(--accent);
}

/* Segmented Buttons for Platform Selection */
.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.platform-pill {
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-paper);
  border: 1px solid var(--border-line);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.platform-pill:hover {
  background: var(--bg-band);
  color: var(--ink-primary);
}

.platform-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

/* Privacy Guarantee Banner */
.privacy-strip {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-top: 1rem;
}

.privacy-strip svg {
  color: #10B981;
  flex-shrink: 0;
}

/* Summary Score Bar */
.score-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-band);
  border: 1px solid var(--border-line);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin-top: 1.25rem;
}

.score-summary-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-primary);
}

.score-pills-row {
  display: flex;
  gap: 0.5rem;
}

/* Word count highlight */
.hl-var {
  background: rgba(0, 113, 227, 0.12);
  color: var(--accent-ink, var(--accent));
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

.hl-vague {
  background: rgba(239, 68, 68, 0.15);
  color: #DC2626;
  text-decoration: underline wavy #EF4444;
  padding: 0.05rem 0.2rem;
  border-radius: 2px;
}

/* Pro Prompt Generator (tools/pro-prompt/) */
.pp-controls { margin-top: 1rem; align-items: flex-end; }
.pp-controls [hidden], .pp-output[hidden], .pp-related[hidden] { display: none !important; }
.pp-check { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; color: var(--ink-secondary); min-height: 38px; cursor: pointer; }
.pp-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.pp-idea { min-height: 96px; }
.pp-status { font-size: 0.85rem; color: var(--ink-muted); }
.pp-output { margin-top: 1.5rem; }
.pp-output .compare-col { display: flex; flex-direction: column; }
.pp-words { font-size: 0.8rem; font-weight: 600; color: var(--accent-ink, var(--accent)); }
.pp-result { width: 100%; box-sizing: border-box; resize: vertical; min-height: 160px; font: inherit; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88rem; line-height: 1.6; }
.pp-result:focus { outline: none; box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15); }
.pp-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.pp-related { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-line); }
.pp-related-title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); margin: 0 0 0.5rem; }
.pp-related ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; }
.pp-related a { color: var(--accent-ink, var(--accent)); text-decoration: none; }
.pp-related a:hover { text-decoration: underline; }
.workbench-actions .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   2026 redesign: tools hub (feature card with the before/after slider,
   tool cards, "which tool" table, private band)
   ========================================================================== */
.th .hub-head { margin-bottom: 40px; }
.th-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg-card); border: 1px solid var(--border-line); border-radius: 32px; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(23, 23, 27, 0.35); }
.th-feature-text { padding: 44px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.th-feature-top { display: flex; align-items: center; gap: 10px; }
.th-feature h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -0.03em; line-height: 1.05; }
.th-feature-text > p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-secondary); }
.th-new { height: 24px; padding: 0 9px; display: inline-flex; align-items: center; background: var(--success-bg); color: var(--success); border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.th-checks { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.th-checks li { height: 30px; padding: 0 12px 0 28px; display: inline-flex; align-items: center; position: relative; background: var(--success-bg); color: var(--success); border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.th-checks li::before, .th-list li::before { content: ""; position: absolute; left: 10px; top: 50%; width: 10px; height: 5px; margin-top: -4px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.th-feature .btn-go { gap: 10px; }
.th-feature-demo { padding: 28px; background: var(--bg-card-subtle); border-left: 1px solid var(--border-line); display: flex; flex-direction: column; gap: 14px; }
.th-badges { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.th-badge { height: 36px; padding: 0 12px 0 6px; display: inline-flex; align-items: center; gap: 8px; background: var(--bg-card); border: 1px solid var(--border-line); border-radius: 10px; font-size: 14px; color: var(--ink-muted); }
.th-badge b { height: 26px; padding: 0 8px; display: inline-flex; align-items: center; background: var(--bg-band); color: var(--ink-secondary); border-radius: 6px; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.th-badge-pro { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.th-badge-pro b { background: var(--accent); color: #FFFFFF; }
.th-caption { margin: 0; text-align: center; font-size: 13.5px; color: var(--ink-muted); }

/* Before/after slider: the "before" picture is clipped to the left of --pos */
.ba { --pos: 50%; position: relative; aspect-ratio: 800 / 598; border-radius: 18px; overflow: hidden; background: #1E1E20; user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #FFFFFF; box-shadow: 0 0 10px rgba(0, 0, 0, 0.35); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: var(--pos); width: 44px; height: 44px; margin: -22px 0 0 -22px; display: flex; align-items: center; justify-content: center; background: #FFFFFF; color: #17171B; border-radius: 50%; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); pointer-events: none; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-range:focus-visible ~ .ba-knob { outline: 3px solid var(--accent); outline-offset: 2px; }
.ba-seal { position: absolute; right: 12px; top: 12px; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; text-align: center; background: #FFD84D; color: #3D2E00; border-radius: 50%; font-size: 10.5px; font-weight: 800; line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; transform: rotate(12deg); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.4); pointer-events: none; }
.ba-prompt { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: rgba(23, 23, 27, 0.86); color: #ECECEF; border-radius: 12px; font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ba-prompt b { align-self: flex-start; padding: 2px 8px; background: #1F5EFF; color: #FFFFFF; border-radius: 6px; font-family: var(--font-body); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }

.th-ico { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.th-feature .th-ico { background: #1F5EFF; color: #FFFFFF; }
.th-ico-orange { background: var(--cat-photo); color: var(--cat-photo-accent); }
.th-ico-blue { background: var(--cat-image); color: var(--cat-image-accent); }
.th-ico-green { background: var(--cat-video); color: var(--cat-video-accent); }
.th-ico-pink { background: var(--cat-text); color: var(--cat-text-accent); }

.th-tools { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.th-tools-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.th-tools-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.th-card { padding: 26px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-card); border: 1px solid var(--border-line); border-radius: 22px; color: var(--ink-primary); text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.th-card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -24px rgba(23, 23, 27, 0.35); }
.th-card h2 { margin: 6px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; }
.th-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-secondary); }
.th-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.th-list li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--ink-secondary); }
.th-list li::before { left: 2px; color: var(--success); }
.th-open { margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 600; color: var(--accent-ink); }
/* Photo, card and resume tools: picture-first cards */
.th-studio { margin-top: 72px; }
.th-studio-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.th-studio-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; }
.th-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
/* A full-row card for the newest tool: picture left, words right (stacked on phones) */
.th-pic.th-pic-wide { grid-column: 1 / -1; flex-direction: row; }
.th-pic-wide .th-pic-art { flex: 0 0 54%; aspect-ratio: 16 / 9; }
.th-pic-wide .th-pic-body { justify-content: center; }
@media (max-width: 760px) { .th-pic.th-pic-wide { flex-direction: column; } .th-pic-wide .th-pic-art { flex-basis: auto; } }
.th-pic { --tint: var(--cat-photo); --tint-ink: var(--cat-photo-accent); display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-line); border-radius: 24px; overflow: hidden; color: var(--ink-primary); text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.th-pic-blue { --tint: var(--cat-image); --tint-ink: var(--cat-image-accent); }
.th-pic-green { --tint: var(--cat-video); --tint-ink: var(--cat-video-accent); }
.th-pic-pink { --tint: var(--cat-text); --tint-ink: var(--cat-text-accent); }
.th-pic:hover { transform: translateY(-4px); box-shadow: 0 28px 44px -26px rgba(23, 23, 27, 0.45); }
.th-pic-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.th-pic-art > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.th-pic:hover .th-pic-art > img { transform: scale(1.04); }
.th-pic-body { flex: 1; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.th-pic h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; }
.th-pic p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-secondary); }
.th-tags { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.th-tags li { padding: 4px 10px; background: var(--tint); color: var(--tint-ink); border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.th-pic .th-open { padding-top: 8px; }

/* Prompt Doctor art: a bad prompt and its fix */
.th-doc { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.th-doc-bad, .th-doc-good { padding: 10px 12px; border-radius: 12px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.45; box-shadow: 0 10px 20px -14px rgba(23, 23, 27, 0.5); }
.th-doc-bad { align-self: flex-start; background: #FFFFFF; color: #6B6B74; text-decoration: line-through; text-decoration-color: #E5484D; }
.th-doc-good { background: #17171B; color: #ECECEF; }
.th-doc b { display: block; margin-bottom: 3px; font-family: var(--font-body); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.th-doc-bad b { color: #C8323A; }
.th-doc-good b { color: #5BE49B; }
.th-doc-arrow { align-self: center; color: var(--tint-ink); font-size: 18px; font-weight: 700; line-height: 1; }

/* Resume Builder art: two templates fanned out with an ATS score */
.th-cv { position: absolute; inset: 0; }
.th-cv img { position: absolute; top: 16%; width: 34%; height: auto; border-radius: 6px; box-shadow: 0 16px 28px -14px rgba(23, 23, 27, 0.55); transition: transform 0.3s ease; }
.th-cv-back { left: 22%; transform: rotate(-7deg); }
.th-cv-front { left: 44%; transform: rotate(5deg); }
.th-pic:hover .th-cv-back { transform: rotate(-10deg) translateX(-6px); }
.th-pic:hover .th-cv-front { transform: rotate(7deg) translateX(6px); }
.th-cv-score { position: absolute; right: 7%; bottom: 10%; padding: 8px 12px; display: flex; align-items: center; gap: 8px; background: #FFFFFF; color: #17171B; border-radius: 12px; font-size: 12.5px; font-weight: 600; box-shadow: 0 10px 20px -10px rgba(23, 23, 27, 0.5); }
.th-cv-score b { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 3px solid #1F9D55; border-radius: 50%; font-size: 12.5px; }
/* With 3 columns, a last card that would leave an empty slot spans the rest of the row, side by side like the wide card */
@media (min-width: 1024px) {
  .th-pics > .th-pic:not(.th-pic-wide):last-child:nth-child(3n) { grid-column: span 2; flex-direction: row; }
  .th-pics > .th-pic:not(.th-pic-wide):last-child:nth-child(3n) .th-pic-art { flex: 0 0 50%; aspect-ratio: auto; }
  .th-pics > .th-pic:not(.th-pic-wide):last-child:nth-child(3n) .th-pic-body { justify-content: center; }
}
@media (max-width: 1023px) { .th-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .th-pics { grid-template-columns: minmax(0, 1fr); } .th-studio { margin-top: 48px; } }

.th-which { margin-top: 88px; }
.sec-head-c { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 28px; }
.sec-head-c h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.03em; }
.th-table { background: var(--bg-card); border: 1px solid var(--border-line); border-radius: 20px; overflow: hidden; }
.th-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) auto; gap: 16px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--border-line); font-size: 15.5px; color: var(--ink-secondary); }
.th-row strong { color: var(--ink-primary); font-weight: 700; }
.th-row a { font-weight: 600; color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
.th-row a:hover { text-decoration: underline; }
.th-row-head { border-top: 0; background: var(--bg-card-subtle); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); padding-top: 12px; padding-bottom: 12px; }
.th-guide { margin: 18px 0 0; text-align: center; font-size: 16px; color: var(--ink-secondary); }
.th-guide a { color: var(--accent-ink); text-decoration: underline; }

.th-private { margin: 88px calc(50% - 50vw) -80px; padding: 72px calc(50vw - 50%); background: #17171B; color: #FFFFFF; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; }
.th-private .kicker { color: #A9A8B0; }
.th-private h2 { margin: 10px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -0.03em; color: #FFFFFF; }
.th-private ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.th-private li { padding: 20px; display: flex; flex-direction: column; gap: 8px; background: #232329; border: 1px solid #34343C; border-radius: 18px; font-size: 14.5px; line-height: 1.5; color: #BDBCC3; }
.th-private li strong { font-size: 16px; color: #FFFFFF; }

@media (max-width: 1023px) {
  .th-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-tools-trio > :nth-child(3) { grid-column: 1 / -1; }
  .th-private { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 859px) {
  .th-feature { grid-template-columns: minmax(0, 1fr); border-radius: 26px; }
  .th-feature-text { padding: 26px 22px; }
  .th-feature-demo { padding: 16px; border-left: 0; border-top: 1px solid var(--border-line); }
  .th-which { margin-top: 56px; }
  .th-row { grid-template-columns: minmax(0, 1fr) auto; }
  .th-row > :first-child { grid-column: 1 / -1; }
  .th-row-head { display: none; }
  .th-private { margin-top: 56px; padding-top: 48px; padding-bottom: 48px; }
  .th-private ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .th-tools { grid-template-columns: minmax(0, 1fr); }
  .th-feature .btn-go { width: 100%; justify-content: center; }
  .ba-seal { width: 58px; height: 58px; font-size: 9px; }
}
.ba-prompt span { display: block; overflow: hidden; text-overflow: ellipsis; }

/* ---------- single tool pages (2026 redesign) ---------- */
.tw-frame { margin: 0 0 24px; padding: 14px; border-radius: 30px; background: radial-gradient(60% 70% at 0% 0%, #D9C9FF 0%, rgba(217, 201, 255, 0) 100%), radial-gradient(60% 70% at 100% 20%, #BDEEDF 0%, rgba(189, 238, 223, 0) 100%), radial-gradient(70% 70% at 80% 100%, #FFCDB6 0%, rgba(255, 205, 182, 0) 100%), #F3EEFA; }
[data-theme="dark"] .tw-frame { background: radial-gradient(60% 70% at 0% 0%, rgba(124, 58, 237, 0.35) 0%, rgba(124, 58, 237, 0) 100%), radial-gradient(70% 70% at 80% 100%, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0) 100%), #1A1A1E; }
.tw-frame .tool-workbench { margin: 0; padding-top: 0; border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px rgba(23, 23, 27, 0.08), 0 40px 70px -34px rgba(60, 40, 90, 0.5); }
.tw-bar { display: flex; align-items: center; gap: 14px; margin: 0 -1.75rem 1.5rem; padding: 13px 18px; background: var(--bg-band); border-bottom: 1px solid var(--border-line); }
.tw-title { font-family: var(--font-mono); font-size: 13px; color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-private { margin-left: auto; flex-shrink: 0; padding: 3px 10px; border-radius: 999px; background: var(--cat-video); color: var(--cat-video-accent); font-size: 12.5px; font-weight: 600; }
.tw-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tw-tools .tool-card { padding: 24px; border-radius: 24px; justify-content: flex-start; gap: 4px; }
.tw-tools .tool-card:hover { border-color: var(--border-line); box-shadow: 0 24px 40px -24px rgba(23, 23, 27, 0.35); }
.tw-tools .tool-card-icon { width: 48px; height: 48px; border-radius: 14px; }
.tw-tools .tool-card:nth-child(3n+1) .tool-card-icon { background: var(--cat-photo); color: var(--cat-photo-accent); }
.tw-tools .tool-card:nth-child(3n+2) .tool-card-icon { background: var(--cat-image); color: var(--cat-image-accent); }
.tw-tools .tool-card:nth-child(3n+3) .tool-card-icon { background: var(--cat-video); color: var(--cat-video-accent); }
.tw-tools .tool-card-cta { margin-top: auto; padding-top: 14px; }
.seo-page .tw-tools .tool-card p { max-width: none; }
.seo-page .hub-head + .tw-frame { margin-top: 8px; }
@media (max-width: 979px) { .tw-tools { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .tw-frame { padding: 8px; border-radius: 22px; }
  .tw-frame .tool-workbench { padding: 0 1.1rem 1.25rem; }
  .tw-bar { margin: 0 -1.1rem 1.1rem; }
  .tw-private { display: none; }
}
.tw-frame ~ .seo-section > h2 { font-weight: 800; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; }

/* Prompt Doctor */
.doc-kind-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.doc-kind-pick select { font: inherit; font-size: 13px; color: var(--ink-primary); background: var(--bg-card); border: 1px solid var(--border-line); border-radius: 8px; padding: 4px 8px; }
.doc-empty { text-align: center; padding: 2.25rem 1rem; color: var(--ink-muted); }
.doc-empty p { margin: 0 0 0.4rem; }
.doc-summary { display: flex; gap: 20px; align-items: flex-start; margin: 1.25rem 0; padding: 18px 20px; background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-md); }
.doc-score { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; }
.doc-score-n { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--ink-primary); }
.doc-score-n small { font-size: 20px; color: var(--ink-muted); }
.doc-kind { font-size: 12px; font-weight: 600; text-align: center; color: var(--accent-ink); }
.doc-verdict { flex: 1; min-width: 0; }
.doc-verdict strong { font-size: 16px; color: var(--ink-primary); }
.doc-missing-label { margin: 10px 0 6px; font-size: 13.5px; color: var(--ink-secondary); }
.doc-missing { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.doc-missing li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #FDECEC; color: #B42318; }
[data-theme="dark"] .doc-missing li { background: #3A1A1A; color: #FDA29B; }
.doc-cols { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.doc-fixed .compare-header { margin-bottom: 8px; }
.doc-fixed-meta { font-size: 0.8rem; font-weight: 600; color: var(--accent-ink, var(--accent)); }
.doc-fixed-box { white-space: pre-wrap; word-break: break-word; margin: 0; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65; }
.doc-fixed-box mark.var { background: var(--accent-light); color: var(--accent-ink); border-radius: 4px; padding: 0 2px; }
.doc-note { margin: 8px 0 0; font-size: 13px; color: var(--ink-muted); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 860px) {
  .doc-cols { grid-template-columns: 1fr; }
  .doc-summary { flex-direction: column; gap: 10px; }
  .doc-score { flex-direction: row; align-items: baseline; gap: 10px; }
}

/* Touch screens: 44px targets for the table links and the select boxes */
@media (pointer: coarse) {
  .th-row { padding-top: 8px; padding-bottom: 8px; }
  .th-row a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
  .control-select { min-height: 44px; }
}
