/* NetHome Styles */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --light: #f8fafc;
  --dark: #1e293b;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: var(--primary);
  color: white;
  padding: 20px 0;
}

header h1 {
  margin: 0 0 5px 0;
  font-size: 2rem;
}

tagline {
  margin: 0;
  opacity: 0.9;
}

main {
  padding: 30px 0;
}

section {
  margin-bottom: 40px;
}

h2 {
  color: var(--primary-dark);
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

.planner-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label {
  font-weight: 500;
  font-size: 0.9rem;
}

.control-group select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.btn-primary, .btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  margin-right: 10px;
}

.btn-secondary:hover {
  opacity: 0.9;
}

.canvas-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

#floor-plan {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: crosshair;
}

.legend {
  background: white;
  padding: 15px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px;
}

.legend h3 {
  margin-top: 0;
  font-size: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.color-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.color-box.strong { background: var(--success); }
.color-box.medium { background: var(--warning); }
.color-box.weak { background: var(--danger); }

device-controls {
  margin-top: 20px;
}

device-controls h3 {
  margin-bottom: 10px;
}

device-btn {
  background: var(--light);
  border: 1px solid var(--border);
  padding: 8px 16px;
  margin-right: 8px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

device-btn:hover, .device-btn.active {
  background: var(--primary);
  color: white;
}

.hint {
  color: var(--secondary);
  font-size: 0.9rem;
  margin-top: 10px;
}

.results-section {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#analysis-results {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.metric-card {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 15px;
  background: var(--light);
  border-radius: var(--radius);
}

.metric-card h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--secondary);
}

.metric-card .score, .metric-card .zones, .metric-card .risk {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
}

#recommendations ul {
  padding-left: 20px;
}

#recommendations li {
  margin-bottom: 8px;
}

.action-buttons {
  margin-top: 20px;
}

support-content {
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

support-content h2 {
  margin-top: 0;
}

support-content ul, support-content ol {
  padding-left: 20px;
}

support-content li {
  margin-bottom: 10px;
}

footer {
  background: var(--dark);
  color: white;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

footer a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer nav {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .planner-controls {
    flex-direction: column;
  }
  
  .canvas-container {
    flex-direction: column;
  }
  
  #floor-plan {
    max-width: 100%;
  }
  
  #analysis-results {
    flex-direction: column;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
