/* AI website TCO calculator */
.tco-calculator {
  margin: 28px 0 36px;
  padding: 0;
}

.tco-calculator * {
  box-sizing: border-box;
}

.tco-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;
}

.tco-calculator fieldset {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-card);
}

.tco-calculator legend {
  padding: 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.tco-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.tco-field label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.tco-field input,
.tco-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
}

.tco-field input:focus,
.tco-field select:focus {
  outline: 2px solid var(--accent-border);
  outline-offset: 1px;
  border-color: var(--accent);
}

.tco-field .tco-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.tco-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.tco-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.tco-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 6px;
}

.tco-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tco-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tco-btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.tco-btn--primary:hover {
  color: #fff;
  opacity: 0.92;
}

.tco-scope {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.tco-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}

.tco-kpi {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}

.tco-kpi-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.tco-kpi-value {
  display: block;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.tco-kpi-sub {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.tco-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 24px 0 8px;
}

.tco-result-head h3 {
  margin: 0;
  font-size: 18px;
}

.tco-result-head span {
  font-size: 12px;
  color: var(--text-muted);
}

.tco-calculator .table-wrap {
  margin: 12px 0 8px;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.tco-calculator table.geo-table {
  width: 100%;
  min-width: 620px;
  margin: 0;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.55;
}

.tco-calculator table.geo-table th,
.tco-calculator table.geo-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.tco-calculator table.geo-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
}

.tco-calculator table.geo-table tr:last-child td {
  border-bottom: 0;
}

.tco-calculator table.geo-table td:nth-child(2),
.tco-calculator table.geo-table td:nth-child(3),
.tco-calculator table.geo-table td:nth-child(4),
.tco-calculator table.geo-table td:nth-child(5),
.tco-calculator table.geo-table td:nth-child(6) {
  font-variant-numeric: tabular-nums;
}

.tco-calculator table.geo-table tr.tco-selected-row td {
  background: var(--accent-subtle);
  font-weight: 600;
}

.tco-table-note {
  margin: 6px 0 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.tco-noscript {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #d97706;
  border-radius: 0 8px 8px 0;
  background: #fffbeb;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.6;
}

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

@media (max-width: 640px) {
  .tco-calculator fieldset {
    padding: 14px;
  }

  .tco-grid,
  .tco-kpis {
    grid-template-columns: 1fr;
  }

  .tco-field input,
  .tco-field select {
    font-size: 16px;
  }

  .tco-kpi-value {
    font-size: 20px;
  }

  .tco-actions .tco-btn {
    flex: 1 1 100%;
  }
}

@media print {
  .news-post-hero,
  .footer,
  .news-related,
  .cta-section,
  .back-to-top,
  .tco-actions,
  .tco-noscript {
    display: none !important;
  }

  .tco-calculator fieldset,
  .tco-kpi,
  .tco-calculator .table-wrap {
    break-inside: avoid;
    box-shadow: none;
  }
}
