:root {
      --navy: #0a1628;
      --navy-mid: #132044;
      --green: #1a7a4a;
      --green-light: #22a05a;
      --green-accent: #2dce73;
      --gold: #c9a84c;
      --white: #ffffff;
      --off-white: #f7f9fc;
      --gray-light: #e8edf5;
      --text-dark: #1a202c;
      --text-mid: #4a5568;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--white);
      color: var(--text-dark);
    }

    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      background: var(--navy);
      padding: 0 5%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 68px;
      box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }

    .nav-logo img {
      height: 38px;
      filter: brightness(10);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 28px;
      list-style: none;
    }

    .nav-links a {
      color: rgba(255, 255, 255, 0.82);
      text-decoration: none;
      font-size: 0.88rem;
      font-weight: 500;
      transition: color 0.2s;
    }

    .nav-links a:hover,
    .nav-links a.active {
      color: var(--green-accent);
    }

    .nav-cta {
      background: var(--green);
      color: white !important;
      padding: 8px 20px;
      border-radius: 4px;
      font-weight: 600 !important;
    }

    .detail-hero {
      margin-top: 68px;
      background: linear-gradient(135deg, var(--navy) 0%, #0f3020 100%);
      padding: 60px 5%;
    }

    .breadcrumb {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 30px;
      font-size: 0.82rem;
    }

    .breadcrumb a {
      color: rgba(255, 255, 255, 0.5);
      text-decoration: none;
    }

    .breadcrumb a:hover {
      color: var(--green-accent);
    }

    .breadcrumb span {
      color: rgba(255, 255, 255, 0.3);
    }

    .breadcrumb .current {
      color: rgba(255, 255, 255, 0.85);
    }

    .detail-layout {
      display: grid;
      grid-template-columns: 220px 1fr;
      gap: 48px;
      align-items: start;
    }

    .book-cover-large {
      width: 220px;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    }

    .book-cover-large img {
      width: 100%;
      display: block;
    }

    .book-cover-placeholder-lg {
      width: 220px;
      height: 300px;
      border-radius: 8px;
      background: linear-gradient(160deg, #0f3d25 0%, #1a7a4a 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 12px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    }

    .book-cover-placeholder-lg .icon {
      font-size: 3rem;
    }

    .book-cover-placeholder-lg .label {
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.6);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .detail-info {
      color: white;
    }

    .detail-badge {
      display: inline-block;
      background: rgba(45, 206, 115, 0.15);
      border: 1px solid rgba(45, 206, 115, 0.3);
      color: var(--green-accent);
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      padding: 4px 12px;
      border-radius: 20px;
      margin-bottom: 18px;
    }

    .detail-info h1 {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.5rem, 3vw, 2.4rem);
      line-height: 1.2;
      margin-bottom: 20px;
    }

    .meta-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-bottom: 28px;
    }

    .meta-item label {
      display: block;
      font-size: 0.72rem;
      color: rgba(255, 255, 255, 0.45);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 3px;
    }

    .meta-item span {
      font-size: 0.9rem;
      color: rgba(255, 255, 255, 0.9);
    }

    .detail-desc {
      font-size: 0.95rem;
      color: rgba(255, 255, 255, 0.65);
      line-height: 1.75;
      margin-bottom: 28px;
      max-width: 620px;
    }

    .detail-actions {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
    }

    .btn-primary {
      background: var(--green);
      color: white;
      padding: 12px 28px;
      border-radius: 6px;
      font-size: 0.9rem;
      font-weight: 600;
      text-decoration: none;
      transition: background 0.2s;
      border: none;
      cursor: pointer;
    }

    .btn-primary:hover {
      background: var(--green-light);
    }

    .btn-secondary {
      background: transparent;
      color: white;
      padding: 12px 28px;
      border-radius: 6px;
      font-size: 0.9rem;
      font-weight: 600;
      text-decoration: none;
      border: 1.5px solid rgba(255, 255, 255, 0.3);
      transition: all 0.2s;
    }

    .btn-secondary:hover {
      border-color: var(--green-accent);
      color: var(--green-accent);
    }

    .detail-body {
      padding: 60px 5%;
      display: grid;
      grid-template-columns: 1fr 300px;
      gap: 48px;
    }

    .main-content {}

    .sidebar {}

    .section-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--green);
      font-size: 0.78rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 10px;
    }

    .section-eyebrow::before {
      content: '';
      width: 28px;
      height: 2px;
      background: var(--green);
      display: inline-block;
    }

    h2.block-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      color: var(--navy);
      margin-bottom: 16px;
    }

    .prose {
      font-size: 0.92rem;
      color: var(--text-mid);
      line-height: 1.8;
    }

    .prose p {
      margin-bottom: 14px;
    }

    .topics-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 16px;
    }

    .topic-tag {
      background: rgba(26, 122, 74, 0.08);
      color: var(--green);
      border: 1px solid rgba(26, 122, 74, 0.2);
      padding: 5px 14px;
      border-radius: 20px;
      font-size: 0.8rem;
      font-weight: 500;
    }

    .sidebar-card {
      background: var(--off-white);
      border: 1px solid var(--gray-light);
      border-radius: 10px;
      padding: 24px;
      margin-bottom: 20px;
    }

    .sidebar-card h4 {
      font-family: 'Playfair Display', serif;
      font-size: 1rem;
      color: var(--navy);
      margin-bottom: 14px;
    }

    .detail-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .detail-list li {
      display: flex;
      flex-direction: column;
      font-size: 0.84rem;
    }

    .detail-list li label {
      color: var(--text-mid);
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 1px;
    }

    .detail-list li span {
      color: var(--text-dark);
      font-weight: 500;
    }

    .back-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--green);
      font-size: 0.88rem;
      font-weight: 600;
      text-decoration: none;
      margin-bottom: 24px;
      transition: gap 0.2s;
    }

    .back-link:hover {
      gap: 12px;
    }

    footer {
      background: var(--navy);
      color: rgba(255, 255, 255, 0.6);
      padding: 40px 5% 24px;
    }

    .footer-bottom {
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      padding-top: 20px;
      display: flex;
      justify-content: space-between;
      font-size: 0.8rem;
      flex-wrap: wrap;
      gap: 10px;
    }

    /* ===== TABLE OF CONTENTS — REDESIGN ===== */
    .toc-wrap {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .toc-frontmatter {
      background: linear-gradient(135deg, var(--off-white) 0%, var(--gray-light) 100%);
      border: 1px solid var(--gray-light);
      border-left: 4px solid var(--gold);
      border-radius: 10px;
      padding: 20px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      flex-wrap: wrap;
    }

    .toc-frontmatter .fm-title {
      font-weight: 600;
      font-size: 0.92rem;
      color: var(--navy);
      line-height: 1.5;
    }

    .toc-card {
      background: var(--white);
      border: 1px solid var(--gray-light);
      border-radius: 10px;
      padding: 20px 22px;
      display: flex;
      gap: 16px;
      align-items: flex-start;
      transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    }

    .toc-card:hover {
      box-shadow: 0 8px 24px rgba(10, 22, 40, 0.08);
      border-color: rgba(26, 122, 74, 0.3);
      transform: translateY(-1px);
    }

    .toc-num {
      flex-shrink: 0;
      width: 38px;
      height: 38px;
      border-radius: 8px;
      background: linear-gradient(160deg, #0f3d25 0%, var(--green) 100%);
      color: var(--white);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Playfair Display', serif;
      font-weight: 700;
      font-size: 0.95rem;
    }

    .toc-body {
      flex: 1;
      min-width: 0;
    }

    .toc-title {
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text-dark);
      line-height: 1.5;
      margin-bottom: 6px;
    }

    .toc-authors {
      font-size: 0.82rem;
      color: var(--text-mid);
      margin-bottom: 14px;
      font-style: italic;
    }

    .toc-btn-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .toc-btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-size: 0.8rem;
      font-weight: 600;
      padding: 8px 16px;
      border-radius: 6px;
      cursor: pointer;
      border: none;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .toc-btn svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }

    .toc-btn.open-btn {
      background: rgba(26, 122, 74, 0.08);
      color: var(--green);
      border: 1px solid rgba(26, 122, 74, 0.25);
    }

    .toc-btn.open-btn:hover {
      background: rgba(26, 122, 74, 0.14);
      border-color: var(--green);
    }

    .toc-btn.download-btn {
      background: var(--green);
      color: white;
    }

    .toc-btn.download-btn:hover {
      background: var(--green-light);
      box-shadow: 0 4px 12px rgba(26, 122, 74, 0.3);
    }

    .toc-btn.fm-download {
      background: var(--gold);
      color: var(--navy);
    }

    .toc-btn.fm-download:hover {
      background: #dab85c;
    }

    @media(max-width: 992px) {
      .detail-body {
        grid-template-columns: 1fr;
        gap: 32px;
      }
    }

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

      .book-cover-large,
      .book-cover-placeholder-lg {
        width: 160px;
        margin: 0 auto;
      }

      .detail-body {
        grid-template-columns: 1fr;
      }

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

      .toc-card {
        flex-direction: column;
      }

      .toc-frontmatter {
        flex-direction: column;
        align-items: flex-start;
      }
    }