/* Downloads & Platform Install Guides — Ink Navy, Brass Gold & Archival Paper */

.download-banner {
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:18px; padding:16px 0 24px; color:var(--muted); font-size:13px;
}
.download-banner strong { display:block; color:var(--navy); font-size:14px; margin-bottom:4px; font-weight:650; }
.chip-help { max-width:420px; color:var(--muted); font-size:12px; }
.chip-help summary { min-height:44px; cursor:pointer; padding:8px 0; color:var(--navy); font-weight:600; }
.chip-help p { padding-bottom:8px; line-height:1.8; }

.download-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.download-card {
  display:flex; flex-direction:column; align-items:stretch;
  background:var(--white); border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:26px; min-width:0;
  box-shadow:var(--shadow-sm); transition:border-color .22s, box-shadow .22s;
}
.download-card:hover { border-color:var(--line-strong); box-shadow:var(--shadow-md); }
.download-card.is-recommended {
  border:2px solid var(--navy); background:var(--white);
  box-shadow:0 20px 48px rgba(13,22,38,.12);
}

.download-card .card-top { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:18px; }
.download-card .platform-icon {
  color:var(--navy); width:38px; height:38px; padding:8px;
  border-radius:8px; background:var(--paper); border:1px solid var(--line);
}
.download-card.is-recommended .platform-icon {
  color:var(--gold); background:var(--navy); border-color:var(--navy);
}
.card-badge {
  border:1px solid var(--line); border-radius:999px;
  padding:3px 10px; color:var(--muted); background:var(--paper); font-size:11px; font-weight:600;
}
.card-badge--recommended {
  color:var(--gold-dark); border-color:var(--gold-border); background:var(--gold-tint);
}

.download-card h3 { font-size:18px; font-weight:650; color:var(--navy); }
.download-card .platform-desc { color:var(--muted); font-size:13px; margin-top:4px; }
.download-meta { display:flex; gap:18px; flex-wrap:wrap; margin-block:18px; color:var(--muted); font-size:12px; }
.download-meta strong { font-weight:600; color:var(--navy); margin-left:5px; }
.download-card [data-role=hint] { margin-top:14px; color:var(--muted); font-size:12px; line-height:1.8; }
.download-card .btn { margin-top:auto; min-height:46px; width:100%; padding-inline:14px; white-space:normal; overflow-wrap:anywhere; }
.download-card .filename { color:var(--muted); font-size:11px; overflow-wrap:anywhere; margin-top:14px; }

.install-help { margin-top:12px; font-size:12px; color:var(--muted); }
.install-help summary { cursor:pointer; min-height:38px; padding:8px 0; color:var(--navy); font-weight:550; }
.download-card .install-help [data-role=hint] { margin-top:0; padding-bottom:8px; }
.guide-jump {
  display:inline-flex; align-items:center; min-height:36px;
  color:var(--gold-dark); font-size:12px; font-weight:650;
  text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere;
}
.guide-jump:hover { color:var(--navy); }

/* Install Security Guide */
.install-guide { margin-top:44px; padding-top:34px; border-top:1px solid var(--line); }
.install-guide-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:24px; flex-wrap:wrap; }
.install-guide-header>div:first-child { max-width:740px; min-width:0; }
.install-guide-header h2 {
  margin-top:10px; font-family:var(--serif);
  font-size:clamp(22px,2.3vw,30px); font-weight:700; line-height:1.38;
  letter-spacing:-.02em; color:var(--navy);
}
.install-guide-intro { margin-top:10px; color:var(--muted); font-size:13px; line-height:1.85; }
.install-guide-actions { display:flex; flex-wrap:wrap; gap:10px; }
.guide-trigger {
  min-height:44px; padding:9px 16px;
  border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  background:var(--white); color:var(--navy); font-size:12px; font-weight:600;
  line-height:1.4; white-space:normal; overflow-wrap:anywhere;
  transition:background .2s,border-color .2s;
}
.guide-trigger:hover { background:var(--navy); border-color:var(--navy); color:#fff; }

.guide-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.guide-card {
  background:var(--white); border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:26px; min-width:0;
  box-shadow:var(--shadow-sm);
}
.guide-card.is-active { border-color:var(--navy); box-shadow:var(--shadow-md); }
.guide-card-head {
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:12px; padding-bottom:16px; border-bottom:1px solid var(--line); flex-wrap:wrap;
}
.guide-card-head>div { min-width:0; flex:1 1 200px; }
.guide-card-head h3 { font-size:16px; font-weight:650; line-height:1.45; color:var(--navy); }
.guide-card-head p { margin-top:4px; color:var(--muted); font-size:12px; line-height:1.7; }
.guide-badge {
  border:1px solid var(--line); border-radius:999px;
  padding:2px 10px; color:var(--muted); background:var(--paper);
  font-size:11px; font-weight:600; line-height:1.5; max-width:100%; overflow-wrap:anywhere;
}
.guide-card.is-active .guide-badge {
  color:var(--gold-dark); border-color:var(--gold-border); background:var(--gold-tint);
}

.guide-steps { list-style:none; padding:0; margin:18px 0 0; display:flex; flex-direction:column; gap:18px; }
.guide-steps li { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.step-index {
  flex-shrink:0; min-width:28px; padding:2px 6px; border-radius:4px;
  background:var(--navy); color:var(--gold);
  font-family:var(--serif); font-size:12px; font-weight:700; line-height:1.5;
  text-align:center; font-variant-numeric:tabular-nums;
}
.step-body { flex:1; min-width:0; }
.step-body>strong { display:block; font-size:13px; font-weight:650; line-height:1.6; color:var(--navy); overflow-wrap:anywhere; }
.step-body>p { margin-top:4px; color:var(--muted); font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.step-body>p strong { color:var(--navy); font-weight:650; }

.ui-flow { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:10px; }
.ui-chip {
  display:inline-flex; align-items:center; padding:3px 9px; border-radius:4px;
  border:1px solid var(--line); background:var(--paper); color:var(--ink);
  font-size:12px; font-weight:600; line-height:1.45; max-width:100%; overflow-wrap:anywhere;
}
.ui-chip--action { border-color:var(--gold-border); background:var(--gold-tint); color:var(--navy); }
.ui-chip--avoid { border-color:var(--seal-border); background:var(--seal-bg); color:var(--seal); }
.ui-arrow { color:var(--muted); font-size:12px; line-height:1; }

.install-dialog { width:min(620px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; }
.install-dialog-body { padding:24px; }
.install-dialog-status {
  margin-bottom:14px; padding:10px 14px;
  border:1px solid var(--gold-border); border-left:3px solid var(--gold);
  border-radius:4px; background:var(--gold-tint); color:var(--navy);
  font-size:12px; font-weight:600; line-height:1.6; overflow-wrap:anywhere;
}
.install-dialog-lead { color:var(--muted); font-size:13px; line-height:1.8; }
.install-dialog-note {
  margin-top:18px; padding-top:14px; border-top:1px solid var(--line);
  color:var(--muted); font-size:12px; line-height:1.8; overflow-wrap:anywhere;
}
.install-dialog-note a { color:var(--navy); text-decoration:underline; text-decoration-color:var(--gold); text-underline-offset:3px; }
.install-dialog-footer { display:flex; justify-content:flex-end; margin-top:18px; }
.install-dialog-footer .button { min-height:44px; padding:10px 24px; }

@media(max-width:1100px) {
  .download-card { padding:22px; }
  .download-grid { gap:16px; }
}
@media(max-width:860px) {
  .download-grid { grid-template-columns:1fr; }
  .download-card { display:grid; grid-template-columns:1fr auto; gap:0 24px; }
  .download-card .card-top { grid-row:1/4; grid-column:2; flex-direction:column; align-items:flex-end; }
  .download-card .download-meta { grid-column:1; margin-block:12px 16px; }
  .download-card .btn { grid-column:1/-1; }
  .download-card [data-role=hint],.download-card .filename,.download-card .install-help { grid-column:1/-1; }
  .download-banner { flex-direction:column; gap:6px; }
  .guide-grid { grid-template-columns:1fr; }
}
@media(max-width:700px) {
  .download-card { padding:20px; }
  .download-card h3 { font-size:16px; }
  .download-card [data-role=hint] { font-size:12px; }
  .download-card .filename { font-size:10px; }
  .install-guide { margin-top:28px; padding-top:24px; }
  .guide-card { padding:20px; }
  .install-dialog-body { padding:18px; }
  .install-guide-actions { width:100%; }
  .guide-trigger { flex:1 1 160px; }
  .install-dialog-footer .button { width:100%; }
}
