/* ==========================================================================
   1. CSS VARIABLES (Light & Dark Mode)
   ========================================================================== */
:root {
  --primary: #1EB6DE;
  --primary-dark: #1892B2;
  --light-bg: #F8FCFF;
  --border: #E1E5F1;
  --text: #1E293B;
  --text-light: #475569;
  --card-bg: #FFFFFF;
  --toast-bg: #2C3E50;
  --danger: #E53E3E;
  --success: #2C7A4D;
}

[data-theme="dark"] {
  --primary: #1EB6DE;
  --primary-dark: #1892B2;
  --light-bg: #292B32;
  --border: #4A4A5A;
  --text: #F1F5F9;
  --text-light: #CBD5E1;
  --card-bg: #1E1F28;
  --toast-bg: #111827;
  --danger: #F56565;
  --success: #48BB78;
}

/* ==========================================================================
   2. SHORT CONTENT SECTION
   ========================================================================== */
.short-content h1 {
  font-size: 70px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px 0;
  line-height: 1.1;
}

.short-content p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0 0 28px 0;
}

.short-content p strong,
.short-content p em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.short-content h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px 0;
}

.short-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.short-content ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
}

.short-content ul li i {
  color: var(--primary);
  font-size: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}

.short-content ul li strong {
  color: var(--text);
}

/* ==========================================================================
   3. CALCULATOR CARD & HEADER
   ========================================================================== */
.calc-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
  padding: 25px;
  transition: background 0.2s;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.card-head-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.card-head-text { 
  flex: 1; 
}

.card-head-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
}

.card-head-sub {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   4. MODE TOGGLE & FORM FIELDS
   ========================================================================== */
.mode-toggle {
  display: flex;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
}

.mode-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
}

.mode-btn:hover {
  color: var(--primary-dark);
  background: rgba(30, 182, 222, 0.08);
  border: none;
  text-shadow: none;
  transform: none;
  filter: none;
  box-shadow: none;
}

.mode-btn.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(30, 182, 222, 0.25);
  border: none;
  text-shadow: none;
  transform: none;
  filter: none;
}

.field { 
  margin-bottom: 16px; 
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.helper-text {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}

.field-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-data-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(30, 182, 222, 0.08);
  border: 1px solid rgba(30, 182, 222, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
}

.sample-data-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  text-shadow: none;
  transform: none;
  filter: none;
}

.sample-data-btn i {
  font-size: 11px;
}

.input-wrap { 
  position: relative; 
}

.input-wrap input,
.input-wrap textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-variant-numeric: tabular-nums;
}

.input-wrap textarea {
  font-family: monospace;
  resize: vertical;
}

.input-wrap input:focus,
.input-wrap textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 182, 222, 0.12);
}

.input-wrap input::placeholder,
.input-wrap textarea::placeholder {
  color: var(--text-light);
  opacity: 0.5;
  font-weight: 400;
}

.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.radio-label input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.convert-btn {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  margin-top: 8px;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
}

.convert-btn:hover {
  color: #ffffff;
  background: var(--primary-dark);
  box-shadow: none;
  border: none;
  text-shadow: none;
  transform: none;
  filter: none;
}

.bottom-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.ghost-btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
}

.ghost-btn:hover {
  background: var(--light-bg);
  color: var(--text);
  border-color: var(--border);
  text-shadow: none;
  transform: none;
  filter: none;
}

/* ==========================================================================
   6. RESULTS & STATS GRID (Main Result spans 2 rows on left)
   ========================================================================== */
.result-card {
  margin-top: 20px;
  padding: 18px;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: none;
  box-sizing: border-box;
}

.result-card.is-visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.result-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-actions { 
  display: flex; 
  gap: 8px; 
}

.result-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(30, 182, 222, 0.1);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
}

.result-action-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
  text-shadow: none;
  transform: none;
  filter: none;
}

.result-clear {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: background 0.2s;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
}

.result-clear:hover {
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger);
  border: none;
  text-shadow: none;
  transform: none;
  filter: none;
}

/* --- NEW GRID LAYOUT --- */
.stats-grid {
  display: grid;
  /* 1st column is for the main result (slightly wider), next 4 are for stats */
  grid-template-columns: 1.2fr repeat(4, 1fr); 
  gap: 10px;
  margin-bottom: 16px;
}

/* Main Result Box: Spans 2 rows vertically on the left */
.rsd-main-result {
  grid-column: 1 / 2;
  grid-row: 1 / 3; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: rgba(30, 182, 222, 0.05);
  border: 1px solid rgba(30, 182, 222, 0.2);
  border-radius: 8px;
  margin-bottom: 0;
}

.rsd-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.rsd-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stat Boxes */
.stat-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-sizing: border-box;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   7. STEP-BY-STEP SECTION
   ========================================================================== */
.step-by-step {
  margin-top: 16px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-title i {
  color: var(--primary);
}

.step-content {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

.step-content p {
  margin: 0 0 8px 0;
}

.step-content code {
  background: var(--light-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--text);
  font-weight: 600;
}

/* ==========================================================================
   8. LIVE RSD EXPLORER
   ========================================================================== */
.formula-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.formula-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.formula-header i {
  color: var(--primary);
  font-size: 18px;
}

.formula-eq.big {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
  font-family: 'Courier New', Courier, monospace;
}

.formula-eq.big .var {
  color: var(--primary);
  font-style: italic;
  font-weight: 800;
}

.diagram-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin: 0 0 24px 0;
  line-height: 1.4;
}

.formula-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.range-label {
  display: block;
  cursor: pointer;
}

.range-label-text {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.range-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.range-input-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin: 0;
}

.range-input-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30, 182, 222, 0.3);
  transition: transform 0.15s ease;
}

.range-input-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-input-wrap input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30, 182, 222, 0.3);
}

.range-input-wrap input[type="range"]::-moz-range-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
}

.range-input-wrap output {
  min-width: 60px;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  font-family: 'Courier New', Courier, monospace;
}

.live-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.live-result-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#LiveRsdOut {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.quality-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.quality-pill.q-excellent {
  color: #2C7A4D;
  background: rgba(44, 122, 77, 0.12);
  border-color: rgba(44, 122, 77, 0.3);
}

.quality-pill.q-good {
  color: #1EB6DE;
  background: rgba(30, 182, 222, 0.12);
  border-color: rgba(30, 182, 222, 0.3);
}

.quality-pill.q-acceptable {
  color: #D69E2E;
  background: rgba(214, 158, 46, 0.12);
  border-color: rgba(214, 158, 46, 0.3);
}

.quality-pill.q-poor {
  color: #DD6B20;
  background: rgba(221, 107, 32, 0.12);
  border-color: rgba(221, 107, 32, 0.3);
}

.quality-pill.q-very-poor {
  color: #E53E3E;
  background: rgba(229, 62, 62, 0.12);
  border-color: rgba(229, 62, 62, 0.3);
}

[data-theme="dark"] .quality-pill.q-excellent {
  color: #48BB78;
  background: rgba(72, 187, 120, 0.15);
}

[data-theme="dark"] .quality-pill.q-good {
  color: #1EB6DE;
  background: rgba(30, 182, 222, 0.15);
}

[data-theme="dark"] .quality-pill.q-acceptable {
  color: #ECC94B;
  background: rgba(236, 201, 75, 0.15);
}

[data-theme="dark"] .quality-pill.q-poor {
  color: #F6AD55;
  background: rgba(246, 173, 85, 0.15);
}

[data-theme="dark"] .quality-pill.q-very-poor {
  color: #F56565;
  background: rgba(245, 101, 101, 0.15);
}

.rsd-bar {
  position: relative;
  height: 14px;
  display: flex;
  border-radius: 7px;
  overflow: visible;
  margin-bottom: 10px;
  background: var(--border);
}

.rsd-bar-zone {
  height: 100%;
  flex: 1;
  transition: opacity 0.2s ease;
}

.rsd-bar-zone.z1 { background: #2C7A4D; flex: 0 0 10%; }
.rsd-bar-zone.z2 { background: #1EB6DE; flex: 0 0 20%; }
.rsd-bar-zone.z3 { background: #D69E2E; flex: 0 0 25%; }
.rsd-bar-zone.z4 { background: #DD6B20; flex: 0 0 25%; }
.rsd-bar-zone.z5 { background: #E53E3E; flex: 0 0 20%; }

.rsd-bar-needle {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 22px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--card-bg), 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: left 0.2s ease;
  pointer-events: none;
}

.rsd-bar-needle::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  background: var(--text);
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}

.rsd-bar-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 8px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-dot.z1 { background: #2C7A4D; }
.legend-dot.z2 { background: #1EB6DE; }
.legend-dot.z3 { background: #D69E2E; }
.legend-dot.z4 { background: #DD6B20; }
.legend-dot.z5 { background: #E53E3E; }

/* ==========================================================================
   9. INFO SECTIONS (Common & Recent)
   ========================================================================== */
.info-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.info-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.info-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-title i { 
  color: var(--primary); 
}

.info-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
}

.info-clear-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--card-bg);
  text-shadow: none;
  transform: none;
  filter: none;
}

.common-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.common-item {
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.common-item:hover {
  border-color: var(--primary);
  background: var(--card-bg);
  text-shadow: none;
  transform: none;
  filter: none;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  color: var(--text);
  box-sizing: border-box;
}

.recent-item-equation {
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.recent-item-equation .result-value {
  color: var(--primary);
  font-weight: 700;
}

[data-theme="dark"] .recent-item-equation .result-value {
  color: var(--primary);
}

.recent-item-meta {
  font-size: 11px;
  color: var(--text-light);
}

.recent-item-clear {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 5px 10px;
  font-size: 12px;
  text-shadow: none;
  transform: none;
  filter: none;
  outline: none;
  flex-shrink: 0;
  margin-left: 8px;
}

.recent-item-clear:hover {
  color: var(--danger);
  border: none;
  text-shadow: none;
  transform: none;
  filter: none;
  box-shadow: none;
}

/* ==========================================================================
   10. FAQ SECTION (Updated to .faq class)
   ========================================================================== */
.faq {
  margin-top: 40px;
}

.faq .twelve.columns {
  padding: 20px 0 40px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.faq .twelve.columns > h2 {
  grid-column: 1 / -1;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px 0;
  text-align: center;
}

.faq .twelve.columns > div {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.faq .twelve.columns > div:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(30, 182, 222, 0.08);
  transform: none;
  text-shadow: none;
}

.faq .twelve.columns > div h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.faq .twelve.columns > div p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   11. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .short-content h1 {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  
  .seven.columns, .five.columns, .six.columns, .twelve.columns {
    width: 100%;
    float: none;
    padding: 0;
    margin-left: 0;
  }
  
  .seven.columns { margin-bottom: 30px; text-align: center; }
  .short-content ul { align-items: center; }
  .short-content ul li { text-align: left; }
  .calc-card { padding: 20px 16px; box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.08); }
  .common-grid { grid-template-columns: 1fr; }
  
  /* Stats Grid: 2 columns on tablet */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
    .rsd-main-result {
    grid-column: 1 / -1; /* Spans across both columns */
    grid-row: auto;
  }
  
  /* FAQ: 1 column on tablet */
  .faq .twelve.columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .faq .twelve.columns > h2 {
    font-size: 20px;
  }
  
  .info-section { padding: 16px; }
  .info-title { font-size: 14px; }
  .formula-card { padding: 20px 16px; }
  .formula-eq.big { font-size: 20px; }
  #LiveRsdOut { font-size: 26px; }
  .rsd-bar-legend { font-size: 10px; gap: 6px 10px; }
}

@media (max-width: 480px) {
  .short-content h1 { font-size: 32px; }
  .short-content p { font-size: 15px; }
  .calc-card { padding: 16px 14px; }
  .common-item { font-size: 13px; padding: 10px 12px; }
  .recent-item { font-size: 13px; padding: 10px 12px; }
  .rsd-value { font-size: 28px; }
  .formula-eq.big { font-size: 18px; }
  .live-result { padding: 14px; gap: 10px; }
  #LiveRsdOut { font-size: 22px; }
  .quality-pill { font-size: 11px; padding: 4px 10px; }
  
  /* Stats Grid: 1 column on mobile */
  .stats-grid {
    grid-template-columns: 1fr;
  }
}