:root {
  /* app palette */
  --black: #000000;
  --gray-very-light: #5e5e5e;
  --gray-light: #525252;
  --gray: #454545;
  --gray-dark: #343434;
  --gray-very-dark: #272727;
  --white-mostly: #c8c8c8;
  --white: #ffffff;

  --red: #ff053f;
  --green: #56ce77;
  --yellow: #e1d948;
  --blue: #31a2f2;
  --magenta: #bc48e0;
  --cyan: #48e0cd;
  --orange: #f28231;

  /* page roles */
  --bg: var(--gray-very-dark);
  --surface: var(--gray-dark);
  --border: var(--gray);
  --text: var(--white);
  --muted: var(--gray-very-light);
  --accent: var(--cyan);
  --accent-text: var(--black);
  --radius: 10px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 640px;
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel {
  position: relative;
  width: 100%;
  margin-top: 2.75rem;
}

.screenshots {
  width: 100%;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.screenshots::-webkit-scrollbar {
  display: none;
}

.screenshot {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  cursor: zoom-out;
  z-index: 10;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  user-select: none;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.carousel-arrow:hover {
  opacity: 1;
  border-color: var(--accent);
}

.carousel-arrow.prev {
  left: -0.75rem;
}

.carousel-arrow.next {
  right: -0.75rem;
}

.screenshot-caption {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.dots button {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  user-select: none;
}

.dots button.active {
  background: var(--accent);
}

.logo {
  margin-bottom: 1.25rem;
}

.name {
  font-size: 2rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
}

.byline {
  color: var(--muted);
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.tagline {
  color: var(--white-mostly);
  margin: 0 0 1.3rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.story,
.features {
  width: 100%;
  margin: 0 0 1.3rem;
  text-align: left;
}

.install-note {
  margin-top: 1rem;
}

.story summary,
.features summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  list-style: none;
  user-select: none;
}

.story summary::-webkit-details-marker,
.features summary::-webkit-details-marker {
  display: none;
}

.story summary::before,
.features summary::before {
  content: "▸ ";
}

.story[open] summary::before,
.features[open] summary::before {
  content: "▾ ";
}

.story summary:hover,
.features summary:hover {
  color: var(--text);
}

.story p,
.features p {
  margin: 0.75rem 0 0;
  color: var(--white-mostly);
  font-size: 0.85rem;
  line-height: 1.6;
}

.features h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text);
}

.features ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--white-mostly);
  font-size: 0.82rem;
  line-height: 1.6;
}

.features li {
  margin: 0.25rem 0;
}

.features code {
  background: var(--gray);
  color: var(--white-mostly);
  padding: 0.05em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
}

.features h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.features h4 {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.features strong {
  color: var(--text);
}

.table-wrap {
  margin-top: 0.5rem;
  overflow-x: auto;
}

.features table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.features th,
.features td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}

.features th {
  color: var(--muted);
  font-weight: normal;
}

.features td:last-child,
.features th:last-child {
  white-space: normal;
}

.story .signature {
  margin-top: 1.25rem;
  text-align: right;
  color: var(--muted);
  font-size: 0.8rem;
}

.story p a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: var(--gray-very-light);
}

.story p a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.byline a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: var(--gray-very-light);
}

.tagline a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gray-very-light);
}

.byline a:hover,
.tagline a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.downloads {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.2;
  user-select: none;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  border-color: var(--accent);
}

.btn:active {
  transform: scale(0.97);
}

.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn.btn-fallback {
  opacity: 0.7;
  border-style: dashed;
  border-color: #ece268;
  pointer-events: auto;
  cursor: default;
}

.btn.btn-fallback:hover {
  border-color: #ece268;
}

.btn.recommended {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.btn-split {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-split:hover {
  border-color: var(--accent);
}

/* A single rectangle for the whole pill, driven by the main link's state -
   each child used to carry its own full .btn border/background, and the
   seam between two independently-bordered elements (one dashed, one solid)
   rendered as an uneven, thicker-looking right edge. */
.btn-split:has(.btn-split-main.btn-fallback) {
  border-style: dashed;
  border-color: #ece268;
}

.btn-split:has(.btn-split-main.btn-fallback):hover {
  border-color: #ece268;
}

.btn-split:has(.btn-split-main.recommended) {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-split-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  user-select: none;
}

.btn-split-main:active {
  transform: scale(0.97);
}

.btn-split-main[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-split-main.recommended {
  color: var(--accent-text);
}

.btn-split-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 0.6rem;
  border: none;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  appearance: none;
  cursor: pointer;
}

.btn-split:has(.btn-split-main.btn-fallback) .btn-split-caret {
  border-left-style: dashed;
  border-left-color: #ece268;
}

.btn-split:has(.btn-split-main.recommended) .btn-split-caret {
  color: var(--accent-text);
  border-left-color: var(--accent-text);
}

.btn-split-caret svg {
  display: block;
}

.warn-glyph {
  display: inline-block;
  transform: translateY(-0.15em);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 20;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 26rem;
  padding: 1.5rem 1.4rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}

.modal-box h3 {
  margin: 0 0 0.7rem;
  padding-right: 1.5rem;
  font-size: 1rem;
}

.modal-box p {
  margin: 0 0 0.7rem;
  color: var(--white-mostly);
  font-size: 0.82rem;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.cmd-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cmd-row code {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border-radius: calc(var(--radius) - 4px);
  background: var(--gray);
  color: var(--white-mostly);
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre;
}

.copy-btn {
  flex-shrink: 0;
  padding: 0 0.9rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  border-color: var(--accent);
}

.copy-btn.copied {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.btn-split-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.btn-split-menu[hidden] {
  display: none;
}

.btn-split-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-split-item:hover {
  border-color: var(--accent);
}

.btn-split-item[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.os-icon {
  font-size: 1rem;
}

.version {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.9rem 0 0;
  min-height: 1.2em;
}

.links {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.9rem;
}

.links a {
  color: var(--white-mostly);
  text-decoration: none;
}

.links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.links a.kofi {
  color: var(--orange);
}

.links a.kofi:hover {
  color: var(--orange);
}

.links a.discord {
  color: #5865f2;
}

.links a.discord:hover {
  color: #5865f2;
}

footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin: 0.4rem 0 0;
}

footer p:first-child {
  margin-top: 0;
}

footer a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: var(--gray-very-light);
}

footer a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

footer a.report-bug {
  color: #ff5859;
  text-decoration-color: #ff5859;
}

footer a.report-bug:hover {
  color: #ff5859;
  text-decoration-color: #ff5859;
}
