/* drizzle site styles.
   Every color on the site is defined in the two palette blocks directly below
   (light is the default, dark follows prefers-color-scheme). Nothing else in
   this file or in the HTML uses a color literal.

   The look is the original site's: one monospace font, flat backgrounds, square
   corners, 1px and 2px ink borders and hard offset shadows. Only the colors moved. */

:root {
  color-scheme: light dark;

  /* Light: pale fog gray paper, navy ink, rain blue darkened for contrast, sun yellow for highlights. */
  --paper: #eceff4;
  --ink: #0f1724;
  --dim: #44546a;
  --rain: #1a5f9e;
  --rain-tint: #d3e4f5;
  --sun: #f2b92e;
  --on-sun: #0f1724;
  --block: #0f1724;
  --on-block: #eceff4;
  --focus: #1a5f9e;

  --font: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 65ch;
  --wrap: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark: deep slate-navy paper, soft cloud-white ink, rain blue, a little sun. */
    --paper: #0f1724;
    --ink: #e8eef7;
    --dim: #a6b4c9;
    --rain: #6db7f2;
    --rain-tint: #1d3350;
    --sun: #f5c64a;
    --on-sun: #0f1724;
    --block: #1e3253;
    --on-block: #e8eef7;
    --focus: #f5c64a;
  }
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img, svg, canvas { max-width: 100%; }

[hidden] { display: none !important; }

/* Pixel art is never smoothed. */
canvas, .pixel { image-rendering: pixelated; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--rain); }

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

::selection { background: var(--rain-tint); color: var(--ink); }

h1, h2, h3 {
  margin: 0 0 16px;
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
h1 { font-size: 20px; line-height: 1.25; }
h2 {
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 18px;
  text-transform: lowercase;
}
h3 { margin-bottom: 6px; font-size: 15px; }

p { margin: 0 0 14px; }
code, pre, kbd { font-family: var(--font); }
.dim { color: var(--dim); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--sun);
  color: var(--on-sun);
  border: 2px solid var(--ink);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* layout */
.wrap {
  width: min(100% - 36px, var(--wrap));
  margin-inline: auto;
}

main { padding-bottom: 48px; }

section {
  padding: 40px 0;
  border-bottom: 1px solid var(--ink);
}
section.hero { padding-top: 24px; }
section:last-of-type { border-bottom: none; }
section[id] { scroll-margin-top: 64px; }

/* header and nav */
.site-header { padding-top: 20px; }
.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 32px;
  height: 32px;
  background: url(/assets/drizzle/raincloud_v2.png) 0 0 / 192px 896px no-repeat;
  image-rendering: pixelated;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.site-nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--dim);
  text-decoration: none;
}
.site-nav a:hover { color: var(--rain); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* sticky install bar, shown once the hero command scrolls out of view */
.stickybar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: none;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  padding: 10px 0;
  font-size: 13px;
}
.stickybar.show { display: block; }
.stickybar .inner { display: flex; align-items: center; gap: 10px; }
.stickybar-label { display: none; color: var(--dim); white-space: nowrap; }
.stickybar-cmd {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* buttons */
.btn {
  display: inline-block;
  padding: 6px 10px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.4;
  text-transform: lowercase;
  cursor: pointer;
}
.btn:hover { background: var(--sun); color: var(--on-sun); }
.btn[aria-pressed="true"],
.btn[aria-pressed="true"]:hover,
.btn.flash,
.btn.flash:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--sun); color: var(--on-sun); font-weight: 700; }
.btn-primary:hover { background: var(--ink); color: var(--paper); }

/* hero */
.update {
  display: block;
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--block);
  color: var(--on-block);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--sun);
}
.update .head {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.update .star { margin-right: 8px; color: var(--sun); }
.update .hl { color: var(--sun); }
.update .body { display: block; margin-top: 6px; font-size: 13px; }

.beta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 8px 14px 7px;
  background: var(--sun);
  color: var(--on-sun);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.beta .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--on-sun);
}
.beta .sep { opacity: 0.55; }
@media (prefers-reduced-motion: no-preference) {
  .beta .dot { animation: blink 1.2s steps(2, end) infinite; }
  @keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
}

.drizzle-still {
  width: 64px;
  height: 64px;
  background: url(/assets/drizzle/raincloud_v2@4x.png) 0 0 / 384px 1792px no-repeat;
  image-rendering: pixelated;
}

.tagline { max-width: 560px; margin-bottom: 22px; line-height: 1.35; }
.tagline .intro { color: var(--rain); }
.subtext { margin: 14px 0 0; color: var(--dim); font-size: 13px; }

.demo-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--ink);
  font-size: 13px;
}
.demo-note strong { color: var(--rain); }
.demo-arrow { color: var(--rain); font-weight: 700; }

/* the live drizzle: hero strip, weather demo and blog embeds */
.stage { margin: 0 0 28px; }
.stage-ground {
  position: relative;
  min-height: 80px;
  border-bottom: 1px dashed var(--ink);
}
.stage canvas { display: block; width: 100%; touch-action: pan-y; }
.stage-ground .drizzle-still {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.stage-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 13px;
}

/* install code blocks and the os tabs */
.os-tabs { display: inline-flex; position: relative; top: 1px; }
.os-tab {
  padding: 8px 12px 7px;
  background: var(--paper);
  color: var(--dim);
  border: 1px solid var(--ink);
  border-bottom: none;
  border-radius: 0;
  font-family: var(--font);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  cursor: pointer;
}
.os-tab + .os-tab { border-left: none; }
.os-tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.os-tab[aria-pressed="false"]:hover { color: var(--ink); }

.codeblock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-size: 13px;
}
.codeblock pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.codeblock .prompt { color: var(--rain); user-select: none; }
.codeblock .btn { flex-shrink: 0; }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.card p { margin: 0; font-size: 14px; }
.card.feature { border-width: 2px; }
.card.feature h3 { font-size: 17px; }
.new-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  background: var(--sun);
  color: var(--on-sun);
  border: 1px solid var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* poses gallery */
.pose-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pose {
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.pose canvas { display: block; margin: 0 0 8px; }
.pose-name { margin: 0 0 4px; font-weight: 700; }
.pose-caption { margin: 0; font-size: 13px; line-height: 1.45; }
.pose-soon {
  display: inline-block;
  margin: 8px 0 0;
  padding: 1px 6px;
  border: 1px dashed var(--ink);
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* weather mood demo */
.wx-stage { max-width: 288px; margin: 0 0 16px; }
.wx-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.wx-note { margin: 14px 0 0; font-size: 13px; }

/* setup steps */
.step { margin-bottom: 26px; }
.step:last-child { margin-bottom: 0; }
.step-head { margin-bottom: 8px; font-weight: 700; }
.step-num { margin-right: 6px; color: var(--rain); }
.step p { margin: 0 0 10px; }

/* lists */
ul.bare { margin: 0; padding: 0; list-style: none; }
ul.bare li { padding: 6px 0; border-bottom: 1px dotted var(--ink); }
ul.bare li:last-child { border-bottom: none; }
ul.bare li::before { content: "\203A\00a0\00a0"; color: var(--rain); }

/* demo chat: an inline panel under the hero */
.chat {
  margin-top: 14px;
  max-width: 420px;
  padding: 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 13px;
}
#drizzle-history {
  max-height: 180px;
  margin-bottom: 6px;
  overflow-y: auto;
  line-height: 1.45;
}
#drizzle-history .msg { margin-bottom: 3px; overflow-wrap: anywhere; }
#drizzle-history .bot { color: var(--rain); }
#drizzle-input {
  width: 100%;
  padding: 6px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: var(--font);
  font-size: 16px;
}
#drizzle-input:focus { background: var(--rain-tint); }

/* blog: index and posts */
.blog-index h1, .post h1 { font-size: 24px; line-height: 1.3; }
.post-list { margin: 24px 0 0; padding: 0; list-style: none; }
.post-list li { padding: 20px 0; border-top: 1px solid var(--ink); }
.post-list h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 17px; text-transform: none; }
.post-list p { margin: 0 0 8px; }
.post-meta { margin: 0 0 8px; color: var(--dim); font-size: 13px; }
.post-meta a { color: inherit; }

.post { padding-top: 32px; }
.post-head { margin-bottom: 24px; }
.post-head h1 { max-width: 28ch; }
.post-summary { max-width: var(--measure); margin: 0; color: var(--dim); }

/* the reading column is about 65 characters wide */
.prose { max-width: var(--measure); line-height: 1.7; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin: 28px 0 8px; }
.prose h4 { margin: 24px 0 8px; font-size: 15px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose blockquote {
  margin: 20px 0;
  padding: 2px 16px;
  border-left: 2px solid var(--ink);
  color: var(--dim);
}
.prose hr { margin: 32px 0; border: 0; border-top: 1px solid var(--ink); }
.prose img { display: block; max-width: 100%; height: auto; margin: 24px 0; }
.prose :not(pre) > code {
  padding: 1px 6px;
  border: 1px solid var(--ink);
  font-size: 13px;
}
.prose pre {
  margin: 20px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

/* tables scroll inside their own box on narrow screens, never the page */
.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--ink);
}
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.table-wrap caption {
  padding: 10px 12px;
  caption-side: bottom;
  color: var(--dim);
  font-size: 12px;
  text-align: left;
}
.table-wrap th, .table-wrap td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ink); }
.table-wrap thead th { border-bottom-width: 2px; }
.table-wrap tbody tr:last-child > * { border-bottom: none; }
.table-wrap td { font-variant-numeric: tabular-nums; }

/* blog embed */
.drizzle-embed { margin: 28px 0; }
.drizzle-embed figcaption { margin-top: 10px; color: var(--dim); font-size: 13px; line-height: 1.5; }
.stage-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* footer */
.site-footer {
  padding: 40px 0 48px;
  color: var(--dim);
  font-size: 13px;
}
.site-footer p { margin: 0 0 8px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--rain); }

/* wider screens */
@media (min-width: 560px) {
  .wrap { width: min(100% - 48px, var(--wrap)); }
  section { padding: 56px 0; }
  h1 { font-size: 28px; }
  .tagline { font-size: 24px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .card.feature { grid-column: 1 / -1; }
  .pose-grid { grid-template-columns: repeat(4, 1fr); }
  .stickybar-label { display: inline; }
}
@media (min-width: 900px) {
  .stage-ground { min-height: 120px; }
}

/* reduced motion: no transitions or animations anywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
