/* ═══════════════════════════════════════════════════
   Neat Diagnostic Tool — West Telco
   Main Stylesheet
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --wt-blue:  #0d44c3;
  --wt-dark:  #05409f;
  --wt-light: #4ee5ff;
  --wt-mint:  #04e5b3;
  --wt-bg:    #dfe9ff;
  --navy:     #1a2e4a;
  --text:     #3a4560;
  --muted:    #6b7a99;
  --border:   #e4e8f0;
  --surface:  #f8f9fc;
  --white:    #ffffff;
  --red:      #ef4444;
  --yellow:   #f59e0b;
  --green:    #04e5b3;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: #03286a;
  color: var(--navy);
  min-height: 100vh;
}

/* ── Background ── */
.bg-gradient {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(140deg, #0d44c3 0%, #05409f 45%, #03286a 100%);
}
.bg-glow {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}
.g1 {
  top: -200px; right: -100px; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(78,229,255,0.15) 0%, transparent 65%);
  animation: pulse1 7s ease-in-out infinite;
}
.g2 {
  bottom: -200px; left: -100px; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(4,229,179,0.12) 0%, transparent 65%);
  animation: pulse2 9s ease-in-out infinite;
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; opacity: 0.035;
  background-image: linear-gradient(rgba(255,255,255,1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,1) 1px, transparent 1px);
  background-size: 60px 60px;
}
@keyframes pulse1 { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08) translate(15px,-15px)} }
@keyframes pulse2 { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06) translate(-12px,12px)} }

/* ── App layout ── */
.app-wrap {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Header ── */
.app-header {
  padding: 16px 52px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(78,229,255,0.2);
  backdrop-filter: blur(10px);
}
.header-logos { display: flex; align-items: center; gap: 16px; }
.logo-wt { height: 28px; }
.logo-sep { width: 1px; height: 22px; background: rgba(255,255,255,0.25); }
.logo-neat { height: 20px; filter: brightness(0) invert(1); }
.header-right { text-align: right; }
.header-label { font-size: 9.5px; color: rgba(255,255,255,0.45); letter-spacing: .12em; text-transform: uppercase; display: block; }
.header-version { font-size: 10.5px; color: var(--wt-light); font-weight: 600; }

/* ── Hero / Landing ── */
.hero-section {
  flex: 1; padding: 60px 52px 40px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--wt-mint); padding: 7px 18px; border-radius: 99px;
  background: rgba(4,229,179,0.12); border: 1px solid rgba(4,229,179,0.3);
  margin-bottom: 20px;
}
.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--wt-mint);
  box-shadow: 0 0 8px var(--wt-mint);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }
.hero-title {
  font-size: 48px; font-weight: 800; color: #fff; letter-spacing: -1.5px;
  line-height: 1.1; margin-bottom: 16px;
}
.hero-title .cyan { color: var(--wt-light); }
.hero-sub {
  font-size: 15px; color: rgba(255,255,255,0.6); line-height: 1.7;
  margin-bottom: 52px; max-width: 640px;
}

/* ── Mode cards ── */
.mode-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 900px; width: 100%;
}
.mode-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 32px; text-decoration: none; color: inherit;
  transition: all 0.25s ease; cursor: pointer; display: flex; flex-direction: column;
  text-align: left;
}
.mode-card:hover {
  background: rgba(255,255,255,0.1); border-color: rgba(78,229,255,0.4);
  transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.mode-card--pro:hover { border-color: rgba(4,229,179,0.5); }
.mode-icon { font-size: 36px; margin-bottom: 12px; }
.mode-badge {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 3px 12px; border-radius: 99px;
  background: rgba(13,68,195,0.2); color: var(--wt-light);
  border: 1px solid rgba(78,229,255,0.25); margin-bottom: 10px; width: fit-content;
}
.mode-badge--pro { background: rgba(4,229,179,0.15); color: var(--wt-mint); border-color: rgba(4,229,179,0.3); }
.mode-card h2 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.mode-card p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.65; flex: 1; }
.mode-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; }
.tag { font-size: 10px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.1); }
.tag--pro { background: rgba(4,229,179,0.1); color: var(--wt-mint); border-color: rgba(4,229,179,0.2); }
.mode-cta { font-size: 12px; font-weight: 700; color: var(--wt-light); margin-top: 4px; }
.mode-cta--pro { color: var(--wt-mint); }

/* ── Form container ── */
.form-container {
  max-width: 900px; width: 100%; margin: 0 auto;
  padding: 40px 52px 60px; flex: 1;
}
.form-header { margin-bottom: 32px; }
.back-link { font-size: 12px; color: rgba(255,255,255,0.5); text-decoration: none; display: inline-block; margin-bottom: 12px; }
.back-link:hover { color: var(--wt-light); }
.form-mode-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 4px 14px; border-radius: 99px;
  background: rgba(13,68,195,0.2); color: var(--wt-light);
  border: 1px solid rgba(78,229,255,0.25); margin-bottom: 12px;
}
.form-mode-badge--pro { background: rgba(4,229,179,0.15); color: var(--wt-mint); border-color: rgba(4,229,179,0.3); }
.form-header h1 { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.form-header p { font-size: 13px; color: rgba(255,255,255,0.6); }
.cyan { color: var(--wt-light); }

/* ── Form sections ── */
.form-section {
  background: rgba(255,255,255,0.95); border-radius: 12px;
  padding: 28px; margin-bottom: 20px; color: var(--navy);
}
.form-section--bant { background: rgba(255,255,255,0.97); }
.section-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.section-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--wt-blue);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.bant-num { background: linear-gradient(135deg, #0d44c3, #04e5b3); }
.section-header h2 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.section-header p { font-size: 12px; color: var(--muted); }

/* Fields */
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group.full { grid-column: 1 / -1; }
label { font-size: 11.5px; font-weight: 600; color: var(--navy); }
.req { color: #ef4444; }
input[type=text], input[type=number], input[type=date], select, textarea {
  border: 1.5px solid var(--border); border-radius: 7px; padding: 9px 12px;
  font-size: 12.5px; color: var(--navy); background: #fff; font-family: inherit;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--wt-blue); box-shadow: 0 0 0 3px rgba(13,68,195,0.1);
}
textarea { resize: vertical; min-height: 60px; }

/* Radio / Checkbox */
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-opt { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.radio-opt input { accent-color: var(--wt-blue); }

.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.check-opt { cursor: pointer; }
.check-opt input { display: none; }
.check-card {
  border: 1.5px solid var(--border); border-radius: 8px; padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; transition: all 0.15s;
}
.check-opt input:checked + .check-card {
  border-color: var(--wt-blue); background: rgba(13,68,195,0.05);
  box-shadow: 0 0 0 3px rgba(13,68,195,0.1);
}
.check-icon { font-size: 22px; }
.check-label { font-size: 11.5px; font-weight: 600; color: var(--navy); }
.check-sub { font-size: 10px; color: var(--muted); }

/* Context box */
.context-box {
  background: rgba(13,68,195,0.05); border-left: 3px solid var(--wt-blue);
  border-radius: 0 8px 8px 0; padding: 10px 14px; font-size: 11.5px;
  color: var(--text); line-height: 1.6; margin-bottom: 16px;
}
.context-box--opportunity {
  background: rgba(4,229,179,0.07); border-left-color: var(--wt-mint); color: #047a60;
}

/* BANT grid */
.bant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bant-item { display: flex; align-items: flex-start; gap: 12px; }
.bant-item--full { grid-column: 1 / -1; }
.bant-letter {
  width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, var(--wt-blue), var(--wt-dark));
  color: #fff; font-size: 16px; font-weight: 900; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.bant-letter--plus { background: linear-gradient(135deg, #04e5b3, #0d44c3); }
.bant-content { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.bant-content label { font-size: 11px; }
.bant-content select { font-size: 12px; }

/* Buttons */
.form-actions {
  display: flex; justify-content: flex-end; gap: 12px;
  padding-top: 24px; margin-top: 8px;
}
.btn-primary {
  background: var(--wt-mint); color: #03286a; border: none; padding: 12px 28px;
  border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer;
  text-decoration: none; display: inline-block; transition: all 0.15s;
}
.btn-primary:hover { background: #03c99e; transform: translateY(-1px); }
.btn-primary.btn-lg { padding: 14px 32px; font-size: 14px; }
.btn-secondary {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2); padding: 12px 24px;
  border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer;
  text-decoration: none; display: inline-block; transition: all 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

/* ── Result pages ── */
.result-container { max-width: 1100px; width: 100%; margin: 0 auto; padding: 40px 52px 60px; flex: 1; }
.result-header { margin-bottom: 28px; }
.result-header h1 { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.result-header p { font-size: 13px; color: rgba(255,255,255,0.6); }
.result-company { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wt-mint); margin-bottom: 6px; }

/* BANT+I Result */
.banti-result {
  border-radius: 12px; padding: 24px 28px; margin-bottom: 24px;
  border: 2px solid;
}
.banti-result.banti-green { border-color: #04e5b3; background: rgba(4,229,179,0.07); }
.banti-result.banti-yellow { border-color: #f59e0b; background: rgba(245,158,11,0.07); }
.banti-result.banti-red { border-color: #ef4444; background: rgba(239,68,68,0.07); }
.banti-score-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.banti-circle {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid currentColor; display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.banti-result.banti-green .banti-circle { color: #04e5b3; border-color: #04e5b3; }
.banti-result.banti-yellow .banti-circle { color: #f59e0b; border-color: #f59e0b; }
.banti-result.banti-red .banti-circle { color: #ef4444; border-color: #ef4444; }
.banti-num { font-size: 26px; font-weight: 900; line-height: 1; color: inherit; }
.banti-denom { font-size: 10px; color: var(--muted); }
.banti-label { font-size: 18px; font-weight: 800; color: #fff; }
.banti-result.banti-green .banti-label { color: #04e5b3; }
.banti-result.banti-yellow .banti-label { color: #f59e0b; }
.banti-result.banti-red .banti-label { color: #ef4444; }
.banti-action { font-size: 12.5px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.banti-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.banti-bar-item { display: flex; align-items: center; gap: 8px; }
.banti-bar-label { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.6); width: 70px; flex-shrink: 0; }
.banti-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden; }
.banti-bar-fill { height: 100%; background: linear-gradient(90deg, #04e5b3, #4ee5ff); border-radius: 99px; }
.banti-bar-val { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.7); width: 28px; text-align: right; }

/* Result sections */
.result-section { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; }
.result-section h2 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--wt-mint); }

/* Recs grid */
.recs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.rec-card {
  border: 1px solid var(--border); border-left: 4px solid var(--wt-blue);
  border-radius: 8px; padding: 16px; background: var(--surface);
}
.rec-space-label { font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wt-mint); margin-bottom: 4px; }
.rec-device-name { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.rec-device-sub { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.rec-reason { font-size: 11px; color: var(--text); line-height: 1.5; margin-bottom: 10px; }
.rec-addon { font-size: 10.5px; font-weight: 700; color: #047a60; background: rgba(4,229,179,0.1); padding: 3px 10px; border-radius: 99px; display: inline-block; margin-bottom: 4px; }
.rec-addon--center { color: var(--wt-blue); background: rgba(13,68,195,0.08); }
.rec-alerts { margin-top: 8px; }
.alert-item { font-size: 10px; color: #92400e; background: rgba(245,158,11,0.08); padding: 3px 8px; border-radius: 4px; margin-bottom: 3px; }

/* Infra grid */
.infra-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.infra-item { padding: 10px 14px; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); }
.infra-label { font-size: 9.5px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; display: block; }
.infra-val { font-size: 12px; font-weight: 600; color: var(--navy); }

/* Result actions */
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Rooms summary */
.rooms-summary { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; }
.rooms-summary h3 { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.rooms-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.room-chip { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 11.5px; }
.room-chip-icon { font-size: 14px; }
.room-chip-name { font-weight: 600; color: var(--navy); }
.room-chip-type { font-size: 10px; color: var(--muted); }
.room-chip-del { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 12px; padding: 0 4px; }

/* Summary table */
.summary-table-wrap { overflow-x: auto; }
.summary-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.summary-table th { background: var(--navy); color: #fff; padding: 9px 12px; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.summary-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.summary-table tr:nth-child(even) td { background: var(--surface); }
.cyan-text { color: var(--wt-blue); font-weight: 700; }

/* Room detail card */
.room-detail-card { background: rgba(255,255,255,0.95); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.room-detail-header { background: var(--navy); padding: 16px 24px; display: flex; align-items: center; gap: 12px; }
.room-detail-num { width: 30px; height: 30px; background: var(--wt-mint); border-radius: 50%; color: #03286a; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.room-detail-header h3 { font-size: 15px; font-weight: 700; color: #fff; }
.room-detail-loc { font-size: 10.5px; color: rgba(255,255,255,0.5); display: block; }
.room-detail-badge { margin-left: auto; background: rgba(78,229,255,0.15); color: var(--wt-light); font-size: 9.5px; font-weight: 700; padding: 3px 12px; border-radius: 99px; letter-spacing: .08em; text-transform: uppercase; }
.room-detail-body { padding: 20px 24px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.room-rec-col, .room-check-col, .room-data-col {}
.room-rec-label { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wt-mint); margin-bottom: 8px; display: block; }
.room-rec-device { font-size: 16px; font-weight: 800; color: var(--wt-blue); margin-bottom: 2px; }
.room-rec-sub { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.room-rec-reason { font-size: 11px; color: var(--text); line-height: 1.5; margin-bottom: 10px; }
.device-specs-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 10px; }
.spec-item { background: var(--surface); border-radius: 5px; padding: 5px 8px; }
.spec-item span { font-size: 8.5px; color: var(--muted); display: block; }
.spec-item strong { font-size: 11px; color: var(--navy); }
.install-checklist { list-style: none; padding: 0; }
.install-checklist li { font-size: 11px; padding: 5px 0; border-bottom: 1px solid var(--border); display: flex; gap: 6px; line-height: 1.4; }
.check-ok { color: var(--text); }
.check-warn { color: #92400e; }
.check-ico { flex-shrink: 0; }
.room-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.rd-item { padding: 4px 0; border-bottom: 1px solid var(--border); }
.rd-item span { font-size: 9px; color: var(--muted); display: block; }
.rd-item strong { font-size: 11px; color: var(--navy); }
.room-notes { margin-top: 8px; font-size: 10.5px; color: var(--text); background: var(--surface); padding: 8px; border-radius: 6px; }
.room-alerts { background: rgba(245,158,11,0.06); border-top: 1px solid rgba(245,158,11,0.2); padding: 10px 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.room-alerts .alert-item { font-size: 10.5px; }

/* Footer */
.app-footer {
  padding: 14px 52px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between;
  font-size: 9.5px; color: rgba(255,255,255,0.3);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE STYLES
   Desktop first → Tablet (≤1024px) → Mobile (≤768px) → Small (≤480px)
   ═══════════════════════════════════════════════════ */

/* ── TABLET (≤1024px) ── */
@media (max-width: 1024px) {

  /* Header */
  .app-header { padding: 14px 28px; }
  .logo-wt { height: 24px; }
  .logo-neat { height: 17px; }

  /* Hero */
  .hero-section { padding: 40px 28px 32px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 14px; }
  .mode-cards { grid-template-columns: 1fr 1fr; gap: 16px; }
  .mode-card h2 { font-size: 18px; }

  /* Forms */
  .form-container { padding: 28px 28px 48px; }
  .fields-grid { grid-template-columns: 1fr 1fr; }
  .fields-grid--3 { grid-template-columns: 1fr 1fr; }
  .checkbox-grid { grid-template-columns: repeat(3, 1fr); }
  .bant-grid { grid-template-columns: 1fr 1fr; }

  /* Results */
  .result-container { padding: 28px 28px 48px; }
  .recs-grid { grid-template-columns: repeat(2, 1fr); }
  .infra-grid { grid-template-columns: repeat(2, 1fr); }
  .banti-bars { grid-template-columns: repeat(2, 1fr); }
  .room-detail-body { grid-template-columns: 1fr 1fr; }
  .room-rec-col { grid-column: 1 / -1; }

  /* Summary table scroll */
  .summary-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .summary-table { min-width: 700px; }
}

/* ── MOBILE (≤768px) ── */
@media (max-width: 768px) {

  /* Header */
  .app-header { padding: 12px 16px; }
  .header-right { display: none; }
  .logo-wt { height: 20px; }
  .logo-neat { height: 15px; }
  .logo-sep { height: 18px; }

  /* Hero */
  .hero-section { padding: 28px 16px 24px; text-align: left; }
  .hero-title { font-size: 26px; letter-spacing: -0.5px; }
  .hero-sub { font-size: 13px; margin-bottom: 32px; }
  .hero-eyebrow { font-size: 9px; padding: 5px 12px; }

  /* Mode cards — stack vertically */
  .mode-cards { grid-template-columns: 1fr; gap: 14px; max-width: 100%; }
  .mode-card { padding: 20px; }
  .mode-card h2 { font-size: 17px; }
  .mode-card p { font-size: 12.5px; }
  .mode-icon { font-size: 28px; }

  /* Form container */
  .form-container { padding: 20px 16px 40px; }
  .form-header h1 { font-size: 22px; }
  .form-header p { font-size: 12px; }
  .form-mode-badge { font-size: 9px; padding: 3px 10px; }

  /* Form sections */
  .form-section { padding: 20px 16px; }
  .section-header { gap: 10px; }
  .section-header h2 { font-size: 14px; }
  .section-num { width: 28px; height: 28px; font-size: 12px; flex-shrink: 0; }

  /* Fields — single column on mobile */
  .fields-grid { grid-template-columns: 1fr; }
  .fields-grid--3 { grid-template-columns: 1fr; }
  .field-group.full { grid-column: 1; }

  /* Checkboxes — 2 columns */
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .check-card { padding: 10px 8px; }
  .check-icon { font-size: 18px; }
  .check-label { font-size: 10.5px; }
  .check-sub { font-size: 9px; }

  /* BANT grid — single column */
  .bant-grid { grid-template-columns: 1fr; }
  .bant-item--full { grid-column: 1; }
  .bant-letter { width: 30px; height: 30px; font-size: 13px; flex-shrink: 0; }

  /* Buttons */
  .form-actions { flex-direction: column-reverse; gap: 10px; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; padding: 13px 20px; }
  .btn-primary.btn-lg { padding: 13px 20px; font-size: 13px; }

  /* Results */
  .result-container { padding: 20px 16px 40px; }
  .result-header h1 { font-size: 22px; }
  .result-actions { flex-direction: column; }
  .result-actions a, .result-actions button { width: 100%; text-align: center; }

  /* BANT+I result */
  .banti-result { padding: 16px; }
  .banti-score-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .banti-circle { width: 60px; height: 60px; }
  .banti-num { font-size: 22px; }
  .banti-label { font-size: 15px; }
  .banti-bars { grid-template-columns: 1fr; gap: 8px; }
  .banti-bar-label { width: 80px; }

  /* Recs grid — single column */
  .recs-grid { grid-template-columns: 1fr; }
  .infra-grid { grid-template-columns: 1fr 1fr; }

  /* Room detail */
  .room-detail-body { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .room-detail-header { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .room-detail-badge { margin-left: 0; }
  .room-data-grid { grid-template-columns: 1fr 1fr; }

  /* Rooms summary */
  .rooms-list { flex-direction: column; }
  .rooms-summary a.btn-primary { display: block; text-align: center; }

  /* Footer */
  .app-footer { flex-direction: column; gap: 4px; text-align: center; padding: 12px 16px; font-size: 9px; }
}

/* ── SMALL MOBILE (≤480px) ── */
@media (max-width: 480px) {

  /* Hero */
  .hero-title { font-size: 22px; }
  .hero-sub { font-size: 12.5px; }

  /* Form */
  .form-header h1 { font-size: 19px; }
  .form-section { padding: 16px 12px; }

  /* Checkboxes — single column */
  .checkbox-grid { grid-template-columns: 1fr; }

  /* BANT */
  .bant-content label { font-size: 10.5px; }

  /* Infra grid — single column */
  .infra-grid { grid-template-columns: 1fr; }

  /* Room data grid — single column */
  .room-data-grid { grid-template-columns: 1fr; }

  /* Device specs */
  .device-specs-mini { grid-template-columns: 1fr 1fr; }

  /* Summary table */
  .summary-table { font-size: 10px; }
  .summary-table th, .summary-table td { padding: 7px 8px; }

  /* Header logos */
  .logo-wt { height: 18px; }
  .logo-neat { height: 13px; }
  .logo-sep { height: 14px; }

  /* Back link */
  .back-link { font-size: 11px; }

  /* Context box */
  .context-box { font-size: 10.5px; padding: 8px 10px; }
}

/* ── TOUCH IMPROVEMENTS ── */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  input, select, textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
    min-height: 44px;
  }
  .check-card { min-height: 60px; justify-content: center; }
  .btn-primary, .btn-secondary { min-height: 48px; }
  .radio-opt { padding: 8px 0; }
  .mode-card:hover { transform: none; } /* Disable hover animation on touch */
}
