*, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scrollbar-color: rgba(255,255,255,0.16) transparent; }
  body { margin: 0; background: #0c0a17; color: #c9c5d8; font: 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; -webkit-font-smoothing: antialiased; }
  /* Soft glows behind everything, fixed so they stay put while the page scrolls */
  body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(ellipse 60% 50% at 8% 0%, rgba(139,92,246,0.32), transparent 70%),
      radial-gradient(ellipse 50% 45% at 100% 6%, rgba(236,72,153,0.19), transparent 70%),
      radial-gradient(ellipse 70% 50% at 55% 100%, rgba(79,70,229,0.24), transparent 70%);
  }
  ::selection { background: rgba(192,132,252,0.35); color: #fff; }
  svg { flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  :focus-visible { outline: 2px solid #c084fc; outline-offset: 2px; }
  .app { display: flex; min-height: 100vh; }

  /* Icon rail, laid out as in the tools' sidebar */
  .rail {
    position: sticky; top: 0; align-self: flex-start; z-index: 3; width: 76px; height: 100vh; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 0 12px;
    background: rgba(255,255,255,0.025); border-right: 1px solid rgba(255,255,255,0.08); overflow-y: auto; scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .logo {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; margin-bottom: 16px;
    background: linear-gradient(135deg, #b5528a 0%, #8e5bb8 55%, #7458c2 100%); color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px -6px rgba(160,96,200,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
  }
  .logo svg { width: 20px; height: 20px; stroke-width: 1.9; }
  .rb {
    width: 60px; padding: 9px 0 8px; border-radius: 12px; color: #a09cb4; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center;
    font-size: 11px; font-weight: 500; line-height: 1.2; transition: background 0.15s, color 0.15s;
  }
  .rb:hover { background: rgba(255,255,255,0.04); color: #f7f5ff; }
  .rb.active { background: linear-gradient(135deg, rgba(236,72,153,0.10), rgba(139,92,246,0.13)); color: #f7f5ff; box-shadow: inset 0 0 0 1px rgba(216,180,254,0.16); }
  .rb.active svg { stroke: #e9d5ff; }
  .rb:focus-visible { outline-offset: -2px; }
  .rb svg { width: 20px; height: 20px; stroke-width: 1.7; }

  /* Page column */
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 36px; }
  .content { flex: 1; padding-bottom: 48px; }

  /* Header */
  .hd { padding: 48px 0 6px; }
  h1 {
    width: fit-content; margin: 0; font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em;
    color: #f7f5ff; background: linear-gradient(90deg, #ffffff 0%, #f5f0ff 60%, #ead6f2 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  .lead { margin: 8px 0 0; max-width: 620px; font-size: 14.5px; color: #a09cb4; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
  .chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
    font-size: 12px; font-weight: 500; line-height: 1.3; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: #c9c5d8;
  }
  .chip.accent { background: rgba(192,132,252,0.08); border-color: rgba(192,132,252,0.2); color: #e9d5ff; }
  .steps {
    list-style: none; counter-reset: step; margin: 30px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  }
  .steps li {
    counter-increment: step; display: flex; align-items: flex-start; gap: 13px; padding: 15px 16px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px;
  }
  .steps li::before {
    content: counter(step); flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #b5528a 0%, #8e5bb8 55%, #7458c2 100%); color: #fff; font-size: 12.5px; font-weight: 700;
    box-shadow: 0 6px 18px -5px rgba(160,96,200,0.6);
  }
  .steps b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: #f7f5ff; }
  .steps span { display: block; margin-top: 3px; font-size: 12.5px; color: #a09cb4; }
  kbd {
    font: 500 11px ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace; color: #f7f5ff; background: rgba(255,255,255,0.06); white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.14); border-bottom-width: 2px; border-radius: 6px; padding: 1px 5px;
  }

  /* Sections and tool cards */
  .sec { scroll-margin-top: 20px; }
  .sec-h { display: flex; align-items: center; gap: 10px; margin: 44px 0 14px; font-size: 15px; font-weight: 600; color: #f7f5ff; }
  .sec-n {
    padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    font-size: 11.5px; font-weight: 500; color: #a09cb4; font-variant-numeric: tabular-nums;
  }
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
  .card {
    display: flex; flex-direction: column; gap: 14px; padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
    border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; transition: border-color 0.2s, box-shadow 0.2s;
  }
  .card:hover { border-color: rgba(216,180,254,0.20); box-shadow: 0 20px 44px -24px rgba(0,0,0,0.8), 0 0 36px -8px rgba(160,96,200,0.28); }
  .card-top { display: flex; align-items: center; gap: 13px; }
  .av {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(236,72,153,0.10), rgba(139,92,246,0.13)); border: 1px solid rgba(216,180,254,0.16); color: #e9d5ff;
    font-size: 13.5px; font-weight: 600; letter-spacing: 0.02em;
  }
  .av svg { width: 20px; height: 20px; }
  .card-id { flex: 1; min-width: 0; }
  .drag {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 14px 7px 11px; border-radius: 10px;
    background: linear-gradient(135deg, #b5528a 0%, #8e5bb8 55%, #7458c2 100%); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.35; text-decoration: none;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15); cursor: grab;
    box-shadow: 0 6px 20px -6px rgba(160,96,200,0.6), inset 0 1px 0 rgba(255,255,255,0.16);
    transition: box-shadow 0.15s, filter 0.15s;
  }
  /* Grip dots, drawn in CSS so the link's text stays just the title */
  .drag::before {
    content: ''; flex-shrink: 0; width: 8px; height: 12px; opacity: 0.75;
    background: radial-gradient(circle, #fff 1px, transparent 1.4px) 0 0 / 4px 4px;
  }
  .drag:hover { filter: brightness(1.06); box-shadow: 0 8px 30px -4px rgba(160,96,200,0.6), inset 0 1px 0 rgba(255,255,255,0.16); }
  .drag:active { cursor: grabbing; }
  .tagline { margin-top: 6px; font-size: 12px; color: #a09cb4; }
  .desc { margin: 0; font-size: 12.5px; line-height: 1.6; color: #c9c5d8; }
  .note {
    display: flex; gap: 10px; padding: 9px 12px; border: 1px solid rgba(192,132,252,0.18); border-left: 3px solid #c084fc;
    border-radius: 10px; background: rgba(192,132,252,0.07);
  }
  .note[hidden] { display: none; }
  .note-l { flex-shrink: 0; padding-top: 2px; font: 700 9.5px ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace; letter-spacing: 1px; text-transform: uppercase; color: #c084fc; }
  .note-b { font-size: 11.5px; line-height: 1.55; color: #c9c5d8; }
  .card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto;
    padding-top: 13px; border-top: 1px solid rgba(255,255,255,0.06);
  }
  .size { font: 11px ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace; color: #8b86a3; }
  .btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
    background: rgba(255,255,255,0.04); color: #c9c5d8; font: 600 11.5px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #f7f5ff; }
  .btn svg { width: 13px; height: 13px; }

  /* Footer: where the page came from and when it was built, like the tools' footer */
  .status {
    position: sticky; bottom: 0; z-index: 2; border-top: 1px solid rgba(255,255,255,0.08); background: rgba(12,10,23,0.72);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  }
  .status .wrap {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; padding-bottom: 9px;
    font-size: 11px; color: #a09cb4;
  }
  .st { display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
  .st span { overflow: hidden; text-overflow: ellipsis; }
  .st svg { width: 13px; height: 13px; }
  .st.ok svg { stroke: #6ee7b7; }
  .st.r { flex-shrink: 0; }
  .st.mono { font: 10.5px ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace; color: #8b86a3; }
  .toast {
    position: fixed; left: calc(50% + 38px); bottom: 54px; z-index: 5; width: max-content; max-width: calc(100vw - 32px);
    transform: translate(-50%, 4px); padding: 7px 14px; border-radius: 999px; background: #f7f5ff; color: #0c0a17;
    font-size: 12px; font-weight: 600; box-shadow: 0 12px 32px -10px rgba(0,0,0,0.7);
    opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s;
  }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  /* Narrow windows: the rail becomes a bar across the top */
  @media (max-width: 760px) {
    .app { flex-direction: column; }
    .rail {
      width: auto; height: auto; align-self: stretch; flex-direction: row; gap: 2px; padding: 6px 12px; overflow-x: auto;
      background: rgba(12,10,23,0.72); border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08);
      -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
    }
    .logo { width: 32px; height: 32px; border-radius: 10px; margin: 0 10px 0 0; }
    .rb { width: 64px; padding: 5px 0 4px; gap: 3px; font-size: 10.5px; }
    .rb svg { width: 18px; height: 18px; }
    .wrap { padding: 0 16px; }
    .hd { padding-top: 28px; }
    h1 { font-size: 25px; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .grid { grid-template-columns: minmax(0, 1fr); }
    .sec { scroll-margin-top: 64px; }
    .sec-h { margin-top: 36px; }
    .toast { left: 50%; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rb, .card, .drag, .btn, .toast { transition: none; }
  }
