/* Free tools: /tools and each tool's landing and result pages.
 * Builds on shared.css tokens, so dark mode follows them. */

.tool-document, .tool-page { overflow-x: clip }

.tool-preview { background: var(--caution); color: #2A1B00; font-size: 14px; font-weight: 600; text-align: center; padding: 10px 16px }
.tool-preview b { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-right: 8px }

.tool-hero .crumb { justify-content: center; padding: 0 0 18px }
.tool-hero .crumb ol { justify-content: center }
.tool-h1-domain { font-size: clamp(30px, 5vw, 46px); overflow-wrap: anywhere }
.tool-h1-domain span { font-family: var(--mono); letter-spacing: -.04em }

.tool-form { max-width: 560px; margin: 26px auto 0 }
.tool-form input { padding: 6px 0 }
.tool-submit:disabled { cursor: progress; transform: none }
.tool-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite }
.tool-form[aria-busy] .tool-spinner { display: inline-block }
@media (prefers-reduced-motion: reduce) { .tool-spinner { animation-duration: 2.4s } }
.tool-error {margin: 14px auto 0; max-width: 560px; color: var(--danger-ink); font-weight: 700; font-size: 15px }

.tool-result { background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: 36px 40px; box-shadow: var(--shadow); margin-top: 28px }
.tool-result h2 { overflow-wrap: anywhere }
.tool-result form { margin-top: 18px }
.tool-result-domain { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--ink-3); overflow-wrap: anywhere; margin-bottom: 8px }
.tool-answer { font-size: clamp(30px, 5vw, 44px); letter-spacing: -.03em; line-height: 1.15 }
.tool-answer-sub { margin-top: 10px; font-size: 16px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; overflow-wrap: anywhere }
.tool-pill { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 800; color: var(--on-fill) }
.tool-archive { margin-top: 16px; font-size: 15px; color: var(--ink-2); line-height: 1.6; max-width: 62ch }
.tool-context { margin-top: 16px; padding: 16px 20px; border-radius: 18px; background: var(--cream); border: 1px solid var(--line); font-size: 15px; line-height: 1.6; color: var(--ink-2) }
.tool-context strong { color: var(--ink) }
.tool-context a { color: var(--brand); font-weight: 700; white-space: nowrap }
.tool-context a:hover { text-decoration: underline }
.tool-context-warn { background: var(--danger-soft); border-color: var(--danger-line); color: var(--ink) }
.tool-archive a { color: var(--brand); font-weight: 700 }
.tool-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 22px }
.tool-facts div { padding: 12px 0; border-bottom: 1px solid var(--line-2); min-width: 0 }
.tool-facts dt { font-size: 12.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em }
.tool-facts dd { margin-top: 3px; font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere }
.tool-facts dd.mono { font-family: var(--mono); font-size: 14px }
.tool-subhead { font-size: 16px; margin: 30px 0 14px }
.tool-warn { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 18px 20px; border-radius: 18px; background: var(--danger-soft); border: 1px solid var(--danger-line) }
.tool-warn .si { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
.tool-warn .si svg { width: 18px; height: 18px; color: var(--on-fill) }
.tool-warn p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere }
.tool-warn .tool-warn-title { font-weight: 800; color: var(--ink); margin-bottom: 4px }
.tool-next { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line) }
.tool-next form { margin: 0 }
.tool-checked { font-size: 13px; color: var(--ink-3); font-weight: 600 }

.tool-bands { margin-top: 12px }
.tool-table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 8px 24px; box-shadow: var(--shadow-soft); overflow-x: auto }
.tool-band-table { width: 100%; border-collapse: collapse; font-size: 14.5px }
.tool-band-table th, .tool-band-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap }
.tool-band-table tbody tr:last-child th, .tool-band-table tbody tr:last-child td { border-bottom: none }
.tool-band-table thead th { font-size: 12.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em }
.tool-band-table tbody th { font-weight: 700 }
.tool-band-table td:nth-child(2) { font-family: var(--mono); color: var(--ink-2) }
.tool-bar-cell { width: 50% }
.tool-bar-cell div { display: flex; align-items: center; gap: 12px }
.tool-band-table .is-current { background: color-mix(in srgb, var(--brand) 9%, transparent) }
.tool-band-here { color: var(--brand); font-weight: 800 }
.tool-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--cream-2); overflow: hidden; min-width: 60px }
.tool-bar span { display: block; height: 100%; border-radius: 999px; background: var(--susp) }
.tool-bar-num { font-family: var(--mono); font-weight: 700; min-width: 3.5ch; text-align: right }
.tool-source { margin-top: 14px; text-align: center; font-size: 13.5px; color: var(--ink-3); font-weight: 600 }
.tool-source a { color: var(--brand); font-weight: 700 }

.tool-page .catbox h3 { margin-bottom: 8px }

.tool-faq { margin-top: 12px }
.tool-faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 10px }
.tool-faq-item summary { cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px }
.tool-faq-item summary::-webkit-details-marker { display: none }
.tool-faq-item summary::after { content: "+"; color: var(--brand); font-weight: 800; font-size: 20px; line-height: 1 }
.tool-faq-item[open] summary::after { content: "–" }
.tool-faq-item summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 18px }
.tool-faq-item p { padding: 0 22px 20px; color: var(--ink-2); font-size: 15px; line-height: 1.65; max-width: 70ch }

.tool-cards { list-style: none; display: grid; gap: 14px; margin-top: 18px }
.tool-card { display: flex; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px 26px; box-shadow: var(--shadow-soft) }
.tool-card:hover { border-color: var(--brand) }
.tool-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px }
.tool-card-icon { width: 52px; height: 52px; border-radius: 16px; background: color-mix(in srgb, var(--brand) 12%, var(--card)); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
.tool-card-icon svg { width: 26px; height: 26px }
.tool-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.tool-card-name { font-size: 18px; font-weight: 800 }
.tool-card-sum { font-size: 14.5px; color: var(--ink-2); font-weight: 500; line-height: 1.5 }
.tool-card-arrow { margin-left: auto; color: var(--brand); font-size: 20px; font-weight: 800 }

@media (max-width: 640px) {
  .tool-result { padding: 26px 20px; border-radius: 24px }
  .tool-facts { grid-template-columns: 1fr }
  .tool-table-wrap { padding: 4px 12px }
  .tool-band-table th, .tool-band-table td { padding: 11px 6px }
  .tool-band-table th:nth-child(2), .tool-band-table td:nth-child(2) { display: none }
  .tool-band-table tbody th, .tool-band-table thead th { white-space: normal }
  .tool-bar-cell { width: auto }
  .tool-card { padding: 18px }
  .tool-card-arrow { display: none }
}
