/* Download page v2 — 2026-08-24, implementing the owner's Claude Design
   draft `PDM Download Page.dc.html`. Replaces download-polish-20260717.css,
   download-store-20260804.css and release-panel-20260814.css on this page
   (those files stay on disk, immutable, and other pages don't use them).

   The draft is dark-only with hard-coded hex; this page lives inside the
   site layout with a light theme too, so every colour maps to the site's
   tokens. The mono face is the local stack (no Google Fonts — the audience
   includes Iran, where Google's font CDN is often unreachable).

   Responsive lessons already paid for on the landing are pre-applied here:
   minmax(0,1fr) grids, no fixed-width children, reduced-motion guards. */

/* The decorative glow bleeds past the container by design; clip the root so
   it can never widen the document (body already hides overflow, this covers
   the html element too). */
html { overflow-x: clip; }

.d2-mono { font-family: ui-monospace, Consolas, "JetBrains Mono", monospace; }

@keyframes d2-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes d2-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes d2-glow { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
@keyframes d2-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes d2-scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

[data-rv] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
[data-rv].on { opacity: 1; transform: none; }
.d2-rise { animation: d2-rise .6s both; }

@media (prefers-reduced-motion: reduce) {
    .d2-rise, [data-rv] { animation: none; opacity: 1; transform: none; transition: none; }
    .d2-pulse, .d2-scanline > span, .d2-logo, .d2-glow { animation: none !important; }
}

/* ---- hero ---------------------------------------------------------------- */
.d2-hero {
    position: relative;
    padding: 56px 0 0;
    background: radial-gradient(900px 480px at 50% -12%, var(--ring), transparent 62%);
    text-align: center;
}
.d2-badge {
    display: inline-flex; align-items: center; gap: 9px;
    height: 34px; padding: 0 17px;
    border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
    border-radius: 30px;
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    font-size: 12.5px; font-weight: 600;
    color: color-mix(in srgb, var(--primary) 75%, var(--fg));
    white-space: nowrap;
}
.d2-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent2); animation: d2-pulse 2s infinite; }
.d2-hero h1 { margin: 26px auto 0; max-width: 720px; font-size: 46px; font-weight: 800; line-height: 1.35; letter-spacing: -.5px; }
.d2-grad {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.d2-hero .lead { margin: 16px auto 0; max-width: 560px; }

.d2-step {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 46px; white-space: nowrap; position: relative; z-index: 2;
}
.d2-step-n {
    font-size: 12px; font-weight: 700; color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    border-radius: 8px; padding: 4px 10px;
}
.d2-step-t { font-size: 12.5px; font-weight: 700; color: var(--primary); letter-spacing: 1px; }

/* ---- main card ----------------------------------------------------------- */
.d2-card-outer { position: relative; max-width: 820px; margin: 24px auto 0; }
.d2-ghost {
    position: absolute; top: -54px; left: 50%; transform: translateX(-50%);
    font-size: clamp(56px, 13vw, 110px); font-weight: 700; line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px color-mix(in srgb, var(--primary) 16%, transparent);
    letter-spacing: 3px; pointer-events: none; user-select: none; white-space: nowrap;
}
.d2-glow {
    position: absolute; inset: -40px 0;
    background: radial-gradient(55% 65% at 50% 55%, var(--ring), transparent 70%);
    animation: d2-glow 5s ease-in-out infinite; pointer-events: none;
}
.d2-card {
    position: relative;
    background: var(--card);
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: start;
}
.d2-scanline { height: 3px; background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent); position: relative; overflow: hidden; }
.d2-scanline > span { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: d2-scan 3.2s linear infinite; }

.d2-card-head { display: flex; align-items: center; gap: 16px; padding: 26px 30px 0; flex-wrap: wrap; }
.d2-logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 12px 34px -8px var(--ring); animation: d2-float 5s ease-in-out infinite; }
.d2-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d2-title { font-size: 21px; font-weight: 800; }
.d2-version { font-size: 14px; font-weight: 700; color: var(--primary); }
.d2-official {
    height: 24px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--accent2) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent2) 30%, transparent);
    font-size: 11px; font-weight: 700; color: var(--accent2); white-space: nowrap;
}
.d2-official.is-beta {
    background: color-mix(in srgb, #f0a92a 10%, transparent);
    border-color: color-mix(in srgb, #f0a92a 35%, transparent);
    color: #f0a92a;
}
.d2-subline { margin-top: 6px; font-size: 12.5px; color: var(--muted); }

.d2-meta { display: flex; padding: 20px 30px 0; flex-wrap: wrap; row-gap: 14px; }
.d2-meta-cell { padding-inline-end: 26px; }
.d2-meta-cell + .d2-meta-cell { border-inline-start: 1px solid var(--border); padding-inline-start: 26px; }
.d2-meta-v { font-size: 17px; font-weight: 700; }
.d2-meta-k { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.d2-actions { display: flex; align-items: center; gap: 13px; padding: 24px 30px; flex-wrap: wrap; }

.d2-note { display: flex; gap: 12px; padding: 16px 30px; border-top: 1px solid var(--border); }
.d2-note svg { flex-shrink: 0; margin-top: 3px; }
.d2-note-amber { background: color-mix(in srgb, #f0a92a 5%, transparent); }
.d2-note-blue { background: color-mix(in srgb, var(--primary) 5%, transparent); align-items: center; }
.d2-note p { margin: 0; font-size: 12.5px; line-height: 2; color: var(--muted); flex: 1; }
.d2-note a { font-size: 12px; font-weight: 700; flex-shrink: 0; color: var(--primary); }
.d2-note b { color: var(--primary); font-weight: 700; }

/* ---- verify card --------------------------------------------------------- */
.d2-verify {
    max-width: 820px; margin: 20px auto 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 20px 26px; text-align: start;
}
.d2-verify-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.d2-verify-head strong { font-size: 14px; font-weight: 700; }
.d2-verify-head small { font-size: 11.5px; color: var(--muted); }
.d2-hashrow {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px;
    background: var(--bg2);
}
.d2-hashrow + .d2-hashrow { margin-top: 9px; }
.d2-hash-k { font-size: 10px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.d2-hash-v { flex: 1; min-width: 0; font-size: 11px; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-hash-v.is-muted { color: var(--muted); }
.d2-copy {
    height: 28px; padding: 0 13px; flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary); border-radius: 8px; cursor: pointer;
    font: inherit; font-size: 11.5px; font-weight: 700;
}
.d2-copy:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }

/* ---- section heads ------------------------------------------------------- */
.d2-sec { padding: 84px 0 0; }
.d2-sec-head { text-align: center; margin-bottom: 44px; }
.d2-sec-head .d2-step { margin-top: 0; margin-bottom: 14px; }
.d2-sec-head h2 { margin: 0; font-size: 30px; font-weight: 800; }

/* ---- extension cards ----------------------------------------------------- */
.d2-ext-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.d2-ext {
    padding: 28px 26px; border: 1px solid var(--border); border-radius: 18px;
    background: var(--card); display: flex; flex-direction: column; align-items: flex-start;
    transition: border-color .2s;
}
.d2-ext:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.d2-ext strong { font-size: 16.5px; font-weight: 800; margin-top: 16px; }
.d2-ext p { font-size: 13px; line-height: 2; color: var(--muted); margin: 8px 0 0; flex: 1; }
.d2-ext-cta {
    margin-top: 18px; height: 40px; padding: 0 20px;
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    color: var(--primary); border-radius: 11px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.d2-ext-cta:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }
.d2-ext-store { margin-top: 10px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* ---- what-you-get -------------------------------------------------------- */
.d2-gets { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.d2-get {
    padding: 24px 22px; border: 1px solid var(--border); border-radius: 16px;
    background: var(--card); transition: border-color .2s, background .2s;
}
.d2-get:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); background: color-mix(in srgb, var(--primary) 4%, var(--card)); }
.d2-get .icon-chip { margin-bottom: 14px; }
.d2-get strong { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 8px; }
.d2-get p { margin: 0; font-size: 12.5px; line-height: 2; color: var(--muted); }

/* ---- requirements + platforms -------------------------------------------- */
.d2-duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.d2-panel { border: 1px solid var(--border); border-radius: 18px; background: var(--card); padding: 28px; }
.d2-panel > strong { display: block; font-size: 16px; font-weight: 800; margin-bottom: 20px; }
.d2-req-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.d2-req-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.d2-req-label.is-rec { color: var(--primary); }
.d2-req-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.d2-req-item + .d2-req-item { margin-top: 10px; }
.d2-req-item.is-rec { color: var(--fg); }
.d2-req-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.d2-plat { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg2); }
.d2-plat + .d2-plat { margin-top: 10px; }
.d2-plat-body { flex: 1; min-width: 0; }
.d2-plat-t { font-size: 13.5px; font-weight: 700; }
.d2-plat-d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.d2-soon {
    height: 24px; padding: 0 11px; display: inline-flex; align-items: center;
    border-radius: 20px; background: color-mix(in srgb, #f0a92a 9%, transparent);
    border: 1px solid color-mix(in srgb, #f0a92a 30%, transparent);
    font-size: 10.5px; font-weight: 700; color: #f0a92a; flex-shrink: 0;
}

/* ---- changelog band ------------------------------------------------------ */
.d2-chlog {
    display: flex; align-items: center; gap: 24px; padding: 34px 38px;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: 22px;
    background: radial-gradient(500px 240px at 12% 50%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%), var(--card);
    flex-wrap: wrap; margin: 84px 0 20px;
}
.d2-chlog-body { flex: 1; min-width: 240px; }
.d2-chlog-t { font-size: 19px; font-weight: 800; }
.d2-chlog-d { margin-top: 8px; font-size: 13.5px; line-height: 2; color: var(--muted); }

@media (max-width: 860px) {
    .d2-hero h1 { font-size: 32px; }
    .d2-sec { padding-top: 60px; }
    .d2-sec-head h2 { font-size: 25px; }
    .d2-duo { grid-template-columns: minmax(0, 1fr); }
    .d2-card-head, .d2-meta, .d2-actions, .d2-note { padding-inline: 20px; }
    .d2-meta-cell { padding-inline-end: 18px; }
    .d2-meta-cell + .d2-meta-cell { padding-inline-start: 18px; }
    .d2-chlog { padding: 26px 22px; }
}
@media (max-width: 560px) {
    .d2-req-cols { grid-template-columns: minmax(0, 1fr); }
    .d2-badge { white-space: normal; height: auto; padding-block: 7px; }

    .d2-hero h1 { font-size: 27px; letter-spacing: 0; }
    .d2-step { white-space: normal; }

    /* the outlined ghost numeral collides with the step pill at phone
       widths — shrink it and give the card room to breathe */
    .d2-card-outer { margin-top: 42px; }
    .d2-ghost { font-size: 44px; top: -28px; letter-spacing: 2px; }

    /* stacked full-width actions instead of two ragged pills */
    .d2-actions { flex-direction: column; align-items: stretch; }
    .d2-actions .btn { width: 100%; justify-content: center; }

    /* the divider-separated meta row breaks badly when it wraps: a stray
       rule hangs at the start of the wrapped line — switch to a plain grid */
    .d2-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
    .d2-meta-cell { padding-inline-end: 0; }
    .d2-meta-cell + .d2-meta-cell { border-inline-start: 0; padding-inline-start: 0; }

    .d2-note { flex-wrap: wrap; }
    .d2-verify { padding: 18px 14px; }
    .d2-hashrow { gap: 8px; padding: 10px 12px; }
    .d2-chlog .d2-ext-cta { width: 100%; justify-content: center; }
}
