/* Web calculator page (book-sales-calculator/index.html), on top of /assets/site.css.
   The result markup comes from the extension's renderer: h2, p.metric (strong + small), p.note. */
.lead { font-size: 18px; }

.calc { margin: 28px 0 0; padding: 20px; border: 1px solid #cfd6e0; border-radius: 12px; background: #f7f9fc; }
.calc .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; align-items: start; }
.calc .grid + .grid { margin-top: 8px; }
.calc .field { min-width: 0; }
.calc label { display: block; margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.calc input[type="text"], .calc select { display: block; width: 100%; height: 46px; padding: 0 10px; line-height: normal; border: 1px solid #8b96a5; border-radius: 6px; background: #fff; color: inherit; font: inherit; }
.calc input[aria-invalid="true"] { border-color: #a72222; box-shadow: 0 0 0 1px #a72222; }
.calc .check { display: flex; align-items: center; gap: 10px; min-height: 44px; align-self: end; margin-bottom: 30px; }
.calc .check input { width: 22px; height: 22px; margin: 0; flex: none; }
.calc .check label { margin: 0; font-weight: 500; }
.hint { margin: 4px 0 10px; color: #556072; font-size: 14px; line-height: 1.4; }
.calc .error { margin: 8px 0 0; color: #a72222; font-size: 16px; }
.calc .error:empty { display: none; }
.calc button { min-height: 48px; }

.result { margin: 20px 0 0; padding: 20px; border: 1px solid #cfd6e0; border-radius: 12px; }
.result h2 { margin: 0 0 8px; font-size: 20px; }
.result p { margin: 6px 0; }
.result .metric { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.result .metric strong { font-size: 30px; line-height: 1.2; }
.result .metric small { color: #556072; font-size: 16px; }
.result .note { color: #556072; font-size: 15px; }

.cta { margin: 36px 0 0; padding: 20px; border-radius: 12px; background: #eef3fd; }
.cta h2 { margin-top: 0; }
.cta-button { display: inline-block; padding: 13px 24px; border-radius: 10px; background: #255cd1; color: #fff; font-weight: 650; text-decoration: none; }
.cta-button:hover, .cta-button:focus-visible { background: #1d4cb0; }

h3 { font-size: 18px; line-height: 1.35; margin: 22px 0 6px; }
.formula { white-space: nowrap; }
sup { line-height: 0; }

@media (max-width: 640px) {
  .lead { font-size: 17px; }
  .calc, .result, .cta { padding: 16px; }
  .calc .grid { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .calc .grid + .grid { margin-top: 12px; }
  .calc .check { margin-bottom: 8px; }
  .calc button, .cta-button { display: block; width: 100%; text-align: center; }
}
