/* Oopsy. Palette taken from the end of a pencil: eraser, ferrule, paint, graphite. */
:root {
  --graphite: #232228;
  --graphite-2: #2c2b32;
  --graphite-3: #3a3942;
  --graphite-4: #4b4a54;
  --eraser: #f5a7b8;
  --eraser-soft: #fbd3dc;
  --eraser-deep: #e3879c;
  --eraser-ink: #a3213f;
  --pencil: #f6c531;
  --pencil-soft: #fde9a6;
  --ferrule: #c8cad0;
  --paper: #fbfbfa;
  --line: #e6e4e8;
  --ink: #232228;
  --muted: #5d5b66;

  --t-text: #ebe9f0;
  --t-dim: #9c9aa6;
  --t-pink: #f7b6c4;
  --t-yellow: #f6c531;
  --t-red: #ff9a9a;
  --t-green: #a9e2b8;

  --f-display: "Unbounded", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --gutter: 16px;
  --maxw: 1200px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  /* no rubber band past the ends; if a browser still bounces, it shows hero pink on top and footer graphite below */
  overscroll-behavior-y: none;
  background: linear-gradient(var(--eraser) 50%, var(--graphite) 50%);
  scrollbar-color: var(--graphite-4) var(--paper);
}
body { overscroll-behavior-y: none; }

/* scrollbars: thin, rounded, in the page's own colors */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--graphite-4); border-radius: 999px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--graphite); }
::-webkit-scrollbar-corner { background: transparent; }
.win ::-webkit-scrollbar { width: 10px; }
.win ::-webkit-scrollbar-track { background: transparent; }
.win ::-webkit-scrollbar-thumb { background: var(--graphite-4); border: 3px solid var(--graphite); }
.win ::-webkit-scrollbar-thumb:hover { background: var(--t-dim); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
code { font-family: var(--f-mono); font-size: .88em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--graphite); outline-offset: 3px; border-radius: 4px; }

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

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.top { background: var(--eraser); }
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 40px; height: 18px; }
.brand__word { font-family: var(--f-display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.top__gh {
  text-decoration: none; font-weight: 600; font-size: 16px; padding: 8px 16px; border-radius: 999px;
  background: var(--graphite); color: var(--paper);
}
.top__gh:hover { background: var(--graphite-3); }

/* ---------- hero ---------- */
.hero {
  background: var(--eraser);
  padding: 32px 0 56px;
  border-bottom: 2px solid var(--graphite);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.hero__grid > *, .fit__grid > * { min-width: 0; }
.hero__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(44px, 9.6vw, 76px);
  line-height: .98;
  letter-spacing: -.035em;
}
.hero__title code {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .82em;
  letter-spacing: -.04em;
  display: inline-block;
  background: var(--graphite);
  color: var(--eraser);
  padding: .02em .22em .08em;
  border-radius: .16em;
  transform: rotate(-2deg);
  margin-top: .12em;
}
.hero__line { margin-top: 30px; font-size: 21px; line-height: 1.45; max-width: 21em; text-wrap: balance; }
.hero__line code { background: rgba(35, 34, 40, .1); padding: .08em .3em; border-radius: 5px; white-space: nowrap; }
@media (min-width: 1040px) {
  .hero { padding: 44px 0 64px; }
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .hero__copy { container-type: inline-size; }
  .hero__title { font-size: min(76px, 18cqi); margin-top: -.085em; }
}

/* install */
.install { margin-top: 44px; max-width: 560px; }
.install__tabs { display: flex; gap: 4px; }
.install__tab {
  appearance: none; border: 2px solid var(--graphite); border-bottom: 0;
  background: transparent; padding: 7px 14px 6px; font-weight: 600; font-size: 14px;
  border-radius: var(--r-sm) var(--r-sm) 0 0; cursor: pointer;
}
.install__tab[aria-selected="true"] { background: var(--graphite); color: var(--paper); }
.install__tab:not([aria-selected="true"]):hover { background: rgba(35, 34, 40, .08); }
.install__box {
  background: var(--paper); border: 2px solid var(--graphite);
  border-radius: 0 var(--r-md) var(--r-md) var(--r-md);
  box-shadow: 4px 4px 0 var(--graphite);
}
.install__row { display: flex; align-items: stretch; min-height: 54px; }
.install__cmd {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 15px 14px; font-size: 14.5px; line-height: 1.4; align-items: flex-start;
  white-space: normal;
}
.install__cmd--init { padding: 13px 14px 14px; border-top: 1px dashed #b3b0ba; }
.install__cmd .w { white-space: nowrap; }
.install__cmd .w--url { white-space: normal; overflow-wrap: normal; }
.install__dollar { color: var(--eraser-ink); font-weight: 600; user-select: none; }
.install__copy {
  appearance: none; flex: none; border: 0; border-left: 2px solid var(--graphite);
  background: var(--pencil); font-weight: 700; font-size: 15px; padding: 0 18px; cursor: pointer;
  border-radius: 0 10px 0 0; min-width: 88px;
}
@media (max-width: 480px) {
  .install__cmd { font-size: 13.5px; }
  .install__copy { min-width: 76px; padding: 0 14px; }
  .install__tab { padding: 7px 10px 6px; font-size: 13.5px; }
}
@media (max-width: 400px) {
  /* Room for the PS> prompt next to the longest unbreakable URL piece. */
  .install__cmd { font-size: 13px; gap: 8px; padding-left: 12px; padding-right: 12px; }
  .install__copy { min-width: 64px; padding: 0 10px; }
}
@media (max-width: 370px) {
  .install__cmd { font-size: 12px; }
  .install__tabs { gap: 3px; }
  .install__tab { padding: 7px 8px 6px; }
}
.install__copy:hover { background: #ffd24d; }
.install__copy:active { background: #eab619; }
.install__copy.is-copied { background: var(--graphite); color: var(--pencil); }

/* ---------- demo window ---------- */
.win {
  display: flex; flex-direction: column;
  background: var(--graphite);
  color: var(--t-text);
  border: 2px solid var(--graphite);
  border-radius: var(--r-lg);
  box-shadow: 8px 8px 0 rgba(35, 34, 40, .9);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 13.5px;
  line-height: 1.6;
}
.win__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px;
  padding: 9px 12px; background: var(--graphite-2);
  border-bottom: 1px solid var(--graphite-3);
}
.win__ctl { display: flex; align-items: center; gap: 8px; }
.win__ctl[hidden] { display: none; }
.win__reset {
  appearance: none; border: 1px solid var(--graphite-4); background: transparent; color: var(--t-text);
  font-family: var(--f-body); font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer;
}
.win__reset:hover { background: var(--graphite-3); }
.win :focus-visible { outline-color: var(--pencil); }

.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--graphite-4); border-radius: 999px; background: var(--graphite);
}
.seg__tab {
  appearance: none; border: 0; background: transparent; color: var(--t-text); cursor: pointer;
  font-family: var(--f-body); font-size: 14px; font-weight: 600; line-height: 1.2;
  padding: 7px 15px; border-radius: 999px; white-space: nowrap;
}
.seg__tab:not([aria-selected="true"]):hover { background: var(--graphite-3); }
.seg__tab[aria-selected="true"] { background: var(--t-text); color: var(--graphite); }
.seg__tab:focus-visible { outline-offset: 2px; }
@media (max-width: 559px) {
  .seg { flex: 1; }
  .seg__tab { flex: 1; }
  .win__ctl { flex-basis: 100%; justify-content: flex-end; }
}

.win__panels { flex: 1 1 auto; display: grid; }
.win__panel { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; }
.win__panel[hidden] { display: flex; visibility: hidden; }

.switch {
  appearance: none; border: 1px solid var(--graphite-4); background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px 4px 6px; border-radius: 999px;
  font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--t-text);
}
.switch:hover { background: var(--graphite-3); }
.switch__track {
  width: 30px; height: 18px; border-radius: 999px; background: var(--graphite-4); position: relative;
  transition: background .18s ease;
}
.switch__knob {
  position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--t-text); transition: transform .18s ease;
}
.switch[aria-pressed="true"] .switch__track { background: var(--eraser); }
.switch[aria-pressed="true"] .switch__knob { transform: translateX(12px); background: var(--graphite); }
.switch__state { display: inline-block; min-width: 1.6em; text-align: left; }

.term__body { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
@media (min-width: 600px) {
  .term__body { grid-template-columns: 196px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
}

/* file tree */
.tree {
  padding: 14px 12px 14px 16px;
  border-bottom: 1px solid var(--graphite-3);
  background: #27262c;
}
@media (min-width: 600px) {
  .tree { border-bottom: 0; border-right: 1px solid var(--graphite-3); }
}
.tree__root { color: var(--t-dim); margin-bottom: 4px; }
.tree__list, .tree__list ul { list-style: none; margin: 0; padding: 0; }
.tree__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; }
.tree__list > li { grid-column: span 1; }
@media (min-width: 600px) { .tree__list { display: block; } }
@media (max-width: 599px) { .chip { font-size: 12.5px; padding: 8px 10px; min-height: 34px; } .chips { gap: 6px; } }
.tree__list ul { padding-left: 14px; border-left: 1px dashed var(--graphite-4); margin-left: 6px; }
.node { position: relative; }
.node__row {
  display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 6px; margin-left: -6px;
  border-radius: 6px; white-space: nowrap;
}
.node__icon { width: 13px; height: 13px; flex: none; }
.node__name { overflow: hidden; text-overflow: ellipsis; }
.node--dir > .node__row .node__name { color: var(--t-pink); }
.node__badge {
  font-size: 10.5px; font-weight: 600; line-height: 1; padding: 3px 5px; border-radius: 4px;
  background: var(--pencil); color: var(--graphite); margin-left: auto;
}
.node__ghost-tag {
  display: none; font-size: 10.5px; color: var(--t-dim); margin-left: auto;
}

/* deleted, but Oopsy kept a snapshot: a ghost outline stays */
.node.is-ghost > .node__row { color: var(--t-dim); outline: 1px dashed var(--graphite-4); outline-offset: -1px; }
.node.is-ghost > .node__row .node__name { color: var(--t-dim); text-decoration: line-through; text-decoration-color: rgba(156, 154, 166, .6); }
.node.is-ghost > .node__row .node__icon { opacity: .45; }
.node.is-ghost > .node__row .node__badge { display: none; }
.node.is-ghost > .node__row .node__ghost-tag { display: inline; }
.node.is-ghost .node.is-ghost > .node__row { outline: 0; }
.node.is-ghost .node.is-ghost > .node__row .node__ghost-tag { display: none; }

/* deleted for real: nothing left */
.node.is-gone { display: none; }

/* the meaningful motion: erasing and restoring */
.node.is-erasing > .node__row { animation: erase .42s cubic-bezier(.6, 0, .4, 1) both; animation-delay: var(--d, 0ms); }
@keyframes erase {
  0% { clip-path: inset(0 0 0 0); background: rgba(245, 167, 184, .28); }
  100% { clip-path: inset(0 0 0 100%); background: rgba(245, 167, 184, 0); }
}
.node.is-restoring > .node__row { animation: restore 1.1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes restore {
  0% { clip-path: inset(0 100% 0 0); background: rgba(169, 226, 184, .26); }
  40% { clip-path: inset(0 0 0 0); background: rgba(169, 226, 184, .22); }
  100% { clip-path: inset(0 0 0 0); background: rgba(169, 226, 184, 0); }
}
.node.is-changed > .node__row { animation: changed .9s ease both; }
@keyframes changed {
  0% { background: rgba(245, 167, 184, .35); }
  100% { background: rgba(245, 167, 184, 0); }
}

/* console */
.term__console { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.term__out {
  flex: 1 1 0; min-height: 232px; overflow-y: auto; padding: 14px 16px 4px; scrollbar-width: thin; scrollbar-color: var(--graphite-4) transparent;
  white-space: pre-wrap; word-break: break-word;
}
@media (min-width: 600px) { .term__out { min-height: 260px; } }
.term__out:focus-visible { outline-offset: -3px; }
.ln { min-height: 1.6em; }
.ln--cmd { color: var(--t-text); }
.ln--cmd .p { color: var(--t-pink); margin-right: .6em; user-select: none; }
.ln--dim { color: var(--t-dim); }
.ln--err { color: var(--t-red); }
.ln--ok { color: var(--t-green); }
.ln--oops { color: var(--t-yellow); }
.ln--oops b, .ln b { font-weight: 600; }
.ln--gap { height: .6em; min-height: 0; }
.ln .hl { color: var(--t-pink); }
.ln .y { color: var(--t-yellow); }
.ln .g { color: var(--t-green); }
.ln .d { color: var(--t-dim); }

.term__line {
  display: flex; align-items: center; gap: .6em; padding: 6px 16px 14px;
}
.term__prompt { color: var(--t-pink); user-select: none; }
.term__input {
  flex: 1; min-width: 0; background: transparent; border: 0; padding: 4px 0;
  color: var(--t-text); font: inherit; font-size: 16px; caret-color: var(--pencil);
}
@media (min-width: 600px) { .term__input { font-size: inherit; } }
.term__input::placeholder { color: var(--t-dim); }
.term__input:focus { outline: none; }
.term__line:focus-within { box-shadow: inset 0 -2px 0 var(--graphite-4); }

/* chips */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 14px;
  background: var(--graphite-2); border-top: 1px solid var(--graphite-3);
}
.chip {
  appearance: none; cursor: pointer; border: 1px solid var(--graphite-4); background: var(--graphite);
  color: var(--t-text); font-family: var(--f-mono); font-size: 13px; line-height: 1;
  padding: 9px 11px; border-radius: 999px; white-space: nowrap; min-height: 36px;
}
.chip:hover { border-color: var(--t-dim); }
.chip:disabled { opacity: .45; cursor: default; }
.chip--danger { color: var(--t-pink); }
.chip--hero { background: var(--pencil); color: var(--graphite); border-color: var(--pencil); font-weight: 600; }
.chip--hero:hover { background: #ffd24d; border-color: #ffd24d; }

/* ---------- sections ---------- */
.h2 {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(28px, 5vw, 40px); line-height: 1.08; text-wrap: balance;
}

.film { padding: 72px 0 88px; }
.film__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin-top: 24px; border: 2px solid var(--graphite); border-radius: var(--r-lg); background: var(--graphite); }

/* postgres */
.db__setup {
  padding: 10px 16px; border-bottom: 1px solid var(--graphite-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db__setup .p { color: var(--t-pink); margin-right: .6em; }
.db__table-wrap { padding: 14px 16px 8px; min-height: 204px; position: relative; }
.db__caption { color: var(--t-dim); font-size: 12.5px; margin-bottom: 8px; }
.db__caption strong { color: var(--t-pink); font-weight: 600; }
.db__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.db__table th, .db__table td {
  text-align: left; padding: 0 10px; height: 32px; border-bottom: 1px solid var(--graphite-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db__table th { color: var(--t-dim); font-weight: 500; font-size: 12.5px; border-bottom-color: var(--graphite-4); }
.db__table th:first-child, .db__table td:first-child { width: 44px; }
.db__table th:last-child, .db__table td:last-child { width: 78px; }
.db__table tr.is-erasing td { animation: erase .4s cubic-bezier(.6, 0, .4, 1) both; animation-delay: var(--d, 0ms); }
.db__table tr.is-restoring td { animation: restore 1.1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
.db__table td.is-changed { animation: changed .9s ease both; color: var(--t-pink); }
.db__table.is-dropped { opacity: .35; }
.db__table.is-dropped thead th { text-decoration: line-through; }
.db__empty {
  position: absolute; left: 16px; right: 16px; top: 82px; text-align: center; color: var(--t-dim);
  border: 1px dashed var(--graphite-4); border-radius: var(--r-sm); padding: 18px 12px; background: rgba(35, 34, 40, .85);
}
.db__empty[hidden] { display: none; }
.db__out {
  flex: 1 1 0; min-height: 112px; overflow-y: auto; padding: 10px 16px; border-top: 1px solid var(--graphite-3);
  white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; scrollbar-color: var(--graphite-4) transparent;
}
.ln--sql .p { color: var(--t-pink); margin-right: .6em; }
.ln--proxy { color: var(--t-yellow); }

/* works with */
.fit { background: var(--pencil); padding: 72px 0 80px; border-top: 2px solid var(--graphite); }
.fit__grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .fit__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; } }
.works { margin: 0; }
.works__row {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px;
  padding: 16px 0; border-top: 1.5px solid var(--graphite); align-items: baseline;
}
.works dt { font-size: 16px; font-weight: 700; }
.works dd { margin: 0; font-family: var(--f-mono); font-size: 18px; font-weight: 500; line-height: 1.5; }
@media (max-width: 480px) {
  .works__row { grid-template-columns: 1fr; gap: 2px; padding: 14px 0; }
  .works dd { font-size: 16px; }
}

/* footer */
.foot { background: var(--graphite); color: var(--paper); padding: 30px 0; }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot__license { color: #b9b7c2; font-size: 16px; }
.foot__links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot__links a, .foot__license a {
  color: var(--paper); font-size: 16px; font-weight: 600;
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.foot__links a:hover, .foot__license a:hover { color: var(--eraser); }
.foot :focus-visible { outline-color: var(--eraser); }
.brand--foot .brand__word { color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}
