* { box-sizing: border-box; }
:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
  background: #eef2f7;
  font-synthesis: none;
}
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #e8eef6 0%, #f8fafc 45%, #eef2f7 100%); }
button, input { font: inherit; }
.app-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 48px; }
.hero {
  display: flex; justify-content: space-between; gap: 24px; align-items: flex-start;
  padding: 32px; border-radius: 24px; background: #0f172a; color: white;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .16);
}
.eyebrow, .section-kicker { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.eyebrow { color: #facc15; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1; }
.subtitle { margin: 14px 0 0; max-width: 700px; color: #cbd5e1; line-height: 1.6; }
.status-pill { padding: 9px 14px; border-radius: 999px; background: rgba(250, 204, 21, .14); color: #fde047; font-weight: 800; white-space: nowrap; }
.card { margin-top: 20px; padding: 26px; border: 1px solid #e2e8f0; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 12px 30px rgba(15, 23, 42, .06); }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 20px; }
.section-kicker { color: #b45309; }
h2 { margin: 0; font-size: 22px; }
.preset-actions { display: flex; gap: 8px; }
.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: block; padding: 14px; background: #fffbea; border: 1px solid #fde68a; border-radius: 16px; }
.field > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: #475569; }
.input-wrap { display: flex; align-items: center; gap: 10px; }
.input-wrap input {
  width: 100%; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 26px; font-weight: 800; color: #0f172a;
}
.input-wrap span { color: #64748b; font-weight: 700; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 800; cursor: pointer; }
.btn-primary { background: #0f172a; color: white; }
.btn-secondary { background: #f1f5f9; color: #0f172a; }
.btn-ghost { background: white; color: #334155; border: 1px solid #cbd5e1; }
.btn:active { transform: translateY(1px); }
.validation { min-height: 20px; margin: 12px 0 0; color: #b91c1c; font-size: 14px; font-weight: 700; }
.result-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.result-main { padding: 24px; border-radius: 22px; background: #fff; border: 1px solid #dbe4ee; box-shadow: 0 12px 30px rgba(15,23,42,.06); }
.result-main p { margin: 0 0 12px; color: #64748b; font-weight: 800; }
.result-main strong { font-size: clamp(40px, 7vw, 64px); line-height: 1; letter-spacing: -.04em; }
.result-main > span { margin-left: 6px; color: #64748b; font-weight: 800; }
.result-main small { display: block; margin-top: 12px; color: #475569; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.result-group { border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; }
.result-group h3 { margin: 0; padding: 14px 16px; background: #f8fafc; font-size: 15px; }
.result-row { display: grid; grid-template-columns: 1fr auto 56px; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid #edf2f7; }
.result-row span { color: #475569; font-size: 14px; }
.result-row b { font-variant-numeric: tabular-nums; }
.result-row em { color: #64748b; font-style: normal; font-size: 13px; text-align: right; }
.parameters summary { cursor: pointer; font-weight: 800; }
.parameter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.parameter-grid div { padding: 14px; border-radius: 12px; background: #f8fafc; display: flex; flex-direction: column; gap: 5px; }
.parameter-grid span { color: #64748b; font-size: 13px; }
.parameters p { margin-bottom: 0; color: #64748b; font-size: 13px; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px 4px 0; color: #64748b; font-size: 13px; }

@media (max-width: 720px) {
  .app-shell { width: min(100% - 20px, 1120px); padding-top: 10px; }
  .hero, .card { border-radius: 18px; }
  .hero { padding: 22px; flex-direction: column; }
  .input-grid, .result-hero, .results-grid { grid-template-columns: 1fr; }
  .parameter-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .preset-actions { width: 100%; }
  .preset-actions .btn { flex: 1; }
  .button-row .btn { flex: 1 1 130px; }
  .result-row { grid-template-columns: 1fr auto 48px; }
}
@media print {
  body { background: white; }
  .app-shell { width: 100%; padding: 0; }
  .hero { box-shadow: none; }
  .button-row, .preset-actions, footer { display: none !important; }
  .card, .result-main { box-shadow: none; break-inside: avoid; }
}
