*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-md);
  line-height: 1.55;
}
main {
  flex: 1;
}
img,
svg {
  max-width: 100%;
}
a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-1);
}
@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}
h1 {
  font-size: var(--t-2xl);
  letter-spacing: -0.01em;
}
h2 {
  font-size: var(--t-xl);
}
h3 {
  font-size: var(--t-lg);
}
p {
  margin: 0;
  max-width: var(--measure);
}
code,
pre,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.mono {
  overflow-wrap: anywhere;
}
.steps li {
  overflow-wrap: anywhere;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: var(--t-sm);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: var(--s-2);
  top: -4rem;
  background: var(--action);
  color: var(--on-action);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-1);
  z-index: 20;
}
.skip:focus {
  top: var(--s-2);
}

/* Layout ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.page {
  padding-block: var(--s-8) var(--s-12);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.stack-sm {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
}
.section {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  scroll-margin-top: 8rem;
}
.lede {
  color: var(--ink-2);
  font-size: var(--t-lg);
}

/* Top bar ----------------------------------------------------------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-6);
  padding-block: var(--s-2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 700;
  font-size: var(--t-lg);
  text-decoration: none;
  min-height: 2.75rem;
}
.brand svg {
  width: 1.6rem;
  height: 1.6rem;
}
.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--s-1);
  overflow-x: auto;
  order: 3;
  width: 100%;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--s-3);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.nav a:hover {
  border-bottom-color: var(--line-strong);
}
.nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
  font-weight: 700;
}
.bar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-2);
  margin-left: auto;
  min-width: 0;
}
.bar-tools form {
  margin: 0;
}
@media (min-width: 40rem) {
  .nav {
    order: 0;
    width: auto;
  }
}

/* Buttons and forms -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 2.75rem;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--action);
  border-radius: var(--r-1);
  background: var(--action);
  color: var(--on-action);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  filter: brightness(1.15);
}
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
  font-weight: 400;
}
.btn-quiet:hover {
  background: var(--surface-2);
  filter: none;
}
.btn-danger {
  background: transparent;
  color: var(--stop);
  border-color: var(--stop);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.field label,
.legend {
  font-weight: 700;
}
.hint {
  color: var(--ink-2);
  font-size: var(--t-sm);
}
input[type="text"],
input[type="search"],
input[type="password"],
input[type="file"],
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  padding: var(--s-2) var(--s-3);
  min-height: 2.75rem;
  width: 100%;
}
input[type="file"] {
  padding: var(--s-2);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-4);
  margin: 0;
  min-width: 0;
}
legend {
  padding-inline: var(--s-2);
  font-weight: 700;
}
.check {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  min-height: 2.75rem;
  padding-block: var(--s-1);
}
.check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  accent-color: var(--action);
  flex: none;
}
.form {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  max-width: 34rem;
}

/* Notes and status --------------------------------------------------- */
.note {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: var(--r-1);
  background: var(--surface);
  max-width: var(--measure);
}
.note > :first-child {
  flex: none;
  margin-top: 0.25rem;
}
.note--warn {
  border-left-color: var(--caution);
}
.note--error {
  border-left-color: var(--stop);
}
.note--ok {
  border-left-color: var(--go);
}
.note p + p {
  margin-top: var(--s-2);
}
.status {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--s-2);
}
.status .lamp {
  flex: none;
  margin-top: 0.3em;
}
.lamp {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
  stroke: currentColor;
}
.lamp-ring,
.lamp-dashed {
  fill: none;
  stroke-width: 2;
}
.lamp-dashed {
  stroke-dasharray: 3 3;
}
.tone-go {
  color: var(--go);
}
.tone-caution {
  color: var(--caution);
}
.tone-info {
  color: var(--info);
}
.tone-stop {
  color: var(--stop);
}
.tone-quiet {
  color: var(--ink-2);
}
.status .status-text {
  color: var(--ink);
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem var(--s-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  font-size: var(--t-xs);
  white-space: nowrap;
}
.chip--strong {
  border-color: var(--ink);
}

/* Catalog ------------------------------------------------------------ */
.filters {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
  align-items: end;
}
.filters .field {
  min-width: 0;
}
@media (min-width: 40rem) {
  .filters {
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) auto;
  }
}
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-1) var(--s-4);
  padding-block: var(--s-4);
  border-top: 1px solid var(--line);
}
.row-title {
  font-size: var(--t-lg);
  font-weight: 700;
}
.row-title a {
  text-decoration: none;
}
.row-title a:hover {
  text-decoration: underline;
}
.row-main {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}
.row-ver {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}
.row-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
}
.ver {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--t-xl);
  line-height: 1.1;
}
.ver-xl {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--t-ver);
  letter-spacing: -0.01em;
  line-height: 1;
}
@media (min-width: 64rem) {
  .row {
    grid-template-columns: minmax(0, 2fr) 9rem minmax(0, 1.2fr);
    align-items: center;
  }
  .row-ver {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }
  .row-meta {
    grid-column: 3;
    grid-row: 1;
  }
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}

/* Package page ------------------------------------------------------- */
.pkg-head {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .pkg-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .pkg-head .ver-block {
    text-align: right;
    max-width: 22rem;
    align-items: flex-end;
  }
}
.crumbs {
  font-size: var(--t-sm);
}
.subnav {
  display: flex;
  gap: var(--s-1);
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 3.5rem;
  background: var(--bg);
  z-index: 5;
}
.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--s-3);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.subnav a:hover {
  border-bottom-color: var(--line-strong);
}
.layout-2 {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 64rem) {
  .layout-2 {
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: start;
  }
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-4);
}

/* Release track: a real ordered list drawn as rail and stations ------- */
.track {
  list-style: none;
  margin: 0;
  padding: var(--s-4) var(--s-2);
  display: flex;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.station {
  position: relative;
  flex: 0 0 6.5rem;
  text-align: center;
}
.station::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-strong);
}
.station:first-child::before {
  left: 50%;
}
.station:last-child::before {
  right: 50%;
}
.station a {
  position: relative;
  display: block;
  padding-block: var(--s-1);
  text-decoration: none;
  min-height: 2.75rem;
}
.station a:hover .v {
  text-decoration: underline;
}
.node {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  margin: 0.2rem auto var(--s-1);
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--surface);
  position: relative;
  z-index: 1;
}
.station.is-viewed .node {
  border-width: 5px;
}
.station.is-current .node {
  background: var(--go);
  border-color: var(--go);
  outline: 2px solid var(--go);
  outline-offset: 3px;
}
.station .v {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
}
.station.is-viewed .v {
  font-weight: 700;
}
.station .sub {
  display: block;
  font-size: var(--t-xs);
  color: var(--ink-2);
}
.station.is-installed .sub::after {
  content: " / installed";
}
@media (max-width: 30rem) {
  .track {
    flex-direction: column-reverse;
    overflow-x: visible;
    padding-inline: var(--s-4);
  }
  .station {
    flex: none;
    text-align: left;
  }
  .station::before,
  .station:first-child::before,
  .station:last-child::before {
    top: 0;
    bottom: 0;
    left: 0.65rem;
    right: auto;
    width: 2px;
    height: auto;
  }
  .station:first-child::before {
    top: 50%;
  }
  .station:last-child::before {
    bottom: 50%;
  }
  .station a {
    display: grid;
    grid-template-columns: 1.5rem 1fr;
    column-gap: var(--s-3);
    align-items: center;
  }
  .node {
    margin: 0;
    grid-row: span 2;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .track {
    animation: reveal 0.4s ease-out;
  }
  .station.is-current .node {
    animation: settle 0.25s ease-out 0.35s backwards;
  }
}
@keyframes reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes settle {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

/* Install routes: native radios, panels toggled with CSS only -------- */
.routes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  border: 0;
  padding: 0;
}
.routes legend {
  padding: 0;
  margin-bottom: var(--s-2);
}
.routes input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.routes label {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  background: var(--surface);
  cursor: pointer;
}
.routes input:checked + label {
  background: var(--action);
  color: var(--on-action);
  border-color: var(--action);
  font-weight: 700;
}
.routes input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.routes input:disabled + label {
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: line-through;
}
.route-panel {
  display: none;
}
.route-picker {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.route-picker:has(#route-linux-chrome:checked) #panel-linux-chrome,
.route-picker:has(#route-managed-chrome:checked) #panel-managed-chrome,
.route-picker:has(#route-developer-zip:checked) #panel-developer-zip,
.route-picker:has(#route-firefox:checked) #panel-firefox {
  display: flex;
}
@supports not selector(:has(*)) {
  .route-panel {
    display: flex;
  }
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
h4 {
  margin: 0;
  font-size: var(--t-md);
}
.steps {
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  max-width: var(--measure);
}
.code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-2);
  align-items: start;
  background: var(--surface-2);
  border-radius: var(--r-1);
  padding: var(--s-2) var(--s-3);
}
.code pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding-block: var(--s-1);
}
.code .btn {
  min-height: 2.25rem;
  padding: var(--s-1) var(--s-3);
}

/* Tables ------------------------------------------------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: var(--s-2);
}
.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: var(--s-2) var(--s-3) var(--s-2) 0;
  border-top: 1px solid var(--line);
}
.table thead th {
  font-size: var(--t-sm);
  color: var(--ink-2);
  border-top: 0;
  border-bottom: 1px solid var(--line-strong);
}
.table .num {
  text-align: right;
}
@media (max-width: 39.99rem) {
  .table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table--stack tr {
    display: block;
    border-top: 1px solid var(--line);
    padding-block: var(--s-2);
  }
  .table--stack td,
  .table--stack th {
    display: block;
    border: 0;
    padding: var(--s-1) 0;
  }
  .table--stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: var(--t-xs);
    color: var(--ink-2);
  }
}
.scroll {
  overflow-x: auto;
}
.scroll:focus-visible {
  outline: 3px solid var(--focus);
}
.hash {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  overflow-wrap: anywhere;
}
.dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--s-2) var(--s-4);
  margin: 0;
}
.dl dt {
  color: var(--ink-2);
}
.dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.perm-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .perm-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.perm-list {
  margin: var(--s-2) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.perm-list li {
  overflow-wrap: anywhere;
}

/* Stage stepper ------------------------------------------------------ */
.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  counter-reset: step;
}
.stepper li {
  border-top: 4px solid var(--line);
  padding-top: var(--s-2);
  counter-increment: step;
}
.stepper li::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-right: var(--s-2);
}
.stepper li[data-state="done"] {
  border-top-color: var(--go);
}
.stepper li[data-state="current"] {
  border-top-color: var(--ink);
}
.stepper li[data-state="failed"] {
  border-top-color: var(--stop);
}
.stepper .state {
  display: block;
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.finding > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.finding {
  display: flex;
  gap: var(--s-3);
  padding-block: var(--s-2);
  border-top: 1px solid var(--line);
}

/* Sign-in ------------------------------------------------------------ */
.auth {
  max-width: 24rem;
  margin-inline: auto;
  padding-block: var(--s-12);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

/* Footer ------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: var(--s-6);
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.foot .cluster {
  justify-content: space-between;
}

/* Empty states ------------------------------------------------------- */
.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-2);
  padding: var(--s-8) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: flex-start;
}
progress {
  width: 100%;
  height: 1rem;
  accent-color: var(--action);
}
