/* Download centre, design system v2 (board 11): a lifted-black page (support-theme), a category index beside the lists, and
   document lines laid out as fields. The accent colour is only a hairline on the current category. */
.download-body { min-height: 100dvh; }
.download-main { position: relative; z-index: 2; width: min(var(--section-w), calc(100% - var(--section-x) * 2)); margin: auto; padding: var(--page-top) 0 20px; }
.download-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 500px); align-items: end; column-gap: 64px; }
.download-hero [data-brand-font="ui"] .rm-mark { font-family: inherit; font-weight: inherit; letter-spacing: inherit; }
.download-hero h1 { margin: 0; font-size: clamp(52px, 6.1vw, 88px); line-height: 1.05; font-weight: 500; letter-spacing: -.04em; text-wrap: balance; }
.download-lead { max-width: 500px; margin: 0 0 8px; color: var(--text-2); font-size: var(--body-size); line-height: 1.9; }

/* Category index (left) and lists (right) */
.download-layout { display: grid; grid-template-columns: 176px minmax(0, 1fr); column-gap: 64px; align-items: start; margin-top: 72px; }
.download-overview { position: sticky; top: 112px; display: grid; border-left: 1px solid var(--line-2); }
.download-overview-item { position: relative; display: block; padding: 11px 0 11px 20px; color: var(--text-3); font-size: var(--fs-small); line-height: 1.5; transition: color var(--dur-hover) var(--ease-settle); }
.download-overview-item strong { font-weight: 500; }
.download-overview-item::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 1px; background: var(--sapphire-300); opacity: 0; transition: opacity var(--dur-hover) var(--ease-settle); }
.download-overview-item:hover { color: var(--text-1); }
.download-overview-item.is-current { color: var(--text-1); }
.download-overview-item.is-current::before { opacity: 1; }
.download-overview-item:focus-visible { outline-offset: 2px; }
.download-sections { min-width: 0; }
.download-section { scroll-margin-top: 112px; }
.download-section + .download-section { margin-top: var(--section-space); }
.download-section-head { margin-bottom: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 440px); align-items: end; gap: 40px; }
.download-section-head h2 { margin: 0; font-size: var(--page-section-title); line-height: 1.3; letter-spacing: -.03em; font-weight: 500; }
.download-section-head p { margin: 0; color: var(--text-2); font-size: var(--fs-small); line-height: 1.85; }

/* Rows */
.download-list { border-top: 1px solid var(--line-2); }
.download-row { position: relative; isolation: isolate; padding: 24px 0; display: flex; align-items: center; gap: 20px; }
.download-row + .download-row, .download-row + .download-release-row, .download-release-row + .download-row { border-top: 1px solid var(--line-1); }
.download-list > :last-child { border-bottom: 1px solid var(--line-2); }
.download-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--panel); opacity: 0; transition: opacity var(--dur-hover) var(--ease-settle); }
@media (hover: hover) { .download-row:hover::before { opacity: 1; } }
.download-filetype { display: grid; flex: none; width: 48px; height: 60px; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-control); color: var(--text-3); background: var(--panel); font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: .06em; }
.download-copy { flex: 1 1 auto; min-width: 0; }
.download-copy h3 { margin: 0; color: var(--text-1); font-size: var(--fs-lead); line-height: 1.5; font-weight: 500; }
.download-copy p { max-width: 640px; margin: 4px 0 0; color: var(--text-3); font-size: var(--fs-caption); line-height: 1.7; }
.download-fields { display: grid; flex: none; grid-template-columns: 84px 76px 80px 92px; column-gap: 14px; align-items: center; color: var(--text-2); font-family: var(--font-mono); font-size: var(--fs-note); line-height: 1.45; }
.download-field { grid-row: 1; min-width: 0; }
.download-field.is-language { grid-column: 1; }
.download-field.is-pages { grid-column: 2; }
.download-field.is-size { grid-column: 3; }
.download-field.is-date { grid-column: 4; color: var(--text-3); }
.download-field.is-format, .download-field.is-other { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.download-action, .download-release-link { min-height: 44px; min-width: 112px; border-radius: var(--radius-button); padding: 12px 22px; display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 10px; font-size: var(--fs-note); line-height: 1.6; font-weight: 500; white-space: nowrap; }
.download-action { color: var(--n-2); background: var(--accent); transition: background var(--dur-hover) var(--ease-settle), transform var(--dur-hover) var(--motion); }
.download-action:hover { background: #fff; transform: translateY(-1px); }
.download-action:active { transform: scale(.98); transition-duration: var(--dur-press); }
.download-release-link { color: var(--text-1); background: var(--panel); border: 1px solid var(--line-2); }
.download-release-link:hover { color: var(--text-1); background: var(--panel-strong); }

/* Release entries (firmware and software) */
.download-release-row { padding: 28px 32px; margin: 16px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; border: 1px solid var(--line-1); border-radius: var(--radius-panel); background: var(--panel); }
.download-release-row + .download-row { border-top: 0; }
.download-release-row h3 { margin: 0; font-size: var(--fs-h4); font-weight: 500; line-height: 1.4; }
.download-release-row p { max-width: 650px; margin: 8px 0 0; color: var(--text-2); font-size: var(--fs-small); line-height: 1.85; }
.download-note { margin: 32px 0 0; border-left: 2px solid var(--line-3); padding: 6px 0 6px 24px; display: grid; grid-template-columns: auto 1fr; gap: 20px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.85; }
.download-note strong { color: var(--text-1); font-size: var(--fs-label); font-weight: 500; letter-spacing: .08em; }

@media (max-width: 1100px) {
  .download-layout { grid-template-columns: 1fr; row-gap: 40px; margin-top: 56px; }
  .download-overview { position: static; display: flex; flex-wrap: wrap; gap: 8px; border-left: 0; }
  .download-overview-item { padding: 10px 18px; border: 1px solid var(--line-2); border-radius: var(--radius-button); }
  .download-overview-item::before { display: none; }
  .download-overview-item.is-current { border-color: var(--sapphire-300); }
}
/* The title stacks above the lead from 1100px: between 820 and 1100px its column was only 236-346px wide, too narrow for the longest word of the title
   ("téléchargement", "ダウンロード"), which was cut in two. */
@media (max-width: 1100px) {
  .download-hero { grid-template-columns: 1fr; row-gap: 24px; }
  .download-lead { margin: 0; }
}
/* Rows put the fields and the button under the title from 960px: with the field columns beside it, the title column fell to 175-220px (katakana words cut in two) */
@media (max-width: 960px) {
  .download-row { flex-wrap: wrap; align-items: flex-start; column-gap: 16px; row-gap: 14px; }
  .download-copy { flex: 1 1 calc(100% - 64px); }
  .download-fields { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-left: 64px; width: calc(100% - 64px); }
  .download-field.is-date { color: var(--text-3); }
  .download-action { margin-left: 64px; }
}
/* French title: "téléchargement" needs about 6.9em; keep it whole between 1101 and 1280px, and on phones scale every title to the width */
@media (min-width: 1101px) and (max-width: 1280px) {
  html:lang(fr) .download-hero h1 { font-size: clamp(52px, 5.4vw, 88px); }
}
@media (max-width: 480px) {
  .download-hero h1 { font-size: min(52px, 12vw); }
}
@media (max-width: 820px) {
  .download-main { padding-bottom: 16px; }
  .download-section-head { grid-template-columns: 1fr; gap: 20px; }
  .download-release-row { padding: 24px; grid-template-columns: 1fr; gap: 24px; }
  .download-release-link { justify-self: start; }
  .download-note { grid-template-columns: 1fr; gap: 10px; padding-left: 20px; }
}
@media (max-width: 520px) {
  html:lang(ja) .download-hero h1 { white-space: pre-line; }
  .download-copy h3 { font-size: 17px; }
  .download-filetype { width: 40px; height: 48px; font-size: 9px; }
  .download-copy { flex-basis: calc(100% - 56px); }
  .download-fields, .download-action { margin-left: 56px; }
  .download-fields { width: calc(100% - 56px); }
  .download-release-row { padding: 24px 20px; }
  .download-overview-item { padding: 9px 16px; }
}
@media (prefers-reduced-motion: reduce) { .download-row::before, .download-overview-item, .download-overview-item::before, .download-action { transition: none; } .download-action:hover { transform: none; } }

/* Category line (support-motion.js): one sapphire line slides between the links in the wide layout; the narrow layout (pills in a row) keeps the marker on each pill */
.download-overview-line { position: absolute; left: -1px; top: 0; width: 1px; height: 0; background: var(--sapphire-300); opacity: 0; pointer-events: none; transition: transform var(--dur-panel) var(--ease-settle), height var(--dur-panel) var(--ease-settle), opacity var(--dur-hover) var(--ease-settle); }
@media (min-width: 1101px) { .download-overview.is-glide .download-overview-item::before { display: none; } }
@media (max-width: 1100px) { .download-overview-line { display: none; } }
/* The arrow on a download button drops into the tray when it is pressed; the label does not change */
@keyframes download-drop { 0% { transform: none; opacity: 1; } 42% { transform: translateY(9px); opacity: 0; } 43% { transform: translateY(-9px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.download-action.is-sent > span:last-child svg { animation: download-drop 760ms var(--ease-settle); }

/* Dealer downloads: uses the shared case-dialog material. */
.dealer-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.dealer-access { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--text-3); font-size: var(--fs-caption); }
.dealer-access svg { width: 16px; height: 16px; }
.dealer-lead { margin: 0 0 28px; color: var(--text-2); font-size: var(--fs-small); line-height: 1.85; }
[data-dealer-download][aria-busy="true"] { cursor: progress; opacity: .65; }
.dealer-dialog { margin: auto; }
.dealer-dialog::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg, transparent, var(--text-1), transparent); opacity: .6; pointer-events: none; }
.dealer-dialog-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 24px; border: 1px solid var(--line-2); border-radius: var(--radius-panel); color: var(--text-2); }
.dealer-dialog-icon svg { width: 24px; height: 24px; }
.dealer-file { padding: 16px; border: 1px solid var(--line-2); border-radius: var(--radius-panel); display: grid; gap: 8px; }
.dealer-file > span { font-size: var(--fs-note); color: var(--text-3); }
.dealer-file strong { font-size: var(--fs-small); font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; }
.dealer-dialog .dealer-actions { justify-content: flex-end; margin-top: 28px; }
.dealer-dialog .dealer-actions [hidden] { display: none; }
@media (max-width: 700px) { .dealer-dialog { margin: auto 16px 16px; } .dealer-head { align-items: flex-start; flex-direction: column; gap: 12px; } }
@media (max-width: 360px) { .dealer-actions > * { width: 100%; } .dealer-actions .primary { order: -1; } }
