﻿  /* ============================================
     CSS Custom Properties
     ============================================ */
  :root {
    --bg:            #0b0a09;
    --bg-card:       #141210;
    --bg-card-hover: #1a1714;
    --border:        #26231f;
    --border-hover:  #bf9b4e;
    --border-glow:   rgba(191, 155, 78, 0.22);
    --text:          #ddd8cc;
    --text-dim:      #8c8678;
    --text-muted:    #565148;
    --accent:        #bf9b4e;
    --accent-dim:    rgba(191, 155, 78, 0.12);

    --ug:            #6b9abe;
    --ug-dim:        rgba(107, 154, 190, 0.18);
    --gr:            #bf9b4e;
    --gr-dim:        rgba(191, 155, 78, 0.18);
    --progress-gray: rgba(255, 255, 255, 0.05);

    --rating-aware:        #4a4640;
    --rating-familiar:     #6d7862;
    --rating-proficient:   #6b9abe;
    --rating-independent:  #bf9b4e;
    --rating-master:       #d08e5e;

    --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-body:    'Source Sans 3', -apple-system, sans-serif;

    --radius: 6px;
    --transition-speed: 0.3s;
  }

  /* Light theme */
  [data-theme="light"] {
    --bg: #f7f5f0;
    --bg-card: #ffffff;
    --bg-card-hover: #faf8f4;
    --border: #e0dbd2;
    --border-hover: #b8942e;
    --border-glow: rgba(184, 148, 46, 0.12);
    --text: #2c2820;
    --text-dim: #6b655a;
    --text-muted: #9e978a;
    --accent: #b8942e;
    --accent-dim: rgba(184, 148, 46, 0.08);
    --ug: #4a7d9e;
    --ug-dim: rgba(74, 125, 158, 0.12);
    --gr: #b8942e;
    --gr-dim: rgba(184, 148, 46, 0.12);
    --progress-gray: rgba(0, 0, 0, 0.06);
    --rating-aware: #9e978a;
    --rating-familiar: #6d7a5e;
    --rating-proficient: #4a7d9e;
    --rating-independent: #b8942e;
    --rating-master: #c0703e;
  }

  /* ============================================
     Reset & Base
     ============================================ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 300;
  }

  /* Noise overlay */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.035;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
  }

  /* ============================================
     Layout
     ============================================ */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  /* ============================================
     Header
     ============================================ */
  .header {
    padding: 4rem 0 2.5rem;
    position: relative;
  }

  .header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent,
      var(--border) 10%,
      var(--accent) 50%,
      var(--border) 90%,
      transparent
    );
  }

  .header-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text);
    margin-bottom: 0.3rem;
    font-style: italic;
  }

  .header-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2.2rem;
  }

  .theme-toggle {
    position: absolute; top: 4rem; right: 2rem;
    background: none; border: 1px solid var(--border);
    color: var(--text-dim); font-size: 1.15rem;
    width: 2.3rem; height: 2.3rem; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all var(--transition-speed); line-height: 1;
  }
  .theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

  /* ============================================
     Filter Bar 鈥?two-row layout
     ============================================ */
  .filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .filter-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .filter-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 400;
    min-width: 4.8rem;
    flex-shrink: 0;
  }

  .filter-group {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
  }

  .filter-btn {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-dim);
    background: none;
    border: 1px solid transparent;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    cursor: pointer;
    transition: color var(--transition-speed), background var(--transition-speed), border-color var(--transition-speed);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .filter-btn:hover {
    color: var(--text);
    background: var(--accent-dim);
  }

  .filter-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
  }

  /* ============================================
     Main Content
     ============================================ */
  .main {
    padding: 2.5rem 0 6rem;
  }

  /* ============================================
     Category Section
     ============================================ */
  .category-section {
    margin-bottom: 3.5rem;
  }

  .category-section.hidden {
    display: none;
  }

  .category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .category-header::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
    flex-shrink: 0;
  }

  .category-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    font-style: italic;
    color: var(--text-dim);
    letter-spacing: 0.02em;
  }

  .category-count {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.08em;
  }

  /* ============================================
     Course Grid
     ============================================ */
  .course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  /* ============================================
     Course Card
     ============================================ */
  .course-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.6rem;
    cursor: pointer;
    position: relative;
    transition:
      background var(--transition-speed),
      border-color var(--transition-speed),
      box-shadow var(--transition-speed),
      transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(16px);
    animation: card-enter 0.5s ease forwards;
  }

  .course-card.card-hidden {
    display: none;
  }

  @keyframes card-enter {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .course-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 0 28px var(--border-glow), inset 0 1px 0 rgba(191, 155, 78, 0.08);
    transform: translateY(-3px);
  }

  .course-card:active {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
  }

  /* Card top row: name + self-study tag + stage badge */
  .card-top {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
  }

  .card-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    font-style: italic;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: 0.01em;
  }

  /* Stage badge */
  .stage-badge {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.5;
    margin-left: auto;
  }

  .stage-badge.undergrad {
    background: var(--ug-dim);
    color: var(--ug);
    border: 1px solid rgba(107, 154, 190, 0.3);
  }

  .stage-badge.grad {
    background: var(--gr-dim);
    color: var(--gr);
    border: 1px solid rgba(191, 155, 78, 0.3);
  }

  .stage-badge.both {
    background: linear-gradient(90deg, var(--ug-dim), var(--gr-dim));
    color: var(--text);
    border: 1px solid rgba(191, 155, 78, 0.25);
  }

  /* Semester + self-study */
  .card-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .self-study-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 3px;
  }

  /* ============================================
     Progress Bar 鈥?single gradient bar (0鈥?00 model)
     ============================================ */
  .progress-section {
    margin-bottom: 1rem;
  }

  .progress-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--progress-gray);
    transition: background 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    overflow: hidden;
  }

  .progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 3px;
    background: inherit;
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  .progress-value {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-dim);
    min-width: 3rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  /* Card bottom: rating + grade */
  .card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  .rating-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
  }

  .rating-badge.r1        { color: var(--rating-aware);        background: rgba(74, 70, 64, 0.2); border: 1px solid rgba(74, 70, 64, 0.3); }
  .rating-badge.r2     { color: var(--rating-familiar);     background: rgba(109, 120, 98, 0.2); border: 1px solid rgba(109, 120, 98, 0.3); }
  .rating-badge.r3   { color: var(--rating-proficient);   background: rgba(107, 154, 190, 0.2); border: 1px solid rgba(107, 154, 190, 0.3); }
  .rating-badge.r4  { color: var(--rating-independent);  background: rgba(191, 155, 78, 0.2); border: 1px solid rgba(191, 155, 78, 0.3); }
  .rating-badge.r5       { color: var(--rating-master);       background: rgba(208, 142, 94, 0.2); border: 1px solid rgba(208, 142, 94, 0.3); box-shadow: 0 0 12px rgba(208, 142, 94, 0.1); }

  .card-grade {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    font-style: italic;
    color: var(--text-dim);
  }

  .card-grade.empty {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  /* ============================================
     Loading & Empty states
     ============================================ */
  .loading-state {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-style: italic;
  }

  .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
  }

  .empty-state p {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 0.5rem;
  }

  .empty-state span {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  .footer {
    padding: 1.5rem 0 2rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
  }
  .footer a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--transition-speed);
  }
  .footer a:hover { color: var(--accent); }
  .footer-left { display: flex; gap: 1.5rem; align-items: center; padding-left: 3rem; }

  /* ============================================
     Responsive
     ============================================ */
  @media (max-width: 720px) {
    .container { padding: 0 1.25rem; }
    .header { padding: 2.5rem 0 2rem; }
    .header-title { font-size: 2rem; }
    .header::after { left: 1.25rem; right: 1.25rem; }
    .course-grid { grid-template-columns: 1fr; }
    .card-name { font-size: 1.2rem; }
    .category-name { font-size: 1.3rem; }
    .filter-label { min-width: 3.5rem; font-size: 0.65rem; }
    .filter-btn { font-size: 0.75rem; padding: 0.25rem 0.6rem; }
  }

  /* ============================================
     Detail Page
     ============================================ */
  .detail-page { padding: 2rem 0 6rem; }

  .detail-back {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-family: var(--font-body); font-size: 0.82rem;
    color: var(--text-dim); text-decoration: none;
    padding: 0 0 2rem; cursor: pointer;
    transition: color var(--transition-speed);
  }
  .detail-back::before { content: '\2190'; font-size: 1rem; }
  .detail-back:hover { color: var(--accent); }

  .detail-layout { display: flex; gap: 2.5rem; align-items: flex-start; }
  .detail-main { flex: 1; min-width: 0; }

  .detail-sidebar {
    width: 200px; flex-shrink: 0;
    position: sticky; top: 2rem;
    align-self: flex-start;
  }
  .page-toc {
    padding: 0.8rem 0;
    border-left: 1px solid var(--border);
    padding-left: 1.2rem;
  }
  .page-toc-title {
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); font-weight: 600;
    display: block; margin-bottom: 0.7rem;
  }
  .page-toc ul { list-style: none; padding: 0; margin: 0; }
  .page-toc li { margin-bottom: 0.15rem; }
  .page-toc a {
    font-size: 0.8rem; color: var(--text-dim); text-decoration: none;
    display: block; padding: 0.25rem 0;
    transition: color var(--transition-speed);
  }
  .page-toc a:hover,
  .page-toc a.active { color: var(--accent); }

  .detail-section { margin-bottom: 3rem; }

  .detail-section-title {
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
    font-style: italic; color: var(--text-dim);
    margin-bottom: 1.2rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border); letter-spacing: 0.02em;
  }

  /* --- Overview --- */
  .detail-ov-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
  .detail-ov-name {
    font-family: var(--font-display); font-size: 2rem; font-weight: 600;
    font-style: italic; color: var(--text); line-height: 1.2;
  }
  .detail-ov-meta { font-size: 0.85rem; color: var(--text-dim); margin: 0.5rem 0 1rem; display: flex; gap: 0.5rem; align-items: center; }
  .detail-ov-summary {
    font-family: var(--font-display); font-size: 1.05rem; font-style: italic;
    color: var(--text-dim); margin-top: 1rem; padding-top: 0.8rem;
    border-top: 1px solid var(--border);
  }

  /* --- Difficulty --- */
  .difficulty-bar-wrap { display: flex; align-items: center; gap: 1rem; }
  .difficulty-bar { display: flex; gap: 4px; flex: 1; max-width: 300px; }
  .difficulty-seg { flex: 1; height: 6px; border-radius: 2px; background: var(--border); transition: background 0.3s; }
  .difficulty-seg.filled { background: var(--gr); box-shadow: 0 0 6px rgba(191,155,78,0.25); }
  .difficulty-label { font-size: 0.8rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

  /* --- Structure --- */
  .structure-list { list-style: none; padding: 0; }
  .structure-item { margin-bottom: 0.6rem; }
  .structure-section {
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
    color: var(--text);
  }
  .structure-section::before { content: '\00A7'; color: var(--accent); margin-right: 0.4rem; font-size: 0.9rem; }
  .structure-topics { list-style: none; padding-left: 1.8rem; margin-top: 0.2rem; }
  .structure-topics li { font-size: 0.85rem; color: var(--text-dim); padding: 0.15rem 0; }
  .structure-topics li::before { content: '\00B7'; color: var(--text-muted); margin-right: 0.5rem; }

  /* --- Key Points (markdown) --- */
  .keypoints-content { font-size: 0.92rem; line-height: 1.75; color: var(--text-dim); }
  .keypoints-content h2 {
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
    font-style: italic; color: var(--text); margin: 1.2rem 0 0.5rem;
  }
  .keypoints-content strong { color: var(--text); }
  .keypoints-content ul { padding-left: 1.3rem; margin: 0.4rem 0; }
  .keypoints-content li { margin-bottom: 0.3rem; }
  .keypoints-content code {
    background: rgba(255,255,255,0.06); padding: 0.1rem 0.35rem; border-radius: 3px;
    font-size: 0.85em; font-family: 'Courier New', monospace;
  }

  /* --- Article + TOC sidebar --- */
  .article-layout { display: flex; gap: 2.5rem; align-items: flex-start; }
  .article-body { flex: 1; min-width: 0; font-size: 0.95rem; line-height: 1.8; color: var(--text-dim); }
  .article-body h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; font-style: italic; color: var(--text); margin: 1.5rem 0 0.6rem; }
  .article-body h2 {
    font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
    font-style: italic; color: var(--text); margin: 1.8rem 0 0.5rem;
    padding-top: 0.5rem;
  }
  .article-body h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--text-dim); margin: 1rem 0 0.4rem; }
  .article-body p { margin-bottom: 0.8rem; }
  .article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 0.8rem; }
  .article-body li { margin-bottom: 0.3rem; }
  .article-body strong { color: var(--text); }
  .article-body code {
    background: rgba(255,255,255,0.06); padding: 0.12rem 0.4rem; border-radius: 3px;
    font-size: 0.88em; font-family: 'Courier New', monospace;
  }
  .article-body pre {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.2rem; overflow-x: auto;
    margin-bottom: 1rem; font-size: 0.85rem; line-height: 1.6;
  }
  .article-body pre code { background: none; padding: 0; }
  .article-body blockquote {
    border-left: 2px solid var(--accent); padding-left: 1rem;
    margin: 0.8rem 0; color: var(--text-muted); font-style: italic;
  }
  .article-body a { color: var(--accent); text-decoration: none; }
  .article-body a:hover { text-decoration: underline; }
  .article-body hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

  .article-toc {
    width: 190px; flex-shrink: 0; position: sticky; top: 2rem;
    align-self: flex-start; padding-left: 1.5rem;
    border-left: 1px solid var(--border);
  }
  .toc-title {
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 0.6rem;
  }
  .article-toc ul { list-style: none; padding: 0; }
  .article-toc li { margin-bottom: 0.3rem; }
  .article-toc a {
    font-size: 0.8rem; color: var(--text-dim); text-decoration: none;
    transition: color var(--transition-speed); display: block; padding: 0.15rem 0;
  }
  .article-toc a:hover { color: var(--accent); }

  /* --- References --- */
  .ref-list { display: flex; flex-direction: column; gap: 0.6rem; }
  .ref-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-card); overflow: hidden;
  }
  .ref-summary {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.8rem 1rem; cursor: pointer;
    list-style: none; font-size: 0.88rem;
  }
  .ref-summary::-webkit-details-marker { display: none; }
  .ref-summary::before { content: '\25B8'; color: var(--accent); font-size: 0.7rem; transition: transform 0.2s; flex-shrink: 0; }
  .ref-item[open] .ref-summary::before { transform: rotate(90deg); }
  .ref-title { font-weight: 600; color: var(--text); flex: 1; }
  .ref-author { color: var(--text-dim); white-space: nowrap; }
  .ref-type {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted); padding: 0.1rem 0.4rem;
    border: 1px solid var(--border); border-radius: 3px; white-space: nowrap;
  }
  .ref-stars { color: var(--accent); white-space: nowrap; font-size: 0.75rem; }
  .ref-review {
    padding: 0 1rem 1rem 2.2rem; font-size: 0.85rem; color: var(--text-dim);
    line-height: 1.65; margin: 0;
  }

  /* --- Milestones --- */
  .timeline { padding-left: 0.5rem; }
  .tl-item { display: flex; gap: 0.8rem; }
  .tl-marker {
    display: flex; flex-direction: column; align-items: center;
    width: 1rem; flex-shrink: 0; padding-top: 0.2rem;
  }
  .tl-dot { width: 10px; height: 10px; border-radius: 50%; display: block; }
  .tl-dot.filled { background: var(--accent); }
  .tl-dot:not(.filled) { background: none; border: 2px solid var(--border); }
  .tl-line { width: 1px; flex: 1; min-height: 1.2rem; background: var(--border); margin-top: 2px; }
  .tl-content { padding-bottom: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: baseline; }
  .tl-date { font-size: 0.78rem; color: var(--text-muted); min-width: 6.5rem; }
  .tl-event { font-size: 0.9rem; color: var(--text); }
  .tl-score {
    font-family: var(--font-display); font-size: 1rem; font-weight: 600;
    color: var(--accent); font-style: italic;
  }
  .tl-tag {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted); padding: 0.1rem 0.4rem;
    border: 1px solid var(--border); border-radius: 3px;
  }

  /* --- Downloads --- */
  .download-list { display: flex; flex-direction: column; gap: 1.2rem; }
  .download-group { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .download-folder {
    display: block; font-family: var(--font-body); font-size: 0.82rem;
    font-weight: 600; color: var(--text); padding: 0.65rem 1rem;
    background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border);
    letter-spacing: 0.02em;
  }
  .download-files { padding: 0.3rem 0; }
  .download-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.45rem 1rem; font-size: 0.85rem; color: var(--text-dim);
    text-decoration: none; transition: background var(--transition-speed), color var(--transition-speed);
  }
  .download-link:hover { background: var(--accent-dim); color: var(--text); }
  .download-arrow { color: var(--accent); font-size: 0.75rem; }

  @media (max-width: 720px) {
    .article-layout { flex-direction: column; }
    .article-toc { width: 100%; position: static; border-left: none; border-bottom: 1px solid var(--border); padding: 0 0 1rem; margin-bottom: 1.5rem; }
    .article-toc ul { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; }
    .detail-ov-name { font-size: 1.5rem; }
  }

