/*
 * sparkwizz.app: the app's mono-bento look on the web.
 * Tokens follow packages/design_system/lib/src/tokens/ds_colors.dart.
 * No JavaScript, no external requests: the font is served from this site.
 */

@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/Onest-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --canvas: #ececea;
  --tile: #ffffff;
  --ink: #121212;
  --ink2: #5f5f5b;
  --line: #e4e4e0;
  --outline: #d6d6d2;
  --lime: #dcf26a;
  --lime-ink: #1c2100;
  --stage: #121212;
  --stage-ink: #ffffff;
  --focus: #121212;
  --radius: 28px;
  --radius-sm: 18px;
  --gap: 12px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0e0e0d;
    --tile: #1b1b1a;
    --ink: #f4f4f1;
    --ink2: #bfbfbb;
    --line: #2a2a28;
    --outline: #3a3a37;
    --stage: #262624;
    --stage-ink: #ffffff;
    --focus: #dcf26a;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  background: var(--lime);
  color: var(--lime-ink);
  text-decoration-color: var(--lime-ink);
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--lime);
  color: var(--lime-ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.doc.wrap {
  max-width: 820px;
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
  border-radius: 999px;
  padding-right: 8px;
}

.brand img {
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: 10px;
  padding: 2px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.975rem;
}

.site-nav a[aria-current="page"] {
  background: var(--tile);
}

.site-nav a.lang {
  border: 1px solid var(--outline);
}

.site-nav a:hover {
  background: var(--lime);
  color: var(--lime-ink);
}

@media (max-width: 559px) {
  .site-nav {
    width: 100%;
    margin-left: -10px;
  }

  .site-nav a {
    padding: 0 10px;
  }

  .site-nav a.lang {
    margin-left: auto;
    margin-right: -10px;
  }
}

/* Tiles */

.tile {
  background: var(--tile);
  border-radius: var(--radius);
  padding: 24px;
}

.tile + .tile {
  margin-top: var(--gap);
}

@media (min-width: 640px) {
  .tile {
    padding: 32px 36px;
  }
}

.stage {
  background: var(--stage);
  color: var(--stage-ink);
}

/* Type */

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.125rem;
  margin-top: 24px;
}

p,
ul,
ol,
dl {
  margin: 0 0 12px;
}

p:last-child,
ul:last-child,
ol:last-child,
dl:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.3em;
}

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

.kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 10px;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink2);
}

.meta {
  color: var(--ink2);
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.pill.ghost {
  background: transparent;
  color: inherit;
  border: 1px solid var(--outline);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

/* Home */

.home-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

.home-grid .tile + .tile {
  margin-top: 0;
}

.hero h1 {
  margin-top: 4px;
}

.hero .lead {
  max-width: 34ch;
}

.wizard-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 16px 0;
  min-height: 260px;
  overflow: hidden;
}

.wizard-stage img {
  width: min(100%, 420px);
  display: block;
}

.feature h2 {
  font-size: 1.2rem;
}

.feature p {
  color: var(--ink2);
}

.feature .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  margin-bottom: 14px;
  box-shadow: 0 0 0 1px var(--outline);
}

@media (min-width: 760px) {
  .home-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .home-grid .hero {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-grid .wizard-stage {
    grid-column: span 2;
  }

  .home-grid .feature {
    grid-column: span 2;
  }
}

/* Documents */

.doc-head h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.toc ol {
  columns: 1;
  margin: 0;
}

@media (min-width: 640px) {
  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

.toc li {
  break-inside: avoid;
}

.doc section h2 {
  scroll-margin-top: 16px;
}

.doc section[id] {
  scroll-margin-top: 16px;
}

.summary {
  background: var(--lime);
  color: var(--lime-ink);
}

.summary a {
  color: var(--lime-ink);
}

.summary a:hover {
  background: var(--lime-ink);
  color: var(--lime);
}

.facts {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.fact {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.fact h3 {
  margin: 0 0 8px;
}

.fact dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 16px;
  margin: 0;
}

.fact dt {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink2);
  margin-top: 8px;
}

.fact dd {
  margin: 0;
}

@media (min-width: 640px) {
  .fact dl {
    grid-template-columns: 9.5rem 1fr;
  }

  .fact dt {
    margin-top: 0;
  }
}

.table-scroll {
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.95rem;
}

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

tr:last-child td {
  border-bottom: 0;
}

th {
  font-weight: 600;
  color: var(--ink2);
  font-size: 0.875rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  min-height: 36px;
}

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

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.path {
  font-weight: 600;
}

/* Placeholders the owner must fill in before publishing. */
.tbc {
  background: transparent;
  color: inherit;
  border: 1px dashed var(--ink2);
  border-radius: 6px;
  padding: 0 4px;
  font-style: italic;
}

.tbc-block {
  border: 2px dashed var(--ink2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 12px 0;
}

.tbc-block p {
  margin: 0 0 4px;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}

.faq details:first-of-type {
  border-top: 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 0;
  list-style-position: outside;
}

.faq details > *:not(summary) {
  margin-bottom: 12px;
}

.contact-card a {
  font-weight: 600;
}

.mail {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Footer */

.site-footer {
  padding-top: 24px;
  padding-bottom: 40px;
  color: var(--ink2);
  font-size: 0.925rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 12px;
}

.site-footer nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}

.site-footer p {
  margin: 0 0 6px;
}

main {
  display: block;
}

.notfound {
  text-align: center;
}

.notfound img {
  width: min(70%, 280px);
}

.notfound .pills {
  justify-content: center;
}

a.pill {
  text-decoration: none;
  min-height: 44px;
}

a.pill:hover {
  background: var(--ink);
  color: var(--canvas);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-header nav,
  .skip,
  .toc {
    display: none;
  }

  .tile {
    padding: 0;
    border-radius: 0;
  }
}
