/* ===== Downloads page — scoped, theme-aware (uses global CSS custom props) ===== */
    .dl-wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 40px); }

    /* Hero */
    .dl-hero { text-align: center; padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); }
    .dl-hero .eyebrow { justify-content: center; }
    .dl-hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 6vw, 46px); line-height: 1.1; letter-spacing: -.01em; margin: 12px 0 0; color: var(--ink); overflow-wrap: break-word; }
    .dl-hero .dl-lead { max-width: 640px; margin: 18px auto 0; color: var(--ink-soft); font-size: clamp(14px, 1.7vw, 17px); line-height: 1.6; }
    .dl-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 0; padding: 0; }
    .dl-trust li { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; box-shadow: var(--shadow-sm); }
    .dl-trust svg { width: 15px; height: 15px; fill: var(--teal); flex: none; }
    .dl-hero-stat { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); font-weight: 600; }
    .dl-hero-stat[hidden] { display: none; }
    .dl-hero-stat strong { color: var(--teal-deep); font-weight: 700; font-variant-numeric: tabular-nums; }
    .dl-hero-stat .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: 7px; vertical-align: middle; animation: dlpulse 2.2s ease-in-out infinite; }
    @keyframes dlpulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

    /* Platform section */
    .dl-platform { margin: clamp(30px, 5vw, 54px) 0 0; }
    .dl-platform-head { display: flex; align-items: center; gap: 15px; margin: 0 0 20px; }
    .dl-platform-ico { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); border: 1px solid var(--line); }
    .dl-platform-ico svg { width: 26px; height: 26px; fill: var(--teal-deep); }
    .dl-platform-head h2 { margin: 0; font-size: clamp(19px, 2.4vw, 24px); font-weight: 650; color: var(--ink); letter-spacing: -.005em; }
    .dl-platform-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

    /* Card grid */
    .dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
    .dl-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; overflow: hidden; }
    .dl-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); opacity: 0; transition: opacity .18s ease; }
    .dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
    .dl-card:hover::before { opacity: 1; }
    .dl-card.is-featured { border-color: var(--teal); }
    .dl-card.is-featured::before { opacity: 1; }

    .dl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .dl-card-head h3 { margin: 0; font-size: 18px; font-weight: 650; color: var(--ink); }
    .dl-role { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: 5px 10px; }
    .dl-role.learner { color: var(--teal-deep); background: var(--teal-soft); }

    .dl-desc { margin: 12px 0 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }

    .dl-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
    .dl-chips li { font-size: 11.5px; font-weight: 600; color: var(--teal-deep); background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; }

    .dl-meta { margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
    .dl-meta div { display: flex; flex-direction: column; gap: 2px; }
    .dl-meta dt { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0; }
    .dl-meta dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }

    .dl-count { align-items: center; gap: 7px; margin: 16px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; min-height: 18px; }
    .dl-count[hidden] { display: none; }
    .dl-count:not([hidden]) { display: inline-flex; }
    .dl-count svg { width: 14px; height: 14px; fill: var(--teal); flex: none; }
    .dl-count strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

    .dl-actions { margin-top: 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
    .dl-btn { display: inline-flex; align-items: center; gap: 9px; background: var(--teal); color: #fff; text-decoration: none; font-weight: 650; font-size: 14px; padding: 12px 22px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
    .dl-btn svg { width: 17px; height: 17px; fill: currentColor; }
    .dl-btn:hover { background: var(--teal-deep); transform: translateY(-1px); box-shadow: var(--shadow); }
    .dl-btn:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; }
    .dl-hint { font-size: 12px; color: var(--muted); }

    /* Per-card SHA-256 */
    .dl-sha { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .dl-sha-k { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
    .dl-sha code { flex: 1 1 190px; min-width: 0; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 11px; color: var(--ink-soft); background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; word-break: break-all; line-height: 1.45; }
    .dl-sha-copy { flex: none; font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--teal-deep); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 11px; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
    .dl-sha-copy:hover { background: var(--teal-soft); }
    .dl-sha-copy.copied { background: var(--success); color: #fff; border-color: var(--success); }

    /* Install + requirements band */
    .dl-band { margin: clamp(40px, 6vw, 66px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
    .dl-panel { background: var(--surface-subtle); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
    .dl-panel h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 9px; }
    .dl-panel h3 svg { width: 18px; height: 18px; fill: var(--teal); }
    .dl-steps { counter-reset: step; list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
    .dl-steps li { position: relative; padding-left: 40px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
    .dl-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
    .dl-steps strong { color: var(--ink); }
    .dl-panel code { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 12px; }

    /* Verify (checksums) */
    .dl-verify { margin: clamp(30px, 4.5vw, 50px) 0 0; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 34px); }
    .dl-verify h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 2.4vw, 25px); color: var(--ink); display: flex; align-items: center; gap: 10px; }
    .dl-verify h2 svg { width: 22px; height: 22px; fill: var(--teal); flex: none; }
    .dl-verify > p { margin: 12px 0 0; color: var(--ink-soft); font-size: 14px; max-width: 720px; line-height: 1.6; }
    .dl-cmds { margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
    .dl-cmd { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
    .dl-cmd h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
    .dl-cmd pre { margin: 0; overflow-x: auto; max-width: 100%; }
    .dl-cmd code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
    .dl-verify-links { margin: 18px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: var(--muted); }
    .dl-verify-links a { color: var(--teal-deep); font-weight: 600; }
    .dl-verify-links code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

    /* Note / iOS */
    .dl-note { margin: 24px 0 0; display: flex; align-items: flex-start; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 18px 20px; }
    .dl-note svg { width: 22px; height: 22px; fill: var(--gold); flex: none; margin-top: 1px; }
    .dl-note p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
    .dl-note strong { color: var(--ink); }

    /* Support CTA */
    .dl-support { margin: clamp(34px, 5vw, 54px) 0 clamp(40px, 6vw, 70px); text-align: center; background: linear-gradient(135deg, var(--teal-soft), var(--surface-subtle)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); }
    .dl-support h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.6vw, 27px); color: var(--ink); }
    .dl-support p { margin: 10px auto 0; max-width: 500px; color: var(--ink-soft); font-size: 14px; }
    .dl-support .dl-btn { margin-top: 20px; }
    .dl-support-ghost { background: transparent; color: var(--teal-deep); border: 1px solid var(--line-strong); box-shadow: none; }
    .dl-support-ghost:hover { background: var(--paper); color: var(--teal-deep); }

    @media (max-width: 560px) {
      .dl-meta { grid-template-columns: 1fr; }
      .dl-platform-head { align-items: flex-start; }
    }
    .dl-alt { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
    .dl-alt a { color: var(--teal-deep); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
    .dl-alt a:hover { color: var(--teal); border-bottom-color: currentColor; }
    .dl-alt strong { color: var(--ink); }
