/* The website and the web installer: the parts they share (base, global nav,
   buttons, footer). Tokens come from tokens.css, copied from the app. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--surface-base); color: var(--text-primary);
  font: var(--weight-regular) var(--size-body)/var(--line-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: var(--weight-semibold); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--green-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
select { font: inherit; color: inherit; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: var(--focus-width) solid var(--focus-color); outline-offset: var(--focus-offset); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 30; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--green-fill); color: var(--text-on-accent); font-weight: var(--weight-semibold); }
.skip:focus { top: 8px; text-decoration: none; }

.wrap { width: 100%; max-width: calc(var(--content-max) + 2 * var(--page-margin)); margin-inline: auto; padding-inline: var(--page-margin); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--target-min); padding: 0 28px; border: 0; border-radius: var(--radius-pill);
  font-size: 17px; font-weight: var(--weight-semibold); line-height: 1.2; text-align: center; text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease), opacity var(--duration-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green-fill); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--green-fill-hover); }
.btn-primary:active { background: var(--green-fill-pressed); }
.btn-secondary { background: var(--fill-control); color: var(--green-text); }
.btn-secondary:hover { background: var(--skeleton-strong); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 19px; }
.btn .i { width: 17px; height: 17px; }
.link { display: inline-flex; align-items: center; gap: 4px; min-height: var(--target-min); font-size: 17px; }
.link .i { width: 11px; height: 11px; stroke-width: 2.6; }

/* Global nav */
.gnav { position: sticky; top: 0; z-index: 20; background: var(--bar-nav); border-bottom: 1px solid var(--separator); }
.gnav-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 120px; min-height: var(--target-min); color: var(--text-primary); }
.brand:hover { text-decoration: none; }
.mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-icon); background: var(--green-fill); color: var(--text-on-accent); }
.mark .i { width: 14px; height: 14px; }
.brand-name { font-size: 17px; font-weight: var(--weight-semibold); letter-spacing: -0.3px; }
.gnav-links { display: flex; flex-shrink: 0; align-items: center; gap: 36px; }
.gnav-links a { display: inline-flex; white-space: nowrap; align-items: center; min-height: var(--target-min); color: var(--text-primary); opacity: 0.8; font-size: 13px; }
.gnav-links a:hover { opacity: 1; text-decoration: none; }
.gnav-end { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 120px; }
.langsel { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: var(--target-min); padding-inline: 4px; font-size: 13px; }
.langsel .i { width: 14px; height: 14px; }
.langsel select { appearance: none; -webkit-appearance: none; padding: 0; border: 0; background: none; font-size: 13px; cursor: pointer; }
.langsel:has(select:focus-visible) { outline: var(--focus-width) solid var(--focus-color); outline-offset: var(--focus-offset); border-radius: 8px; }
.langsel select:focus-visible { outline: none; }
.langsel select option { color: initial; }
.menu-btn { display: none; place-items: center; width: var(--target-min); height: var(--target-min); padding: 0; border: 0; background: none; }
.menu-btn .i { width: 20px; height: 20px; }

@media (max-width: 1023px) { .gnav-links { gap: 22px; } }
@media (max-width: 699px) {
  .gnav-row { height: 48px; }
  .brand { min-width: 0; }
  .gnav-dl { display: none; }
  .menu-btn { display: grid; }
  .gnav-end { min-width: 0; gap: 0; }
  .gnav-links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--page-margin) 16px; background: var(--bar-nav); border-bottom: 1px solid var(--separator);
  }
  .gnav-links:not(.open) { display: none; }
  .gnav-links a { opacity: 1; font-size: 17px; border-bottom: 1px solid var(--separator-list); }
  .gnav-links a:last-child { border-bottom: 0; }
}

/* Footer */
.foot { background: var(--surface-alt); padding: 24px 0 28px; color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.foot .wrap { display: flex; flex-direction: column; gap: 12px; }
.foot-text { max-width: 860px; }
.foot a { color: var(--text-secondary); text-decoration: underline; }
.foot a:hover { color: var(--text-primary); }
.foot hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--separator); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; }
.foot-release { display: flex; align-items: center; min-height: var(--target-min); }
.foot-release a { display: inline-flex; align-items: center; min-height: var(--target-min); }
.foot-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.foot-langs { display: flex; flex-wrap: wrap; }
.foot-langs button, .foot-langs a { display: inline-flex; align-items: center; min-height: var(--target-min); padding: 0 8px; border: 0; background: none; color: var(--text-secondary); font-size: 12px; text-decoration: none; }
.foot-langs button:hover, .foot-langs a:hover { color: var(--text-primary); }
.foot-langs button[aria-pressed="true"], .foot-langs a[aria-current] { color: var(--text-primary); font-weight: var(--weight-semibold); }
.foot-theme { display: inline-flex; align-items: center; gap: 6px; min-height: var(--target-min); }
.foot-theme select { min-height: 32px; padding: 0 6px; border: 1px solid var(--separator); border-radius: 8px; background: var(--surface-alt); font-size: 12px; color: var(--text-primary); }
.foot-112 { display: inline-flex; align-items: center; min-height: 24px; font-weight: var(--weight-semibold); }

@media (max-width: 599px) {
  .foot { padding: 20px 0 28px; line-height: 17px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
