.calc-main {
  padding: 2rem 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.calc-container {
  max-width: 640px;
  margin: 0 auto;
}

.calc-header {
  margin-bottom: 2rem;
  text-align: center;
}

.calc-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.calc-header p {
  font-size: 0.9rem;
  color: var(--text2);
}

.calc-header a {
  color: var(--accent);
  text-decoration: none;
}

.calc-header a:hover {
  text-decoration: underline;
}

.block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.block-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-light);
}

.block-note {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.block-note strong {
  color: var(--text);
}

.block-note a {
  color: var(--accent);
  text-decoration: none;
}

.block-note a:hover {
  text-decoration: underline;
}

.row {
  display: grid;
  grid-template-columns: 1fr 100px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.row:last-child {
  border-bottom: none;
}

.row:first-of-type {
  padding-top: 0;
}

.row3 {
  display: grid;
  grid-template-columns: 1fr 100px 80px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.row3:last-child {
  border-bottom: none;
}

.row3:first-of-type {
  padding-top: 0;
}

.col-heads {
  display: grid;
  grid-template-columns: 1fr 100px 80px;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.col-head {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text3);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.col-head:first-child {
  text-align: left;
}

.lbl {
  font-size: 0.9rem;
  color: var(--text);
}

.sub {
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 0.25rem;
}

input[type="number"] {
  width: 100px;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid var(--border2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

input[type="number"].required {
  border-left: 3px solid var(--accent);
  padding-left: calc(0.5rem - 3px);
}

input[type="number"].opt {
  opacity: 0.7;
}

select.pond {
  width: 80px;
  padding: 0.5rem;
  border: 1px solid var(--border2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

select.pond:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

select.pond:disabled {
  opacity: 0.5;
  cursor: default;
}

.formula {
  font-size: 0.8rem;
  color: var(--text2);
  background: var(--bg2);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  border-left: 3px solid var(--accent);
  line-height: 1.6;
}

.formula strong {
  color: var(--text);
}

.btn-calc {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  margin-top: 1rem;
  transition: background 0.2s, transform 0.1s;
}

.btn-calc:hover {
  background: #1d4ed8;
}

.btn-calc:active {
  transform: scale(0.98);
}

#resultado {
  display: none;
  margin-top: 1rem;
}

.res-block {
  border-radius: var(--radius);
  padding: 1.5rem;
}

.res-block.ok {
  background: var(--solved-bg);
  border: 1px solid var(--solved);
}

.res-block.warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
}

.res-block.fail {
  background: var(--fail-bg);
  border: 1px solid var(--fail-bd);
}

.res-block.imp {
  background: var(--violet-light);
  border: 1px solid var(--violet);
}

.res-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.res-tag.ok {
  background: var(--solved);
  color: #fff;
}

.res-tag.warn {
  background: var(--warn);
  color: #fff;
}

.res-tag.fail {
  background: var(--fail);
  color: #fff;
}

.res-tag.imp {
  background: var(--violet);
  color: #fff;
}

.res-nota {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.res-nota.ok {
  color: var(--solved);
}

.res-nota.warn {
  color: var(--warn);
}

.res-nota.fail {
  color: var(--fail);
}

.res-nota.imp {
  color: var(--violet);
}

.res-sub {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 1rem;
}

.info-box {
  font-size: 0.8rem;
  line-height: 1.75;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
}

.info-box strong {
  color: var(--text);
}

.sep {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.obj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.obj-table th {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text3);
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.obj-table th.r {
  text-align: right;
}

.obj-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.obj-table tr:last-child td {
  border-bottom: none;
}

.obj-table td.num {
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.badge.ok {
  background: var(--solved-bg);
  color: var(--solved);
}

.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge.fail {
  background: var(--fail-bg);
  color: var(--fail);
}

.badge.imp {
  background: var(--violet-light);
  color: var(--violet);
}

.bar-wrap {
  height: 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.bar-fill.ok {
  background: var(--solved);
}

.bar-fill.warn {
  background: var(--warn);
}

.bar-fill.fail {
  background: var(--fail);
}

.bar-fill.imp {
  background: var(--violet);
}

.extra-note {
  font-size: 0.8rem;
  color: var(--text2);
  background: var(--card);
  border-radius: 6px;
  padding: 0.75rem;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  line-height: 1.65;
}

.extra-note strong {
  color: var(--text);
}

.acceso-warn {
  font-size: 0.8rem;
  color: var(--fail);
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border-radius: 6px;
  border-left: 3px solid var(--fail-bd);
}

.calc-footer {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text3);
  text-align: center;
  line-height: 1.6;
}

.calc-footer a {
  color: var(--accent);
  text-decoration: none;
}

.calc-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .calc-main {
    padding: 1.5rem 1rem 3rem;
  }

  .col-heads,
  .row3 {
    grid-template-columns: 1fr 85px 70px;
  }

  select.pond {
    width: 70px;
  }

  .row3 input[type="number"] {
    width: 85px;
  }

  .obj-table {
    font-size: 0.76rem;
  }

  .obj-table td,
  .obj-table th {
    padding: 0.4rem;
  }
}