* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Times New Roman', Times, serif;
  background-color: #2b0f00;
  background-image:
    radial-gradient(ellipse at top left, #5c2d0e 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, #7a3b14 0%, transparent 55%);
  min-height: 100vh;
  color: #3b1f0a;
  line-height: 1.7;
}

.page-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

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

.site-header h1 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 2rem;
  font-weight: bold;
  color: #f5d9aa;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.site-header .subtitle {
  color: #d4a87a;
  font-size: 1rem;
  font-style: italic;
  margin-top: 0.4rem;
}

.main-card {
  background: #fdf6ec;
  border: 2px solid #a0622a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(60, 20, 0, 0.45);
  padding: 2rem 2.2rem;
}

.instructions-box {
  background: #f5e6cc;
  border: 1px solid #c8863c;
  border-radius: 8px;
  margin-bottom: 1.8rem;
  overflow: hidden;
}

.instructions-box summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: bold;
  color: #5c2d0e;
  font-family: 'Times New Roman', Times, serif;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.instructions-box summary::before {
  content: '▶';
  font-size: 0.7rem;
  transition: transform 0.25s ease;
  display: inline-block;
}

.instructions-box[open] summary::before {
  transform: rotate(90deg);
}

.instructions-content {
  padding: 0.9rem 1.2rem 1.1rem;
  border-top: 1px solid #d4a87a;
  font-size: 0.9rem;
  color: #4a2a0a;
}

.instructions-content p {
  margin-bottom: 0.5rem;
}

.instructions-content ol {
  padding-left: 1.3rem;
  margin-bottom: 0.8rem;
}

.instructions-content ol li {
  margin-bottom: 0.3rem;
}

.formula-note {
  background: #efe0c2;
  border-left: 4px solid #a0622a;
  padding: 0.6rem 0.9rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  color: #5c2d0e;
  margin-top: 0.8rem !important;
}

.input-section h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  font-weight: bold;
  color: #5c2d0e;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  border-bottom: 2px solid #c8863c;
  padding-bottom: 0.4rem;
}

.field-group {
  margin-bottom: 1rem;
}

.field-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: bold;
  color: #5c2d0e;
  margin-bottom: 0.35rem;
  letter-spacing: 0.5px;
}

.field-group input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid #c8863c;
  border-radius: 6px;
  background: #fffaf3;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  color: #3b1f0a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-group input[type="number"]:focus {
  border-color: #7a3b14;
  box-shadow: 0 0 0 3px rgba(122, 59, 20, 0.18);
}

.btn-calculate {
  width: 100%;
  padding: 0.8rem;
  background: #7a3b14;
  color: #f5d9aa;
  border: none;
  border-radius: 8px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: background 0.2s, transform 0.1s;
}

.btn-calculate:hover {
  background: #5c2d0e;
}

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

.result-box {
  display: none;
  margin-top: 1.5rem;
  border-radius: 10px;
  padding: 1.3rem 1.5rem;
  border: 2px solid #c8863c;
  text-align: center;
  transition: all 0.3s ease;
}

.result-box .hi-value {
  font-size: 2rem;
  font-weight: bold;
  font-family: 'Times New Roman', Times, serif;
  margin-bottom: 0.2rem;
}

.result-box .hi-status {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Times New Roman', Times, serif;
  margin-bottom: 0.4rem;
}

.result-box .hi-desc {
  font-size: 0.9rem;
  font-style: italic;
}

.status-comfortable {
  background: #e8f5e9;
  border-color: #4caf50 !important;
  color: #1b5e20;
}

.status-warm {
  background: #fff9e6;
  border-color: #f9a825 !important;
  color: #5c3c00;
}

.status-hot {
  background: #fff3e0;
  border-color: #ef6c00 !important;
  color: #6b2a00;
}

.status-very-hot {
  background: #fce4ec;
  border-color: #c62828 !important;
  color: #7f0000;
}

.status-extreme {
  background: #3b0000;
  border-color: #b71c1c !important;
  color: #ff8a80;
}

.table-section {
  margin-top: 2rem;
}

.table-section h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  font-weight: bold;
  color: #5c2d0e;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 2px solid #c8863c;
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
}

.table-note {
  font-size: 0.88rem;
  color: #7a4a1a;
  font-style: italic;
  margin-bottom: 1rem;
}

.table-wrapper {
  overflow-x: auto;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: 'Times New Roman', Times, serif;
}

.ref-table thead tr {
  background: #5c2d0e;
}

.ref-table th {
  color: #f5d9aa;
  padding: 0.55rem 0.8rem;
  text-align: left;
  font-weight: bold;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ref-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid #dfc9a8;
  color: #3b1f0a;
  vertical-align: middle;
}

.ref-table tbody tr:nth-child(even) td {
  background: #f5e6cc;
}

.ref-table tbody tr:hover td {
  background: #efe0c2;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
}

.badge-comfortable {
  background: #e8f5e9;
  color: #1b5e20;
}

.badge-warm {
  background: #fff9e6;
  color: #5c3c00;
}

.badge-hot {
  background: #fff3e0;
  color: #6b2a00;
}

.badge-veryhot {
  background: #fce4ec;
  color: #7f0000;
}

.badge-extreme {
  background: #b71c1c;
  color: #ff8a80;
}

.site-footer {
  text-align: center;
  margin-top: 1.8rem;
  padding: 1rem 1.5rem;
  background: #f0e0c4;
  border: 1px solid #c8863c;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #7a4a1a;
  font-style: italic;
}

.site-footer a {
  color: #7a3b14;
  text-decoration: underline;
  font-family: 'Times New Roman', Times, serif;
}

.site-footer a:hover {
  color: #3b1f0a;
}

.footer-formula {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #a07040;
}

@media (max-width: 480px) {
  .main-card {
    padding: 1.3rem 1rem;
  }

  .site-header h1 {
    font-size: 1.4rem;
  }

  .result-box .hi-value {
    font-size: 1.5rem;
  }
}
