:root {
  --primary: #0a1628;
  --primary-light: #132744;
  --accent: #00b4d8;
  --accent2: #0077b6;
  --accent3: #48cae4;
  --gold: #f4a261;
  --danger: #e63946;
  --success: #2a9d8f;
  --text: #e0e6ed;
  --text-muted: #8899aa;
  --surface: #0f1f38;
  --surface2: #162a4a;
  --border: #1e3a5f;
  --h2-color: #48cae4;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--primary);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}
/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 4px; }

/* HEADER */
.hero {
  background: linear-gradient(135deg, #0a1628 0%, #0d2137 40%, #0a2a4a 70%, #0a1628 100%);
  border-bottom: 2px solid var(--accent2);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 60% 50%, rgba(0,180,216,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 40px rgba(0,180,216,0.3);
}
.hero h1 span { color: var(--accent); }
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--accent3);
  margin-top: .5rem;
  letter-spacing: 2px;
  font-weight: 300;
}
.hero .meta {
  margin-top: 1.2rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.hero .badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .9rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .5px;
}
.badge-blue { background: rgba(0,180,216,0.15); color: var(--accent); border: 1px solid rgba(0,180,216,0.3); }
.badge-gold { background: rgba(244,162,97,0.15); color: var(--gold); border: 1px solid rgba(244,162,97,0.3); }
.badge-green { background: rgba(42,157,143,0.15); color: var(--success); border: 1px solid rgba(42,157,143,0.3); }
.badge-red { background: rgba(230,57,70,0.15); color: var(--danger); border: 1px solid rgba(230,57,70,0.3); }

/* LAYOUT */
.page-wrapper {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
}
/* SIDEBAR NAV */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-title {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0 1.2rem;
  margin-bottom: .8rem;
}
.sidebar a {
  display: block;
  padding: .45rem 1.2rem .45rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .82rem;
  border-left: 3px solid transparent;
  transition: all .2s;
}
.sidebar a:hover, .sidebar a.active {
  color: var(--accent);
  background: rgba(0,180,216,0.05);
  border-left-color: var(--accent);
}
.sidebar a.sub { padding-left: 2.2rem; font-size: .78rem; }
.sidebar .nav-divider {
  height: 1px;
  background: var(--border);
  margin: .8rem 1.2rem;
}
/* Hamburger mobile */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 42px; height: 42px;
  border-radius: 8px;
  font-size: 1.4rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  padding: 2.5rem 3rem 4rem;
  max-width: 1100px;
  min-width: 0;
}
section { margin-bottom: 3.5rem; }
h2 {
  font-size: 1.6rem;
  color: var(--h2-color);
  border-bottom: 2px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}
h3 {
  font-size: 1.15rem;
  color: var(--accent);
  margin: 1.5rem 0 .8rem;
  font-weight: 600;
}
h4 {
  font-size: 1rem;
  color: var(--gold);
  margin: 1.2rem 0 .6rem;
  font-weight: 600;
}
p { margin-bottom: .9rem; color: var(--text); }

/* TABLES */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
thead th {
  background: var(--surface2);
  color: var(--accent3);
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 600;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--accent2);
  white-space: nowrap;
}
tbody td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tbody tr:hover { background: rgba(0,180,216,0.04); }
tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }

/* CARDS / SPEC BOXES */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}
.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}
.spec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.spec-card .label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: .3rem;
}
.spec-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.spec-card .unit {
  font-size: .85rem;
  color: var(--accent3);
  font-weight: 400;
}
.spec-card .detail {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

/* INFO BOXES */
.info-box {
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: .88rem;
  border-left: 4px solid;
}
.info-box.note { background: rgba(0,180,216,0.08); border-color: var(--accent); }
.info-box.warn { background: rgba(244,162,97,0.08); border-color: var(--gold); }
.info-box.danger { background: rgba(230,57,70,0.08); border-color: var(--danger); }
.info-box.success { background: rgba(42,157,143,0.08); border-color: var(--success); }
.info-box strong { color: var(--accent3); }

/* PROGRESS BARS */
.progress-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: .5rem 0;
  font-size: .85rem;
}
.progress-label { min-width: 140px; color: var(--text-muted); }
.progress-bar {
  flex: 1;
  height: 10px;
  background: var(--surface2);
  border-radius: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 5px;
  transition: width .5s;
}
.progress-val { min-width: 45px; text-align: right; font-weight: 600; }

/* SVG DIAGRAMS */
.diagram-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}
.diagram-container .caption {
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .8rem;
  font-style: italic;
}
.diagram-container svg { display: block; margin: 0 auto; max-width: 100%; }

/* SEQUENCE / TIMELINE */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 1.2rem;
  padding-left: 1.2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: .45rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--primary);
}
.timeline-item .time {
  font-size: .75rem;
  color: var(--accent3);
  font-weight: 600;
  letter-spacing: .5px;
}
.timeline-item .desc {
  font-size: .88rem;
  color: var(--text);
}

/* LISTS */
ul, ol { margin: .5rem 0 1rem 1.5rem; }
li { margin-bottom: .35rem; font-size: .92rem; }
li::marker { color: var(--accent); }

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .78rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    transition: left .3s;
    z-index: 150;
  }
  .sidebar.open { left: 0; }
  .menu-toggle { display: flex; }
  .main-content { padding: 2rem 1.2rem 3rem; }
  .hero h1 { font-size: 2rem; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 550px) {
  .spec-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; letter-spacing: 3px; }
}

/* COMPARISON CHART BARS */
.bar-chart { margin: 1rem 0; }
.bar-row {
  display: flex;
  align-items: center;
  margin: .4rem 0;
  font-size: .82rem;
}
.bar-label { min-width: 150px; color: var(--text-muted); }
.bar-track {
  flex: 1;
  height: 22px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: .5rem;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* COST TABLE HIGHLIGHT */
.cost-total td { font-weight: 700; color: var(--gold) !important; border-top: 2px solid var(--gold); }

/* PRINT */
@media print {
  .sidebar, .menu-toggle { display: none !important; }
  .main-content { padding: 1rem; }
  body { background: #fff; color: #222; }
  h2 { color: #0077b6; }
}
