html {
  color-scheme: light;
  --ground: #eef2ee;
  --paper: #fff;
  --text: #18221e;
  --muted: #52625a;
  --line: #dde5df;
  --soft: #f4f7f4;
  --accent: #08664d;
  --button: #09694f;
  --button-hover: #07523e;
  --button-text: #fff;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ground: #151a17;
  --paper: #1c231f;
  --text: #eff4ef;
  --muted: #a6b7ac;
  --line: #35423a;
  --soft: #252e28;
  --accent: #7edab7;
  --button: #8addbc;
  --button-hover: #a6ebcf;
  --button-text: #102c21;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --ground: #151a17;
    --paper: #1c231f;
    --text: #eff4ef;
    --muted: #a6b7ac;
    --line: #35423a;
    --soft: #252e28;
    --accent: #7edab7;
    --button: #8addbc;
    --button-hover: #a6ebcf;
    --button-text: #102c21;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; }
button { font: inherit; }
h1, h2, p, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.frame { width: min(1040px, calc(100% - 32px)); margin-inline: auto; }
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 4px;
}

.brand, .theme, .download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  text-decoration: none;
}

.brand { font-size: 1.125rem; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
}

.brand-mark span {
  position: relative;
  width: 18px;
  height: 16px;
  border-bottom: 2px solid currentColor;
}

.brand-mark span::before, .brand-mark span::after {
  content: "";
  position: absolute;
  bottom: 3px;
  height: 10px;
  width: 6px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.brand-mark span::before { left: 1px; height: 13px; }
.brand-mark span::after { right: 1px; }
.theme {
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.theme:hover, .theme[aria-pressed="true"] { background: var(--soft); color: var(--text); }
.moon {
  width: 14px;
  height: 14px;
  border: solid currentColor;
  border-width: 0 0 2px 3px;
  border-radius: 50%;
}

.sheet {
  --identity-columns: 52px minmax(0, 1fr);
  --metadata-columns: minmax(64px, .8fr) minmax(76px, .9fr) minmax(109px, 1.2fr);
  margin-block-end: 28px;
  padding: clamp(22px, 4.5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.intro { margin-block-end: clamp(24px, 4vw, 40px); }
h1 {
  font-size: clamp(1.625rem, 3.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.intro p, .empty p { margin-block-start: 10px; color: var(--muted); }
.apps { list-style: none; padding: 0; margin: 0; }
.app-row, .list-head {
  display: grid;
  grid-template-columns: var(--identity-columns) minmax(272px, .85fr) 112px;
  align-items: center;
  column-gap: 16px;
}

.list-head {
  padding-block-end: 10px;
  color: var(--muted);
  font-size: .8125rem;
  border-bottom: 1px solid var(--line);
}

.list-head > span:first-child { grid-column: 1 / 3; }
.app-row { min-height: 96px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.app-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 9px;
}

.app-initial { background: var(--soft); color: var(--muted); font-size: 1.25rem; font-weight: 650; }
.app-info { min-width: 0; }
h2 { font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.app-info p { margin-block-start: 4px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.release {
  display: grid;
  grid-template-columns: var(--metadata-columns);
  gap: 8px;
  align-items: baseline;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.app-row .release { color: var(--muted); font-size: .8125rem; }
.release dd { overflow-wrap: anywhere; }
.download {
  padding-inline: 12px;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
  font-size: .875rem;
  font-weight: 650;
}

.download:hover { background: var(--button-hover); }
.download-icon { position: relative; width: 14px; height: 14px; border-bottom: 1.5px solid currentColor; }
.download-icon::before, .download-icon::after { content: ""; position: absolute; }
.download-icon::before { left: 6px; top: 0; height: 9px; border-left: 1.5px solid currentColor; }
.download-icon::after {
  width: 6px;
  height: 6px;
  left: 3px;
  top: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.empty { padding: 24px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.empty p { margin-block-start: 6px; font-size: .875rem; }
.install { margin-block-start: 16px; color: var(--muted); font-size: .875rem; }
.install summary { min-height: 44px; padding-block: 11px; font-weight: 600; color: var(--accent); cursor: pointer; }
.install ol { margin: 0; padding-inline-start: 24px; max-width: 58ch; }
.install li + li { margin-block-start: 6px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .frame { width: 100%; }
  .topbar { min-height: 64px; padding-inline: 18px; }
  .sheet { border-inline: 0; border-radius: 0; padding: 24px 18px 18px; }
  .list-head { display: none; }
  .apps { border-top: 1px solid var(--line); }
  .app-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px 14px; align-items: start; }
  .app-icon { width: 44px; height: 44px; grid-row: 1 / 4; }
  .release { grid-column: 2; display: flex; flex-wrap: wrap; gap: 3px 0; text-align: start; }
  .release div { min-width: 0; }
  .release div + div { display: flex; }
  .release div + div::before { content: "·"; margin-inline: 7px; }
  .download { grid-column: 2; justify-self: start; }
}

@media (max-width: 360px) {
  .brand { font-size: 1rem; }
  .theme { padding-inline: 8px; }
}
