

    /* === Hero === */
    .hero {
      max-width: 900px;
      margin: 2.5rem auto 1.5rem;
      padding: 0 1.25rem;
      text-align: center;
    }

    .hero h1 {
      font-family: 'Cinzel Decorative', serif;
      font-size: 2.1rem;
      margin-bottom: 0.5rem;
      color: var(--primary);
    }

    .hero p {
      margin: 0.25rem auto 0.4rem;
      max-width: 650px;
      color: var(--text-muted);
      font-size: 0.98rem;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.25rem 0.7rem;
      border-radius: 999px;
      background: rgba(106,85,211,0.07);
      color: var(--primary);
      font-size: 0.78rem;
      margin-bottom: 0.5rem;
    }

    .pill span.dot {
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: #33c26e;
      box-shadow: 0 0 0 5px rgba(51,194,110,0.22);
    }

    /* === Main Layout === */
    main {
      flex: 1;
      width: 100%;
    }

    .map-wrapper {
      max-width: 1100px;
      margin: 0 auto 3rem;
      padding: 0 1.25rem 2rem;
    }

    .map-intro {
      margin-bottom: 1.5rem;
      font-size: 0.9rem;
      color: var(--text-muted);
      text-align: center;
    }

    .map-intro strong {
      color: var(--primary);
    }

    .map-grid {
      display: grid;
      grid-template-columns: minmax(0,1fr);
      gap: 1.5rem;
    }

    @media (min-width: 900px) {
      .map-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
      }
    }

    /* === Category Cards === */
    .category-card {
      background: var(--bg-card);
      border-radius: var(--radius-xl);
      padding: 1.1rem 1rem 1.1rem;
      box-shadow: var(--shadow-soft);
      border: 1px solid var(--border-soft);
      position: relative;
      overflow: hidden;
    }

    .category-card::before {
      content: "";
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at top left, rgba(255,255,255,0.55), transparent 55%);
      pointer-events: none;
    }

    .category-card h2 {
      font-size: 1.2rem;
      margin: 0 0 0.25rem;
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    .category-card .tagline {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin-bottom: 0.6rem;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 0.1rem 0.55rem;
      font-size: 0.7rem;
      font-weight: 600;
      color: #fff;
    }

    .badge.bio { background: var(--bio); }
    .badge.chem { background: var(--chem); }
    .badge.nutr { background: var(--nutr); }

    /* === Tree Structures === */
    .tree-root {
      margin: 0;
      padding: 0;
      list-style: none;
      font-size: 0.9rem;
    }

    .tree-root > li {
      margin-bottom: 0.4rem;
    }

    details {
      border-radius: 12px;
      padding: 0.35rem 0.5rem;
      background: rgba(255,255,255,0.82);
      border: 1px solid rgba(0,0,0,0.04);
      margin-bottom: 0.3rem;
    }

    details[open] {
      background: rgba(106,85,211,0.03);
      border-color: rgba(106,85,211,0.16);
    }

    summary {
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      font-weight: 600;
      font-size: 0.88rem;
    }

    summary::-webkit-details-marker {
      display: none;
    }

    .summary-label {
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    .summary-arrow {
      font-size: 0.75rem;
      opacity: 0.6;
      transition: transform 0.18s ease;
    }

    details[open] .summary-arrow {
      transform: rotate(90deg);
      opacity: 0.9;
    }

    .sub-list {
      list-style: disc;
      padding-left: 1.1rem;
      margin: 0.35rem 0 0.2rem;
    }

    .sub-list li {
      margin-bottom: 0.18rem;
    }

    .leaf {
      font-size: 0.86rem;
    }

    /* Subtle pill for future linking */
    .leaf span {
      border-radius: 999px;
      padding: 0.05rem 0.4rem;
      background: rgba(0,0,0,0.03);
    }

    /* === Back to top === */
    .back-to-top {
      position: fixed;
      right: 1rem;
      bottom: 1rem;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(0,0,0,0.3);
      opacity: 0;
      visibility: hidden;
      transition: 0.25s ease;
      font-size: 1.2rem;
      z-index: 15;
    }

    .back-to-top.show {
      opacity: 1;
      visibility: visible;
    }

    /* === Footer === */
    footer {
      text-align: center;
      padding: 1.5rem 1rem 1.8rem;
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    /* === Dark Mode === */
    body.dark {
      background: radial-gradient(circle at top, #171623 0, #151424 40%, #10101b 100%);
      color: #e7e6ff;
    }

    body.dark .site-header {
      background: rgba(10,10,20,0.9);
      border-bottom-color: rgba(255,255,255,0.06);
      box-shadow: 0 12px 30px rgba(0,0,0,0.7);
    }

    body.dark .nav-links a {
      color: #ece9ff;
    }

    body.dark .nav-links a:hover {
      background: rgba(255,255,255,0.04);
      border-color: rgba(169,153,255,0.5);
      color: #f5f2ff;
    }

    body.dark .hero h1 {
      color: #d5c9ff;
    }

    body.dark .hero p,
    body.dark .map-intro {
      color: #a9a7d5;
    }

    body.dark .category-card {
      background: #151524;
      border-color: rgba(255,255,255,0.06);
      box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    }

    body.dark details {
      background: rgba(22,22,36,0.95);
      border-color: rgba(255,255,255,0.05);
    }

    body.dark details[open] {
      background: rgba(55,45,120,0.7);
      border-color: rgba(173,152,255,0.7);
    }

    body.dark .leaf span {
      background: rgba(255,255,255,0.06);
    }
