.layout {
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-6);
}

.brand img {
  width: 28px;
  height: auto;
  display: block;
}

.brand span {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand {
  text-decoration: none;
  color: inherit;
}

.brand {
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.brand span {
  transition: letter-spacing 0.15s ease;
}

.brand:hover {
  opacity: 0.85;
}

.brand:hover span {
  letter-spacing: 0.06em;
}


/* LEFT PANEL */
.left-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  padding: var(--space-6);
  border-right: 1px solid #e5e5e5;
  background: #fafafa;
}

@media (max-width: 768px) {
  .left-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1000;
    background: #fafafa;
  }

  .left-panel.open {
    transform: translateX(0);
  }

  .main {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
  }
}

/* RIGHT PANEL */
.right-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 240px;
  height: 100vh;
  padding: var(--space-6);
  border-left: 1px solid #e5e5e5;
  background: #fafafa;
}

/* MAIN CONTENT */
.main {
  margin-left: 220px;
  margin-right: 240px;
  min-height: 100vh;
}

.panel-title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.nav a {
  display: block;
  margin-bottom: var(--space-3);
  text-decoration: none;
  color: #111;
  font-size: var(--text-sm);
}

/* RIGHT PANEL DROPDOWNS */
details {
  margin-bottom: var(--space-4);
}

summary {
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
}

.details-links a {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  text-decoration: none;
  color: #444;
}

/* MOBILE */

/* Tablet: hide RIGHT panel only */
@media (max-width: 1024px) {
  .right-panel {
    display: none;
  }

  .main {
    margin-right: 0;
  }
}
@media (prefers-color-scheme: dark) {
  .brand img {
    filter: invert(1);
  }

  .left-panel,
  .right-panel {
    background: #0f0f0f;
    border-color: #222;
  }
}

.mobile-header {
  display: none;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid #e5e5e5;
    background: inherit;
    position: sticky;
    top: 0;
    z-index: 1001;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
  }

  .mobile-brand img {
    width: 24px;
  }

  .menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
  }
}

.mobile-resources {
  display: none;
}

@media (max-width: 768px) {
  .right-panel {
    display: none;
  }

  .mobile-resources {
    display: block;
    padding: var(--space-6);
    border-top: 1px solid #e5e5e5;
  }

  .mobile-resources details {
    margin-top: var(--space-4);
  }
}


@media (max-width: 768px) {
  .container {
    max-width: 100%;
    margin: 0;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}