/*
 * Thermal Mass Calculator (/thermal-mass-calculator/, page 138).
 * Extracted from the page's inline <script>/<style> (Phase 2B, 2026-09-22) and
 * repaired: wpautop/TinyMCE markup removed from JS string literals; logic unchanged.
 * Loaded by wp-content/mu-plugins/psa-calculators.php. Do not paste back into the editor.
 */
  .tmc-calculator {
    --tmc-bg: #f7f4ef;
    --tmc-card: #ffffff;
    --tmc-text: #202124;
    --tmc-muted: #667085;
    --tmc-line: #e7dfd3;
    --tmc-accent: #8b5e34;
    --tmc-accent-dark: #5f3f22;
    --tmc-soft: #fff7ed;
    --tmc-good: #eef7f0;
    --tmc-warn: #fff8e5;
    --tmc-radius: 22px;
    --tmc-shadow: 0 18px 45px rgba(69, 49, 27, 0.12);
    max-width: 980px;
    margin: 28px 0;
    padding: 0;
    color: var(--tmc-text);
    font-family: inherit;
  }

  .tmc-shell {
    overflow: hidden;
    border: 1px solid var(--tmc-line);
    border-radius: var(--tmc-radius);
    background:
      radial-gradient(circle at top left, rgba(139, 94, 52, 0.16), transparent 34%),
      linear-gradient(135deg, #fffdf9 0%, var(--tmc-bg) 100%);
    box-shadow: var(--tmc-shadow);
  }

  .tmc-hero {
    padding: 28px;
    border-bottom: 1px solid var(--tmc-line);
  }

  .tmc-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(139, 94, 52, 0.10);
    color: var(--tmc-accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .tmc-hero h3 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
    line-height: 1.15;
  }

  .tmc-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--tmc-muted);
    font-size: 1rem;
  }

  .tmc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
    gap: 0;
  }

  .tmc-panel {
    padding: 28px;
  }

  .tmc-panel:first-child {
    border-right: 1px solid var(--tmc-line);
    background: rgba(255, 255, 255, 0.50);
  }

  .tmc-section-title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 800;
  }

  .tmc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

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

  .tmc-field.tmc-full {
    grid-column: 1 / -1;
  }

  .tmc-field label {
    margin: 0;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 750;
  }

  .tmc-field small {
    color: var(--tmc-muted);
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .tmc-field input,
  .tmc-field select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid #d9d2c8;
    border-radius: 14px;
    background: #ffffff;
    color: var(--tmc-text);
    padding: 11px 13px;
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }

  .tmc-field input:focus,
  .tmc-field select:focus {
    border-color: var(--tmc-accent);
    box-shadow: 0 0 0 4px rgba(139, 94, 52, 0.13);
  }

  .tmc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
  }

  .tmc-button {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }

  .tmc-button-primary {
    background: linear-gradient(135deg, var(--tmc-accent) 0%, var(--tmc-accent-dark) 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(95, 63, 34, 0.24);
  }

  .tmc-button-secondary {
    border: 1px solid var(--tmc-line);
    background: #ffffff;
    color: var(--tmc-accent-dark);
  }

  .tmc-button:hover {
    transform: translateY(-1px);
  }

  .tmc-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .tmc-result-card {
    border: 1px solid var(--tmc-line);
    border-radius: 18px;
    background: var(--tmc-card);
    padding: 16px;
  }

  .tmc-result-card.tmc-highlight {
    background: linear-gradient(135deg, var(--tmc-soft), #ffffff);
  }

  .tmc-label {
    margin: 0 0 5px;
    color: var(--tmc-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .tmc-value {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.1;
    font-weight: 900;
    color: var(--tmc-accent-dark);
  }

  .tmc-subvalue {
    margin: 6px 0 0;
    color: var(--tmc-muted);
    font-size: 0.9rem;
  }

  .tmc-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tmc-mini {
    border: 1px solid var(--tmc-line);
    border-radius: 16px;
    background: #ffffff;
    padding: 12px;
  }

  .tmc-mini strong {
    display: block;
    color: var(--tmc-text);
    font-size: 1.02rem;
  }

  .tmc-mini span {
    color: var(--tmc-muted);
    font-size: 0.8rem;
  }

  .tmc-meter {
    overflow: hidden;
    height: 10px;
    margin-top: 12px;
    border-radius: 999px;
    background: #efe6da;
  }

  .tmc-meter span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c9a06a, var(--tmc-accent-dark));
    transition: width 0.25s ease;
  }

  .tmc-note {
    margin: 0;
    border-left: 4px solid var(--tmc-accent);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px 14px;
    color: #475467;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .tmc-error {
    border-color: #f3c4c4;
    background: #fff5f5;
    color: #912018;
  }

  .tmc-muted {
    color: var(--tmc-muted);
  }

  @media (max-width: 800px) {
    .tmc-grid {
      grid-template-columns: minmax(0, 1fr); /* Phase 2B: was 1fr (content overflowed on phones) */
    }

    .tmc-panel:first-child {
      border-right: 0;
      border-bottom: 1px solid var(--tmc-line);
    }

    .tmc-fields,
    .tmc-mini-grid {
      grid-template-columns: minmax(0, 1fr); /* Phase 2B: was 1fr (content overflowed on phones) */
    }

    .tmc-hero,
    .tmc-panel {
      padding: 22px;
    }
  }
