/* DOWNLOADS layout adapter. Brand tokens come from live site.css; fallback values
   keep pages readable during an outage. All selectors stay within this subsystem. */
.mh-downloads {
  color-scheme: light;
  --ink: var(--mh-ink, #08233e);
  --muted: var(--mh-muted, #52697d);
  --line: var(--mh-border-strong, #c2ced7);
  --paper: var(--mh-background, #edf5fa);
  --accent: var(--mh-blue, #076a9f);
  --danger: #9b2833;
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.7 var(--mh-sans, system-ui, sans-serif);
}
.mh-downloads *, .mh-downloads *::before, .mh-downloads *::after { box-sizing: border-box; }
.mh-downloads :where(header, main, footer) { max-width: var(--mh-shell, 1160px); margin: auto; padding: 28px 32px; }
.mh-downloads header { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.mh-downloads a { color: var(--accent); text-underline-offset: 4px; }
.mh-downloads a:hover { text-decoration-thickness: 2px; }
.mh-downloads .brand { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; text-decoration: none; color: var(--ink); }
.mh-downloads .brand img { display: block; width: 56px; height: 56px; object-fit: contain; }
.mh-downloads .brand-name { font: 700 23px/1.2 var(--mh-serif, Georgia, serif); }
.mh-downloads .brand small { display: block; font: 650 10px/2 var(--mh-sans, system-ui, sans-serif); letter-spacing: .19em; }
.mh-downloads nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.mh-downloads header nav a, .mh-downloads .home-toc a { display: inline-flex; align-items: center; min-height: 44px; }
.mh-downloads header nav a { font-size: 15px; }
.mh-downloads .eyebrow { margin: 28px 0 14px; color: var(--accent); font-size: 12px; font-weight: 720; letter-spacing: .14em; }
.mh-downloads h1 { font: 650 clamp(34px, 5.5vw, 64px)/1.1 var(--mh-serif, Georgia, serif); letter-spacing: -.035em; margin: 14px 0; }
.mh-downloads h2 { font: 650 clamp(23px, 3vw, 30px)/1.25 var(--mh-serif, Georgia, serif); margin: 0 0 18px; }
.mh-downloads h3 { font-size: 19px; line-height: 1.35; }
.mh-downloads .lead { font-size: 19px; color: var(--mh-text, #3d5d75); max-width: var(--mh-reading-width, 780px); }
.mh-downloads .panel { background: var(--mh-white, #fff); border: 1px solid var(--line); border-radius: var(--mh-radius-small, 15px); padding: 28px; margin: 24px 0; }
.mh-downloads .dev, .mh-downloads .notice { background: var(--mh-surface, #f7fbfd); border-left: 4px solid var(--accent); padding: 18px 22px; margin: 24px 0; }
.mh-downloads .dev p { margin: 6px 0; font-size: 14px; }
.mh-downloads .status { padding: 12px 0; min-height: 48px; font-weight: 600; }
.mh-downloads .status.error { color: var(--danger); }
.mh-downloads .selectors, .mh-downloads .grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mh-downloads label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.mh-downloads :where(input, select, textarea, button) { font: inherit; border-radius: 6px; }
.mh-downloads :where(input, select, textarea) { width: 100%; min-width: 0; padding: 11px; border: 1px solid var(--muted); background: var(--mh-white, #fff); color: var(--ink); }
.mh-downloads textarea { min-height: 100px; resize: vertical; }
.mh-downloads .wide { grid-column: 1 / -1; }
.mh-downloads .row, .mh-downloads .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mh-downloads .row input { flex: 1; min-width: 180px; }
.mh-downloads .actions { margin-top: 24px; }
.mh-downloads button, .mh-downloads .home-button { cursor: pointer; background: var(--accent); color: var(--mh-white, #fff); border: 1px solid var(--accent); padding: 12px 20px; font-weight: 650; min-height: 48px; }
.mh-downloads .home-button { display: inline-flex; align-items: center; gap: 24px; border-radius: 999px; text-decoration: none; }
.mh-downloads button.secondary { background: var(--mh-white, #fff); color: var(--accent); }
.mh-downloads button.danger { background: var(--danger); border-color: var(--danger); }
.mh-downloads button:disabled { opacity: .6; cursor: wait; }
.mh-downloads .grid-form > button { justify-self: start; align-self: end; }
.mh-downloads :focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.mh-downloads .skip { position: absolute; top: -100px; left: 16px; background: var(--mh-white, #fff); padding: 12px; z-index: 2; }
.mh-downloads .skip:focus { top: 8px; }
.mh-downloads .release, .mh-downloads .package { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.mh-downloads .badge { display: inline-block; background: var(--mh-surface, #f7fbfd); border: 1px solid var(--line); border-radius: 4px; padding: 2px 9px; font-size: 13px; margin: 0 8px 8px 0; }
.mh-downloads .metadata { display: flex; gap: 8px 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.mh-downloads .notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.mh-downloads .checksum { font: 12px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; }
.mh-downloads .muted, .mh-downloads footer { color: var(--muted); font-size: 14px; }
.mh-downloads pre { max-width: 100%; overflow: auto; background: var(--mh-surface, #f7fbfd); padding: 18px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; }
.mh-downloads code { overflow-wrap: anywhere; }
.mh-downloads footer { border-top: 1px solid var(--line); margin-top: 36px; }
.mh-downloads .copyright { padding-top: 12px; border-top: 1px solid var(--line); }
.mh-downloads .diagnostic-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.mh-downloads .diagnostic-topic dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; font-size: 14px; }
.mh-downloads .diagnostic-topic dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.mh-downloads .diagnostic-topic dt { overflow-wrap: anywhere; }
/* Information pages use the same typography and palette as the manuals. */
.mh-downloads .home-hero { padding: 24px 0 48px; }
.mh-downloads.home h1 { max-width: 900px; font-size: clamp(40px, 6.4vw, 78px); }
.mh-downloads.home h1 span { color: var(--accent); }
.mh-downloads.home .lead { margin: 28px 0; }
.mh-downloads .home-state { margin: 40px 0 0; background: var(--mh-surface, #f7fbfd); border-left: 4px solid var(--accent); border-radius: 0 var(--mh-radius-small, 15px) var(--mh-radius-small, 15px) 0; padding: 24px; max-width: 850px; }
.mh-downloads .home-state .eyebrow, .mh-downloads .home-note .eyebrow { margin-top: 0; }
.mh-downloads .home-state h2 { font-size: 24px; }
.mh-downloads .home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mh-downloads .home-grid .panel { margin: 8px 0 24px; padding: 24px; display: flex; flex-direction: column; }
.mh-downloads .home-grid .panel a { margin-top: auto; }
.mh-downloads .home-number { color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 26px; }
.mh-downloads .home-note { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 36px 0; border-top: 1px solid var(--line); margin-top: 28px; }
.mh-downloads .home-toc { margin: 28px 0; padding: 20px 0; border-block: 1px solid var(--line); }
.mh-downloads.home .panel:target { scroll-margin-top: 20px; }
.mh-downloads.home dd { margin: 6px 0 20px; }
.mh-downloads.home .panel a { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .mh-downloads :where(header, main, footer) { padding: 20px; }
  .mh-downloads header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .mh-downloads nav { gap: 8px 20px; }
  .mh-downloads .panel { padding: 20px; }
  .mh-downloads .home-grid, .mh-downloads .home-note { grid-template-columns: 1fr; }
  .mh-downloads .home-note { gap: 12px; }
  .mh-downloads .home-grid .panel { margin-bottom: 0; }
  .mh-downloads .home-number { margin-bottom: 10px; }
  .mh-downloads .home-hero { padding-top: 8px; }
}
@media (max-width: 600px) {
  .mh-downloads .selectors, .mh-downloads .grid-form { grid-template-columns: 1fr; }
  .mh-downloads .wide { grid-column: auto; }
  .mh-downloads .row { align-items: stretch; }
  .mh-downloads .actions > button { flex: 1 1 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .mh-downloads *, .mh-downloads *::before, .mh-downloads *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .mh-downloads { background: white; color: black; font-size: 11pt; }
  .mh-downloads :where(header, main, footer) { max-width: none; padding: 12px 0; }
  .mh-downloads nav, .mh-downloads .actions, .mh-downloads .skip { display: none; }
  .mh-downloads .panel, .mh-downloads .home-state { background: white; color: black; break-inside: avoid; }
  .mh-downloads .home-grid, .mh-downloads .home-note { display: block; }
  .mh-downloads h1 { font-size: 30pt; }
  .mh-downloads pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .mh-downloads a { color: black; }
}
