/* IDYL — download.html page layer. Builds on idyl.css + home.css (site chrome). */

/* ---------- Hero ---------- */
.dl-hero-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 48px; align-items: center; }
.dl-copy { min-width: 0; }
.dl-title {
  margin: 28px 0 0; max-width: 11ch;
  font-size: clamp(52px, 7.4vw, 112px); line-height: .93; letter-spacing: -0.035em;
}
.dl-lede { margin-top: 28px; max-width: 46ch; }
.dl-primary { margin-top: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.dl-main { height: 54px; padding: 0 26px 0 22px; font-size: 15.5px; }
.dl-main .ico-dl { margin-left: 0; }
.dl-main-meta { font-size: 13.5px; color: var(--bone-2); }
.dl-also { margin-top: 18px; font-size: 14.5px; color: var(--bone-2); }
.dl-ref { margin-top: 28px; max-width: 58ch; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.55; color: var(--bone, inherit); overflow-wrap: anywhere; }
.dl-ref code { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; white-space: normal; word-break: break-all; }
.dl-release { margin-top: 32px; padding-top: 18px; max-width: 58ch; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }

/* App icon + the menu-bar menu it lives in, staged like a desktop at night */
.dl-visual { position: relative; margin: 0; height: 430px; min-width: 0; }
.tray { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.tray-bar {
  display: flex; justify-content: flex-end; align-items: center; gap: 4px; height: 30px; padding: 0 8px;
  border-radius: 9px; background: rgba(22, 27, 37, .72); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.tb-item { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 5px; color: var(--bone-2); font: 500 12px/1 var(--font-ui); }
.tb-idyl { background: rgba(243, 238, 228, .12); color: var(--bone); }
.tb-idyl svg { width: 15px; height: 15px; }
.tb-batt i { position: relative; width: 20px; height: 10px; border-radius: 3px; border: 1.2px solid var(--bone-2); }
.tb-batt i::before { content: ""; position: absolute; inset: 1.5px 6px 1.5px 1.5px; border-radius: 1px; background: var(--bone-2); }
.tb-batt i::after { content: ""; position: absolute; right: -3.5px; top: 2.5px; width: 2px; height: 3px; border-radius: 0 1px 1px 0; background: var(--bone-2); }
.tray-menu {
  width: 262px; margin: 6px 64px 0 auto; padding: 6px; border-radius: 12px;
  background: rgba(22, 27, 37, .9); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 60px -24px rgba(0, 0, 0, .9);
}
.tray-menu p { padding: 6px 10px; border-radius: 6px; font-size: 13px; color: var(--bone); }
.tray-menu .tray-status { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.tray-menu .tray-sub { padding-top: 0; font-size: 12px; color: var(--mute); }
.tray-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(242, 184, 91, .18); }
.tray-menu hr { margin: 5px 8px; border: 0; border-top: 1px solid var(--line-strong); }
.tray-menu p:nth-of-type(4) { background: rgba(243, 238, 228, .07); }
.dl-icon {
  position: absolute; left: 0; bottom: 0; z-index: 1; width: 208px; height: 208px; overflow: hidden;
  display: grid; place-items: center; border-radius: 48px;
  background: radial-gradient(120% 90% at 50% 0%, #1A2030 0%, var(--ink-900) 55%, var(--ink-950) 100%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset;
}
.dl-icon-img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.dl-icon-mark { width: 120px; height: 120px; }
/* The real app icon carries its own squircle and margins: drop the stand-in frame. */
.dl-icon.has-img { width: 248px; height: 248px; left: -20px; bottom: -20px; background: none; border: 0; box-shadow: none; overflow: visible; }
.dl-icon.has-img .dl-icon-mark { display: none; }
.dl-icon.has-img .dl-icon-img { filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55)); }

@media (max-width: 1060px) {
  .dl-hero-in { grid-template-columns: 1fr; gap: 56px; }
  .dl-visual { height: 340px; max-width: 560px; }
  .dl-icon { width: 172px; height: 172px; border-radius: 40px; }
  .dl-icon-mark { width: 100px; height: 100px; }
  .dl-icon.has-img { width: 204px; height: 204px; left: -16px; bottom: -16px; }
}
@media (max-width: 520px) {
  .dl-main { flex: 1 1 100%; }
  .dl-primary { gap: 12px; }
  .dl-visual { height: 330px; }
  .tray-menu { width: 236px; margin-right: 40px; }
  .dl-icon { width: 136px; height: 136px; border-radius: 32px; }
  .dl-icon-mark { width: 80px; height: 80px; }
  .dl-icon.has-img { width: 164px; height: 164px; left: -8px; bottom: -14px; }
}

/* ---------- Platforms ---------- */
.dl-platforms { padding: 0 0 clamp(88px, 10vw, 140px); }
.plat-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--ink-900); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
}
.plat { position: relative; display: flex; flex-direction: column; padding: 28px 28px 30px; border-left: 1px solid var(--line); min-width: 0; scroll-margin-top: 96px; }
.plat:first-child { border-left: 0; }
.plat-here {
  visibility: hidden; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font: 500 12px/1 var(--font-ui); color: var(--gold-2);
}
.plat-here::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.plat.is-here .plat-here { visibility: visible; }
.plat.is-here::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold); }
.plat-name { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.plat-req { margin-top: 10px; font-size: 14.5px; color: var(--bone-2); }
.plat-files { display: grid; gap: 10px; margin-top: 24px; }
.plat-file {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 12px; background: var(--ink-950); border: 1px solid var(--line-strong);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.plat-file:hover { border-color: var(--bone-2); background: var(--ink-850); }
.plat-file.is-rec { border-color: rgba(242, 184, 91, .55); }
.plat-file.is-missing { opacity: .55; cursor: default; }
.plat-file.is-missing:hover { border-color: inherit; background: none; }
.pf-name { font-size: 15px; font-weight: 500; color: var(--bone); }
.pf-meta { grid-column: 1; margin-top: 3px; font-size: 11.5px; color: var(--mute); overflow-wrap: anywhere; }
.pf-ico { grid-column: 2; grid-row: 1 / span 2; width: 20px; height: 20px; fill: none; stroke: var(--bone-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.plat-file:hover .pf-ico { stroke: var(--bone); }
.plat-note { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--mute); }

@media (max-width: 900px) {
  .plat-grid { grid-template-columns: 1fr; border-radius: var(--r-lg); }
  .plat { border-left: 0; border-top: 1px solid var(--line); padding: 24px 20px 26px; }
  .plat:first-child { border-top: 0; }
  .plat-here { display: none; }
  .plat.is-here .plat-here { display: inline-flex; }
}

/* ---------- After install ---------- */
.setup { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.setup-step { min-width: 0; }
.setup-n { margin-top: 26px; font-size: 11px; letter-spacing: .08em; color: var(--mute); }
.setup-step h3 { margin: 8px 0 8px; font: 600 18px/1.3 var(--font-ui); letter-spacing: -0.01em; }
.setup-step > p:last-child { font-size: 14.5px; color: var(--bone-2); }

.mini { height: 196px; padding: 18px; overflow: hidden; background: var(--ink-900); border: 1px solid var(--line); border-radius: var(--r-lg); }
.mini-h { margin-bottom: 10px; font-size: 12px; color: var(--mute); }
.mini-check dl { margin: 0; }
.mini-check dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.mini-check dt { color: var(--bone-2); }
.mini-check dd { margin: 0; color: var(--bone); font-family: var(--font-mono); font-size: 12.5px; }
.mini-check dd.ok { display: inline-flex; align-items: center; gap: 8px; color: var(--meadow); }
.mini-check dd.ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--meadow); }
.mini-models ul { list-style: none; margin: 0; padding: 0; }
.mini-models li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--bone); }
.mini-models em { font: 500 10.5px/1 var(--font-mono); font-style: normal; letter-spacing: .04em; padding: 4px 7px; border-radius: 5px; border: 1px solid; }
.mini-models .fit { color: var(--meadow); border-color: rgba(127, 227, 160, .35); }
.mini-models .tight { color: var(--gold); border-color: rgba(242, 184, 91, .35); }
.mini-models .big { color: var(--mute); border-color: var(--line-strong); }
.mini-models li:last-child span { color: var(--mute); }
.mini-models .pulling i { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--p); background: var(--bone-2); border-radius: 2px; }
.mini-earn { display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 500; color: var(--bone); }
.mini-sw { position: relative; width: 46px; height: 28px; flex: none; border-radius: 999px; background: var(--gold); }
.mini-sw i { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink-950); }
.mini-field { display: grid; gap: 8px; }
.mini-label { font-size: 12px; color: var(--mute); }
.mini-input { display: block; padding: 10px 12px; border-radius: 9px; background: var(--ink-950); border: 1px solid var(--line-strong); font: 400 12.5px var(--font-mono); color: var(--faint); }

@media (max-width: 960px) {
  .setup { grid-template-columns: 1fr; gap: 48px; }
  .setup-step { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 32px; }
  .setup-step .mini { grid-row: 1 / span 3; }
  .setup-n { margin-top: 4px; }
}
@media (max-width: 640px) {
  .setup-step { display: block; }
  .mini { height: auto; min-height: 168px; }
  .setup-n { margin-top: 20px; }
}

/* ---------- Promises ---------- */
.dl-promises { margin-top: 0; }
.promises svg.ub-glyph { stroke-width: 3; }
.promises svg .hollow { fill: none; stroke: var(--gold); }
.dl-fine { margin-top: 28px; max-width: 78ch; font-size: 13px; color: var(--mute); }

/* ---------- Requirements ---------- */
.req { table-layout: fixed; }
.req thead th:first-child { width: 22%; }
.req thead th { font-size: 11px; }
.req tbody th { font-size: 14.5px; vertical-align: top; }
.req tbody td { font-size: 14.5px; color: var(--bone-2); vertical-align: top; padding-right: 24px; }
.req tbody td strong { color: var(--bone); font-weight: 500; }
@media (max-width: 720px) {
  .req, .req tbody, .req tr, .req th, .req td { display: block; width: 100%; }
  .req thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .req tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .req tbody th, .req tbody td { padding: 0; border: 0; }
  .req tbody th { margin-bottom: 6px; }
  .req tbody td + td { margin-top: 4px; }
  .req tbody td[colspan] { margin-top: 0; }
  .req tbody td:not([colspan])::before { display: inline-block; min-width: 76px; color: var(--mute); font-size: 13px; }
  .req tbody td:nth-of-type(1):not([colspan])::before { content: "macOS"; }
  .req tbody td:nth-of-type(2)::before { content: "Windows"; }
  .req tbody td:nth-of-type(3)::before { content: "Linux"; }
}

/* ---------- First launch ---------- */
.warn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.warn { padding: 28px; background: var(--ink-900); border: 1px solid var(--line); border-radius: var(--r-xl); min-width: 0; }
.warn h3 { margin: 0; font: 600 19px/1.3 var(--font-ui); letter-spacing: -0.01em; }
.warn-msg {
  margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--ink-950); border: 1px solid var(--line-strong);
  font-size: 13.5px; color: var(--bone-2);
}
.warn ol { margin: 20px 0 0; padding-left: 22px; display: grid; gap: 12px; font-size: 14.5px; color: var(--bone-2); }
.warn ol li { padding-left: 4px; }
.warn ol li::marker { font: 500 12px var(--font-mono); color: var(--gold); }
.warn ol strong { color: var(--bone); font-weight: 600; }
.warn-after { margin-top: 18px; font-size: 13px; color: var(--mute); }
.ui {
  display: inline-block; padding: 0 6px; border-radius: 5px; white-space: nowrap;
  background: var(--ink-800); border: 1px solid var(--line-strong);
  font-size: .92em; font-weight: 500; line-height: 1.6; color: var(--bone);
}
@media (max-width: 820px) {
  .warn-grid { grid-template-columns: 1fr; }
  .warn { padding: 22px 20px; border-radius: var(--r-lg); }
}

/* ---------- CLI ---------- */
#cli .code-body pre { white-space: pre-wrap; word-break: break-all; color: var(--bone); padding: 24px 28px; }
@media (max-width: 520px) {
  #cli .code-body pre { padding: 18px; font-size: 12px; }
  #cli .tab { padding: 0 10px; font-size: 12.5px; }
}
