/* ============================================================
   System Design Atlas — Styles
   ============================================================ */

:root {
  --nav-bg: #0B1F4B;
  --nav-bg-hover: #123A7A;
  --accent: #FF6B35;
  --accent-hover: #E85A2A;
  --text: #1E2A44;
  --text-light: #5A6B85;
  --bg: #FFFFFF;
  --bg-alt: #F4F6FB;
  --border: #E2E8F0;
  --card-shadow: 0 1px 3px rgba(11, 31, 75, 0.08), 0 1px 2px rgba(11, 31, 75, 0.04);
  --card-shadow-hover: 0 4px 12px rgba(11, 31, 75, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.w {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  box-shadow: 0 2px 8px rgba(11, 31, 75, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: #C8D6E8;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover { color: #fff; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
  cursor: pointer;
  border: none;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s;
  cursor: pointer;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.18); }

.nav-cta {
  padding: 10px 22px;
}

/* ---------- HERO ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #0B1F4B 0%, #123A7A 50%, #1A4A8A 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FF6B35' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .w {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.1rem;
  color: #C8D6E8;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-sub {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #9FB0CC;
}

.hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.diagram-preview {
  width: 100%;
  max-width: 440px;
  height: 260px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #9FB0CC;
  position: relative;
  overflow: hidden;
}

.diagram-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FF6B35' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 64px 0;
}

.section.alt { background: var(--bg-alt); }

.section-header {
  max-width: 720px;
  margin-bottom: 32px;
}

.tag {
  display: inline-block;
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

/* ---------- CONTENT GRID ---------- */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}

/* ---------- CONCEPT CARD ---------- */
.concept-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.concept-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.concept-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.concept-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

.concept-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- LESSON CARD ---------- */
.lesson-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.lesson-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.lesson-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.lesson-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Lesson cards link straight to the lesson page. */
.read-more {
  color: var(--accent);
  font-weight: 700;
}

.lesson-card:hover .read-more { color: var(--accent-hover); }

.card-go { color: var(--accent); }

.lesson-number {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.read-time {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

/* ---------- PROBLEM CARD ---------- */
.problem-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.problem-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.problem-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.problem-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ---------- CONCEPT BADGE (alternative) ---------- */
.concept-badge-alt {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 107, 53, 0.12);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.55;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- BUILDING BLOCKS ---------- */
.block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.block-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}

.block-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.block-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.block-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.block-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.55;
}

.block-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- INTERACTIVE CANVAS ---------- */
.interactive-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.canvas-toolbar h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.toolbar-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.canvas {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 360px;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.canvas-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.95rem;
}

.canvas-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  pointer-events: none;
}

.canvas-sidebar h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-light);
}

.component-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.component {
  width: 100px;
  padding: 12px 8px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.component:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(11, 31, 75, 0.1);
}

.component:active { cursor: grabbing; }

.canvas-sidebar .hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* ---------- PRACTICE LIST ---------- */
.practice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.practice-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}

.practice-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.practice-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 20px;
}

.practice-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 8px 0 8px;
}

.practice-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.55;
}

.practice-components {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.practice-components span {
  font-size: 0.82rem;
  color: var(--text-light);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 20px;
}

.practice-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.practice-btn:hover { background: var(--accent-hover); }

/* ---------- QUIZ ---------- */
.quiz-container {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--card-shadow);
}

.quiz-question {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  min-height: 60px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.quiz-option:hover { border-color: var(--accent); background: rgba(255, 107, 53, 0.04); }

.quiz-option input { accent-color: var(--accent); }

.quiz-feedback {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.quiz-feedback.correct { background: #E6F4EA; border: 1px solid #A7D6B0; color: #1B7A43; }
.quiz-feedback.wrong   { background: #FDEAEA; border: 1px solid #F5B5B0; color: #C0392B; }

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.quiz-progress {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ---------- CHAT ---------- */
.chat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.chat-messages {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg);
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: var(--bg-alt); }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-bubble.assistant {
  background: var(--bg-alt);
  border-top-left-radius: 4px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.chat-input-row input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: #fff;
}

.chat-input-row input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- WHY CHOOSE ---------- */
.why-choose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.why-left h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.why-left p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.why-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.why-list li {
  font-weight: 500;
  color: var(--text);
}

.why-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 107, 53, 0.02));
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--radius);
  padding: 32px;
}

.why-right .award {
  font-size: 3rem;
  margin-bottom: 12px;
}

.why-right h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.why-right p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--nav-bg);
  color: #C8D6E8;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 28px;
}

.footer-grid .logo {
  color: #fff;
  margin-bottom: 8px;
}

.footer-grid p, .footer-grid .footer-links li {
  font-size: 0.9rem;
  color: #9FB0CC;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- SIMULATOR ---------- */
.simulator-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.simulator-top {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.simulator-canvas {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 400px;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.simulator-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ctrl-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.ctrl-group input[type="range"] {
  width: 100%;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chaos-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chaos-group select {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  background: #fff;
}

.chaos-group .btn-primary {
  flex-shrink: 0;
  padding: 10px 18px;
}

.btn-row .btn-primary {
  flex-shrink: 0;
}

.btn-row .btn-secondary {
  flex-shrink: 0;
}

.metrics {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 0.9rem;
}

.metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.metrics strong {
  color: var(--text);
}

.sim-canvas {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 400px;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.sim-marker {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sim-status {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.75rem;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sim-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sim-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.sim-group input[type="range"] {
  width: 100%;
}

.sim-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  background: #fff;
}

.sim-group .btn-primary,
.sim-group .btn-secondary {
  flex-shrink: 0;
  padding: 10px 18px;
  white-space: nowrap;
}

/* ---------- CHAT WIDGET ---------- */
.chat-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.chat-messages {
  min-height: 240px;
  max-height: 320px;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-bubble.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  text-align: right;
}

.chat-bubble.assistant {
  background: var(--bg-alt);
  align-self: flex-start;
  text-align: left;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: #fff;
}

.chat-input-area input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.chat-input-area .btn-primary {
  flex-shrink: 0;
  padding: 12px 20px;
}

.chat-input-area .btn-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status {
  padding: 10px 14px;
  background: rgba(255, 107, 53, 0.1);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.simulator-instructions {
  ol, ul { padding-left: 20px; }
  li { margin-bottom: 6px; line-height: 1.6; }
  h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
  .hint { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .simulator-wrap { grid-template-columns: 1fr; }
  .simulator-top { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .simulator-wrap { padding: 20px; }
  .simulator-instructions { display: none; }
}
@media (max-width: 900px) {
  .interactive-container { grid-template-columns: 1fr; }
  .canvas-sidebar { order: -1; }
  .why-choose { grid-template-columns: 1fr; }
  .why-list { grid-template-columns: 1fr; }
  .hero { flex-direction: column; padding: 48px 0 32px; }
  .hero-visual { order: -1; }
  .nav-links { display: none; }
}

@media (max-width: 500px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; }
  .content-grid, .block-grid, .practice-list { grid-template-columns: 1fr; }
}
