/* The app's look: zinc neutrals, the brand's off-white and near-black, and
   its violets (see frontend/src/index.css). Fredoka for headings, Nunito for text. */
@font-face {
  font-family: Fredoka;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/fredoka-latin-600-normal.woff2) format('woff2');
}

@font-face {
  font-family: Fredoka;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/fredoka-latin-700-normal.woff2) format('woff2');
}

@font-face {
  font-family: Nunito;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/nunito-latin-400-normal.woff2) format('woff2');
}

@font-face {
  font-family: Nunito;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/nunito-latin-500-normal.woff2) format('woff2');
}

@font-face {
  font-family: Nunito;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/nunito-latin-600-normal.woff2) format('woff2');
}

@font-face {
  font-family: Nunito;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/nunito-latin-700-normal.woff2) format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #fbf8f3;
  --surface: #ffffff;
  --subtle: #f4f4f5;
  --border: #e4e4e7;
  --text: #141218;
  --muted: #71717a;
  --accent: #7c5bd6;
  --accent-hover: #9b80e0;
  --accent-soft: #ede6fb;
  --accent-text: #4b1fa8;
  --link-line: #b9a2ee;
  --shadow: 0 1px 2px rgb(24 24 27 / 0.05), 0 8px 24px rgb(24 24 27 / 0.06);
  --radius: 14px;
  font-family: Nunito, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141218;
    --surface: #18181b;
    --subtle: #27272a;
    --border: #27272a;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --accent-soft: #2b1063;
    --accent-text: #b9a2ee;
    --link-line: #4b1fa8;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: Fredoka, Nunito, system-ui, sans-serif;
  font-weight: 600;
}

svg {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.logo {
  fill: currentColor;
  stroke: none;
}

.sprite {
  display: none;
}

[hidden] {
  display: none !important;
}

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

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms,
    border-color 150ms,
    transform 100ms;
}

.button:active {
  transform: scale(0.98);
}

.button:focus-visible,
.device:focus-visible,
[role='tab']:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-hover);
}

.button.outline {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button.outline:hover {
  border-color: var(--muted);
}

.button.small {
  padding: 4px 10px;
  font-size: 13px;
}

.button.light {
  background: #fff;
  color: #3b0764;
}

.button.light:hover {
  background: #f5f3ff;
}

.button.glass {
  border-color: rgb(255 255 255 / 0.5);
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  backdrop-filter: blur(6px);
}

.button.glass:hover {
  background: rgb(255 255 255 / 0.22);
}

.button .icon-done,
.button.done .icon-copy {
  display: none;
}

.button.done .icon-done {
  display: inline;
}

/* Hero */

/* Dark violet, almost flat, with a faint grid of lavender dots (the brand
   kit's pattern) and a lavender glow behind the mascot. */
.hero,
footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle, rgb(185 162 238 / 0.07) 1.2px, transparent 1.6px) 0 0 / 26px 26px,
    linear-gradient(160deg, #23124a, #180d33 55%, #120a24);
  color: #fff;
}

.topbar,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
}


.topbar nav,
.footer-inner nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.topbar nav a,
.footer-inner nav a {
  text-decoration: none;
  opacity: 0.8;
}

.topbar nav a:hover,
.footer-inner nav a:hover {
  opacity: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 24px;
  padding-block: 40px 88px;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 30px rgb(26 8 56 / 0.35);
}

.tagline {
  margin: 16px 0 0;
  color: #f5d08a;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.works-with {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  color: rgb(255 255 255 / 0.78);
  font-size: 14px;
}

.works-with .logo {
  width: 20px;
  height: 20px;
  color: #fff;
}

.mascot {
  width: 100%;
  aspect-ratio: 1;
  max-width: 460px;
  justify-self: center;
  opacity: 0;
  /* The glow sits on the canvas itself and fades out before its edges. */
  background: radial-gradient(closest-side at 50% 52%, rgb(185 162 238 / 0.32), rgb(124 91 214 / 0.12) 55%, transparent);
}

/* The hero swings in, the text from the left and the mascot from the right
   once its model has loaded. */
.hero-copy {
  transform-origin: left center;
  animation: swing-left 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mascot.ready {
  opacity: 1;
  transform-origin: right center;
  animation: swing-right 1300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes swing-left {
  from {
    opacity: 0;
    transform: perspective(1200px) translateX(-80px) rotateY(35deg);
  }
}

@keyframes swing-right {
  from {
    opacity: 0;
    transform: perspective(1200px) translateX(80px) rotateY(-35deg);
  }
}

/* Sections swing in the same way as they are reached, from alternating
   sides (classes set by scenes.js, so without scripts they just show). */
main {
  overflow-x: clip;
}

.reveal {
  opacity: 0;
  transform-origin: left center;
  transform: perspective(1400px) translateX(-80px) rotateY(28deg);
  transition:
    opacity 900ms ease-out,
    transform 1100ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.from-right {
  transform-origin: right center;
  transform: perspective(1400px) translateX(80px) rotateY(-28deg);
}

.reveal.shown {
  opacity: 1;
  transform: none;
}

/* Sections */

.scene {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 48px;
  padding-block: 64px;
}

.copy h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.copy p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.copy .hint {
  color: var(--accent-text);
  font-size: 14px;
}

.copy.centered {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
}

.stage {
  position: relative;
  font-size: 14px;
}

.window,
.chat,
.brain-note,
.note,
.history,
.device,
.assistant {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.window-bar,
.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

small {
  color: var(--muted);
  font-size: 12px;
}

.enter {
  animation: appear 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* Lines between nodes (drawn by stage.js) */

svg.links {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

svg.links path {
  stroke: var(--link-line);
  stroke-width: 1.5;
  stroke-dasharray: 5 6;
}

svg.links path.active {
  stroke: var(--accent);
  animation: flow 600ms linear infinite;
}

svg.links path.active.reverse {
  animation-direction: reverse;
}

@keyframes flow {
  to {
    stroke-dashoffset: -22;
  }
}

.packet {
  fill: var(--accent);
  stroke: var(--bg);
  stroke-width: 2;
}

/* Above the lines; the click ring and the pointer place themselves. */
.stage > :not(svg, .ripple) {
  position: relative;
  z-index: 1;
}

/* 1. Drop anything */

.drop-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
}

.devices {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 92px;
  padding: 12px 6px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    color 200ms,
    border-color 200ms,
    transform 200ms;
}

.device svg {
  width: 24px;
  height: 24px;
}

.device:hover {
  border-color: var(--muted);
  color: var(--text);
}

.device.now {
  border-color: var(--accent);
  color: var(--accent-text);
  transform: scale(1.05);
}

.count {
  margin-left: auto;
  border-radius: 999px;
  background: var(--subtle);
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Five cards fit; the rest slide out of sight. */
.cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 346px;
  margin: 0;
  overflow: hidden;
  padding: 12px;
  list-style: none;
}

.empty {
  margin: auto;
  color: var(--muted);
}

.card {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
}

.kind {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 16px;
}

.card-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.card-text b,
.card-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-text b {
  font-weight: 500;
}

.bot-mark {
  color: var(--accent-text);
  font-size: 15px;
}

.thumb {
  flex: none;
  width: 44px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fbbf24, #f472b6 50%, #7dd3fc);
}

.wave {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
}

.wave i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.6;
}

/* 2. Shared memory */

.memory-stage {
  display: grid;
  gap: 48px 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  /* The panels take the height kept for the tallest step, so the assistants
     and the lines never move. */
  grid-template-rows: auto 1fr;
}

.assistants {
  display: flex;
  grid-column: 1 / -1;
  gap: 12px;
}

.assistant {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  font-weight: 500;
  transition:
    border-color 200ms,
    transform 200ms;
}

.assistant.now {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.logo-badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--subtle);
}

.logo-badge .logo {
  width: 18px;
  height: 18px;
}

.logo-badge.small {
  width: 24px;
  height: 24px;
}

.logo-badge.small .logo {
  width: 14px;
  height: 14px;
}

.brain-note,
.chat {
  min-height: 260px;
}

.items {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
}

.mini {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  transition:
    border-color 200ms,
    box-shadow 200ms;
}

.mini b {
  font-weight: 500;
}

.mini span {
  color: var(--muted);
  font-size: 13px;
}

.mini.faded {
  opacity: 0.5;
}

.mini.now {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.trip-lines {
  display: grid;
}

.trip-lines .new {
  border-radius: 4px;
  animation: highlight 1800ms ease-out both;
}

@keyframes highlight {
  from {
    background: var(--accent-soft);
    color: var(--accent-text);
  }
}

.by,
.note-by {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--accent-text);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.messages > * {
  margin: 0;
  animation: appear 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bubble {
  max-width: 90%;
  border-radius: 12px;
  background: var(--subtle);
  padding: 8px 10px;
}

.bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

.tool {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.later {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

/* 3. History */

.history-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
}

.note,
.history {
  min-height: 300px;
}

.note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.note-head b {
  font-size: 18px;
}

.note-head .note-by {
  margin: 0;
}

.lines {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 20px 16px 12px;
  list-style: none;
}

.lines li {
  border-radius: 6px;
  padding: 4px 8px;
}

.lines li::before {
  content: '• ';
  color: var(--muted);
}

.lines .selected {
  background: color-mix(in srgb, #10a37f 30%, transparent);
}

.lines .back {
  animation: highlight 1800ms ease-out both;
}

.caret {
  position: relative;
  margin-left: 1px;
  border-left: 2px solid var(--who);
  animation: blink 1s steps(1) infinite;
}

.caret::after {
  content: attr(data-who);
  position: absolute;
  bottom: 100%;
  left: -2px;
  border-radius: 4px 4px 4px 0;
  background: var(--who);
  padding: 1px 5px;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.caret[data-who='']::after {
  display: none;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.revs {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px;
  list-style: none;
}

.rev {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  transition:
    background-color 200ms,
    border-color 200ms,
    transform 150ms;
}

.rev > svg {
  color: var(--muted);
  font-size: 16px;
}

.rev > span:not(.restore) {
  display: grid;
  flex: 1;
  min-width: 0;
}

.rev b {
  font-weight: 500;
}

.rev.now {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.restore {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  background: var(--accent);
  padding: 4px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  transition:
    transform 150ms,
    background-color 150ms,
    box-shadow 150ms;
  animation: appear 250ms ease-out both;
}

.pointer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 26px;
  height: 26px;
  fill: #18181b;
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.3));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 1000ms cubic-bezier(0.45, 0, 0.2, 1),
    opacity 300ms,
    scale 150ms;
}

.pointer.clicking {
  scale: 0.78;
}

/* The ring a click leaves, and what it pressed. */
.ripple {
  position: absolute;
  z-index: 4;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  animation: ripple 650ms ease-out forwards;
}

@keyframes ripple {
  from {
    opacity: 1;
    transform: scale(0.2);
  }
  to {
    opacity: 0;
    transform: scale(1.4);
  }
}

.rev.pressed {
  background: var(--subtle);
  transform: scale(0.98);
}

.restore.pressed {
  background: var(--accent-hover);
  transform: scale(0.88);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Feature tiles */

.features {
  padding-block: 64px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 12px 20px;
}

.tile h3 {
  margin: 16px 8px 4px;
  font-size: 17px;
}

.tile p {
  margin: 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.art {
  position: relative;
  height: 170px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--subtle);
  font-size: 12px;
}

.art svg path {
  stroke: var(--link-line);
  stroke-width: 1.5;
}

/* Boards */

.canvas {
  position: absolute;
  inset: -20px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 14px 14px;
  animation: pan 9s ease-in-out infinite alternate;
}

@keyframes pan {
  to {
    transform: translate(-14px, 8px);
  }
}

.b-frame,
.b-card {
  position: absolute;
  top: calc(var(--y) + 20px);
  left: calc(var(--x) + 20px);
}

.b-frame {
  width: var(--w);
  height: var(--h);
  border: 1.5px dashed var(--link-line);
  border-radius: 10px;
}

.b-frame span {
  position: absolute;
  top: -9px;
  left: 10px;
  background: var(--subtle);
  padding: 0 4px;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
}

.b-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
  box-shadow: var(--shadow);
}

/* Cards are dropped onto the canvas: from a little above, then settle. */
.art-board [data-step]:is(.b-card, .b-frame) {
  opacity: 0;
  translate: 0 -10px;
  scale: 1.08;
  transition:
    opacity 300ms,
    translate 400ms cubic-bezier(0.2, 0.8, 0.2, 1),
    scale 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.art-board [data-step].on {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

.b-photo {
  width: 64px;
  height: 46px;
  padding: 0;
  background: linear-gradient(135deg, #fbbf24, #f472b6 50%, #7dd3fc);
}

.b-link {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.b-sticky {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #78350f;
  rotate: 3deg;
}

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

.b-note b {
  color: var(--text);
}

.b-ink {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  overflow: visible;
}

.art .b-ink path {
  stroke-width: 2;
  stroke-linecap: round;
}

.art .b-ink .b-connect {
  stroke: var(--accent);
  opacity: 0;
}

.art .b-ink .b-connect.on {
  opacity: 1;
}

.art .b-ink marker path {
  fill: var(--accent);
  stroke: none;
}

.art .b-ink .b-pen {
  stroke: #f59e0b;
  stroke-width: 2.5;
}

/* The pencil drawing on the board, its tip on the stroke. */
.b-pencil {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 20px;
  height: 20px;
  color: var(--text);
  stroke-width: 1.8;
  fill: var(--surface);
  opacity: 0;
  transition: opacity 200ms;
  pointer-events: none;
}

.b-pencil.on {
  opacity: 1;
}

/* Mind map */

.art-mind svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art-mind path {
  stroke-dasharray: 120;
  animation: draw 2.4s ease-out infinite alternate;
}

@keyframes draw {
  from {
    stroke-dashoffset: 120;
  }
  40% {
    stroke-dashoffset: 0;
  }
}

.m-node {
  position: absolute;
  top: var(--y);
  left: var(--x);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px 10px;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.m-node.root {
  --x: 50%;
  --y: 50%;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* Collections */

.art-tree ul {
  margin: 0;
  padding: 18px 16px;
  list-style: none;
}

.art-tree li {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 13px;
}

.art-tree li svg {
  font-size: 14px;
}

.art-tree li.in {
  padding-left: 30px;
}

.art-tree li.now {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 500;
}

.art-tree li span {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.8;
}

/* Graph */

.art-graph svg {
  width: 100%;
  height: 100%;
}

.g-dots circle {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
}

.g-dots .hub {
  fill: var(--accent);
}

.art-graph .packet {
  fill: var(--accent-text);
  stroke: none;
}

/* Search */

.art-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.s-box,
.s-result {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 8px 10px;
}

.s-box {
  border-color: var(--accent);
  font-size: 13px;
}

.s-query::after {
  content: '';
  border-left: 1.5px solid var(--text);
  animation: blink 1s steps(1) infinite;
}

.s-box kbd {
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
}

.s-result {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 300ms,
    transform 300ms;
}

.s-result + .s-result {
  transition-delay: 120ms;
}

.found .s-result {
  opacity: 1;
  transform: none;
}

.s-result span {
  display: grid;
  min-width: 0;
}

.s-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

mark {
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Public notes */

.art-public {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.p-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-toggle {
  display: inline-grid;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px 10px;
}

.p-toggle > span {
  display: inline-flex;
  grid-area: 1 / 1;
  align-items: center;
  gap: 4px;
  transition: opacity 250ms;
}

.p-public {
  color: var(--accent-text);
  opacity: 0;
}

.art-public.on .p-private {
  opacity: 0;
}

.art-public.on .p-public {
  opacity: 1;
}

.p-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  padding: 6px 10px;
  color: var(--accent-text);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 300ms,
    transform 300ms;
}

.art-public.on .p-url {
  opacity: 1;
  transform: none;
}

.p-page {
  display: grid;
  gap: 6px;
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.p-page i {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

.p-page i:nth-child(2) {
  width: 80%;
}

.p-page i:nth-child(3) {
  width: 60%;
}

/* Markdown */

.art-md {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.md-src {
  overflow: hidden;
  padding: 14px 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.9;
  white-space: pre;
}

.md-src > div {
  border-radius: 3px;
}

.md-src .back {
  animation: highlight 1600ms ease-out both;
}

.md-mark {
  color: var(--accent-text);
}

.md-out {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  background: var(--surface);
  padding: 14px 12px;
  line-height: 1.4;
}

.md-h {
  font-size: 15px;
}

.md-task {
  display: flex;
  align-items: center;
  gap: 6px;
}

.md-quote {
  border-left: 2px solid var(--accent);
  padding-left: 6px;
  color: var(--muted);
}

.box {
  flex: none;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
  transition:
    background-color 200ms,
    border-color 200ms;
}

.box.done {
  border-color: var(--accent);
  background: var(--accent);
}

/* Obsidian */

.art-vault {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  padding: 14px;
}

.art-vault svg.links path {
  stroke-width: 1.5;
}

.v-side {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.v-head {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  font-weight: 600;
}

.v-head .logo {
  width: 14px;
  height: 14px;
}

.logo.obsidian {
  color: #7c3aed;
}

.v-list {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 92px;
  margin: 0;
  padding: 6px;
  list-style: none;
}

.v-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--muted);
  white-space: nowrap;
  transition:
    background-color 200ms,
    color 200ms;
}

.v-list li.now,
.v-list li.new {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.v-label {
  align-self: center;
  margin-bottom: 34px;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* Phone */

.art-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-bottom: 12px;
}

.phone {
  position: relative;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
}

.ph-sheet {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--border);
  background: var(--subtle);
  padding: 8px;
  animation: sheet 4s ease-in-out infinite;
}

@keyframes sheet {
  0%,
  15% {
    transform: translateY(100%);
  }
  35%,
  85% {
    transform: none;
  }
  100% {
    transform: translateY(100%);
  }
}

.ph-label {
  color: var(--muted);
  font-size: 10px;
}

.ph-apps {
  display: flex;
  gap: 6px;
}

.ph-apps i {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--border);
}

.ph-apps img {
  border-radius: 7px;
  box-shadow: 0 0 0 2px var(--accent);
}

.ph-tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.ph-tg .logo {
  color: #26a5e4;
}

/* A section reached: its title lights up for a moment. */
h2.glow {
  animation: glow 1800ms ease-out;
}

@keyframes glow {
  0% {
    text-shadow: 0 0 0 transparent;
  }
  30% {
    color: var(--accent-text);
    text-shadow:
      0 0 18px color-mix(in srgb, var(--accent) 70%, transparent),
      0 0 42px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  100% {
    text-shadow: 0 0 0 transparent;
  }
}

/* Connect and install */

.panel {
  padding-block: 64px;
}

.panel .copy {
  max-width: 620px;
  margin-bottom: 24px;
}

pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

code {
  border-radius: 4px;
  background: var(--subtle);
  padding: 1px 4px;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.6;
}

.address {
  display: grid;
  gap: 6px;
  max-width: 420px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.address input {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  outline: none;
}

.address input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

[role='tab'] {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 10px 14px;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

[role='tab'][aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.tab-panel {
  padding-top: 20px;
}

.tab-panel > p {
  margin: 0 0 16px;
  color: var(--muted);
}

.prompt {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.prompt pre {
  margin-bottom: 16px;
  color: var(--muted);
}

.howto {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin: 0;
  padding-left: 22px;
}

.howto li::marker {
  color: var(--accent-text);
  font-weight: 600;
}

.url-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.url-row code {
  padding: 6px 10px;
}

.howto-title {
  margin: 0 0 12px;
  font-size: 16px;
}

.howto + .note-small + .howto-title {
  margin-top: 32px;
}

/* Under a tab's steps; `.tab-panel > p` would take its margin otherwise. */
.tab-panel > .note-small {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.installs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.install {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.install h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 17px;
}

.install h3 .logo {
  width: 26px;
  height: 26px;
}

.logo.docker {
  color: #2496ed;
}

.logo.umbrel {
  color: var(--text);
}

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

.install pre {
  border-radius: 10px;
  background: var(--subtle);
  padding: 12px 14px;
}

.faq {
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 20px;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

.faq details p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Footer: the hero's background again, in a strip. */

footer {
  margin-top: 48px;
}

.footer-inner {
  padding-block: 48px;
  font-size: 15px;
}

.footer-inner .brand {
  font-size: 18px;
  text-shadow: 0 1px 12px rgb(26 8 56 / 0.4);
}

/* The brain of linked notes, turning between the brand and the links. */
.footer-inner .brain-3d {
  width: 200px;
  aspect-ratio: 1;
  margin-block: -32px;
  background: radial-gradient(closest-side, rgb(185 162 238 / 0.22), transparent);
}

/* Narrower screens */

@media (max-width: 960px) {
  .scene {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-block: 48px;
  }

  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 0 56px;
  }

  .mascot {
    order: -1;
    max-width: 260px;
    margin-bottom: -24px;
  }

  /* Sources in a row above the inbox. */
  .drop-stage {
    grid-template-columns: 1fr 1fr;
    gap: 36px 12px;
  }

  .drop-stage .inbox {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .devices {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  .device {
    width: 76px;
  }

  .memory-stage,
  .history-stage,
  .installs,
  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .memory-stage {
    grid-template-rows: auto auto 1fr;
    row-gap: 40px;
  }

  .brain-note {
    min-height: 0;
  }

  .chat {
    min-height: 230px;
  }

  .assistant {
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner .brain-3d {
    order: -1;
    width: 160px;
    margin-block: -16px -8px;
  }

  .footer-inner nav {
    flex-wrap: wrap;
  }
}

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