/* Shared layout for Tools calculators. Cards stay dark so light and dark site themes both stay readable. */

.tc-page { background: #f4f4f0; }
.tc-body {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 4.5rem;
}
.tc-intro {
  font-size: 0.95rem;
  color: #3f3f46;
  line-height: 1.7;
  background: #fff;
  border-left: 4px solid #FDC700;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.tc-card {
  background: #1a1a1a;
  border: 1px solid rgba(253, 199, 0, 0.18);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.tc-card h2, .tc-hd {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.85rem;
}
.tc-sub {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #FDC700;
  margin: 1.35rem 0 0.75rem;
}
.tc-grid { display: grid; gap: 1rem; }
.tc-grid-2 { grid-template-columns: 1fr 1fr; }
.tc-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.tc-field { display: flex; flex-direction: column; gap: 0.4rem; }
.tc-field[hidden] { display: none !important; }
.tc-field label, .tc-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}
.tc-field input[type="number"],
.tc-field select,
.tc-field input[type="text"] {
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1rem;
  outline: none;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset;
}
.tc-field input:focus,
.tc-field select:focus {
  border-color: #FDC700;
  background: rgba(255, 255, 255, 0.09);
}
.tc-field select option { background: #fff; color: #141418; }
.tc-field input::placeholder { color: rgba(255, 255, 255, 0.35); }
.tc-hint { font-size: 0.78rem; color: rgba(255, 255, 255, 0.62); line-height: 1.5; margin: 0 0 1rem; }
.tc-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tc-tab {
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.tc-tab[aria-selected="true"] { background: #FDC700; color: #1a1a1a; border-color: #FDC700; }
.tc-tab:focus-visible, .tc-btn:focus-visible, .tc-iconbtn:focus-visible {
  outline: 2px solid #FDC700;
  outline-offset: 2px;
}
.tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  margin-top: 1rem;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 10px;
  background: #FDC700;
  color: #1a1a1a;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}
.tc-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.tc-btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tc-btn-row .tc-btn { flex: 1 1 12rem; }
.tc-iconbtn {
  min-width: 48px;
  min-height: 48px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.tc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: end;
  margin-bottom: 0.65rem;
}
.tc-row--3 { grid-template-columns: 1fr 1.3fr auto; }
.tc-branch {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
}
.tc-branch__hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  color: #fff;
  font-weight: 800;
}
.tc-error {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  font-size: 0.88rem;
  font-weight: 600;
}
.tc-error[hidden], .tc-warn[hidden], .tc-results[hidden] { display: none; }
.tc-warn {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  background: rgba(253, 199, 0, 0.14);
  border: 1px solid rgba(253, 199, 0, 0.45);
  color: #fde68a;
  font-size: 0.85rem;
}
.tc-results { margin-top: 1.1rem; }
.tc-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tc-result {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tc-result span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.tc-result strong { font-size: 1.2rem; color: #fff; font-family: "Courier New", monospace; }
.tc-result--wide { grid-column: 1 / -1; }
.tc-result--ok strong { color: #4ade80; }
.tc-result--bad strong { color: #fca5a5; }
.tc-table { width: 100%; border-collapse: collapse; margin-top: 0.85rem; }
.tc-table th, .tc-table td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
}
.tc-table th { color: #FDC700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.tc-bands { display: flex; gap: 0.4rem; justify-content: center; align-items: flex-end; margin: 0.5rem 0 1rem; }
.tc-band {
  width: 2.5rem;
  height: 5.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.tc-legal {
  font-size: 0.72rem;
  line-height: 1.55;
  color: #52525b;
  margin: 0.85rem 0 0;
  max-width: 46rem;
}
.tc-disclaimer, .tc-backwrap {
  font-size: 0.8rem;
  color: #3f3f46;
  line-height: 1.6;
  background: #fff;
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  margin: 1.25rem 0 0;
}
.tc-back {
  display: inline-flex;
  margin-top: 1.25rem;
  font-weight: 800;
  color: #1a1a1a;
  text-decoration: none;
}
.tc-back:hover { color: #6b5a00; }
@media (max-width: 640px) {
  .tc-body { padding: 1.75rem 0.85rem 3.5rem; }
  .tc-grid-2, .tc-grid-3, .tc-results-grid, .tc-row--3 { grid-template-columns: 1fr; }
  .tc-result--wide { grid-column: auto; }
  .tc-card { padding: 1.15rem; }
}
