* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a1a;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }

/* ── Desktop: Miller columns ── */
#desktop-view {
  display: flex;
  height: 100vh;
}
#mobile-view { display: none; }
.miller-col {
  overflow-y: auto;
  border-right: 1px solid #1e1e3a;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.miller-intro {
  padding: 20px 16px 14px;
  border-bottom: 1px solid #1e1e3a;
  flex-shrink: 0;
}
.miller-intro-title {
  font-size: 17px;
  color: #fff;
  margin-bottom: 8px;
}
.title-link { color: inherit; }
.title-link:hover { color: #cccfff; }
.miller-intro-desc {
  font-size: 12px;
  color: #8a8aaa;
  line-height: 1.55;
}
.miller-col-nav { width: 240px; background: #0a0a18; }
.miller-col-detail { width: 300px; background: #0e0e22; }
.miller-col-detail:nth-child(3) { background: #12122c; }
.miller-col-wide { flex: 1; flex-shrink: 1; min-width: 300px; background: #161636; border-right: none; }
.miller-col-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6a6a9a;
  padding: 16px 16px 8px;
  border-bottom: 1px solid #1e1e3a;
  flex-shrink: 0;
}
.miller-col-body { padding: 8px 0; flex: 1; overflow-y: auto; }
.miller-item {
  padding: 9px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #c0c0d8;
  transition: background 0.1s;
}
.miller-item:hover { background: #1a1a3a; }
.miller-item.miller-selected {
  background: #1e1e40;
  color: #fff;
}
.miller-item-name { flex: 1; line-height: 1.3; }
.miller-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.miller-arrow {
  color: #4a4a7a;
  font-size: 14px;
  flex-shrink: 0;
}
.miller-selected .miller-arrow { color: #8a8ab0; }
.miller-badge {
  font-size: 11px;
  color: #5a5a8a;
  background: #1a1a35;
  padding: 1px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}
.miller-detail { padding: 14px 16px; }
.miller-desc {
  font-size: 13px;
  color: #a0a0c0;
  line-height: 1.55;
  margin-bottom: 12px;
}
.miller-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #5a5a8a;
  margin: 14px 0 4px;
}
.miller-detail ul {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}
.miller-detail ul li {
  font-size: 12px;
  color: #b0b0c8;
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.4;
}
.miller-detail ul li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: #4a4a7a;
}
.miller-detail ul li strong { color: #d0d0e8; }
.miller-detail .sources-list li { color: #8a8ab0; font-size: 11px; }
.miller-sources-toggle { margin: 6px 0; }
.miller-sources-toggle > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.miller-sources-toggle > summary::-webkit-details-marker { display: none; }
.miller-sources-toggle > summary::after {
  content: "›";
  font-size: 12px;
  color: #4a4a7a;
  transition: transform 0.15s;
}
.miller-sources-toggle[open] > summary::after { transform: rotate(90deg); }
.miller-footer {
  padding: 12px 16px;
  font-size: 11px;
  color: #4a4a6a;
  border-top: 1px solid #1e1e3a;
  flex-shrink: 0;
}
.miller-footer a { color: #6a6a9a; text-decoration: none; }
.miller-footer a:hover { color: #9a9aba; text-decoration: underline; }
.miller-list-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #5a5a8a;
  padding: 8px 16px 8px;
}
.surprise-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: #1e1e40;
  color: #fff;
  border: 1px solid #2a2a55;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.surprise-btn:hover { background: #2a2a55; border-color: #3a3a70; }
.surprise-btn:active { background: #16162e; }
.miller-divider {
  height: 1px;
  background: #1e1e3a;
  margin: 8px 0;
}
.miller-md {
  font-size: 13px;
  color: #b0b0c8;
  line-height: 1.6;
}
.miller-md p { margin-bottom: 8px; }
.miller-md strong { color: #d0d0e8; }
.miller-md ol, .miller-md ul {
  margin: 4px 0 8px 20px;
  padding: 0;
}
.miller-md ol { list-style: decimal; }
.miller-md ul { list-style: disc; }
.miller-md li { margin-bottom: 3px; }
.miller-md li::before { content: none; }

@media (max-width: 1024px) {
  body {
    height: auto;
    overflow: auto;
  }
  #desktop-view { display: none !important; }
  #mobile-view {
    display: block;
    padding: 20px 16px 40px;
    max-width: 600px;
    margin: 0 auto;
  }
  .mobile-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a4a;
  }
  .mobile-header h1 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 6px;
  }
  .mobile-header p {
    font-size: 13px;
    color: #6a6a9a;
  }
  .mobile-section-header,
  .mobile-exercise-header {
    text-align: left;
    border-left: 4px solid #333;
    border-bottom: 1px solid #2a2a4a;
    padding: 16px 16px 16px 14px;
    background: #0e0e22;
    border-radius: 0 8px 8px 0;
  }
  .mobile-breadcrumb {
    font-size: 12px;
    color: #7a7aaa;
    margin-bottom: 6px;
    line-height: 1.4;
  }
  .mobile-breadcrumb a {
    color: #8a8ab0;
    text-decoration: none;
  }
  .mobile-breadcrumb a:hover { color: #cccfff; text-decoration: underline; }
  .mobile-desc {
    margin-top: 6px;
    color: #a0a0c0 !important;
    line-height: 1.55 !important;
  }
  .mobile-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mobile-domain,
  .mobile-child {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #12122a;
    border-radius: 8px;
    border-left: 4px solid #333;
    color: #e0e0e0;
    transition: background 0.1s;
  }
  .mobile-child {
    background: #0e0e22;
    padding: 10px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #d0d0e8;
  }
  .mobile-domain:hover,
  .mobile-child:hover { background: #1a1a3a; }
  .mobile-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .mobile-name { flex: 1; font-size: 16px; font-weight: 500; }
  .mobile-child .mobile-name { font-size: 14px; font-weight: 400; }
  .mobile-badge {
    font-size: 11px;
    color: #5a5a8a;
    background: #1a1a35;
    padding: 1px 6px;
    border-radius: 8px;
  }
  .mobile-arrow {
    color: #4a4a7a;
    font-size: 14px;
  }
  .mobile-section { margin-bottom: 18px; }
  .mobile-section .section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #6a6a9a;
    margin-bottom: 6px;
  }
  .mobile-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
  }
  .mobile-section ul li {
    font-size: 13px;
    color: #b0b0c8;
    padding: 4px 0 4px 14px;
    position: relative;
    line-height: 1.45;
  }
  .mobile-section ul li::before {
    content: "•";
    position: absolute;
    left: 2px;
    color: #5a5a8a;
  }
  .mobile-section ul li strong { color: #c0c0d8; }
  .mobile-section .sources-list li { color: #8a8ab0; font-size: 12px; }
  .ex-description {
    font-size: 14px;
    color: #b0b0c8;
    line-height: 1.6;
  }
  .ex-description p { margin-bottom: 10px; }
  .ex-description ol, .ex-description ul {
    margin: 4px 0 10px 20px;
    list-style: revert;
    padding: 0;
  }
  .ex-description li { margin-bottom: 4px; padding-left: 0; }
  .ex-description li::before { content: none; }
  .ex-description strong { color: #d0d0e8; }
  .ex-text {
    font-size: 14px;
    color: #a0a0b8;
    line-height: 1.55;
  }
  .ex-text p { margin-bottom: 8px; }
  .ex-text strong { color: #c0c0d8; }
}
