/* M6 Renew - Modern Dark Theme & Multi-Page Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111622;
  --bg-card: rgba(20, 27, 41, 0.75);
  --bg-card-hover: rgba(28, 37, 56, 0.85);
  --header-bg: rgba(10, 13, 20, 0.88);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.3);
  
  --text-main: #f3f4f6;
  --text-heading: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --gradient-brand: linear-gradient(135deg, #38bdf8 0%, #3b82f6 50%, #8b5cf6 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Theme Definition & Specific Overrides */
[data-theme="light"],
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]),
  html[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --header-bg: rgba(255, 255, 255, 0.94);
    --border-color: rgba(15, 23, 42, 0.14);
    --border-glow: rgba(2, 132, 199, 0.35);
    
    --text-main: #0f172a;
    --text-heading: #0f172a;
    --text-muted: #334155;
    --text-dim: #475569;
    
    --accent-cyan: #0284c7;
    --accent-blue: #2563eb;
    --accent-emerald: #047857;
    --accent-purple: #6d28d9;
    --accent-amber: #b45309;
    --accent-rose: #be123c;
    
    --shadow-main: 0 4px 20px rgba(0, 0, 0, 0.06);
  }
}

html[data-theme="light"] body,
body[data-theme="light"] {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] header,
body[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: rgba(15, 23, 42, 0.14) !important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .subproject-card,
html[data-theme="light"] .subproject-seq-item,
html[data-theme="light"] .budget-card,
html[data-theme="light"] .sequence-card,
html[data-theme="light"] .checklist-item,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .visualizer-section,
html[data-theme="light"] .drawing-card,
html[data-theme="light"] .phase-detail-card,
html[data-theme="light"] .warning-callout,
body:not([data-theme="dark"]) .card,
body:not([data-theme="dark"]) .subproject-card,
body:not([data-theme="dark"]) .subproject-seq-item,
body:not([data-theme="dark"]) .budget-card,
body:not([data-theme="dark"]) .sequence-card,
body:not([data-theme="dark"]) .checklist-item,
body:not([data-theme="dark"]) .stat-card,
body:not([data-theme="dark"]) .visualizer-section,
body:not([data-theme="dark"]) .drawing-card,
body:not([data-theme="dark"]) .phase-detail-card,
body:not([data-theme="dark"]) .warning-callout {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .subproject-seq-item::before,
body:not([data-theme="dark"]) .subproject-seq-item::before {
  background: #ffffff !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.2) !important;
}

html[data-theme="light"] .plan-nav-container,
body:not([data-theme="dark"]) .plan-nav-container {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .plan-tab-btn,
body:not([data-theme="dark"]) .plan-tab-btn {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}

html[data-theme="light"] .plan-tab-btn.active,
body:not([data-theme="dark"]) .plan-tab-btn.active {
  background: var(--accent-cyan) !important;
  color: #ffffff !important;
  border-color: var(--accent-cyan) !important;
}

html[data-theme="light"] .subproject-pill,
body:not([data-theme="dark"]) .subproject-pill {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}

html[data-theme="light"] .subproject-pill.active,
body:not([data-theme="dark"]) .subproject-pill.active {
  background: rgba(2, 132, 199, 0.12) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] .section-title,
html[data-theme="light"] .subproject-title,
html[data-theme="light"] .subproject-seq-title,
html[data-theme="light"] .budget-title,
html[data-theme="light"] .stage-title,
html[data-theme="light"] .checklist-title,
html[data-theme="light"] .budget-val,
html[data-theme="light"] .drawing-title,
body:not([data-theme="dark"]) h1,
body:not([data-theme="dark"]) h2,
body:not([data-theme="dark"]) h3,
body:not([data-theme="dark"]) h4,
body:not([data-theme="dark"]) .section-title,
body:not([data-theme="dark"]) .subproject-title,
body:not([data-theme="dark"]) .subproject-seq-title,
body:not([data-theme="dark"]) .budget-title,
body:not([data-theme="dark"]) .stage-title,
body:not([data-theme="dark"]) .checklist-title,
body:not([data-theme="dark"]) .budget-val,
body:not([data-theme="dark"]) .drawing-title {
  color: #0f172a !important;
}

html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] .subproject-desc,
html[data-theme="light"] .subproject-seq-desc,
html[data-theme="light"] .checklist-desc,
html[data-theme="light"] .budget-label,
html[data-theme="light"] .section-desc,
html[data-theme="light"] .hero-subtitle,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .drawing-desc,
body:not([data-theme="dark"]) p,
body:not([data-theme="dark"]) li,
body:not([data-theme="dark"]) .subproject-desc,
body:not([data-theme="dark"]) .subproject-seq-desc,
body:not([data-theme="dark"]) .checklist-desc,
body:not([data-theme="dark"]) .budget-label,
body:not([data-theme="dark"]) .section-desc,
body:not([data-theme="dark"]) .hero-subtitle,
body:not([data-theme="dark"]) .stat-label,
body:not([data-theme="dark"]) .drawing-desc {
  color: #334155 !important;
}

html[data-theme="light"] .nav-link,
body:not([data-theme="dark"]) .nav-link {
  color: #334155 !important;
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active,
body:not([data-theme="dark"]) .nav-link:hover,
body:not([data-theme="dark"]) .nav-link.active {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.08) !important;
}

  body:not([data-theme="dark"]) .nav-link.subpage-link {
    border: 1px dashed #0284c7 !important;
    color: #0284c7 !important;
  }

  body:not([data-theme="dark"]) .nav-link.subpage-link:hover,
  body:not([data-theme="dark"]) .nav-link.subpage-link.active {
    background: rgba(2, 132, 199, 0.14) !important;
    color: #0284c7 !important;
    border-style: solid !important;
    font-weight: 700 !important;
  }
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --header-bg: rgba(255, 255, 255, 0.94);
  --border-color: rgba(15, 23, 42, 0.14);
  --border-glow: rgba(2, 132, 199, 0.35);
  
  --text-main: #0f172a;
  --text-heading: #0f172a;
  --text-muted: #334155;
  --text-dim: #475569;
  
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-emerald: #047857;
  --accent-purple: #6d28d9;
  --accent-amber: #b45309;
  --accent-rose: #be123c;
  
  --shadow-main: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .card,
[data-theme="light"] .subproject-card,
[data-theme="light"] .budget-card,
[data-theme="light"] .sequence-card,
[data-theme="light"] .checklist-item,
[data-theme="light"] .stat-card,
[data-theme="light"] .visualizer-section,
[data-theme="light"] .drawing-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] .subproject-title,
[data-theme="light"] .budget-title,
[data-theme="light"] .stage-title,
[data-theme="light"] .checklist-title,
[data-theme="light"] .budget-val,
[data-theme="light"] .drawing-title {
  color: #0f172a !important;
}

[data-theme="light"] p,
[data-theme="light"] li,
[data-theme="light"] .subproject-desc,
[data-theme="light"] .checklist-desc,
[data-theme="light"] .budget-label,
[data-theme="light"] .section-desc,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .stat-label,
[data-theme="light"] .drawing-desc {
  color: #334155 !important;
}

[data-theme="light"] .nav-link {
  color: #334155 !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .nav-link.subpage-link {
  border: 1px dashed #0284c7 !important;
  color: #0284c7 !important;
}

[data-theme="light"] .nav-link.subpage-link:hover,
[data-theme="light"] .nav-link.subpage-link.active {
  background: rgba(2, 132, 199, 0.14) !important;
  color: #0284c7 !important;
  border-style: solid !important;
  font-weight: 700 !important;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 40%);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #7dd3fc;
}

/* Layout Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  gap: 2.5rem;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.brand:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.brand-badge {
  font-size: 0.7rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  -webkit-text-fill-color: initial;
}

nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.subpage-link {
  border: 1px dashed var(--accent-cyan);
  color: var(--accent-cyan);
}

.nav-link.subpage-link:hover, .nav-link.subpage-link.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent-cyan);
  border-style: solid;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  margin-left: auto;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.notebooklm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border: 1px solid var(--border-glow);
  color: #ffffff;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.notebooklm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

/* Hero Section */
.hero {
  max-width: 1300px;
  margin: 3rem auto 2.5rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.2rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Subpage Banner */
.subpage-hero {
  max-width: 1300px;
  margin: 2.5rem auto 2rem;
  padding: 0 2rem;
  text-align: center;
}

.subpage-hero h1 {
  font-size: 3rem;
  margin-bottom: 0.8rem;
}

.subpage-hero p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Main Container */
.container {
  max-width: 1300px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Cards & Containers */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-main);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Room Selector & Before/After Visualizer */
.visualizer-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-main);
}

.room-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.room-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.room-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.room-btn.active {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.view-controls {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.toggle-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Interactive Split Slider */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 580px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-after {
  z-index: 1;
}

.img-before-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
}

.img-before-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Handle line */
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  z-index: 10;
  cursor: ew-resize;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.slider-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Badges */
.badge-before, .badge-after {
  position: absolute;
  top: 20px;
  z-index: 15;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
}

.badge-before {
  left: 20px;
  background: rgba(244, 63, 94, 0.85);
  color: #ffffff;
}

.badge-after {
  right: 20px;
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
}

.room-info-bar {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-info-title {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.room-info-details {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.side-by-side-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  display: none;
}

.side-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 420px;
}

.side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sub-page Building Order Sequence Styles */
.sequence-stepper {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.step-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.step-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glow);
}

.step-pill.active {
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.step-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  display: block;
}

.step-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 0.2rem;
  display: block;
}

.step-pill.active .step-name {
  color: #ffffff;
  font-weight: 600;
}

.sequence-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sequence-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.sequence-card:hover {
  border-color: var(--border-glow);
}

.sequence-card-number {
  position: absolute;
  top: -15px;
  right: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.sequence-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.stage-badge {
  background: var(--gradient-brand);
  color: white;
  font-weight: 800;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.stage-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.subbox {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.subbox h4 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subbox-tasks h4 { color: var(--accent-cyan); }
.subbox-rules h4 { color: var(--accent-emerald); }
.subbox-warnings h4 { color: var(--accent-amber); }

.subbox-list {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subbox-list li {
  position: relative;
  padding-left: 1.2rem;
}

.subbox-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.warning-callout {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.warning-callout h4 {
  color: var(--accent-rose);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.warning-callout p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Sub-projects Sequential Vertical Layout */
.subproject-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.subproject-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.5rem 1.8rem;
  border-radius: 12px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.subproject-card:hover {
  border-color: var(--border-glow);
  transform: translateX(4px);
}

.subproject-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.subproject-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.subproject-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Status Badges */
.status-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-progress {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-planned {
  background: rgba(156, 163, 175, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(156, 163, 175, 0.3);
}

/* NotebookLM Integration Card */
.notebooklm-card {
  background: linear-gradient(160deg, rgba(20, 27, 41, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.05);
}

.notebooklm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.notebook-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.sources-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.btn-sm {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-sm:hover {
  background: var(--accent-cyan);
  color: #000;
}

/* Budget Section */
.budget-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0;
}

.budget-progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 10px;
  width: 44.7%;
  transition: width 0.8s ease-in-out;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.budget-table th, .budget-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.budget-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 650px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--gradient-emerald);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(10, 13, 20, 0.95);
}

/* Lightbox Close Button */
.lightbox-close-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  transition: var(--transition);
}
.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(10, 13, 20, 0.95);
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN ENHANCEMENTS
   ========================================================================== */

/* Smooth Touch Scrolling Utilities */
.drawings-category-tabs,
.filter-bar,
.sequence-stepper {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.drawings-category-tabs::-webkit-scrollbar,
.filter-bar::-webkit-scrollbar,
.sequence-stepper::-webkit-scrollbar,
nav::-webkit-scrollbar {
  display: none;
}

/* Tablet & Medium Screen Adjustments (< 1024px) */
@media (max-width: 1024px) {
  header {
    padding: 0.8rem 1.5rem;
  }
  .header-container {
    gap: 1.5rem;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-card {
    padding: 1.8rem;
  }
  .grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
  .drawings-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Tablet & Mobile Breakpoint (< 850px) */
@media (max-width: 850px) {
  header {
    padding: 0.75rem 1rem;
  }
  .header-container {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
  }
  .brand {
    font-size: 1.25rem;
  }
  .theme-toggle-btn {
    margin-left: auto;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
  }
  nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 0.4rem;
    margin-top: 0.2rem;
    gap: 0.6rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.6rem;
  }
  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    flex-shrink: 0;
  }

  .drawings-category-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
    width: 100%;
  }
  .drawing-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
    width: 100%;
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sequence-stepper {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.6rem;
    padding: 0.8rem 0.5rem;
  }
  .step-pill {
    min-width: 130px;
    flex-shrink: 0;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  .card, .sequence-card {
    padding: 1.5rem 1.25rem !important;
    margin-bottom: 2rem !important;
  }

  .subproject-card, .budget-card {
    padding: 1.25rem 1rem !important;
  }

  .grid-3col {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.5rem !important;
  }
}

/* Mobile Screens (< 640px) */
@media (max-width: 640px) {
  header {
    padding: 0.6rem 0.8rem;
  }
  .brand {
    font-size: 1.15rem;
  }
  .brand i {
    width: 20px;
    height: 20px;
  }
  
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }
  .hero-subtitle {
    font-size: 0.92rem;
  }

  .drawings-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .drawing-card {
    border-radius: 12px;
  }
  .drawing-img-wrapper {
    height: 220px;
  }
  .drawing-body {
    padding: 1rem 1.1rem;
  }
  .drawing-title {
    font-size: 1.05rem;
  }
  .drawing-desc {
    font-size: 0.85rem;
  }

  .checklist-item {
    padding: 0.9rem 1rem;
    gap: 0.75rem;
  }
  .checklist-title {
    font-size: 0.95rem;
  }
  .checklist-desc {
    font-size: 0.85rem;
  }

  .budget-row {
    font-size: 0.85rem;
    padding: 0.45rem 0;
  }

  /* Table Horizontal Scrolling on Small Screens */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
  }

  #lightboxModal {
    padding: 1rem !important;
  }
  #lightboxImg {
    max-width: 100% !important;
    max-height: 72vh !important;
  }
  #lightboxCaption {
    font-size: 0.95rem !important;
    margin-top: 0.75rem !important;
  }
  .lightbox-close-btn {
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
  }
}
