/* Tokens from design-system/flare-launcher/MASTER.md, so the page looks like the launcher. */
@font-face {
  font-family: "Fira Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/fira-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/fira-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fira-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Code";
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fira-code-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --background: #0b1120;
  --card: #0f172a;
  --border: #1e293b;
  --input: #334155;
  --foreground: #f1f5f9;
  --muted-foreground: #94a3b8;
  --primary: #22c55e;
  --primary-hover: #4ade80;
  --primary-foreground: #0b1120;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --background: #ffffff;
    --card: #f8fafc;
    --border: #e2e8f0;
    --input: #cbd5e1;
    --foreground: #0f172a;
    --muted-foreground: #475569;
    --primary: #15803d;
    --primary-hover: #166534;
    --primary-foreground: #ffffff;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: var(--background);
  color: var(--foreground);
  font: 400 16px/1.5 "Fira Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  display: block;
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.tagline {
  margin: 12px 0 0;
  color: var(--muted-foreground);
  font-size: 17px;
  text-wrap: balance;
}

.notice {
  margin: 32px 0 0;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 14px;
}

.download {
  width: 100%;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notice:not([hidden]) + .download {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 32px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.button:hover {
  background: var(--primary-hover);
}

/* On systems the launcher can't run on, the download stays available but no longer looks like the next step. */
[data-supported="false"] .button {
  background: transparent;
  color: var(--foreground);
  box-shadow: inset 0 0 0 1px var(--input);
}

[data-supported="false"] .button:hover {
  background: var(--border);
}

.meta {
  margin: 12px 0 0;
  color: var(--muted-foreground);
  font: 400 13px/1.5 "Fira Code", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-variant-ligatures: none;
}

/* The thank-you page: next steps for the platform the worker put on <body>. */
.tagline a {
  color: var(--foreground);
  text-underline-offset: 3px;
}

.steps {
  width: 100%;
  margin-top: 40px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  text-align: left;
  font-size: 14px;
}

.steps h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}

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

.steps li + li {
  margin-top: 6px;
}

.steps .file {
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: 13px;
  font-variant-ligatures: none;
  overflow-wrap: anywhere;
}

[data-platform="windows"] .only-linux,
[data-platform="linux"] .only-windows {
  display: none;
}

.steps .terminal {
  margin: 12px 0 0;
  color: var(--muted-foreground);
}

.steps code {
  display: block;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  font: 400 13px/1.5 "Fira Code", ui-monospace, monospace;
  font-variant-ligatures: none;
  overflow-x: auto;
  white-space: nowrap;
  user-select: all;
}

.requires {
  margin: 16px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.switch {
  margin-top: 24px;
  padding: 10px 4px;
  color: var(--muted-foreground);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}

.switch:hover {
  color: var(--foreground);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The page shown when a download can't be found or isn't available. */
.error .button {
  margin-top: 32px;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
