/* Tools: home list, social scripts, task breakdown, report wizards. Uses site.css tokens only. */
.tools-page h1 { margin-bottom: .2em; }
.tools-page .lead { margin-bottom: 1.2em; }
.tool-back { margin: 0 0 12px; }
.tool-back a { display: inline-flex; align-items: center; min-height: 44px; }
.small { font-size: .92rem; }
.strong { font-weight: 650; }
.pre { white-space: pre-line; }

/* ---- tools home ---- */
.tool-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
.tool-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tool-card:hover { border-color: var(--accent); }
.tool-card.sos { background: var(--care-bg); border: 2px solid var(--care-line); color: var(--care-ink); }
.tool-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.tool-title { font: 700 1.08rem/1.3 var(--head); }
.tool-sub { color: var(--muted); font-size: .95rem; }
.tool-card.sos .tool-sub { color: inherit; }
.tool-chev { font-size: 1.6rem; line-height: 1; color: var(--muted); flex: none; }
.tool-badge { justify-self: start; margin-top: 6px; font: 600 .8rem/1.2 var(--body); padding: 4px 9px; border-radius: 8px; }
.tool-badge.is-free-pro { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.tool-badge.is-pro { background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent); }
.tool-badge.is-pro::before { content: "\1F512\FE0E"; margin-right: 4px; font-size: .75rem; }
.tool-today { margin-top: 6px; font-size: .92rem; color: var(--link); }
.tool-today .ok { color: var(--text); font-weight: 600; }

/* ---- shared form bits ---- */
.note.load-fail { border: 1px solid var(--care-line); margin: 0 0 16px; }
.note.load-fail p { margin-bottom: 8px; }
.form-error { color: #B3261E; min-height: 0; margin: 6px 0; }
.form-error:empty { display: none; }
:root[data-theme="dark"] .form-error { color: #F2B8B5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-error { color: #F2B8B5; } }
input[type="search"] { min-height: var(--tap); padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; width: 100%; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--focus); }
.chips { margin: 8px 0 12px; }
button.chip[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
button.chip[aria-pressed="true"], button.chip[aria-checked="true"] { box-shadow: inset 0 0 0 1px var(--accent); }
.spinner { display: inline-block; width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
progress { width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; background: var(--card); overflow: hidden; accent-color: var(--teal); }
progress::-webkit-progress-bar { background: var(--card); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--teal); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--teal); border-radius: 99px; }

/* ---- social scripts ---- */
.script-list { display: grid; gap: 10px; margin: 8px 0 16px; }
.script-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.script-card[open] { border-color: var(--accent); }
.script-card summary { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; min-height: 56px; padding: 14px 16px; cursor: pointer; list-style: none; }
.script-card summary::-webkit-details-marker { display: none; }
.script-head { display: grid; gap: 2px; min-width: 0; }
.script-title { font-weight: 700; }
.script-sit { color: var(--muted); font-size: .93rem; }
.script-cat { flex: none; font-size: .8rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.script-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.script-text { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); }
.script-text p:last-child { margin-bottom: 0; }
.script-tip { font-size: .93rem; color: var(--muted); margin: 4px 0 0; }
.script-body .actions { margin: 12px 0 4px; }
.create-script { margin-top: 24px; }
.create-script h2 { margin-top: 0; }

/* ---- task breakdown ---- */
.tb-intro h2 { margin-top: 0; }
.tb-buttons { display: grid; gap: 12px; margin: 16px 0; max-width: 420px; }
.tb-buttons .btn { min-height: 56px; }
.tb-busy, .tb-error { text-align: center; padding: 40px 0; }
.tb-busy p { margin: 8px 0 0; }
.tb-photo { display: block; width: 100%; max-width: 560px; height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.tb-plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tb-plan-head h2 { margin: 0 0 6px; }
.tb-count { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.tb-steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.tb-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.tb-step input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--teal); }
.tb-step label { display: grid; gap: 2px; flex: 1; cursor: pointer; min-height: 28px; }
.tb-step.done { background: var(--card); }
.tb-step.done .tb-step-text { text-decoration: line-through; color: var(--muted); }
.tb-min { font-size: .85rem; color: var(--muted); font-weight: 600; }
.tb-win { text-align: center; padding: 18px; border-radius: var(--radius); background: var(--accent-soft); }
.tb-win-title { font: 750 1.4rem var(--head); margin-bottom: 4px; }

/* ---- report wizards ---- */
.pdf-actions { margin: 0 0 16px; }
.section-progress { margin-top: 4px; }
.section-body { margin: 8px 0 12px; }
.checks { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 2px; }
.check-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 4px; border-radius: 10px; }
.check-row:hover { background: var(--card); }
.check-row input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.check-row label { flex: 1; cursor: pointer; }
.auto-note { display: inline-block; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: .92rem; font-weight: 600; }
.sense-list { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 8px; }
.sense-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sense-list li > span:first-child { display: grid; gap: 2px; }
.sense-level { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-card { padding: 14px 16px; border-radius: 12px; background: var(--card); margin: 8px 0; }
.result-card h3 { margin: 0 0 4px; font-size: 1.02rem; }
.result-card p:last-child { margin-bottom: 0; }
.wizard-nav { display: flex; gap: 12px; margin: 16px 0 8px; }
.wizard-nav .btn { flex: 1; max-width: 260px; }
.saved { padding: 8px 0; }
.saved h2 { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
/* Tools grouped by purpose; same groups and order at every width. */
.tool-group { margin: 0 0 28px; }
.tool-group h2 { margin: 0 0 2px; font-size: 1.2rem; }
.tool-group-intro { margin: 0 0 12px; }
.tool-tour { margin-top: 8px; }
