/* Free author tools (/tools). Layered on /blog/assets/blog.css (theme tokens)
   and /for/audiences.css (type scale). The menu and footer are the app's own,
   from /site-chrome.css (scripts/site-chrome.js). House design: white
   canvas, medium headings, 24px cards, pill buttons, black result panel. */
.tool-hero { max-width: 860px; padding: 44px 0 8px !important; }
.tool-hero h1 { margin: 16px 0 18px; }
.tool-crumbs { font-size: 14px; color: var(--blog-ink-muted); }
/* Tool icons: the app's icon set in the app's rounded tile, as on /features. */
.tool-hero-icon, .tool-tile-icon { display: inline-grid; place-items: center; align-self: flex-start; width: 52px; height: 52px; border-radius: 16px; color: #1d4ed8; }
.tool-hero-icon { margin-top: 14px; background: #dbe6ff; }
.tool-hero-icon + h1 { margin-top: 14px; }
[data-theme="dark"] .tool-hero-icon { background: #22346b; color: #dbe6ff; }
.tool-tile-icon { margin-bottom: 18px; background: rgba(255, 255, 255, .66); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3); }
.tool-tile:hover .tool-tile-icon { transform: rotate(-6deg) scale(1.08); }
/* The label above the heading is the same pill as on /features. */
.tool-hero .eyebrow { display: inline-block; margin: 0; padding: 6px 16px; border-radius: 999px; background: #dbe6ff; color: #1e3a8a; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.5; }
[data-theme="dark"] .tool-hero .eyebrow { background: #22346b; color: #a8bfff; }
.tool-crumbs a { color: var(--blog-ink-muted); }
main section.tool-wrap { padding: 20px 0 36px; }

.tool { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tool-form, .tool-card { padding: 28px; border: 1px solid var(--blog-border); border-radius: 24px; background: var(--blog-card); }
.tool-form h2, .tool-result h2 { font-size: 20px; margin: 0 0 18px; }
.tool-result { position: sticky; top: 16px; padding: 30px; border-radius: 28px; background: #000; color: #fff; }
.tool-result h2 { color: #fff; }
.tool-big { margin: 0; font: 500 clamp(44px, 6vw, 68px)/1 "Poppins", "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.tool-big small { font-size: 18px; letter-spacing: 0; color: rgba(255, 255, 255, .7); margin-left: 6px; }
.tool-sub { margin: 8px 0 20px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.tool-lines { list-style: none; margin: 0; padding: 0; }
.tool-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 15px; }
.tool-lines span { color: rgba(255, 255, 255, .72); }
.tool-lines strong { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.tool-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .12); font-size: 14px; line-height: 1.5; color: #fff; }
.tool-note:empty { display: none; }
.tool-note.is-warn { background: #fff3cd; color: #4d3800; }

.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tool-field { display: grid; gap: 6px; margin-bottom: 16px; }
.tool-field > span, .tool-field > label { font-size: 14px; font-weight: 500; color: var(--blog-ink); }
.tool-field small { font-size: 13px; color: var(--blog-ink-muted); line-height: 1.45; }
.tool input[type="number"], .tool input[type="text"], .tool input[type="email"], .tool select, .tool textarea, .tool-capture input {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 11px 16px; border: 1px solid var(--blog-border); border-radius: 14px;
  background: var(--blog-ground); color: var(--blog-ink); font: 400 16px/1.4 "Poppins", "Helvetica Neue", Arial, sans-serif;
}
.tool textarea { min-height: 260px; border-radius: 18px; resize: vertical; line-height: 1.6; }
.tool input:focus, .tool select:focus, .tool textarea:focus, .tool-capture input:focus { outline: 0; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29, 78, 216, .2); }
.tool-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--blog-ground-deep); margin-bottom: 18px; flex-wrap: wrap; }
.tool-seg label { position: relative; }
.tool-seg input { position: absolute; opacity: 0; inset: 0; }
.tool-seg span { display: block; padding: 9px 20px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--blog-ink-2); cursor: pointer; transition: background .18s ease, color .18s ease; }
.tool-seg input:checked + span { background: #1d4ed8; color: #fff; }
.tool-seg input:focus-visible + span { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.tool-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 15px; line-height: 1.4; }
.tool-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #1d4ed8; flex: none; }
.tool-cost { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; align-items: center; margin-bottom: 12px; }
.tool-cost .tool-check { margin: 0; }
[hidden] { display: none !important; }

.tool-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--blog-border);
  background: var(--blog-card); color: var(--blog-ink); font: 500 15px/1.3 "Poppins", "Helvetica Neue", Arial, sans-serif; cursor: pointer; text-decoration: none; transition: border-color .18s ease, transform .18s ease; }
.tool-btn:hover { border-color: #1d4ed8; transform: translateY(-1px); text-decoration: none; }
.tool-btn.is-primary { border-color: #1d4ed8; background: #1d4ed8; color: #fff; }
.tool-btn.is-primary:hover { background: #1e3a8a; color: #fff; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Stat tiles (word counter) */
.tool-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-stat { padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .1); }
.tool-stat strong { display: block; font: 500 30px/1.1 "Poppins", "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tool-stat span { font-size: 13.5px; color: rgba(255, 255, 255, .72); }

/* Series tracker */
.tool-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tool-table-wrap { overflow-x: auto; border: 1px solid var(--blog-border); border-radius: 18px; }
.tool-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.tool-table th { padding: 12px 10px; text-align: left; font-size: 13px; font-weight: 500; color: var(--blog-ink-muted); background: var(--blog-ground-deep); white-space: nowrap; }
.tool-table td { padding: 4px 6px; border-top: 1px solid var(--blog-border); }
.tool-table input, .tool-table select { width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--blog-ink); font: 400 15px/1.3 "Poppins", "Helvetica Neue", Arial, sans-serif; }
.tool-table input:hover, .tool-table select:hover { border-color: var(--blog-border); }
.tool-table input:focus, .tool-table select:focus { outline: 0; border-color: #1d4ed8; background: var(--blog-ground); }
.tool-table .tool-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--blog-ink-muted); font-size: 18px; cursor: pointer; }
.tool-table .tool-x:hover { background: var(--blog-ground-deep); color: var(--blog-ink); }
.tool-saved { font-size: 13.5px; color: var(--blog-ink-muted); margin: 12px 0 0; }

/* Explainer, tables, FAQ */
.tool-copy { max-width: 780px; }
.tool-copy h2 { margin-top: 0; }
.tool-copy table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.tool-copy th, .tool-copy td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--blog-border); }
.tool-copy th { font-weight: 500; color: var(--blog-ink-muted); font-size: 13.5px; }
.tool-copy .tool-scroll { overflow-x: auto; }
.tool-faq details { border-top: 1px solid var(--blog-border); padding: 16px 0; }
.tool-faq details:last-child { border-bottom: 1px solid var(--blog-border); }
.tool-faq summary { cursor: pointer; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.tool-faq p { margin: 10px 0 0; }
.tool-checked { font-size: 14px; color: var(--blog-ink-muted); }

/* Call to action + email */
main section.tool-cta { padding: 40px; border-radius: 32px; background: #cee5fe; color: #181b34; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.tool-cta h2 { color: #181b34; margin-bottom: 12px; }
.tool-cta p { margin: 0 0 20px; color: rgba(24, 27, 52, .84); }
.tool-capture { padding: 24px; border-radius: 24px; background: #fff; color: #181b34; }
.tool-capture h3 { margin: 0 0 6px; font-size: 18px; color: #181b34; }
.tool-capture p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; }
.tool-capture form { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-capture input { flex: 1 1 180px; background: #fff; color: #181b34; border-color: #c3c6d4; }
.tool-capture [role="status"] { margin: 10px 0 0; font-size: 14px; min-height: 1.2em; }

/* Hub */
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-tile { display: flex; flex-direction: column; padding: 30px; border-radius: 28px; color: #181b34; text-decoration: none; transition: transform .2s ease; }
.tool-tile:hover { transform: translateY(-4px); text-decoration: none; color: #181b34; }
.tool-tile:nth-child(4n+1) { background: #cee5fe; } .tool-tile:nth-child(4n+2) { background: #f4cdff; }
.tool-tile:nth-child(4n+3) { background: #e8fff4; border: 1px solid #c9eedb; } .tool-tile:nth-child(4n+4) { background: #fff3cd; }
.tool-tile h2 { font-size: 24px; margin: 0 0 10px; color: #181b34; }
.tool-tile p { margin: 0 0 22px; color: rgba(24, 27, 52, .84); line-height: 1.6; }
.tool-tile span { margin-top: auto; font-weight: 500; }
.tool-related { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 860px) {
  .tool, main section.tool-cta, .tool-grid { grid-template-columns: 1fr; }
  .tool-result { position: static; }
  .tool-row { grid-template-columns: 1fr; }
  main section.tool-cta { padding: 28px 22px; border-radius: 24px; }
  .tool-form, .tool-card { padding: 22px 18px; }
  .aud-nav nav a[href="/#pricing"], .aud-nav nav a[href="/features"] { display: none; }
}
@media print {
  .aud-nav, .aud-footer, .tool-cta, .tool-actions, .tool-tabs, .tool-copy, .tool-hero p, .tool-x, .skip { display: none !important; }
  .tool-table-wrap { border: 0; overflow: visible; } .tool-panel[hidden] { display: block !important; }
  .tool-table input, .tool-table select { border: 0; padding: 2px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .tool *, .tool-tile, .tool-tile-icon, .tool-btn, .tool-cover-thumb img { transition: none !important; } }

/* Saved work: what was made here before, kept in this browser (tools.js, "Saved work"). */
.tool-history { margin-top: 20px; padding: 24px 28px; border: 1px solid var(--blog-border); border-radius: 24px; background: var(--blog-card); }
.tool-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.tool-history h2 { margin: 0; font-size: 20px; }
.tool-history-note { margin: 4px 0 14px; font-size: 14px; line-height: 1.5; color: var(--blog-ink-muted); }
.tool-history-list { list-style: none; margin: 0; padding: 0; }
.tool-history-list li { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--blog-border); }
.tool-history-open { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 12px 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--blog-ink); }
.tool-history-open strong { font-weight: 500; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blog-ink); }
.tool-history-open span { font-size: 13.5px; color: var(--blog-ink-muted); }
.tool-history-open:hover strong, .tool-history-list li.is-current strong { color: var(--blog-accent); }
.tool-link { flex: none; min-height: 32px; padding: 6px 0; border: 0; background: none; color: var(--blog-ink-muted); font: 500 13.5px/1.3 "Poppins", "Helvetica Neue", Arial, sans-serif; text-decoration: underline; cursor: pointer; }
.tool-link:hover { color: var(--blog-ink); }
.tool-cover-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px; }
.tool-cover-thumb { display: grid; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--blog-ink); }
.tool-cover-thumb img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; margin: 0; border-radius: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); transition: transform .18s ease; }
.tool-cover-thumb:hover img { transform: translateY(-3px); }
.tool-cover-thumb span { font-size: 13px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-cover-picks { margin: -4px 0 16px; }
.tool-cover-picks > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--blog-ink); }
.tool-cover-picks .tool-cover-strip { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.tool-cover-picks .tool-cover-thumb span { display: none; }
.tool-recent-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-recent-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 18px; border: 1px solid var(--blog-border); border-radius: 18px; background: var(--blog-card); color: var(--blog-ink); text-decoration: none; transition: border-color .18s ease; }
.tool-recent-item:hover { border-color: var(--blog-accent); color: var(--blog-ink); text-decoration: none; }
.tool-recent-item img { flex: none; width: 40px; height: 60px; object-fit: cover; margin: 0; border-radius: 4px; }
.tool-recent-text { display: grid; gap: 1px; min-width: 0; }
.tool-recent-text strong { font-weight: 500; font-size: 15px; color: var(--blog-ink); }
.tool-recent-text span { font-size: 13.5px; color: var(--blog-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-recent-text small { font-size: 12.5px; color: var(--blog-ink-muted); }
.tool-sub .tool-limit-cta { display: inline-flex; margin-top: 12px; }
/* "Create a free account" as the next step, not a warning (the cover maker, signed out). */
.tool-result .tool-sub.tool-join { padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .86); }
.tool-join strong { display: block; margin-bottom: 4px; font-size: 18px; font-weight: 500; color: #fff; }
.tool-join-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 760px) { .tool-recent-list { grid-template-columns: 1fr; } .tool-history { padding: 20px; } }

/* The result panel is black in both themes: its text never follows the theme. */
.tool-result p, .tool-result strong, .tool-result h2 { color: #fff; }
.tool-result .tool-sub { color: rgba(255, 255, 255, .78); }
.tool-result .tool-note.is-warn { color: #4d3800; }
.tool-result .tool-stat span, .tool-result .tool-lines span { color: rgba(255, 255, 255, .72); }
.tool-cta p, .tool-capture p, .tool-tile p { color: rgba(24, 27, 52, .84); }
.tool-field small a, .tool-copy a { color: var(--blog-accent); }

/* AI tools and the copyright page: the result panel holds text, not a number,
   so it scrolls with the page instead of sticking. */
.tool.is-ai { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.tool.is-ai textarea { min-height: 0; }
.tool.is-ai .tool-result { position: static; }
.tool-left { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--blog-ink-muted); min-height: 1.4em; }
.tool-left a { color: var(--blog-accent); }
.tool-res { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.tool-res:first-child { border-top: 0; padding-top: 0; }
.tool-res h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; font-weight: 500; color: #fff; }
.tool-result .tool-res p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .84); white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-res-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tool-mini { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .32); background: transparent; color: #fff;
  font: 500 13.5px/1.3 "Poppins", "Helvetica Neue", Arial, sans-serif; cursor: pointer; text-decoration: none; }
.tool-mini:hover, .tool-mini:focus-visible { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.tool-mini.is-link { border-color: #93c5fd; color: #bfdbfe; }
.tool-result .tool-sub.is-warn { padding: 12px 14px; border-radius: 14px; background: #fff3cd; color: #4d3800; }
.tool-result .tool-actions .tool-btn:not(.is-primary) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .32); }
.tool-result .tool-actions .tool-btn:not(.is-primary):hover { border-color: #fff; }
.tool-result .tool-ai-note { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .62); }
.tool-result[aria-busy="true"] .tool-res-list { opacity: .45; }
.tool-pre { margin: 0; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 14.5px/1.65 "Poppins", "Helvetica Neue", Arial, sans-serif; color: rgba(255, 255, 255, .9); }
.tool-steps { list-style: none; counter-reset: step; margin: 0 0 34px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-steps li { counter-increment: step; padding: 20px; border: 1px solid var(--blog-border); border-radius: 20px; background: var(--blog-card); }
.tool-steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 50%; background: #1d4ed8; color: #fff; font-weight: 500; font-size: 15px; }
.tool-steps strong { display: block; margin-bottom: 4px; font-weight: 500; color: var(--blog-ink); }
.tool-steps span { font-size: 14.5px; line-height: 1.55; color: var(--blog-ink-2); }

/* Hub: tools in named groups */
main section.tool-group { padding: 8px 0 28px; }
.tool-group > h2 { margin: 0 0 4px; font-size: 26px; }
.tool-group-about { margin: 0 0 18px; color: var(--blog-ink-muted); }
.tool-tile h3 { font-size: 22px; margin: 0 0 10px; color: #181b34; font-weight: 500; }
@media (max-width: 860px) { .tool.is-ai, .tool-steps { grid-template-columns: 1fr; } }

/* Cover maker and 3D mockup: the result is a picture. */
.tool-cover { margin: 0 0 4px; }
.tool-cover img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; border-radius: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.tool-canvas { display: block; width: 100%; height: auto; border-radius: 18px;
  background: #e9edf3 conic-gradient(#dfe4ec 25%, transparent 0 50%, #dfe4ec 0 75%, transparent 0) 0 0 / 28px 28px; }
.tool input[type="file"] { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px dashed var(--blog-border); border-radius: 14px; background: var(--blog-ground); color: var(--blog-ink); font: 400 15px/1.4 "Poppins", "Helvetica Neue", Arial, sans-serif; }
.tool input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 16px; border: 0; border-radius: 999px; background: #1d4ed8; color: #fff; font: 500 14px/1.3 "Poppins", "Helvetica Neue", Arial, sans-serif; cursor: pointer; }
.tool-result .tool-sub a { color: inherit; text-decoration: underline; }
/* A button inside a message keeps its own look: white label, no underline (it read dark on blue). */
.tool-result .tool-sub a.tool-btn, .tool-result .tool-sub a.tool-btn:hover { color: #fff; text-decoration: none; }
