body[data-tool="regra-de-tres"] .tool-input { max-width: 850px; width: 100%; margin-inline: auto; }
body[data-tool="regra-de-tres"] .tool-input h2 { margin-bottom: .5rem; }
body[data-tool="regra-de-tres"] .tool-input > .help { margin: 0 0 1.5rem; }
.rule-equation { display: grid; gap: .85rem; }
.rule-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(.6rem, 2vw, 1.25rem); align-items: center; }
.rule-value { min-width: 0; padding: .85rem; border: 1px solid #d8e3e3; border-radius: 15px; background: #f7f9f8; }
.rule-value label, .rule-answer-label { display: block; color: #425966; font-size: .88rem; font-weight: 750; }
.rule-letter { display: block; margin: .25rem 0 .55rem; color: #12324a; font: 800 clamp(1.25rem, 3vw, 1.6rem)/1 ui-sans-serif, system-ui, sans-serif; }
.rule-value input { min-height: 54px; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rule-connector { color: #425966; font-size: .88rem; font-weight: 750; white-space: nowrap; text-align: center; }
.rule-relation { display: flex; align-items: center; gap: .8rem; margin: .1rem 0; color: #a54420; font-size: .94rem; font-weight: 850; text-align: center; white-space: nowrap; }
.rule-relation::before, .rule-relation::after { content: ""; height: 1px; flex: 1; background: #d8e3e3; }
.rule-answer { border-color: #f4b29a; background: #fff1eb; }
.rule-answer output { display: flex; align-items: center; min-height: 54px; padding: .3rem 1rem; border: 1px solid #e7a38a; border-radius: 10px; background: white; color: #12324a; font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rule-summary { margin: 1.25rem 0 0; color: #425966; font-size: .95rem; line-height: 1.5; }
@media (max-width: 520px) {
  .rule-pair { gap: .45rem; }
  .rule-value { padding: .65rem; }
  .rule-value input, .rule-answer output { padding-inline: .6rem; }
  .rule-connector { width: 3.25rem; font-size: .76rem; white-space: normal; line-height: 1.15; }
}
