/* Site chrome — header + footer (ALL pages).
 *
 * Horizontal SOT = same as home body: --o2-edge / --o2-edge-end.
 * Do NOT add a second shell (980+gutter) — that drifts chrome vs home sections.
 *
 * Footer: brand, three navigation groups and credits.
 *
 * WORD-COLLAPSE LOCK (site-wide chrome rule):
 * Never put `min-width: 0` on text-only nav clusters inside `1fr` grid tracks.
 * That lets the track shrink to the longest *word*, so phrases wrap one word per line
 * (“How it works” → How / it / works). Prefer nowrap link labels + minmax(min-content, 1fr).
 */

/* —— Shared horizontal lock (matches home chapters) —— */
.local-nav-inner,
.page-main,
.page-main--wide,
.footer-head,
.footer-nav,
.footer-bar {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: var(--o2-edge);
  padding-right: var(--o2-edge-end);
}

.local-nav-inner {
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Header menu links must stay on one line per label */
.local-links a {
  white-space: nowrap;
}

.download-chooser {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90vh, 720px);
  padding: 0;
  overflow: auto;
  color: #171717;
  background: transparent;
  border: 0;
  border-radius: 26px;
}

.download-chooser::backdrop {
  background: rgba(17, 18, 20, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.download-chooser-panel {
  position: relative;
  padding: 36px;
  background: rgba(250, 250, 252, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: inherit;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
}

.download-chooser-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #555;
  background: #ececef;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.download-chooser-close:hover { background: #e2e2e6; }
.download-chooser-close:focus-visible,
.download-chooser button:focus-visible,
.download-chooser a:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.5);
  outline-offset: 3px;
}
.download-chooser-close svg { width: 17px; height: 17px; }
.download-chooser-close path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.download-chooser-eyebrow {
  margin: 0 0 8px;
  color: #6a6a70;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.download-chooser h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.download-chooser-intro {
  margin: 10px 0 26px;
  color: #68686e;
  font-size: 15px;
  line-height: 1.45;
}

.download-chooser-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.download-option {
  display: flex;
  min-width: 0;
  min-height: 202px;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(25, 25, 28, 0.1);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(20, 20, 25, 0.035);
}

.download-option-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.download-option-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  color: #222;
  background: #f0f0f2;
  border-radius: 14px;
}

.download-option-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.download-option-icon.is-windows svg { fill: currentColor; stroke: none; }
.download-option h3 { margin: 0 0 3px; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.download-option-heading p { margin: 0; color: #707077; font-size: 13px; line-height: 1.35; }

.download-option-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  color: #171717;
  background: #fff;
  border: 1px solid rgba(20, 20, 25, 0.2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.download-option-action:hover { background: #f4f4f6; border-color: rgba(20, 20, 25, 0.34); transform: translateY(-1px); }
.download-option-action.is-primary { color: #fff; background: #000; border-color: #000; }
.download-option-action.is-primary:hover { background: #252525; }
.download-option-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download-option-status { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: #6e6e73; }
.download-option-status[hidden] { display: none; }
.download-option-action[data-mac-download]:not([data-state="live"]) svg { display: none; }

@media (max-width: 560px) {
  .download-chooser { width: calc(100vw - 24px); border-radius: 22px; }
  .download-chooser-panel { padding: 30px 20px 22px; }
  .download-chooser-close { top: 13px; right: 13px; }
  .download-chooser-intro { margin-bottom: 20px; }
  .download-chooser-options { grid-template-columns: 1fr; gap: 10px; }
  .download-option { min-height: 0; gap: 18px; padding: 16px; }
}

.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--o2-line);
  background: var(--o2-paper);
  color: var(--o2-gray);
  font-size: 14px;
  line-height: 1.45;
}

.footer-head {
  margin: 0 0 24px;
}

.footer-brand {
  margin: 0;
  color: var(--o2-ink);
  font-size: 16px;
  font-weight: 600;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(min-content, 1fr));
  gap: 24px clamp(20px, 4vw, 56px);
  margin: 0 0 28px;
  align-items: start;
}

.footer-col-title {
  margin: 0 0 8px;
  color: var(--o2-ink);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.footer-bar a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

.footer-links a {
  display: inline-block;
  white-space: nowrap;
}

.footer-links a:is(:hover, :focus-visible),
.footer-bar a:is(:hover, :focus-visible) {
  color: var(--o2-ink);
  text-decoration: underline;
}

.footer-bar {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--o2-line);
}

.footer-bar p {
  margin: 0;
}

.footer-bar a {
  text-decoration: underline;
}

/* Current page pill (header) */
.local-links a.is-current {
  color: var(--o2-ink);
  background: rgba(0, 0, 0, 0.06);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-weight: 600;
}

html.is-on-dark .local-links a.is-current {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.footer-links a.is-current {
  color: var(--o2-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— Tablet / phone —— */
@media (max-width: 733px) {
  .local-links {
    left: max(12px, var(--o2-edge));
    right: max(12px, var(--o2-edge-end));
  }

  .footer { padding: 36px 0 28px; }
}

@media (max-width: 680px) {
  .footer-nav { grid-template-columns: 1fr; gap: 18px; }
  .footer-links { gap: 8px 14px; }
}

/* Offer announcement continues the site's neutral chrome. */
.site-offer-banner { position: relative; z-index: 10; padding: 16px var(--o2-edge-end) 16px var(--o2-edge); margin-top: var(--local-nav-height, 52px); color: var(--text, #1d1d1f); background: var(--surface, #ececef); border-bottom: 1px solid rgba(0,0,0,.12); font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.site-offer-banner a { color: inherit; text-decoration: underline; }
