.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  min-width: 240px;
  padding: 1.25rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* NAV container */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* Links */
.sidebar-nav a {
  text-decoration: none;
  display: block;
  padding: 0.40rem 0.55rem;
  border-left: 2px solid transparent;
  border-radius: 2px;
  opacity: 0.92;
}

/* Hover/focus: terminal highlight */
.sidebar-nav a:hover,
.sidebar-nav a:focus {
  outline: none;
  border-left-color: rgba(0, 229, 160, 0.95);
  background: rgba(0, 229, 160, 0.08);
  opacity: 1;
}

/* Optional active state if you add li.active in HTML */
.sidebar-nav li.active a {
  border-left-color: rgba(0, 229, 160, 1);
  background: rgba(0, 229, 160, 0.12);
  font-weight: 700;
  opacity: 1;
}

.sidebar-nav li.active a::before {
  content: "› ";
}

/* Optional section separators / headers if you add them later */
.sidebar-section {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(0, 229, 160, 0.25);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1100px;
}

.secplus-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 2rem;
  padding: 1rem;
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}

.secplus-domain {
  margin-bottom: 2.5rem;
}

.secplus-table-wrapper {
  overflow-x: auto;
}

.secplus-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

.secplus-table th,
.secplus-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.secplus-table thead th {
  border-bottom: 2px solid rgba(0, 229, 160, 0.25);
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.status-badge.in-progress {
  background: rgba(13, 110, 253, 0.15);
  color: #6ea8fe;
  border: 1px solid rgba(13, 110, 253, 0.35);
}

.status-badge.review {
  background: rgba(145, 108, 255, 0.15);
  color: #b197fc;
  border: 1px solid rgba(145, 108, 255, 0.35);
}

.status-badge.done {
  background: rgba(25, 135, 84, 0.2);
  color: #75b798;
  border: 1px solid rgba(25, 135, 84, 0.4);
}

.pdf-embed {
  width: 100%;
  height: 80vh;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .pdf-embed {
    height: 70vh;
  }
}

/* Collapsible quiz sections */
details {
  margin: 0.5rem 0;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(0, 229, 160, 0.15);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
}

details[open] {
  border-color: rgba(0, 229, 160, 0.3);
}

details summary {
  cursor: pointer;
  padding: 0.25rem 0;
}

details summary:hover {
  color: rgba(0, 229, 160, 0.95);
}

/* Mobile */
@media (max-width: 700px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .sidebar-nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .sidebar-nav a:hover,
  .sidebar-nav a:focus {
    border-left: none;
    border-bottom-color: rgba(0, 229, 160, 0.95);
  }

  .sidebar-nav li.active a {
    border-left: none;
    border-bottom-color: rgba(0, 229, 160, 1);
  }

  .sidebar-nav li.active a::before {
    content: "";
  }
}

/* ── Blog list titles ───────────────────────────────────── */
.post-list-title {
  color: rgba(0, 229, 160, 0.95);
}

/* ── Table of Contents ──────────────────────────────────── */
.toc {
  background: var(--bg-secondary, rgba(0, 0, 0, 0.15));
  border: 1px solid var(--border-color, rgba(0, 229, 160, 0.2));
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem 0;
  font-size: 0.9rem;
  width: fit-content;
  max-width: 100%;
}

.toc__title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.6rem 0;
  color: var(--text-muted, rgba(0, 229, 160, 0.7));
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.25rem;
}

.toc__item {
  margin: 0.3rem 0;
}

.toc__item--sub {
  margin-left: 1.5rem;
  font-size: 0.85rem;
}

.toc__item a {
  color: var(--link-color, rgba(0, 229, 160, 0.9));
  text-decoration: none;
}

.toc__item a:hover {
  text-decoration: underline;
}
