.downloads { background: var(--bg); }
.downloads [hidden] { display: none; }
.download-width { width: min(940px, calc(100% - 44px)); margin: 0 auto; }
.download-header { border-bottom: 1px solid var(--line); }
.download-header > div { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.download-header img { display: block; width: 120px; height: auto; }
.workspace-link { font-weight: 600; text-decoration: none; }
.workspace-link:hover { text-decoration: underline; }
.downloads main { padding: clamp(30px, 7vw, 82px) 0 55px; }
.downloads h1 { font-size: clamp(38px, 6.5vw, 68px); }
.download-intro { max-width: 590px; margin-top: 14px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.device-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin: 32px 0 16px; }
.device-list a { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 650; }
.device-list a:hover { background: var(--panel); }
.device-list a[aria-current="true"] { background: #302644; border-color: #8d74b9; color: #e4d9ff; }
.device-symbol { width: 16px; height: 22px; border: 1.6px solid currentColor; border-radius: 4px; position: relative; }
.device-symbol::after { content: ''; position: absolute; width: 4px; left: 50%; bottom: 2px; height: 1px; background: currentColor; transform: translateX(-50%); }
.device-symbol.iphone::after { top: 2px; }
.device-symbol.monitor { width: 24px; height: 16px; margin-bottom: 3px; border-radius: 3px; }
.device-symbol.monitor::after { bottom: -5px; width: 11px; height: 2px; }
.device-symbol.tablet { width: 23px; height: 18px; }
.device-panel { display: grid; grid-template-columns: .95fr 1.25fr; border: 1px solid var(--border); border-radius: 15px; background: var(--panel); overflow: hidden; margin-bottom: 16px; scroll-margin-top: 12px; }
.device-summary, .device-steps { padding: clamp(22px, 3.5vw, 38px); }
.device-summary { border-right: 1px solid var(--border); }
.device-summary h2 { font-size: 29px; }
.device-summary p, .device-steps li, .device-steps p { line-height: 1.6; color: var(--muted); }
.device-summary p { margin-top: 12px; }
.device-summary small { display: block; margin-top: 14px; color: var(--subtle); }
.booth-downloads { display: grid; justify-items: start; gap: 8px; margin-top: 20px; }
.booth-downloads .button { justify-content: space-between; width: min(100%, 220px); }
.portable-download { display: inline-block; margin-top: 18px; }
.device-summary .portable-note { margin-top: 4px; }
.download-action { min-height: 44px; gap: 13px; margin-top: 20px; text-decoration: none; }
.download-action span { font-size: 17px; }
.device-steps { background: var(--rail); }
.device-steps h3 { font-size: 17px; }
.device-steps ol { margin: 12px 0 0; padding-left: 1.4em; }
.device-steps li { padding-left: 3px; margin-top: 9px; }
.device-steps li::marker { color: var(--accent); font-weight: 650; }
.device-steps strong { color: var(--text); }
.device-steps pre { margin: 8px 0 0; padding: 10px 13px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.device-steps p { margin-top: 13px; font-size: 13px; }
.device-steps details { margin-top: 13px; }
.device-steps summary { cursor: pointer; font-size: 13px; }
.device-steps code { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .download-width { width: calc(100% - 32px); }
  .download-intro { font-size: 16px; }
  .device-list { grid-template-columns: 1fr 1fr; margin-top: 22px; }
  .device-list a { padding: 8px 11px; }
  .device-panel { grid-template-columns: 1fr; }
  .device-summary { border-right: 0; border-bottom: 1px solid var(--border); }
}
