/* osu!flow site: plain, dark, one accent colour. */

:root {
  color-scheme: dark;
  --bg: #17171a;
  --bg-2: #1c1c20;
  --text: #ececef;
  --text-2: #b4b4bc;
  --muted: #8e8e98;
  --accent: #e8689b;
  --line: #34343a;
  --good: #6ee7a8;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 64px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  font-weight: 650;
  line-height: 1.2;
}

h1 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
}

h2 {
  font-size: 1.5rem;
}

p {
  margin: 0;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #26262b;
}

kbd {
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: min(920px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.skip:focus {
  top: 8px;
}

/* header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.nav a {
  color: var(--text-2);
  font-size: 0.94rem;
  text-decoration: none;
}

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

/* buttons */

.btn {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #1a1a1d;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: #f07aa9;
}

.btn-small {
  padding: 5px 14px;
  font-size: 0.92rem;
}

.btn-plain {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.btn-plain:hover {
  background: var(--bg-2);
}

/* hero */

.hero {
  padding: 48px 0 24px;
}

.lead {
  max-width: 40rem;
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.1rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.shot {
  margin: 32px 0 0;
}

.shot img {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* sections */

.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.steps {
  margin: 20px 0 0;
  padding-left: 1.3em;
}

.steps li {
  margin-top: 10px;
  max-width: 44rem;
}

.steps li::marker {
  color: var(--muted);
}

.list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 40px;
  margin: 24px 0 0;
}

.list dt {
  font-weight: 650;
}

.list dd {
  margin: 2px 0 0;
  color: var(--text-2);
}

/* demo */

.try {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: start;
}

.try p {
  margin-top: 10px;
  color: var(--text-2);
}

.demo-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
}

.demo-row:hover,
.demo-row:focus-visible {
  border-color: #55555e;
  background: #232327;
}

.demo-cover {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: hsl(var(--h1) 45% 38%);
}

.demo-cover::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.demo-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.demo-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-sub {
  overflow: hidden;
  color: var(--text-2);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-facts {
  color: var(--muted);
  font-size: 0.82rem;
}

.demo-get {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.demo-get:hover {
  background: #2a2a30;
}

.demo-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--icon-download) center / contain no-repeat;
  mask: var(--icon-download) center / contain no-repeat;
}

.demo {
  --icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-5-5m5 5 5-5M5 20h14'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E");
}

.demo-row[data-state="busy"] .demo-icon {
  opacity: 0.35;
}

.demo-row[data-state="done"] .demo-get {
  border-color: var(--good);
  color: var(--good);
  cursor: default;
}

.demo-row[data-state="done"] .demo-icon {
  -webkit-mask-image: var(--icon-check);
  mask-image: var(--icon-check);
}

.demo-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.demo-reset {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.demo-reset[hidden] {
  display: none;
}

/* screenshots, syntax, FAQ */

.two {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.table td:last-child {
  color: var(--text-2);
}

.faq details {
  margin-top: 8px;
  border-bottom: 1px solid var(--line);
}

.faq h2 {
  margin-bottom: 12px;
}

.faq summary {
  padding: 12px 0;
  font-weight: 600;
  cursor: pointer;
}

.faq details p {
  padding: 0 0 14px;
  max-width: 44rem;
  color: var(--text-2);
}

#download p + p {
  margin-top: 10px;
}

/* footer */

.foot {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.foot .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.foot .links a {
  color: var(--text-2);
}

.legal {
  max-width: 44rem;
  margin-top: 14px;
}

/* smaller screens */

@media (max-width: 820px) {
  .nav a:not(:last-child) {
    display: none;
  }

  .try,
  .two,
  .list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .nav {
    display: none;
  }

  .top-in .btn {
    margin-left: auto;
  }

  .demo-facts {
    display: none;
  }
}

[hidden] { display: none !important; }
.preview-downloads { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.preview-downloads h3 { margin: 0 0 8px; font-size: 1.1rem; line-height: 1.3; }
.platform-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.preview-downloads .note { margin-top: 12px; }
