.tool-page {
  --tool-ink: #282326;
  --tool-muted: #605851;
  --tool-accent: #9e2533;
  --tool-line: #ded6cb;
  --tool-paper: #fffdf8;
  color: var(--tool-ink);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.tool-page [hidden] { display: none !important; }
.tool-wrap { width: min(1120px, 90%); margin-inline: auto; }
.tool-hero { border-bottom: 1px solid var(--tool-line); padding-block: clamp(36px, 7vw, 88px) clamp(30px, 5vw, 64px); }
.tool-crumbs { font-size: 14px; color: var(--tool-muted); margin-bottom: 22px; }
.tool-page h1 { max-width: 900px; margin: 0 0 16px; font-size: clamp(34px, 5.6vw, 66px) !important; line-height: 1.08 !important; }
.tool-page h2 { font-size: clamp(23px, 3vw, 35px) !important; line-height: 1.2 !important; margin: 0 0 14px; }
.tool-page h3 { font-size: 18px !important; line-height: 1.3 !important; margin: 0 0 10px; }
.tool-page p { margin: 0 0 12px; }
.tool-hero p { max-width: 680px; }
.tool-eyebrow, .tool-card small { color: var(--tool-accent); font-size: 14px; font-weight: 700; }
.tool-section { padding-block: 36px; }
.tool-grid, .tool-toolbar, .tool-layout, .tool-fields, .tool-image-pair {
  display: grid;
  gap: 16px;
}
.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-toolbar { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-bottom: 14px; }
.tool-card, .tool-panel, .tool-cta {
  background: var(--tool-paper);
  border: 1px solid var(--tool-line);
  border-radius: 15px;
  padding: clamp(16px, 3vw, 28px);
  min-width: 0;
}
.tool-card { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; text-decoration: none; transition: border-color .18s, transform .18s; }
.tool-card:hover { border-color: var(--tool-accent); transform: translateY(-3px); }
.tool-card svg { width: 27px; height: 27px; color: var(--tool-accent); }
.tool-card h3, .tool-card p { margin: 0; }
.tool-card p { color: var(--tool-muted); font-size: 15px; }
.tool-card span { margin-top: auto; color: var(--tool-accent); font-weight: 700; }
.tool-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.tool-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-field { min-width: 0; }
.tool-full { grid-column: 1 / -1; }
.tool-field label { display: block; font-size: 15px; font-weight: 650; margin-bottom: 5px; }
.tool-field :is(input:not([type=checkbox]):not([type=color]), select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #bfb5a9;
  border-radius: 8px;
  background: #fff;
  color: var(--tool-ink);
  font-size: 16px;
}
.tool-field input[type=file] { font-size: 14px; }
.tool-field textarea { resize: vertical; }
.tool-check { display: flex; align-items: flex-start; gap: 9px; }
.tool-check input { margin: .35em 0 0; accent-color: var(--tool-accent); }
.estimate-options { margin: 0; min-width: 0; padding: 0; border: 0; }
.estimate-options legend { padding: 0; margin-bottom: 6px; font-weight: 700; }
.estimate-options .tool-check {
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--tool-line);
}
.estimate-options .tool-check input { margin: 0; flex: 0 0 auto; width: 18px; height: 18px; }
.estimate-options .tool-check label { flex: 1; padding-block: 10px; margin: 0; cursor: pointer; }
.estimate-files ul { margin: 8px 0; padding-left: 20px; }
.tool-page :is(a,button,input,textarea,select,summary):focus-visible { outline: 3px solid #225b83; outline-offset: 3px; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tool-page .tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--tool-accent);
  border-radius: 8px;
  background: var(--tool-accent);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.tool-page .tool-button:hover { background: #7e1c29; }
.tool-page .tool-button-secondary { background: #fff; color: #7e1c29 !important; -webkit-text-fill-color: #7e1c29; }
.tool-page .tool-button-secondary:hover { background: #f6ede8; }
.tool-page .tool-button:disabled { opacity: .55; cursor: default; }
.tool-metrics { margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); gap: 8px; }
.tool-metrics div { padding: 10px; border-radius: 8px; background: #f2eee5; }
.tool-metrics dt { color: var(--tool-muted); font-size: 14px; }
.tool-metrics dd { font-weight: 750; font-size: 17px; margin: 0; }
.tool-code { background: #f1ece4; padding: 12px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.tool-warning { color: #87202d; font-weight: 650; }
.tool-feedback { min-height: 1.65em; margin-top: 9px !important; color: var(--tool-muted); font-size: 14px; }
.tool-note { font-size: 14px; color: var(--tool-muted); }
.tool-profit-bar { background: #52765a; height: 13px; overflow: hidden; border-radius: 999px; margin-bottom: 8px; }
.tool-profit-bar span { display: block; background: #9e2533; height: 100%; }
.tool-qr { width: min(240px, 100%); aspect-ratio: 1; display: block; margin-block: 12px; }
.tool-message { white-space: pre-wrap; }
.signature-preview { background: #fff; padding: 12px; margin-bottom: 12px; border: 1px solid var(--tool-line); overflow-x: auto; }
.tool-snippet { background: #fff; border: 1px solid var(--tool-line); border-radius: 10px; padding: 12px; margin: 12px 0; }
.tool-snippet + .tool-snippet { max-width: 330px; }
.tool-snippet small, .snippet-url { font-size: 14px; color: var(--tool-muted); }
.tool-snippet .snippet-title { font-size: 20px; color: #27378e; line-height: 1.3; }
.snippet-description { font-size: 14px; }
.tool-drop { border: 2px dashed #c4afa6; padding: 12px; border-radius: 10px; }
.tool-drop.is-dragging { background: #f7e8e5; border-color: var(--tool-accent); }
.tool-image-result { border-top: 1px solid var(--tool-line); padding-block: 14px; }
.tool-image-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-image-pair figure { margin: 0; min-width: 0; }
.tool-image-pair img { width: 100%; height: 110px; object-fit: contain; background: #eee9e1; }
.tool-image-pair figcaption { font-size: 14px; }
.tool-prose { max-width: 780px; }
.tool-prose section { margin-bottom: 28px; }
.tool-prose ol { padding-left: 23px; }
.tool-prose li { margin-block: 6px; }
.tool-prose details { border-top: 1px solid var(--tool-line); padding-block: 10px; }
.tool-prose summary { cursor: pointer; font-weight: 700; }
.tool-prose details p { margin-block: 8px 2px; }
.tool-cta { margin-block: 24px; }
.tool-cta .tool-button { margin-top: 4px; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tool-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .tool-grid, .tool-toolbar, .tool-fields { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .tool-card { transition: none; } }
@media print {
  body.tool-site > :not(main), .tool-page :is(.tool-crumbs,.tool-input-panel,.tool-buttons,.tool-feedback,.tool-cta,.tool-support) { display: none !important; }
  .tool-page .tool-layout { display: block; }
  .tool-page .tool-wrap { width: 100%; }
  .tool-page .tool-hero { padding: 12px 0; }
}
