:root {
  color-scheme: dark;
  --background: #0c110f;
  --surface: #131a17;
  --surface-raised: #19211e;
  --line: #2b3931;
  --text: #edf4ef;
  --muted: #acc0b1;
  --accent: #c5dfaa;
  --accent-ink: #172212;
  --danger: #ffb6b0;
  --radius: 16px;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(52rem 30rem at 50% 0, #18251c, transparent 80%), var(--background);
  color: var(--text);
}

h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.12; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -.05em; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
a { color: var(--accent); }
button, input { font: inherit; }
strong { font-weight: 650; }

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

.frame { width: min(100% - 3rem, 62rem); margin-inline: auto; }
.main { padding-block: clamp(2rem, 6vw, 4rem) 4rem; }

.skip-link {
  position: absolute;
  z-index: 1;
  top: .75rem;
  left: .75rem;
  padding: .5rem .85rem;
  border-radius: .5rem;
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  border-radius: .4rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-decoration: none;
}

.masthead-name { color: var(--muted); font-size: .9rem; }
.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--surface-raised);
}

.brand-mark::after, .art-center::after {
  display: block;
  aspect-ratio: 1;
  background: var(--accent);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  content: "";
}

.brand-mark::after { width: 1.05rem; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36%;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  padding: clamp(1.5rem, 4.8vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(110deg, #18231b, #121a16 72%);
}

.hero-copy { z-index: 1; }
.lead { max-width: 39ch; margin-top: .75rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

.hero-art {
  position: relative;
  display: grid;
  height: clamp(10rem, 25vw, 14rem);
  place-items: center;
  background: radial-gradient(circle, #9fca7033, transparent 65%);
  pointer-events: none;
}

.hero-art::before, .hero-art::after, .art-center {
  position: absolute;
  aspect-ratio: 1;
  border: 1px solid #c5dfaa36;
  border-radius: 50%;
}

.hero-art::before { width: 100%; max-width: 17rem; content: ""; }
.hero-art::after { width: 76%; max-width: 13rem; content: ""; }
.art-center { display: grid; width: 52%; max-width: 9rem; place-items: center; }
.art-center::after { width: 62%; }

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: .6rem 1rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { border-color: var(--accent); }
.button-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: #d6edbf; }

.downloads { margin-top: clamp(1.8rem, 5vw, 2.75rem); scroll-margin-top: 1rem; }
.download-list, .project-list { margin: .85rem 0 0; padding: 0; list-style: none; }
.download-list, .workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }

.download, .workspace-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.download {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 5.2rem;
  padding: .8rem 1rem;
  color: var(--text);
  text-decoration: none;
}

.download:hover { border-color: var(--accent); }
.download small { display: block; color: var(--muted); font-size: .86rem; }

.download-glyph {
  position: relative;
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--surface-raised);
  color: var(--accent);
}

.download-glyph::before {
  width: .9rem;
  height: 1rem;
  background: currentColor;
  clip-path: polygon(43% 0, 57% 0, 57% 63%, 80% 42%, 89% 52%, 50% 88%, 11% 52%, 20% 42%, 43% 63%);
  content: "";
}

.download-glyph::after {
  position: absolute;
  bottom: .64rem;
  width: .9rem;
  border-bottom: 1px solid currentColor;
  content: "";
}

.setup { margin-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); }
.setup summary { width: fit-content; padding-block: .7rem; color: var(--text); cursor: pointer; }
.setup ol { margin: 0; padding-left: 1.5rem; }
.setup li + li { margin-top: .35rem; }
.setup code { color: var(--accent); overflow-wrap: anywhere; }

.auth-card {
  width: min(100%, 29rem);
  margin: clamp(.25rem, 4vh, 3rem) auto 0;
  padding: clamp(1.35rem, 5vw, 2.15rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1.5rem 4rem #0005;
}

.auth-card h1, .workspace h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.auth-card > .button { margin-top: 1.25rem; }
.auth-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.auth-form .button { width: 100%; margin-top: .25rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }

.field input {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid #536459;
  border-radius: .5rem;
  background: var(--background);
  color: var(--text);
}

.field input:focus { border-color: var(--accent); }
.code-field { font-variant-numeric: tabular-nums; letter-spacing: .22em; }
.field-hint { color: var(--muted); font-size: .875rem; }

.form-error {
  padding: .7rem .85rem;
  border: 1px solid #89514e;
  border-radius: .5rem;
  background: #392421;
  color: var(--danger);
}

.form-error:empty { display: none; }
.text-link { display: inline-block; margin-top: 1.15rem; text-underline-offset: .2em; }

.workspace-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.workspace-grid { margin-top: 1.6rem; }
.workspace-card { padding: clamp(1.05rem, 3vw, 1.5rem); overflow-wrap: anywhere; }
.account-data { display: grid; gap: .65rem; margin: .85rem 0 0; }
.account-data dt { color: var(--muted); font-size: .875rem; }
.account-data dd { margin: 0; }
.project-list li { padding-block: .45rem; }
.project-list li + li { border-top: 1px solid var(--line); }

@media (max-width: 40rem) {
  .frame { width: calc(100% - 2rem); }
  .hero { display: block; }
  .hero-art { display: none; }
  .download-list, .workspace-grid { grid-template-columns: 1fr; }
}
