/* ==========================================================================
   Renova — Calculadoras de materiales (renovasv.com/calculadoras/)
   Sistema visual alineado con renovasv.com (WordPress + Elementor + Minnaro)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --ink: #090402;
  --ink-secondary: rgba(9, 4, 2, 0.72);
  --ink-muted: rgba(9, 4, 2, 0.58);
  --accent: #0050fb;
  --accent-hover: #0040c8;
  --accent-tint: rgba(0, 80, 251, 0.06);
  --white: #ffffff;
  --border: #00000033;
  --border-subtle: rgba(9, 4, 2, 0.12);
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warn-bg: #f7f7f7;
  --warn-border: #0050fb;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --max-width: 1760px;
  --header-height: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.num,
.tabular {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Layout container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 30px;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .container {
    padding-inline: 20px;
  }
}

/* ==========================================================================
   Header (renovasv.com — blanco, wordmark azul a la izquierda, menú derecha)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 0;
  text-decoration: none;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .brand-logo {
    height: 30px;
  }
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link.is-active {
  color: var(--accent);
  font-weight: 600;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

.menu-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 68px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0;
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
  }

  .nav-list li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }

  .nav-link.is-active::after {
    display: none;
  }
}

/* ==========================================================================
   Hero editorial Minnaro
   ========================================================================== */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 52px 0 44px;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 18ch;
}

.hero-lead {
  margin: 0;
  max-width: 66ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

.hero-meta strong {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   Main workspace section
   ========================================================================== */
.workspace-section {
  padding: 36px 0 64px;
}

.reference-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-bottom: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.reference-banner strong {
  color: var(--ink);
}

.badge-ref {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid rgba(0, 80, 251, 0.3);
  vertical-align: middle;
  white-space: nowrap;
}

.badge-edited {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-soft);
  color: var(--ink);
  border: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

/* Two-column layout */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 24px;
}

@media (max-width: 600px) {
  .hero {
    padding: 36px 0 32px;
  }

  .panel {
    padding: 20px 16px;
  }
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.panel-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.panel-subtitle {
  margin: 0 0 22px;
  font-size: 0.925rem;
  color: var(--ink-secondary);
}

.line-counter {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink);
}

/* ==========================================================================
   Tabs (Minnaro sharp geometry)
   ========================================================================== */
.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: var(--bg-soft);
}

@media (max-width: 620px) {
  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tab-btn {
  appearance: none;
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink-secondary);
  padding: 13px 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tab-btn:last-child {
  border-right: none;
}

@media (max-width: 620px) {
  .tab-btn {
    border-bottom: 1px solid var(--border);
  }
  .tab-btn:nth-child(2n) {
    border-right: none;
  }
  .tab-btn:nth-child(n + 3) {
    border-bottom: 2px solid transparent;
  }
}

.tab-btn:hover {
  background: var(--bg);
  color: var(--ink);
}

.tab-btn.is-active {
  background: var(--bg);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.tab-panel {
  min-width: 0;
}

.tab-panel[hidden] {
  display: none;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.calc-form {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.field-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 560px) {
  .field-grid-2,
  .field-grid-3 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease;
}

.input:hover,
.select:hover {
  border-color: var(--ink);
}

.input:focus,
.select:focus {
  border-color: var(--accent);
}

.select:disabled,
.input:disabled {
  background: var(--bg-soft);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding: 4px 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ==========================================================================
   Formula summary & Generated Lines Preview
   ========================================================================== */
.summary-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 16px 18px;
}

.summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 10px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

.metric-value.is-primary {
  color: var(--accent);
  font-size: 1.25rem;
}

.formula-text {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--ink-secondary);
}

.exclusion-note {
  margin: 0;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ink);
  font-size: 0.825rem;
  color: var(--ink-secondary);
}

.exclusion-note strong {
  color: var(--ink);
}

.preview-block {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.preview-table-wrap,
.quote-table-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.preview-table {
  min-width: 390px;
}

.preview-table th,
.preview-table td {
  padding: 9px 6px;
}

.preview-table th:first-child,
.preview-table td:first-child {
  padding-left: 10px;
}

.preview-table th:last-child,
.preview-table td:last-child {
  padding-right: 10px;
}

.preview-table .col-concept {
  min-width: 140px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preview-table .concept-text {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

.data-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.preview-empty {
  padding: 16px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Buttons (border-radius: 0 — Minnaro)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
}

.btn-secondary {
  background: var(--bg);
  border-color: var(--border);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.btn-ink:hover {
  background: #231f1d;
  border-color: #231f1d;
  color: var(--white);
}

.btn-block {
  width: 100%;
}

.btn-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.btn-remove:hover {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-text-danger {
  background: none;
  border: none;
  padding: 4px 6px;
  color: var(--danger);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.btn-text-danger:hover {
  color: #7a140d;
}

/* Status feedback */
.live-feedback {
  min-height: 20px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--accent);
}

.alert-box {
  padding: 12px 14px;
  border: 1px solid var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.875rem;
  margin-bottom: 14px;
}

.alert-box[hidden] {
  display: none;
}

/* ==========================================================================
   Quote Builder Panel
   ========================================================================== */
.quote-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 560px) {
  .quote-meta-grid {
    grid-template-columns: 1fr;
  }
}

.quote-empty {
  padding: 28px 20px;
  border: 1px dashed var(--border);
  background: var(--bg-soft);
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-bottom: 20px;
}

.quote-empty strong {
  color: var(--ink);
}

.quote-lines-section {
  min-width: 0;
  max-width: 100%;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.quote-lines-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink-secondary);
}

.quote-table {
  min-width: 580px;
}

.quote-table th,
.quote-table td {
  padding: 10px 6px;
}

.quote-table th:first-child,
.quote-table td:first-child {
  padding-left: 10px;
}

.quote-table th:last-child,
.quote-table td:last-child {
  padding-right: 10px;
}

.quote-col-concept {
  min-width: 210px;
  width: 42%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quote-input {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.84rem;
}

.quote-textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  line-height: 1.35;
  resize: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quote-input:focus {
  border-color: var(--accent);
}

.quote-input-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 64px;
  padding-inline: 6px;
}

.quote-input-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 78px;
  padding-inline: 6px;
}

.quote-input-unit {
  width: 76px;
  padding-inline: 6px;
}

.quote-line-formula {
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quote-line-formula > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quote-line-total {
  font-weight: 700;
  color: var(--ink);
  padding-top: 16px !important;
}

/* Totals summary */
.totals-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.totals-values {
  margin-left: auto;
  text-align: right;
}

.totals-row {
  font-size: 0.875rem;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.totals-row strong {
  color: var(--ink);
}

.totals-grand {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.totals-ref-caption {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  margin-top: 2px;
}

/* Action button groups */
.actions-stack {
  display: grid;
  gap: 10px;
}

.actions-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 520px) {
  .actions-row-2 {
    grid-template-columns: 1fr;
  }
}

.quote-disclaimer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.quote-disclaimer strong {
  color: var(--ink);
}

/* ==========================================================================
   Reference Prices & Formulas Section
   ========================================================================== */
.reference-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 56px 0;
}

.section-heading {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}

.section-desc {
  margin: 0 0 28px;
  max-width: 70ch;
  color: var(--ink-secondary);
  font-size: 0.95rem;
}

.reference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 960px) {
  .reference-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.reference-card {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}

.reference-card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reference-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.yield-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.yield-list li {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

.yield-list li:last-child {
  border-bottom: none;
}

.yield-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 3px;
}

/* ==========================================================================
   Footer (inspirado en renovasv.com — tinta oscura con wordmark blanco)
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 56px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.footer-logo {
  height: 26px;
  width: auto;
  margin-bottom: 16px;
}

.footer-tagline {
  margin: 0;
  max-width: 36ch;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.footer-heading {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.footer-info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.925rem;
  color: rgba(255, 255, 255, 0.88);
}

.footer-info a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-info a:hover {
  color: #8fb4ff;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  font-size: 0.925rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.68);
}

/* ==========================================================================
   Printable Sheet (oculto en pantalla, único elemento visible al imprimir)
   ========================================================================== */
.print-sheet {
  display: none;
}

@media print {
  @page {
    size: letter portrait;
    margin: 14mm 14mm 16mm;
  }

  body {
    background: #ffffff !important;
    color: #090402 !important;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .skip-link,
  .site-header,
  .hero,
  .workspace-section,
  .reference-section,
  .site-footer {
    display: none !important;
  }

  .print-sheet {
    display: block !important;
  }

  .print-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 2px solid #090402;
  }

  .print-logo {
    height: 26px;
    width: auto;
    margin-bottom: 6px;
  }

  .print-doc-meta {
    text-align: right;
    font-size: 9pt;
    color: rgba(9, 4, 2, 0.75);
  }

  .print-doc-title {
    margin: 0 0 4px;
    font-size: 16pt;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #090402;
  }

  .print-ref-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border: 1px solid #0050fb;
    color: #0050fb;
    font-size: 8pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .print-client-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid #00000033;
    background: #f7f7f7;
    font-size: 9.5pt;
  }

  .print-client-grid dt {
    font-size: 8pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(9, 4, 2, 0.65);
  }

  .print-client-grid dd {
    margin: 2px 0 0;
    font-weight: 500;
    color: #090402;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 9.2pt;
  }

  .print-table th,
  .print-table td {
    padding: 8px 8px;
    border-bottom: 1px solid #00000033;
    text-align: left;
    vertical-align: top;
  }

  .print-table thead th {
    border-top: 1px solid #090402;
    border-bottom: 1.5px solid #090402;
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f7f7f7;
  }

  .print-table .col-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .print-formula {
    display: block;
    margin-top: 2px;
    font-size: 8pt;
    color: rgba(9, 4, 2, 0.68);
  }

  .print-totals {
    margin-left: auto;
    width: 280px;
    border: 1px solid #090402;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
  }

  .print-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 9.5pt;
    padding: 3px 0;
  }

  .print-totals-row.is-grand {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1.5px solid #090402;
    font-size: 12pt;
    font-weight: 700;
  }

  .print-disclaimer {
    padding: 12px 14px;
    border: 1px solid #00000033;
    border-left: 3px solid #0050fb;
    font-size: 8.5pt;
    line-height: 1.5;
    color: rgba(9, 4, 2, 0.8);
    margin-bottom: 14px;
  }

  .print-footer {
    font-size: 8pt;
    color: rgba(9, 4, 2, 0.65);
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #00000033;
    padding-top: 8px;
  }
}

/* ==========================================================================
   Separación en 3 páginas (27-nov-2026): calculadoras a ancho completo,
   cotización rápida y comunicación en páginas propias
   ========================================================================== */

/* Navegación entre herramientas */
.tool-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tool-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-height: 56px;
  padding: 10px 8px;
  border-bottom: 3px solid transparent;
  color: var(--ink-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.tool-nav-link:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.tool-nav-link.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tool-nav-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  font-size: 0.75rem;
}

.tool-nav-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

@media (max-width: 600px) {
  .tool-nav-link {
    flex-direction: column;
    font-size: 0.8125rem;
    gap: 2px;
    padding: 8px 4px;
  }
}

/* Calculadoras a ancho completo: datos a la izquierda, resultado a la derecha */
.calc-inputs,
.calc-results {
  display: grid;
  gap: 16px;
  min-width: 0;
}

@media (min-width: 1100px) {
  .page-calculadoras .calc-form {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px 32px;
    align-items: start;
  }
}

.calc-next {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .calc-next .btn {
    width: 100%;
  }
}

/* Cotización y comunicación en página propia */
.page-cotizacion .panel,
.page-cotizacion .reference-banner,
.page-comunicacion .panel {
  max-width: none;
  width: 100%;
  margin-inline: auto;
}

.quote-meta-grid-1 {
  grid-template-columns: minmax(0, 1fr);
}

.tool-steps {
  margin-top: 20px;
}

.comm-summary {
  margin-top: 0;
}

.comm-summary-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.comm-summary-title a {
  font-size: 0.875rem;
  color: var(--accent);
}

@media print {
  .tool-nav {
    display: none !important;
  }
}

.comm-summary[hidden] {
  display: none;
}

/* ==========================================================================
   Herramientas independientes (27-nov-2026 b)
   ========================================================================== */
.new-line-form {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: end;
  margin: 20px 0 6px;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.new-line-btn {
  min-height: 44px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .new-line-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .new-line-desc,
  .new-line-btn {
    grid-column: 1 / -1;
  }
}

#new-line-feedback {
  min-height: 1.4em;
  margin-bottom: 14px;
}

.comm-message {
  margin: 16px 0 18px;
}

.comm-textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

@media print {
  .page-calculadoras .hero,
  .page-calculadoras .workspace-section,
  .page-calculadoras .reference-section {
    display: block !important;
  }
}
