/* Memnoria marketing site.
 *
 * One dark canvas framed by dashed rails, sections divided by hairlines
 * with small mark-shaped nodes where lines meet. The official mark is taken
 * apart into a shape grammar used everywhere on the page:
 *   rounded square = a file or a version
 *   circle         = a person
 *   pink branch    = an AI assistant (the only use of Watermelon)
 * Product UI is shown in the app's own light, neutral styling. */

@font-face {
  font-family: Figtree;
  src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #131211;
  --bg-raised: #1b1a19;
  --bg-sunk: #0d0c0c;
  --line: rgb(243 239 232 / 0.09);
  --line-strong: rgb(243 239 232 / 0.17);
  --rail: rgb(243 239 232 / 0.16);
  --text: #f3efe8;
  --text-2: #b3ada4;
  --text-3: #8c867d;
  --paper: #f3efe8;
  --pink: #f44d5d;
  --ink: #151515;

  /* Product UI, from the app's own tokens */
  --ui-bg: #fafafa;
  --ui-card: #ffffff;
  --ui-fg: #171717;
  --ui-muted: #666666;
  --ui-line: #e5e5e5;
  --ui-input: #d4d4d4;
  --ui-side: #f5f5f5;
  --positive: #1f7a4d;
  --positive-tint: #e9f5ee;
  --caution: #b54708;
  --caution-tint: #fef3e7;
  --critical: #c0362c;
  --critical-tint: #fdecea;

  --font: Figtree, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --frame: 1280px;
  --edge: clamp(0px, 2.5vw, 40px);
  --pad: clamp(20px, 4vw, 56px);
  --cell-pad: clamp(22px, 3vw, 40px);
  /* The mark's corner radius is 28.6% of a square's side. */
  --mark-r: 0.286;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

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

.ui :focus-visible {
  outline-color: var(--ui-fg);
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Frame and bands ---------- */

.frame {
  position: relative;
  width: min(100% - 2 * var(--edge), var(--frame));
  margin-inline: auto;
  border-inline: 1px dashed var(--rail);
}

.band {
  position: relative;
  border-top: 1px solid var(--line-strong);
  padding: clamp(72px, 9vw, 128px) var(--pad);
}

/* Nodes where a section rule meets the rails: small squares from the mark. */
.band::before,
.band::after,
.site-footer .footer-inner::before,
.site-footer .footer-inner::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 9px;
  height: 9px;
  border-radius: 2.6px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  z-index: 1;
}

.band::before,
.site-footer .footer-inner::before {
  left: -5px;
}

.band::after,
.site-footer .footer-inner::after {
  right: -5px;
}

.band-head {
  max-width: 920px;
  margin-bottom: clamp(44px, 5vw, 72px);
}

h2 {
  font-size: clamp(2.25rem, 1.25rem + 2.9vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 500;
  text-wrap: balance;
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.lead {
  margin-top: 22px;
  max-width: 34rem;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.5;
}

/* A grid that runs edge to edge between the rails, cells divided by hairlines. */
.has-grid {
  padding-bottom: 0;
}

.grid-bleed {
  display: grid;
  gap: 1px;
  margin-inline: calc(-1 * var(--pad));
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
}

.cell {
  background: var(--bg);
  padding: var(--cell-pad);
  min-width: 0;
}

.cell > p,
.cell-copy p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 1rem;
  max-width: 32em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: #ffffff;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
}

.btn-quiet {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-quiet:hover {
  background: var(--bg-raised);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 44px;
  height: 64px;
  padding-inline: var(--pad);
}

.brand img {
  width: 120px;
  height: auto;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--text-2);
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 0.9375rem;
}

/* The header button appears once the hero's own button has scrolled away,
   so the page never shows two identical calls to action at once. */
.js .header-cta {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0s linear 0.2s;
}

.js .is-past-hero:not(.is-at-access) .header-cta {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--text);
  transition: transform 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-nav {
  display: grid;
  border-top: 1px solid var(--line);
  padding: 8px var(--pad) 20px;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: center;
  padding: clamp(56px, 7vw, 104px) var(--pad) clamp(48px, 6vw, 88px);
}

h1 {
  font-size: clamp(3rem, 1.1rem + 5.4vw, 6.25rem);
  line-height: 0.95;
  letter-spacing: -0.048em;
  font-weight: 500;
  text-wrap: balance;
}

.hero-sub {
  margin: 32px 0 40px;
  max-width: 31rem;
  color: var(--text-2);
  font-size: 1.1875rem;
  line-height: 1.5;
}

.hero-figure {
  justify-self: end;
  width: 100%;
  max-width: 600px;
}

.mark-x {
  width: 100%;
  height: auto;
  overflow: visible;
}

.mx-grid path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 2 5;
  vector-effect: non-scaling-stroke;
}

.mx-ghost rect,
.mx-ghost circle {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

/* <use> can't pass vector-effect into its shadow tree, so size the dash in user units. */
.mx-ghost use {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 3.2;
  stroke-dasharray: 9 12;
}

.mx-piece {
  transition: opacity 0.25s ease;
}

.mx-file > rect,
.mx-person circle {
  fill: var(--paper);
}

.mx-agent {
  fill: var(--pink);
}

/* Inside each file square, a small preview of the kind of file it is. */
.mx-glyph {
  opacity: 0.34;
}

.mx-glyph rect,
.mx-glyph path {
  fill: var(--ink);
}

.mx-glyph .soft {
  opacity: 0.55;
}

.mx-glyph .stroke {
  fill: none;
  stroke: var(--ink);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mx-piece text.initial {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 124px;
  font-weight: 650;
  letter-spacing: 0;
  text-anchor: middle;
  opacity: 1;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-3);
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: default;
  transition: color 0.2s ease;
}

.key svg {
  width: 11px;
  height: 11px;
  fill: var(--paper);
}

.key[data-kind="agent"] svg {
  fill: var(--pink);
}

.key:hover {
  color: var(--text);
}

.hero-figure:has(.key[data-kind="file"]:hover) .mx-piece:not(.mx-file),
.hero-figure:has(.key[data-kind="person"]:hover) .mx-piece:not(.mx-person),
.hero-figure:has(.key[data-kind="agent"]:hover) .mx-piece:not(.mx-agent) {
  opacity: 0.14;
}

/* ---------- Problem ---------- */

.problem {
  padding-bottom: 0;
}

.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1px;
  margin-inline: calc(-1 * var(--pad));
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
}

.copies,
.as-you {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(24px, 3vw, 44px);
  align-items: start;
}

.copies > :first-child,
.as-you > :first-child {
  grid-row: 1 / span 2;
}

.copies h3,
.as-you h3 {
  padding-top: 4px;
}

.itself {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  background: var(--pink);
  color: var(--ink);
}

.copies-pile {
  display: grid;
  justify-items: start;
  padding-top: 6px;
}

.copies-pile span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  margin-top: -5px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-raised);
  box-shadow: 0 10px 22px -12px rgb(0 0 0 / 0.9);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copies-pile span::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2.6px;
  background: var(--text-3);
}

.copies-pile span:nth-child(1) {
  transform: rotate(-1.6deg);
}
.copies-pile span:nth-child(2) {
  margin-left: 18px;
  transform: rotate(1.2deg);
}
.copies-pile span:nth-child(3) {
  margin-left: 6px;
  transform: rotate(-0.8deg);
}
.copies-pile span:nth-child(4) {
  margin-left: 26px;
  transform: rotate(1.8deg);
}
.copies-pile span:nth-child(5) {
  margin-left: 12px;
  transform: rotate(-1deg);
  color: var(--text);
  border-color: rgb(243 239 232 / 0.3);
}

.copies-pile span:nth-child(5)::before {
  background: var(--paper);
}

.as-you-log {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-raised);
  font-size: 0.875rem;
  overflow: hidden;
}

.as-you-log li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  color: var(--text-2);
}

.as-you-log li + li {
  border-top: 1px solid var(--line);
}

.as-you-log time {
  margin-left: auto;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8e8e8;
  color: var(--ui-fg);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.avatar.you {
  width: 30px;
  height: 30px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.625rem;
  letter-spacing: 0.01em;
}

.avatar.agent {
  background: none;
}

.glyph-agent {
  flex: none;
  width: 16px;
  height: 16px;
  fill: var(--pink);
}

.itself > .itself-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.itself h3 {
  margin-top: 14px;
  font-size: clamp(2.25rem, 1.4rem + 2.2vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.itself-card {
  margin-top: auto;
  padding-top: 48px;
}

.itself-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  background: var(--ui-card);
  color: var(--ui-fg);
  font-size: 0.875rem;
  line-height: 1.35;
  border-radius: 12px 12px 0 0;
}

.itself-row b {
  font-weight: 600;
}

.itself-row time {
  margin-left: auto;
  color: var(--ui-muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.itself-row.muted {
  margin-top: 1px;
  border-radius: 0 0 12px 12px;
  color: var(--ui-muted);
}

.itself-row .glyph-agent {
  width: 22px;
  height: 22px;
}

.itself-row .avatar {
  width: 22px;
  height: 22px;
}

/* ---------- The week ---------- */

.week {
  padding-bottom: clamp(24px, 3vw, 40px);
}

.week-head {
  margin-bottom: clamp(32px, 4vw, 56px);
}

.beats {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.beat {
  display: grid;
  grid-template-columns: minmax(250px, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.beat-copy {
  position: sticky;
  top: 112px;
  padding-left: 52px;
}

/* The timeline: a dashed line through each beat, with who acted as its node. */
.beat-copy::before {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 40px;
  height: 120px;
  border-left: 1px dashed var(--line-strong);
}

.beat-node {
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}

.beat-node.person {
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.beat-node.agent svg {
  width: 32px;
  height: 32px;
  fill: var(--pink);
}

.beat-time {
  display: block;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 24px;
}

.beat h3 {
  margin-top: 14px;
  font-size: clamp(1.625rem, 1.1rem + 1.2vw, 2.125rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.beat-copy p {
  margin-top: 16px;
  color: var(--text-2);
  max-width: 27em;
}

.beat-visual {
  min-width: 0;
}

.visual-note {
  margin-top: 14px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* ---------- Product UI (the app's own look) ---------- */

.ui {
  background: var(--ui-bg);
  color: var(--ui-fg);
  border-radius: 14px;
  font-size: 0.8125rem;
  line-height: 1.45;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.5),
    0 30px 60px -30px rgb(0 0 0 / 0.85);
  overflow: hidden;
}

.ui-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--ui-card);
  border-bottom: 1px solid var(--ui-line);
}

.ui-head strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

.ui-steps {
  display: flex;
  gap: 6px;
  color: var(--ui-muted);
  font-size: 0.75rem;
}

.ui-steps span {
  padding: 3px 9px;
  border-radius: 999px;
}

.ui-steps .on {
  background: #f0f0f0;
  color: var(--ui-fg);
  font-weight: 600;
}

.ui-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  background: var(--ui-card);
  border-top: 1px solid var(--ui-line);
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--ui-input);
  border-radius: 8px;
  background: var(--ui-card);
  color: var(--ui-fg);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

button.ui-btn {
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    opacity 0.15s ease;
}

button.ui-btn:hover {
  background: #f4f4f4;
}

.ui-btn.solid {
  background: var(--ui-fg);
  border-color: var(--ui-fg);
  color: #fafafa;
}

button.ui-btn.solid:hover {
  background: #333333;
}

.ui-btn[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  color: #444444;
  font-size: 0.75rem;
  font-weight: 600;
}

.input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--ui-input);
  border-radius: 8px;
  background: var(--ui-card);
}

.input.select::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid var(--ui-muted);
  border-bottom: 1.5px solid var(--ui-muted);
  transform: translateY(-2px) rotate(45deg);
}

.seg {
  display: inline-flex;
  justify-self: start;
  padding: 2px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: #f1f1f1;
  font-size: 0.75rem;
}

.seg span {
  padding: 4px 10px;
  border-radius: 7px;
  color: var(--ui-muted);
}

.seg .on {
  background: var(--ui-card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
  color: var(--ui-fg);
  font-weight: 600;
}

.tree {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: var(--ui-card);
  overflow: hidden;
}

.tree li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  color: #9a9a9a;
}

.tree li + li {
  border-top: 1px solid #f0f0f0;
}

.tree svg,
.app-list svg,
.finder svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.check {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid #c8c8c8;
  border-radius: 4px;
}

.tree li.on {
  color: var(--ui-fg);
  font-weight: 600;
}

.tree li.on .check {
  border-color: var(--ui-fg);
  background: var(--ui-fg);
}

.tree li.on .check::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 0.5px;
  width: 4px;
  height: 7.5px;
  border-right: 1.5px solid #ffffff;
  border-bottom: 1.5px solid #ffffff;
  transform: rotate(45deg);
}

.choices {
  display: grid;
  gap: 6px;
}

.choice {
  position: relative;
  display: grid;
  gap: 1px;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: var(--ui-card);
  color: var(--ui-muted);
  font-size: 0.75rem;
}

.choice b {
  color: var(--ui-fg);
  font-size: 0.8125rem;
  font-weight: 600;
}

.choice::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 11px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #c8c8c8;
  border-radius: 50%;
}

.choice.on {
  border-color: var(--ui-fg);
  box-shadow: inset 0 0 0 1px var(--ui-fg);
}

.choice.on::before {
  border: 4.5px solid var(--ui-fg);
}

.seg-wide {
  display: flex;
  margin-bottom: 16px;
}

.seg-wide span {
  flex: 1 1 auto;
  text-align: center;
  white-space: nowrap;
}

/* Beat 1: adding an agent */

.ui-sheet {
  max-width: 720px;
}

.sheet-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  padding: 20px 18px;
}

/* Beat 2: a review */

.ui-review {
  max-width: 660px;
}

.crumb {
  display: block;
  color: var(--ui-muted);
  font-size: 0.75rem;
}

.review-title {
  display: block;
  margin-top: 1px;
}

.status {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--caution-tint);
  color: var(--caution);
  font-size: 0.75rem;
  font-weight: 600;
}

[data-state="approved"] .status {
  background: var(--positive-tint);
  color: var(--positive);
}

[data-state="declined"] .status {
  background: #efefef;
  color: var(--ui-muted);
}

.review-by {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 18px 0;
}

.review-by b {
  font-weight: 600;
}

.review-note {
  margin: 10px 18px 0;
  padding: 10px 13px;
  border-radius: 9px;
  background: #f1f1f1;
  color: #444444;
}

.diff {
  margin: 14px 18px 18px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-card);
  overflow: hidden;
  transition: opacity 0.25s ease;
}

.diff-file {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #f7f7f7;
  border-bottom: 1px solid var(--ui-line);
  font-family: var(--mono);
  font-size: 0.71875rem;
}

.diff-file.folded {
  border-top: 1px solid var(--ui-line);
  border-bottom: 0;
}

.diff-count {
  color: var(--ui-muted);
}

.diff-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  padding: 7px 14px 7px 8px;
  font-size: 0.84375rem;
}

.diff-line > span:first-child {
  font-family: var(--mono);
  text-align: center;
}

.diff-line.del {
  background: var(--critical-tint);
  color: #7d231b;
}

.diff-line.add {
  background: var(--positive-tint);
  color: #155136;
}

[data-state="declined"] .diff {
  opacity: 0.45;
}

.review-foot {
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 57px;
}

.review-result {
  color: var(--ui-muted);
  font-size: 0.8125rem;
}

[data-state="approved"] .review-result {
  color: var(--positive);
}

.review-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Beat 3: history as the mark's staircase, each version with its own undo */

.stairs {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stair {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  max-width: 600px;
  margin-left: calc(var(--i, 0) * 16px);
}

.stair:nth-child(2) {
  --i: 1;
}
.stair:nth-child(3) {
  --i: 2;
}
.stair:nth-child(4) {
  --i: 3;
}
.stair:nth-child(5) {
  --i: 4;
}

.stair-block {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: calc(44px * var(--mark-r));
  background: var(--paper);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Who made the version sits in the square's corner notch, as the circles do in the mark. */
.stair-block .avatar {
  position: absolute;
  right: -11px;
  bottom: -11px;
  width: 24px;
  height: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 3px var(--bg);
}

.stair-block .glyph-agent {
  display: none;
}

.stair.agent .stair-block {
  background: var(--pink);
}

.stair-text {
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.35;
  transition: color 0.3s ease;
}

.stair-text time {
  display: block;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.stair-undo {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.stair-undo:hover {
  border-color: var(--text-3);
  color: var(--text);
}

.undone-tag {
  display: none;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-style: normal;
  white-space: nowrap;
}

.stair.undone .stair-block {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--text-3);
}

.stair.agent.undone .stair-block {
  box-shadow: inset 0 0 0 1.5px var(--pink);
}

.stair.undone .stair-text {
  color: var(--text-3);
}

.stair.undone .stair-undo {
  display: none;
}

.stair.undone .undone-tag {
  display: inline-block;
}

.stair.new {
  animation: stair-in 0.45s ease both;
}

.stair.new .stair-text {
  color: var(--text);
}

@keyframes stair-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.history-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
}

.history-foot .visual-note {
  margin: 0;
}

.ui-btn.ghost {
  background: none;
  border-color: var(--line-strong);
  color: var(--text);
}

button.ui-btn.ghost:hover {
  background: var(--bg-raised);
}

/* Beat 4: undo one assistant's week, with a preview of what it touches */

.ui-undo {
  max-width: 760px;
}

.undo-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.field-row .field {
  margin: 0;
}

.undo-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.undo-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: var(--ui-card);
}

.undo-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  transition: opacity 0.25s ease;
}

.undo-list li + li {
  border-top: 1px solid #f0f0f0;
}

.undo-list b {
  display: block;
  font-weight: 600;
}

.undo-list small {
  display: block;
  color: var(--ui-muted);
  font-size: 0.71875rem;
}

.undo-list .glyph-agent {
  width: 18px;
  height: 18px;
}

.undo-list .undone-tag {
  margin-left: auto;
  border-color: var(--ui-input);
  color: var(--ui-muted);
}

[data-state="after"] .undo-list li {
  color: var(--ui-muted);
}

[data-state="after"] .undo-list .undone-tag {
  display: inline-block;
}

.undo-kept {
  padding: 9px 12px;
  border-radius: 9px;
  background: #f1f1f1;
  color: #444444;
  font-size: 0.78125rem;
}

.undo-foot {
  flex-wrap: wrap;
}

.undo-result {
  margin-right: auto;
  color: var(--positive);
  font-size: 0.8125rem;
}

/* ---------- File context and workers ---------- */

.ctx {
  padding-bottom: 0;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  margin-inline: calc(-1 * var(--pad));
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
}

.context-grid .cell {
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow: hidden;
}

.workers {
  grid-column: span 8;
}
.where {
  grid-column: span 4;
}
.notes {
  grid-column: span 5;
}
.search {
  grid-column: span 7;
}

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

.pipeline li {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(150px, 0.8fr) minmax(0, 1.4fr);
  align-items: center;
}

.pipe-file {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.pipe-file .sq {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 2.9px;
  background: rgb(21 21 21 / 0.35);
}

/* The worker sits on a dashed line from the file to what it wrote. */
.pipe-worker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 8px;
}

.pipe-worker::before,
.pipe-worker::after {
  content: "";
  flex: 1;
  min-width: 10px;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--line-strong) 0 4px, transparent 4px 8px);
}

.pipe-worker .pill {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.78125rem;
  font-weight: 500;
  white-space: nowrap;
}

.pipe-out {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-raised);
  color: var(--text-2);
  font-size: 0.84375rem;
  line-height: 1.4;
}

.pipe-out b {
  display: block;
  margin-bottom: 2px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
}

.runs {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.runs-label {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8125rem;
}

.chips li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2.3px;
  background: var(--paper);
}

.chips.outside li {
  border-style: dashed;
  color: var(--text-2);
}

.chips.outside li::before {
  background: none;
  box-shadow: inset 0 0 0 1px var(--text-3);
}

/* Product fragments in this grid run off the cell's right and bottom edges. */
.ui-note,
.ui-search {
  margin: auto calc(-1 * var(--cell-pad)) calc(-1 * var(--cell-pad)) 0;
  border-radius: 14px 0 0 0;
}

.ui-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 22px;
}

.ui-note strong {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--ui-line);
  font-weight: 600;
}

.note-body {
  padding: 10px 12px;
  border: 1px solid var(--ui-input);
  border-radius: 8px;
  background: var(--ui-card);
}

.note-by {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ui-muted);
  font-size: 0.71875rem;
}

.note-by .avatar {
  width: 18px;
  height: 18px;
  font-size: 0.5rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--ui-card);
  border-bottom: 1px solid var(--ui-line);
  font-size: 0.875rem;
}

.ui-note svg,
.ui-search svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--ui-muted);
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.results {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 8px 14px;
  list-style: none;
}

.results li {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
}

.results li:first-child {
  background: #f1f1f1;
}

.results svg {
  margin-top: 2px;
}

.results b {
  font-weight: 600;
}

.results small {
  margin-left: 8px;
  color: var(--ui-muted);
  font-size: 0.71875rem;
}

.results q {
  display: block;
  margin-top: 3px;
  color: #444444;
  quotes: none;
}

.results mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #fdeeb4;
  color: inherit;
}

/* ---------- Product bento ---------- */

.product {
  padding-bottom: 0;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  margin-inline: calc(-1 * var(--pad));
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
}

.bento .cell {
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow: hidden;
}

.bento .cell-copy h3,
.context-grid .cell-copy h3 {
  font-size: 1.1875rem;
}

.bento .cell-copy p,
.context-grid .cell-copy p {
  font-size: 0.96875rem;
}

.web {
  grid-column: span 8;
}
.mac {
  grid-column: span 4;
}
.tools {
  grid-column: span 5;
}
.server {
  grid-column: span 7;
}

.web .cell-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 32px;
  align-items: baseline;
}

.web .cell-copy p {
  margin: 0;
}

/* The app window runs off the cell's right and bottom edges. */
.ui-app {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 380px;
  margin: 0 calc(-1 * var(--cell-pad)) calc(-1 * var(--cell-pad)) 0;
  border-radius: 14px 0 0 0;
  font-size: 0.78125rem;
}

.app-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 10px;
  background: var(--ui-side);
  border-right: 1px solid var(--ui-line);
}

.app-side img {
  width: 92px;
  height: auto;
  margin: 2px 8px 16px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  color: #444444;
}

.side-item.on {
  background: #e9e9e9;
  color: var(--ui-fg);
  font-weight: 600;
}

.side-label {
  padding: 14px 8px 4px;
  color: var(--ui-muted);
  font-size: 0.6875rem;
  font-weight: 600;
}

.tile {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #e2e2e2;
  color: #444444;
  font-size: 0.625rem;
  font-weight: 700;
}

.side-item.on .tile {
  background: var(--ui-fg);
  color: #ffffff;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 8px;
  color: #444444;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ui-card);
}

.app-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
}

.app-title strong {
  font-size: 0.9375rem;
}

.members {
  display: flex;
}

.members > * {
  width: 22px;
  height: 22px;
  margin-left: -5px;
  box-shadow: 0 0 0 2px var(--ui-card);
}

.members .avatar.agent {
  background: var(--ui-card);
}

.members .glyph-agent {
  width: 18px;
  height: 18px;
}

.app-tabs {
  display: flex;
  gap: 20px;
  padding: 0 18px;
  border-bottom: 1px solid var(--ui-line);
  color: var(--ui-muted);
}

.app-tabs span {
  padding: 8px 0 9px;
  white-space: nowrap;
}

.app-tabs .on {
  color: var(--ui-fg);
  font-weight: 600;
  box-shadow: inset 0 -2px var(--ui-fg);
}

.app-tabs i {
  margin-left: 3px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ui-fg);
  color: #ffffff;
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 700;
}

.app-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  flex: 1;
}

.app-list {
  padding: 8px 10px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--ui-fg);
}

.list-row span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  white-space: nowrap;
}

.list-row span:last-child {
  color: var(--ui-muted);
}

.list-row svg {
  color: var(--ui-muted);
}

.list-row.head {
  color: var(--ui-muted);
  font-size: 0.6875rem;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  margin-bottom: 4px;
}

.list-row.on {
  background: #f0f0f0;
  font-weight: 600;
}

.app-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 14px;
  border-left: 1px solid var(--ui-line);
  background: var(--ui-bg);
}

.panel-preview {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-card);
}

.panel-preview span {
  height: 5px;
  border-radius: 3px;
  background: #e6e6e6;
}

.panel-preview span:first-child {
  width: 70%;
  height: 7px;
  background: #cfcfcf;
}

.panel-preview .short {
  width: 55%;
}

.panel-label {
  margin-top: 6px;
  color: var(--ui-muted);
  font-size: 0.6875rem;
  font-weight: 600;
}

.version {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  line-height: 1.3;
}

.version .avatar {
  width: 20px;
  height: 20px;
  font-size: 0.5625rem;
}

.version .glyph-agent {
  width: 18px;
  height: 18px;
}

.version small {
  display: block;
  color: var(--ui-muted);
  font-size: 0.6875rem;
}

/* Finder */

.finder {
  margin-top: auto;
  border-radius: 12px;
  background: #ffffff;
  color: #222222;
  font: 0.75rem/1.4 -apple-system, BlinkMacSystemFont, var(--font);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.5),
    0 30px 60px -30px rgb(0 0 0 / 0.85);
  overflow: hidden;
}

.finder-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  background: #ececec;
  border-bottom: 1px solid #d9d9d9;
}

.finder-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.finder-bar i:nth-child(2) {
  background: #febc2e;
}

.finder-bar i:nth-child(3) {
  background: #28c840;
}

.finder-bar span {
  margin-left: 10px;
  font-weight: 600;
}

.finder-body {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 186px;
}

.finder-side {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 8px 12px;
  background: #f0efee;
  border-right: 1px solid #e2e2e2;
}

.finder-side span {
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.finder-side .finder-label {
  padding-top: 9px;
  color: #8a8a8a;
  font-size: 0.65625rem;
  font-weight: 600;
}

.finder-side .on {
  background: #dcdcdc;
}

.finder-list {
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.finder-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.finder-list span:nth-child(even) {
  background: #f5f5f5;
}

.finder svg {
  color: #7c7c7c;
}

.finder .cloud {
  margin-left: auto;
  color: #a0a0a0;
}

/* Terminal */

.terminal {
  flex: 1;
  min-height: 210px;
  margin: 0 calc(-1 * var(--cell-pad)) calc(-1 * var(--cell-pad)) 0;
  border: 1px solid var(--line-strong);
  border-width: 1px 0 0 1px;
  border-radius: 12px 0 0 0;
  background: var(--bg-sunk);
  overflow: hidden;
}

.terminal-tabs {
  display: flex;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

.terminal-tabs button {
  padding: 5px 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.terminal-tabs button:hover {
  color: var(--text);
}

.terminal-tabs [aria-selected="true"] {
  background: var(--bg-raised);
  color: var(--text);
}

.terminal pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  color: var(--text);
  font: 0.75rem/1.85 var(--mono);
}

.terminal pre[hidden] {
  display: none;
}

.prompt,
.comment {
  color: var(--text-3);
}

/* Server flow */


.flow {
  width: 100%;
  height: auto;
  overflow: visible;
}

.server .flow {
  margin-top: auto;
}

.flow-v {
  display: none;
  max-width: 420px;
}

.flow-box {
  fill: none;
  stroke: var(--line-strong);
  stroke-dasharray: 3 4;
}

.flow-label {
  fill: var(--text-3);
  font-family: var(--mono);
  font-size: 11px;
}

.flow-label.strong {
  fill: var(--text);
  font-size: 13px;
}

.flow-file rect {
  fill: var(--paper);
}

.flow-file text {
  fill: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  opacity: 0.7;
}

.flow-file.dim {
  opacity: 0.22;
}

.flow-scope {
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.flow-line {
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.flow-agent {
  fill: var(--pink);
}

/* ---------- Fine print ---------- */

.details {
  padding-bottom: 0;
}

.fine {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-inline: calc(-1 * var(--pad));
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
}

.fine > div {
  padding: var(--cell-pad);
  background: var(--bg);
}

.fine dt {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.fine dd {
  margin-top: 10px;
  color: var(--text-2);
  max-width: 32em;
}

/* ---------- Access ---------- */

.access {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

.access h2 {
  font-size: clamp(2.75rem, 1.2rem + 4.4vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.048em;
}

.access-form {
  margin-top: 40px;
  max-width: 540px;
}

.access label,
.contact label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 0.875rem;
}

.email-row {
  display: flex;
  gap: 8px;
}

.access input,
.access textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-raised);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

.access input {
  height: 50px;
  padding: 0 16px;
}

.access textarea {
  padding: 13px 16px;
  resize: vertical;
}

.access input::placeholder,
.access textarea::placeholder {
  color: var(--text-3);
}

.access input:hover,
.access textarea:hover {
  border-color: rgb(243 239 232 / 0.3);
}

.access input:focus-visible,
.access textarea:focus-visible {
  border-color: var(--text);
  outline: none;
}

.access [aria-invalid="true"] {
  border-color: #ff8a80;
}

.form-feedback {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-2);
}

.form-feedback.error {
  color: #ff9d94;
}

.form-feedback.success {
  color: #8fd8ae;
}

.honeypot {
  display: none;
}

.contact {
  margin-top: 32px;
  max-width: 540px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.contact summary {
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}

.contact summary::-webkit-details-marker {
  display: none;
}

.contact summary span {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
  transition: text-decoration-color 0.15s ease;
}

.contact summary:hover span {
  text-decoration-color: var(--text);
}

.contact form {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}

.contact label:not(:first-of-type) {
  margin-top: 12px;
}

.contact .btn {
  justify-self: start;
  margin-top: 16px;
}

/* The mark, assembled, on the same construction grid the hero pulled it apart on. */
.access-mark {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
}

.access-mark svg,
.access-mark img {
  position: absolute;
}

.access-mark svg {
  inset: 0;
  width: 100%;
  height: 100%;
}

.access-mark img {
  left: 3.92%;
  top: 3.92%;
  width: 92.17%;
  height: 92.17%;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-strong);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
  padding: 30px var(--pad) 40px;
}

.footer-inner::before,
.footer-inner::after {
  top: -5px;
}

.footer-inner img {
  width: 108px;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 0.875rem;
}

.footer-nav a {
  color: var(--text-2);
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-inner small {
  margin-left: auto;
  color: var(--text-3);
  font-size: 0.8125rem;
}

/* ---------- Utility pages (404, thanks) ---------- */

.utility {
  display: grid;
  min-height: calc(100vh - 65px);
  align-content: center;
  padding: 80px var(--pad);
}

.utility h1 {
  font-size: clamp(2.75rem, 1.4rem + 4vw, 5rem);
}

.utility p {
  margin: 24px 0 36px;
  max-width: 30rem;
  color: var(--text-2);
  font-size: 1.125rem;
}

.utility .btn {
  justify-self: start;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .web,
  .mac {
    grid-column: span 12;
  }
  .tools,
  .server,
  .workers,
  .where {
    grid-column: span 12;
  }
  .notes,
  .search {
    grid-column: span 6;
  }
  .undo-body {
    grid-template-columns: 1fr;
  }
  .bento .mac {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: end;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-figure {
    justify-self: center;
    max-width: 480px;
    margin-top: 16px;
  }
  .problem-grid {
    grid-template-columns: 1fr;
  }
  .itself {
    grid-column: 1;
    grid-row: auto;
  }
  .beat {
    grid-template-columns: 1fr;
  }
  .beat-copy {
    position: relative;
    top: 0;
  }
  .beat-copy::before {
    display: none;
  }
  .beat-copy {
    padding-left: 0;
  }
  .beat-node {
    position: static;
    display: inline-grid;
    width: 28px;
    height: 28px;
    margin-right: 12px;
    vertical-align: middle;
  }
  .beat-node.agent svg {
    width: 28px;
    height: 28px;
  }
  .beat-time {
    display: inline-block;
    vertical-align: middle;
  }
  .web .cell-copy {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .access {
    grid-template-columns: 1fr;
  }
  .access-mark {
    justify-self: start;
    max-width: 280px;
    order: -1;
  }
}

@media (max-width: 720px) {
  .copies,
  .as-you {
    display: block;
  }
  .copies > :first-child,
  .as-you > :first-child {
    margin-bottom: 28px;
  }
  .bento .mac {
    display: flex;
    align-items: stretch;
    gap: 30px;
  }
  .lead {
    font-size: 1.125rem;
  }
  .notes,
  .search {
    grid-column: span 12;
  }
  /* File and worker share a line; what the worker wrote sits underneath. */
  .pipeline {
    gap: 22px;
  }
  .pipeline li {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "file worker"
      "out out";
    row-gap: 10px;
  }
  .pipe-file {
    grid-area: file;
  }
  .pipe-worker {
    grid-area: worker;
    padding: 0 0 0 8px;
  }
  .pipe-worker::after {
    display: none;
  }
  .pipe-out {
    grid-area: out;
  }
  .stair {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 16px;
  }
  .stair-block {
    width: 40px;
    height: 40px;
    border-radius: calc(40px * var(--mark-r));
  }
  .stair-text {
    font-size: 0.8125rem;
  }
  .ui-btn {
    height: 38px;
    padding: 0 14px;
  }
  .stair-undo {
    height: 36px;
  }
  .terminal-tabs button {
    padding: 8px 12px;
  }
  .flow-h {
    display: none;
  }
  .flow-v {
    display: block;
  }
  .sheet-body {
    grid-template-columns: 1fr;
  }
  .ui-app {
    grid-template-columns: 1fr;
  }
  .app-side {
    display: none;
  }
  .app-body {
    grid-template-columns: 1fr;
  }
  .app-panel {
    display: none;
  }
  .fine {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  :root {
    --edge: 0px;
  }
  .frame {
    border-inline: 0;
  }
  .band::before,
  .band::after,
  .site-footer .footer-inner::before,
  .site-footer .footer-inner::after {
    display: none;
  }
  .header-cta {
    display: none;
  }
  .legend {
    gap: 18px;
  }
  .email-row {
    flex-direction: column;
  }
  .stair {
    margin-left: calc(var(--i, 0) * 8px);
  }
  .hero-sub {
    margin: 24px 0 32px;
    font-size: 1.0625rem;
  }
  .access-mark {
    max-width: 200px;
  }
  /* Keep the agent sheet to the parts the story is about. */
  .sheet-col:first-child .field:nth-child(2) {
    display: none;
  }
  .review-actions {
    width: 100%;
  }
  .review-actions .ui-btn {
    flex: 1;
    justify-content: center;
  }
  .footer-inner small {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .terminal pre {
    padding: 14px 14px 16px;
    font-size: 0.6875rem;
  }
  .seg-wide span {
    padding: 4px 6px;
    font-size: 0.6875rem;
  }
  .undo-body {
    padding: 16px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
