/* ── Notes page — self-contained styles ─────────────────────────── */
    .notes-shell {
      max-width: 1200px;
      margin: 0 auto;
      padding: 40px 24px 80px;
    }

    /* Page hero */
    .notes-hero {
      text-align: center;
      padding: 48px 24px 36px;
      border-bottom: 1px solid var(--border, #2e3150);
      margin-bottom: 36px;
    }
    .notes-hero h1 {
      font-size: clamp(28px, 5vw, 44px);
      font-weight: 900;
      background: linear-gradient(135deg, #1a73e8, #a78bfa);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 12px;
    }
    .notes-hero p {
      color: rgba(212,216,240,.65);
      font-size: 16px;
      max-width: 640px;
      margin: 0 auto 20px;
      line-height: 1.6;
    }
    .notes-hero-sources {
      display: flex;
      justify-content: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .notes-hero-sources a {
      font-size: 12px;
      padding: 4px 12px;
      border-radius: 20px;
      border: 1px solid rgba(26,115,232,.35);
      color: #8ec5ff;
      text-decoration: none;
      transition: background .15s;
    }
    .notes-hero-sources a:hover { background: rgba(26,115,232,.18); }

    /* Search + filter bar */
    .notes-controls {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 32px;
    }
    .notes-search-wrap {
      flex: 1;
      min-width: 220px;
      position: relative;
    }
    .notes-search-wrap svg {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: rgba(212,216,240,.4);
      pointer-events: none;
    }
    #notes-search {
      width: 100%;
      background: rgba(255,255,255,.05);
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 10px;
      padding: 10px 14px 10px 38px;
      color: var(--text, #d4d8f0);
      font-size: 14px;
      outline: none;
      font-family: inherit;
      transition: border-color .15s;
    }
    #notes-search:focus { border-color: #1a73e8; }
    #notes-search::placeholder { color: rgba(212,216,240,.35); }

    .notes-filter-btns {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .nf-btn {
      padding: 8px 14px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,.1);
      background: rgba(255,255,255,.05);
      color: rgba(212,216,240,.6);
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
      transition: all .15s;
      font-family: inherit;
    }
    .nf-btn:hover, .nf-btn.active {
      background: rgba(26,115,232,.18);
      border-color: rgba(26,115,232,.5);
      color: #8ec5ff;
    }

    /* A-Z index strip */
    .notes-az-strip {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
      margin-bottom: 32px;
      padding-bottom: 20px;
      border-bottom: 1px solid rgba(255,255,255,.06);
    }
    .az-link {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 700;
      color: rgba(212,216,240,.45);
      text-decoration: none;
      border: 1px solid transparent;
      transition: all .15s;
    }
    .az-link:hover, .az-link.has-items {
      color: #8ec5ff;
      border-color: rgba(26,115,232,.35);
      background: rgba(26,115,232,.08);
    }
    .az-link.disabled { opacity: .25; pointer-events: none; }

    /* Topic stats bar */
    .notes-stats {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
      margin-bottom: 32px;
    }
    .nstat {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: rgba(212,216,240,.5);
    }
    .nstat strong { color: #1a73e8; font-size: 18px; font-weight: 800; }

    /* Letter section */
    .notes-letter-section {
      margin-bottom: 40px;
    }
    .notes-letter-header {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 16px;
    }
    .notes-letter-badge {
      width: 42px;
      height: 42px;
      background: linear-gradient(135deg, #1a73e8, #4fa3f7);
      color: #fff;
      font-size: 20px;
      font-weight: 900;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .notes-letter-header h2 {
      font-size: 22px;
      font-weight: 800;
      color: var(--text, #d4d8f0);
      margin: 0;
    }
    .notes-letter-header span,
    .notes-letter-count {
      font-size: 13px;
      color: rgba(212,216,240,.4);
      font-weight: 400;
    }

    /* Topic cards grid */
    .notes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 14px;
    }

    /* Single topic card */
    .note-card {
      background: rgba(255,255,255,.03);
      border: 1px solid rgba(255,255,255,.07);
      border-radius: 12px;
      padding: 18px 20px;
      transition: border-color .2s, background .2s, transform .15s;
      position: relative;
      overflow: hidden;
    }
    .note-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: var(--nc-accent, linear-gradient(90deg,#1a73e8,#4fa3f7));
      opacity: 0;
      transition: opacity .2s;
    }
    .note-card:hover {
      border-color: rgba(26,115,232,.35);
      background: rgba(26,115,232,.05);
      transform: translateY(-2px);
    }
    .note-card:hover::before { opacity: 1; }

    .nc-head {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 10px;
    }
    .nc-icon {
      font-size: 22px;
      line-height: 1;
      flex-shrink: 0;
    }
    .nc-meta { flex: 1; min-width: 0; }
    .nc-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text, #d4d8f0);
      margin-bottom: 3px;
      line-height: 1.3;
    }
    .nc-category {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: .04em;
      text-transform: uppercase;
      color: rgba(212,216,240,.35);
    }
    .nc-desc {
      font-size: 12.5px;
      color: rgba(212,216,240,.55);
      line-height: 1.6;
      margin-bottom: 14px;
    }
    .nc-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-bottom: 14px;
    }
    .nc-tag {
      font-size: 10.5px;
      padding: 2px 8px;
      border-radius: 20px;
      background: rgba(26,115,232,.1);
      border: 1px solid rgba(26,115,232,.2);
      color: #8ec5ff;
      font-weight: 500;
    }
    .nc-tag.tag-html    { background: rgba(228,77,38,.1);  border-color: rgba(228,77,38,.3);  color: #fca5a5; }
    .nc-tag.tag-css     { background: rgba(38,77,228,.1);  border-color: rgba(38,77,228,.3);  color: #93c5fd; }
    .nc-tag.tag-js      { background: rgba(234,179,8,.1);  border-color: rgba(234,179,8,.3);  color: #fde68a; }
    .nc-tag.tag-react   { background: rgba(97,218,251,.1); border-color: rgba(97,218,251,.3); color: #7dd3fc; }
    .nc-tag.tag-node    { background: rgba(51,153,51,.1);  border-color: rgba(51,153,51,.3);  color: #86efac; }
    .nc-tag.tag-php     { background: rgba(119,123,179,.1);border-color:rgba(119,123,179,.3); color: #c4b5fd; }
    .nc-tag.tag-sql     { background: rgba(234,88,12,.1);  border-color: rgba(234,88,12,.3);  color: #fdba74; }
    .nc-tag.tag-git     { background: rgba(240,80,50,.1);  border-color: rgba(240,80,50,.3);  color: #fca5a5; }
    .nc-tag.tag-tools   { background: rgba(100,100,100,.1);border-color:rgba(100,100,100,.3); color: #d1d5db; }
    .nc-tag.tag-perf    { background: rgba(220,38,127,.1); border-color:rgba(220,38,127,.3);  color: #f9a8d4; }
    .nc-tag.tag-a11y    { background: rgba(16,185,129,.1); border-color:rgba(16,185,129,.3);  color: #6ee7b7; }
    .nc-tag.tag-sec     { background: rgba(185,28,28,.1);  border-color: rgba(185,28,28,.3);  color: #fca5a5; }

    .nc-links {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .nc-link {
      font-size: 11.5px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 6px;
      text-decoration: none;
      transition: background .15s;
    }
    .nc-link-w3 {
      background: rgba(4,150,255,.12);
      color: #60a5fa;
      border: 1px solid rgba(4,150,255,.25);
    }
    .nc-link-w3:hover { background: rgba(4,150,255,.22); text-decoration: none; }
    .nc-link-mdn {
      background: rgba(161,161,170,.08);
      color: #a1a1aa;
      border: 1px solid rgba(161,161,170,.18);
    }
    .nc-link-mdn:hover { background: rgba(161,161,170,.16); text-decoration: none; }
    .nc-link-editor {
      background: rgba(26,115,232,.12);
      color: #8ec5ff;
      border: 1px solid rgba(26,115,232,.25);
    }
    .nc-link-editor:hover { background: rgba(26,115,232,.22); text-decoration: none; }

    /* Level badge */
    .nc-level {
      position: absolute;
      top: 14px;
      right: 14px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .05em;
      text-transform: uppercase;
      padding: 2px 7px;
      border-radius: 20px;
    }
    .level-beginner  { background: rgba(16,185,129,.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,.25); }
    .level-intermediate { background: rgba(234,179,8,.12); color: #fde68a; border: 1px solid rgba(234,179,8,.25); }
    .level-advanced  { background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }

    /* No results */
    .notes-empty {
      text-align: center;
      padding: 60px 20px;
      color: rgba(212,216,240,.35);
      display: none;
    }
    .notes-empty.show { display: block; }
    .notes-empty svg { opacity: .2; margin-bottom: 12px; }

    /* Scroll-to-top */
    #notes-back-top {
      position: fixed;
      bottom: 28px;
      right: 28px;
      z-index: 900;
      width: 42px;
      height: 42px;
      background: #1a73e8;
      color: #fff;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      font-size: 18px;
      display: none;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 16px rgba(26,115,232,.45);
      transition: transform .15s;
    }
    #notes-back-top.show { display: flex; }
    #notes-back-top:hover { transform: scale(1.08); }

    @media (max-width: 640px) {
      .notes-grid { grid-template-columns: 1fr; }
      .notes-az-strip { gap: 2px; }
      .az-link { width: 26px; height: 26px; font-size: 11px; }
    }

