/* Allow scrolling for the firmware updates page (overrides global site rule) */
html, body { height: auto !important; overflow: auto !important; }

/* Make the page use normal document flow (site's main stylesheet makes body a flex column).
  For this standalone page we restore block flow so content can grow and scroll naturally. */
body { display: block !important; }

/* Firmware updates page styles (moved from updates.html) */
.fw-wrap{padding:2rem 1rem;}
.fw-card{max-width:720px;margin:0 auto;background:#fff;border:1px solid #e6e6e6;border-radius:8px;padding:24px;box-shadow:0 6px 18px rgba(0,0,0,0.06);}

/* Use the site's Rajdhani heading font for the page title */
.fw-card h1{font-family:'Rajdhani', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-weight:700; margin:0 0 8px 0}
.fw-list{margin:16px 0;padding:0;list-style:none}
.fw-item{display:flex;align-items:center;justify-content:space-between;padding:12px;border:1px solid #f0f0f0;border-radius:8px;background:#fafafa;margin-bottom:10px}
.fw-item:first-child{margin-top:0}
.fw-fname{font-family:monospace;color:#888;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn-download{background:#0b5fff;color:#fff;border:0;padding:8px 12px;border-radius:6px;text-decoration:none}
.muted{color:#666;font-size:0.95rem}
@media (prefers-color-scheme:dark){
  .fw-card{background:#111;color:#ddd;border-color:#222;box-shadow:none}
  .fw-item{border-color:#222;background:#0b0b0b}
  .fw-fname{color:#dbdbdb}
  .btn-download{background:#0a84ff}
  .muted{color:#999}
}

/* Latest release styling */
.fw-section-heading{margin:18px 0 8px 0;font-size:1rem;font-weight:700}
.fw-latest{background:linear-gradient(90deg,#f7fbff,#ffffff);border:1px solid #e1eefc;padding:16px}
.fw-latest .fw-fname{font-weight:700;color:#333}
@media (prefers-color-scheme:dark){
  .fw-latest{background:linear-gradient(90deg,#0f1724,#0b0b0b);border-color:#1e2b3a}
  .fw-latest .fw-fname{color:#fff}
}

/* Patch notes styling */
.fw-notes{margin:8px 0 0 0;color:#555;font-size:0.95rem;white-space:pre-wrap}
@media (prefers-color-scheme:dark){
  .fw-notes{color:#bbb}
}

/* Patch Notes link */
.patch-link{display:inline-block;margin:0 10px 0 12px;color:#0b5fff;text-decoration:none;font-weight:700}
.patch-link:hover{text-decoration:underline}

/* Modal styles */
.fw-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:9999}
.fw-modal[hidden]{display:none}
.fw-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,0.5)}
.fw-modal-content{position:relative;max-width:720px;width:90%;max-height:80vh;overflow:auto;background:#fff;border-radius:8px;padding:20px;box-shadow:0 10px 40px rgba(0,0,0,0.6);z-index:2}
.fw-modal-close{position:absolute;right:10px;top:8px;border:0;background:transparent;font-size:1.25rem;cursor:pointer}
.fw-modal-body{color:#222}
@media (prefers-color-scheme:dark){
  .fw-modal-content{background:#0b0b0b;color:#ddd;border:1px solid #222}
  .fw-modal-body{color:#ddd}
}

/* Modal separators */
.fw-modal-body hr{border:0;border-top:1px solid #e6e6e6;margin:12px 0}
@media (prefers-color-scheme:dark){
  .fw-modal-body hr{border-top:1px solid #2b2b2b}
}

/* Prefer dark palette for firmware card and related elements.
   Avoid using !important so browsers parse reliably (some mobile
   browsers behave differently when many !important rules are present). */
.fw-card{
  background: #111;
  color: #ddd;
  border-color: #222;
  box-shadow: none;
}
.fw-card h1, .fw-card p, .fw-card .muted{ color: #ddd; }
.fw-item{
  background: #0b0b0b;
  border-color: #222;
  color: #ddd;
}
.fw-fname{ color: #dbdbdb; }
.btn-download{ background: #0a84ff; color: #fff; }
.fw-latest{ background: linear-gradient(90deg,#0f1724,#0b0b0b); border-color:#1e2b3a; }
.fw-notes, .fw-modal-body{ color: #ddd; }
.fw-modal-content{ background: #0b0b0b; color: #ddd; border-color:#222; }
