:root {
  --teal: #19c5c6;
  --blue: #00acfe;
  --navy: #00597d;
  --green: #008080;
  --yellow: #ffd93d;
  --red: #ff6b6b;
  --bg: #0d1117;
  --bg-2: #161b22;
  --bg-3: #1c2128;
  --panel: #20262e;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #e6edf3;
  --muted: #8b949e;
  --dim: #59636e;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
li { margin: 0 0 7px; }
li:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 700; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.18;
}

h1 { font-size: clamp(30px, 4vw, 54px); max-width: 980px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 300;
  padding: 9px 14px;
  border-radius: var(--radius);
  background: var(--teal);
  color: var(--bg);
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 268px;
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-mark {
  display: block;
  width: 156px;
  height: 47px;
  background: url("../assets/cm-logo.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-title { font-size: 15px; font-weight: 800; line-height: 1.1; }
.brand-subtitle {
  margin-top: 2px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-spacer { flex: 1; }

.status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(25, 197, 198, 0.25);
  border-radius: 999px;
  background: rgba(25, 197, 198, 0.12);
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge.green {
  border-color: rgba(107, 203, 119, 0.28);
  background: rgba(107, 203, 119, 0.12);
  color: #6bcb77;
}
.date-chip {
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.menu-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
}

body.sidebar-hidden .shell {
  grid-template-columns: 1fr;
}

.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 76px);
  overflow: auto;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #161b22;
}

body.sidebar-hidden .sidebar {
  display: none;
}

.sidebar-section {
  padding: 10px 20px 6px;
  color: #7d8590;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 8px;
  color: #c9d1d9;
  font-size: 13.5px;
  font-weight: 850;
}

.nav-item span:first-child {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 22px;
  border-radius: 0;
  background: none;
  color: inherit;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 950;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #eff3f8;
}

.nav-item.active {
  border-left-color: var(--teal);
  background: rgba(25, 197, 198, 0.12);
  color: var(--teal);
}

.main {
  width: 100%;
  max-width: 1400px;
  padding: 28px 32px 44px;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(25, 197, 198, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 89, 125, 0.72), rgba(0, 128, 128, 0.34)),
    var(--bg-3);
  box-shadow: var(--shadow);
}

.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7), transparent 72%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }
.kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero p { max-width: 850px; font-size: 15px; line-height: 1.7; }

.hero-actions,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.btn:hover { border-color: rgba(25, 197, 198, 0.4); background: rgba(25, 197, 198, 0.08); color: var(--text); }
.btn.primary { border-color: transparent; background: linear-gradient(135deg, var(--teal), var(--blue)); color: #061015; }
.btn.primary:hover { color: #061015; }

.panel {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 850;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex: 0 0 auto;
}
.dot.blue { background: var(--blue); }
.dot.green { background: #6bcb77; }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }

.panel-body { padding: 18px; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wide-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 16px; }

.card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-3);
}
.card h3 { margin-bottom: 8px; }
.card p { line-height: 1.6; }

.metric {
  display: grid;
  gap: 7px;
  min-height: 108px;
}
.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.metric strong { font-size: 28px; line-height: 1; color: var(--teal); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(25, 197, 198, 0.24);
  border-radius: 999px;
  background: rgba(25, 197, 198, 0.1);
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
th {
  background: var(--bg-3);
  color: var(--dim);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
td { color: var(--muted); }

.timeline { display: grid; gap: 10px; }
.timeline-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-3);
}
.timeline-item span {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.resource-list { display: grid; gap: 10px; }
.resource-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--text);
}
.resource-link:hover { border-color: rgba(25, 197, 198, 0.36); color: var(--text); }
.resource-link small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.resource-link b { color: var(--teal); font-family: var(--mono); font-size: 11px; }

.clock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.clock-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-3);
}
.clock-city { color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.clock-time { margin-top: 10px; color: var(--teal); font-family: var(--mono); font-size: 27px; font-weight: 800; }
.clock-date { margin-top: 5px; color: var(--muted); font-size: 12px; }

.calendar-list { display: grid; gap: 10px; }
.calendar-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-3);
}
.calendar-date {
  color: var(--teal);
  font-family: var(--mono);
  font-weight: 800;
}

.callout {
  padding: 14px 16px;
  border: 1px solid rgba(255, 217, 61, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 217, 61, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.footer-note {
  margin-top: 24px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 1080px) {
  .grid.cols-4, .grid.cols-3, .wide-grid { grid-template-columns: 1fr; }
  .main { padding: 22px; }
}

@media (max-width: 820px) {
  .topbar { padding: 12px 16px; }
  .brand { min-width: 0; }
  .status-row { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 76px;
    left: -260px;
    width: 220px;
    height: calc(100vh - 76px);
    z-index: 90;
    transition: left 0.2s ease;
    box-shadow: 8px 0 34px rgba(0, 0, 0, 0.35);
  }
  .sidebar.is-open { left: 0; }
  .main { padding: 18px; }
  .hero { padding: 24px; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .calendar-item { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
}

