/* ═══════════════════════════════════════════════════════════════════
   MB-NEC — style.css
   Design system: mbuhamad.com dark navy theme
   Fonts: Inter (UI) + JetBrains Mono (code/values)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Custom properties ─────────────────────────────────────────── */
:root {
  --bg:          #060d1a;
  --surface:     #0a1628;
  --surface-d:   #060d1a;
  --border:      rgba(30,58,95,0.8);
  --border-s:    #1e3a5f;

  --text:        #f8fafc;
  --muted:       #94a3b8;
  --muted2:      #475569;

  --accent:      #06b6d4;      /* cyan  */
  --accent-blue: #3b82f6;      /* blue  */
  --accent2:     #10b981;      /* green */
  --warn:        #eab308;      /* yellow */
  --bad:         #ef4444;      /* red   */
  --good:        #10b981;      /* green */
  --purple:      #a78bfa;

  --nav-h:       64px;
  --radius:      8px;
  --radius-sm:   5px;
  --shadow:      0 4px 24px rgba(0,0,0,0.45);

  --font-ui:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', ui-monospace, 'Cascadia Code', monospace;
}

/* ── Reset / base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: #38bdf8; }

/* ══════════════════════════════════════════════════════════════════
   SITE NAV  (#mb-nav)
   ══════════════════════════════════════════════════════════════════ */
#mb-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(6,13,26,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
}

/* Brand */
.mb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 32px;
}
.mb-brand:hover { text-decoration: none; }

.mb-brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.mb-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mb-brand-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.mb-brand-call {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
}

/* Nav links */
.mb-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.mb-links > li > a,
.mb-links > li > span {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  user-select: none;
}

.mb-links > li > a:hover,
.mb-links > li > span:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}

/* Chevron */
.mb-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.mb-dropdown.open .mb-chevron {
  transform: rotate(180deg);
}

/* Dropdown container */
.mb-dropdown {
  position: relative;
}

/* Dropdown menu */
.mb-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px 0;
  z-index: 1100;
  animation: dropFadeIn 0.15s ease;
}

@keyframes dropFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mb-dropdown.open .mb-drop-menu,
.mb-dropdown:hover .mb-drop-menu {
  display: block;
}

.mb-drop-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.12s, background 0.12s;
  text-decoration: none;
}

.mb-drop-menu a:hover {
  color: var(--text);
  background: rgba(6,182,212,0.08);
  text-decoration: none;
}

.mb-drop-menu a.mb-drop-active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(6,182,212,0.1);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

/* Status dot */
.mb-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 20px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.mb-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
  animation: pulse-dot 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--good); }
  50%       { opacity: 0.6; box-shadow: 0 0 3px var(--good); }
}

/* Hamburger */
.mb-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-s);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: border-color 0.15s;
}

.mb-hamburger:hover { border-color: var(--accent); }

.mb-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}

.mb-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mb-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mb-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav panel */
#mb-nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 10px 0 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}

#mb-nav-mobile.open { display: block; }

#mb-nav-mobile a {
  display: block;
  padding: 11px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
}

#mb-nav-mobile a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

#mb-nav-mobile a.mb-mob-active {
  color: var(--accent);
  font-weight: 600;
}

.mb-mob-section {
  padding: 10px 24px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-top: 6px;
}

#mb-nav-mobile a.mb-mob-child {
  padding-left: 38px;
  font-size: 0.855rem;
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE TOPBAR  (.topbar)
   ══════════════════════════════════════════════════════════════════ */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(6,182,212,0.6));
}

.topbar-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.topbar-sub {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Status pill ─ */
.status-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.3s, color 0.3s;
}

.status-pill::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.status-pill.good {
  background: rgba(16,185,129,0.12);
  color: var(--good);
  border: 1px solid rgba(16,185,129,0.25);
}

.status-pill.bad {
  background: rgba(239,68,68,0.12);
  color: var(--bad);
  border: 1px solid rgba(239,68,68,0.25);
}

/* ══════════════════════════════════════════════════════════════════
   TWO-COLUMN LAYOUT  (.layout)
   ══════════════════════════════════════════════════════════════════ */
.layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 0;
  max-width: 1480px;
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-h) - 104px - 52px);
}

/* ── Panels ─ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-panel {
  border-right: none;
  border-left: none;
  border-top: none;
}

.results-panel {
  border-right: none;
  border-top: none;
}

/* Panel header */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(6,13,26,0.5);
}

.panel-head-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-head-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Toolbar ─ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: rgba(6,13,26,0.3);
}

.toolbar.secondary {
  border-top: 1px solid var(--border);
  border-bottom: none;
  margin-top: auto;
}

.toolbar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.toolbar-check {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.toolbar-check input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.spacer { flex: 1; min-width: 0; }

/* ── Form controls ─ */
select,
input[type="number"],
input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border-s);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  padding: 5px 9px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

select {
  cursor: pointer;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

select:hover,
input[type="number"]:hover,
input[type="text"]:hover {
  border-color: var(--accent);
}

select:focus,
input[type="number"]:focus,
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(6,182,212,0.18);
}

input[type="number"] { width: 74px; }

.project-input {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}

/* ── Buttons ─ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  user-select: none;
  outline: none;
}

.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(59,130,246,0.35);
}

.btn.primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 16px rgba(59,130,246,0.5);
}

.btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

.btn.secondary {
  background: rgba(30,58,95,0.5);
  color: var(--muted);
  border-color: var(--border-s);
}

.btn.secondary:hover {
  background: rgba(30,58,95,0.85);
  color: var(--text);
  border-color: var(--accent);
}

.btn.icon {
  padding: 6px 10px;
  background: rgba(30,58,95,0.4);
  color: var(--muted);
  border-color: var(--border-s);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.btn.icon:hover {
  background: rgba(30,58,95,0.8);
  color: var(--text);
  border-color: var(--accent);
}

/* ── NEC editor textarea ─ */
.nec-editor {
  flex: 1;
  width: 100%;
  min-height: 320px;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  tab-size: 4;
  white-space: pre;
  overflow-x: auto;
  transition: box-shadow 0.15s;
}

.nec-editor:focus {
  box-shadow: inset 0 0 0 1px rgba(6,182,212,0.25);
}

.nec-editor::placeholder { color: var(--muted2); }

/* ── Warnings ─ */
.warnings {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  background: rgba(234,179,8,0.04);
}

.warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--warn);
  line-height: 1.45;
}

.warning::before {
  content: '⚠';
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* ── Panel sub-section (projects) ─ */
.panel-section {
  border-top: 1px solid var(--border);
}

.panel-section-head {
  padding: 8px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
  background: rgba(6,13,26,0.4);
  border-bottom: 1px solid var(--border);
}

.project-list {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 160px;
  overflow-y: auto;
}

.project-empty {
  font-size: 0.78rem;
  color: var(--muted2);
  padding: 6px 4px;
  font-style: italic;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.project-item:hover {
  background: rgba(6,182,212,0.07);
  border-color: rgba(6,182,212,0.2);
  color: var(--text);
}

.project-item.active {
  background: rgba(6,182,212,0.12);
  border-color: rgba(6,182,212,0.3);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════
   METRICS STRIP  (.metrics)
   ══════════════════════════════════════════════════════════════════ */
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(6,13,26,0.4);
}

.metric {
  flex: 1 1 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  text-align: center;
  min-width: 90px;
}

.metric:last-child { border-right: none; }

.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.metric-value.good  { color: var(--good); }
.metric-value.warn  { color: var(--warn); }
.metric-value.bad   { color: var(--bad); }

/* ══════════════════════════════════════════════════════════════════
   TABS  (.tabs / .tab / .tab-page)
   ══════════════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(6,13,26,0.4);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-family: var(--font-ui);
  outline: none;
}

.tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}

.tab.active {
  background: var(--accent);
  color: #03111c;
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.tab-page {
  display: none;
  padding: 16px;
  flex: 1;
  overflow: auto;
}

.tab-page.active { display: flex; flex-direction: column; gap: 14px; }

/* ══════════════════════════════════════════════════════════════════
   CHART CARDS  (.chart-card)
   ══════════════════════════════════════════════════════════════════ */
.chart-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.chart-card canvas {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* ── 2-up grid ─ */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ══════════════════════════════════════════════════════════════════
   TABLES  (.data-table / .table-wrap)
   ══════════════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.data-table th {
  padding: 7px 11px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(6,13,26,0.7);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table td {
  padding: 6px 11px;
  color: var(--muted);
  border-bottom: 1px solid rgba(30,58,95,0.4);
  white-space: nowrap;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover td {
  background: rgba(6,182,212,0.05);
  color: var(--text);
}

.data-table td.hl { color: var(--text); font-weight: 500; }
.data-table td.good { color: var(--good); }
.data-table td.warn { color: var(--warn); }
.data-table td.bad  { color: var(--bad);  }

/* ══════════════════════════════════════════════════════════════════
   RAW OUTPUT  (.raw-pre / #rawOutput)
   ══════════════════════════════════════════════════════════════════ */
.raw-pre {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
  min-height: 300px;
  tab-size: 4;
}

/* ══════════════════════════════════════════════════════════════════
   CHART LINE LEGEND COLOURS  (used by app.js canvas logic)
   ══════════════════════════════════════════════════════════════════ */
.line-swr   { color: #3b82f6; }   /* blue   */
.line-r     { color: #10b981; }   /* green  */
.line-x     { color: #eab308; }   /* yellow */
.line-gain  { color: #a78bfa; }   /* purple */

/* CSS variables consumed by app.js for chart colours */
:root {
  --chart-swr:  #3b82f6;
  --chart-r:    #10b981;
  --chart-x:    #eab308;
  --chart-gain: #a78bfa;
  --chart-grid: rgba(30,58,95,0.6);
  --chart-text: #94a3b8;
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER  (.site-footer)
   ══════════════════════════════════════════════════════════════════ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted2);
  background: var(--surface);
  text-align: center;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); text-decoration: none; }

.footer-sep { color: var(--muted2); opacity: 0.5; }
.footer-muted { color: var(--muted2); font-style: italic; }

/* ══════════════════════════════════════════════════════════════════
   SCROLLBAR (WebKit)
   ══════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2a4f7a; }

/* Firefox */
* { scrollbar-color: #1e3a5f var(--bg); scrollbar-width: thin; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 420px 1fr;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    border-right: none;
  }

  .mb-links,
  .mb-status {
    display: none;
  }

  .mb-hamburger {
    display: flex;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  #mb-nav { padding: 0 14px; }

  .topbar { padding: 12px 14px; }

  .topbar-title { font-size: 1.2rem; }

  .layout { gap: 0; }

  .toolbar { gap: 6px; padding: 8px 10px; }

  .tab { padding: 9px 12px; font-size: 0.78rem; }

  .metric { padding: 10px 8px; }
  .metric-value { font-size: 0.9rem; }

  .site-footer { gap: 4px; padding: 10px 14px; }

  .footer-sep { display: none; }
}

@media (max-width: 420px) {
  .mb-brand-name { display: none; }
}
