/* ember-parachute's site: a sky (the ink, the washes) and a canopy (the one
   warm accent, for what you can act on). Guides: nav, article, contents.
   Examples: the demo beside its hooks, the address above both. */
:root {
  --bg: #f4f7fb;
  --surface: #fff;
  --fg: #142033;
  --muted: #56657c;
  --line: #d6dfeb;
  --wash: #e8eff8;
  --code-bg: #eef3f9;
  --accent: #d9482b;
  --accent-ink: #fff;
  --sky: #2367b0;
  --push: #2367b0;
  --replace: #8a5a00;
  --setup: #1f7a4c;
  --change: #2367b0;
  --reset: #a33a2a;
  --selection: #ffd9cc;
  --radius: 10px;
  --font-body:
    "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:
    "JetBrains Mono", ui-monospace, sfmono-regular, menlo, consolas, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1420;
    --surface: #131c2b;
    --fg: #e3ebf6;
    --muted: #9aa9bf;
    --line: #26344a;
    --wash: #19253a;
    --code-bg: #0a111b;
    --accent: #ff7a5c;
    --accent-ink: #1a0b06;
    --sky: #7db6f2;
    --push: #7db6f2;
    --replace: #f0c060;
    --setup: #6fd3a0;
    --change: #7db6f2;
    --reset: #ff9a85;
    --selection: #5a2618;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1420;
  --surface: #131c2b;
  --fg: #e3ebf6;
  --muted: #9aa9bf;
  --line: #26344a;
  --wash: #19253a;
  --code-bg: #0a111b;
  --accent: #ff7a5c;
  --accent-ink: #1a0b06;
  --sky: #7db6f2;
  --push: #7db6f2;
  --replace: #f0c060;
  --setup: #6fd3a0;
  --change: #7db6f2;
  --reset: #ff9a85;
  --selection: #5a2618;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font-body);
}

::selection {
  background: var(--selection);
}

a {
  color: var(--sky);
  text-underline-offset: 2px;
}

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

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

h1,
h2,
h3 {
  line-height: 1.25;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

/* Header and footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--fg);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  fill: var(--accent);
  stroke: var(--sky);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--fg);
}

.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.site-footer {
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Buttons, fields, chips */

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
}

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

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

.button-primary:hover {
  color: var(--accent-ink);
  filter: brightness(1.08);
}

.link-button {
  margin-left: 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sky);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > span,
.field > legend {
  padding: 0;
  font-size: 0.85rem;
  font-weight: 700;
}

input:not([type="checkbox"]),
select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 1rem;
}

.chip {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  color: var(--fg);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented button {
  padding: 0.4rem 0.9rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented .is-current {
  background: var(--accent);
  color: var(--accent-ink);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

/* Home */

.hero {
  max-width: 820px;
  padding: 2rem 0 1rem;
}

.hero h1 {
  margin: 0.2rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow a {
  color: inherit;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.install {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
}

.two-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.two-up h2 {
  font-size: 1.05rem;
}

pre.code,
.source pre,
.outputs pre {
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  font-size: 0.85rem;
  line-height: 1.5;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.intro {
  max-width: 820px;
}

/* Examples */

.example-head {
  max-width: 900px;
  margin-bottom: 1rem;
}

.example-head h1 {
  margin: 0.2rem 0 0.5rem;
}

.address {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.address-bar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.address-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.address-url {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.address-history {
  padding: 0.5rem 0.9rem;
}

.address-history summary {
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.history-list {
  overflow: auto;
  max-height: 9.5rem;
  margin: 0.4rem 0 0.2rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.history-list li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.12rem 0;
  overflow-wrap: anywhere;
}

.badge {
  flex: none;
  min-width: 4.6rem;
  padding: 0 0.4rem;
  border: 1px solid currentcolor;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.badge-push {
  color: var(--push);
}

.badge-replace {
  color: var(--replace);
}

.example-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: start;
}

@media (width <= 900px) {
  .example-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.panel-title .muted {
  font-weight: 400;
  font-size: 0.85rem;
}

.events {
  overflow: auto;
  max-height: 70vh;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event {
  margin-bottom: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--change);
  border-radius: 6px;
  background: var(--wash);
  font-size: 0.85rem;
}

.event-setup {
  border-left-color: var(--setup);
}

.event-reset {
  border-left-color: var(--reset);
}

.event-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  align-items: baseline;
}

.hook {
  font-family: var(--font-mono);
  font-weight: 700;
}

.flag {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.flag-on {
  color: var(--accent);
}

.event-body {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.1rem 0.6rem;
  margin: 0.35rem 0 0;
}

.event-body dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.event-body dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.example-sources h2 {
  margin-top: 2rem;
  font-size: 1.1rem;
}

.source {
  margin-bottom: 0.75rem;
}

.source pre {
  max-height: 32rem;
}

.source summary {
  padding: 0.3rem 0;
  cursor: pointer;
}

.results {
  transition: opacity 0.15s;
}

.results.is-loading {
  opacity: 0.55;
}

.products {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.6rem;
}

.products li {
  padding: 0.3rem 0;
}

.products .muted {
  display: block;
  font-size: 0.85rem;
}

.is-dense .products li {
  padding: 0.05rem 0;
}

.is-dense .products .muted {
  display: inline;
  margin-left: 0.4rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.page {
  min-width: 2.2rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.page.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
}

.tab.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.project {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--wash);
}

.project h2,
.project p {
  margin: 0;
}

.outputs dt {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.outputs dt .muted {
  display: block;
  font-weight: 400;
}

.outputs dd {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
}

.outputs dd pre {
  flex: 1;
}

.warning {
  color: var(--reset);
}

.table {
  width: 100%;
  margin: 0.75rem 0;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table th {
  color: var(--muted);
  font-weight: 700;
}

/* Guides */

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 2rem;
  align-items: start;
}

@media (width <= 1100px) {
  .docs-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (width <= 760px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.docs-nav,
.docs-toc {
  position: sticky;
  top: 4.5rem;
  font-size: 0.92rem;
}

@media (width <= 760px) {
  .docs-nav {
    position: static;
  }
}

.docs-nav h2,
.docs-toc h2 {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-nav ol,
.docs-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav a,
.docs-toc a {
  display: block;
  padding: 0.22rem 0.6rem;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.docs-nav a.active,
.docs-nav a:hover,
.docs-toc a:hover {
  color: var(--fg);
}

.docs-nav a.active {
  border-left-color: var(--accent);
  font-weight: 700;
}

.docs-toc .toc-sub {
  padding-left: 0.8rem;
}

.docs-article {
  min-width: 0;
}

.prose {
  max-width: 760px;
}

.prose h1 {
  margin-top: 0;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  letter-spacing: -0.01em;
}

.prose h2 {
  margin-top: 2.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.4rem;
}

.prose h3 {
  margin-top: 1.8rem;
  font-size: 1.12rem;
}

.prose code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--code-bg);
}

.prose pre {
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  line-height: 1.5;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose table {
  display: block;
  overflow: auto;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--wash);
}

.prose blockquote {
  margin: 1rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--wash);
}

.prose blockquote p {
  margin: 0.3rem 0;
}

.prose li + li {
  margin-top: 0.3rem;
}

.docs-edit {
  margin-top: 2.5rem;
  font-size: 0.88rem;
}

.docs-pager {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.docs-next {
  margin-left: auto;
}

.prose pre.shiki {
  border: 1px solid var(--line);
  background-color: var(--code-bg) !important;
}

.shiki span {
  color: var(--shiki-light);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shiki span {
    color: var(--shiki-dark);
  }
}

:root[data-theme="dark"] .shiki span {
  color: var(--shiki-dark);
}

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

.controls > .chip {
  align-self: end;
  justify-self: start;
  white-space: nowrap;
}

/* Docfy's code blocks */
.docfy-code-block {
  position: relative;
  margin: 1rem 0;
}

.docfy-code-block pre {
  margin: 0;
}

.docfy-code-block__copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.docfy-code-block:hover .docfy-code-block__copy,
.docfy-code-block__copy:focus-visible {
  opacity: 1;
}

.docfy-code-block__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.address {
  position: relative;
}

.link-button.clear {
  position: absolute;
  top: 3.6rem;
  right: 0.9rem;
}
