/* OMA landing: the marketing site is itself an OMA board.

   Two layouts share one document:
   - Stacked (default, also used without JavaScript and on small screens): regions stack
     as cards, the map is a sticky index at the top.
   - Canvas (.is-canvas, set by boot.js on screens at least 1000 x 620): each region is a
     1440 x 900 board scaled to fit, and canvas.js zooms and flies between them.
   - Phone canvas (.is-canvas.is-phone, other portrait screens): the same, with 390 x 700
     boards and a few objects per region. See "Phone canvas" below.

   Positions in the canvas section come straight from the Figma frames on the
   "Landing (Canvas)" page, in board pixels. Colours and type come from tokens.css. */

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-raised);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p, h1, h2, h3, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute; z-index: 100; left: 16px; top: -100px;
  padding: 8px 14px;
  background: var(--action-primary-bg); color: var(--action-primary-text);
  font: 500 14px/1.3 var(--font-ui); text-decoration: none; border-radius: var(--radius);
}
.skip:focus { top: 16px; }

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

html:not(.js) .js-only,
html:not(.is-canvas) .canvas-only { display: none !important; }

/* ---------- Type ---------- */

.display-hero, .display-join, .display-l, .region__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "wdth" 100;
  color: var(--text-primary);
}
.display-hero { font-size: 112px; line-height: 0.95; letter-spacing: -0.04em; }
.display-join { font-size: 104px; line-height: 0.95; letter-spacing: -0.04em; }
.display-l { font-size: 64px; line-height: 1.05; letter-spacing: -0.025em; white-space: nowrap; }
.region__title { font-size: 32px; line-height: 1.15; letter-spacing: -0.015em; }
.region-headline {
  font-family: var(--font-display); font-weight: 600; font-variation-settings: "wdth" 100;
  font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; color: var(--text-primary);
}
.region-body { font: 400 16px/1.5 var(--font-ui); color: var(--text-secondary); }
.region__teaser { display: block; font: 400 13px/1.5 var(--font-mono); color: var(--text-secondary); white-space: nowrap; }

.h3 { font: 600 22px/1.3 var(--font-ui); letter-spacing: -0.005em; color: var(--text-primary); }
.body { font: 400 16px/1.5 var(--font-ui); color: var(--text-primary); }
.body-s { font: 400 14px/1.5 var(--font-ui); color: var(--text-primary); }
.label { font: 500 14px/1.3 var(--font-ui); color: var(--text-primary); }
.mono { font: 400 13px/1.5 var(--font-mono); color: var(--text-secondary); white-space: pre; }
.needs .mono, .plain .mono { white-space: pre-wrap; }
.overline {
  font: 500 12px/1.3 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: pre;
  color: var(--text-secondary);
}
.overline--accent, .accent-text { color: var(--accent-highlight); }
.link-text { color: var(--text-link); }

/* ---------- Components ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px;
  border: 0; border-radius: var(--radius);
  font: 500 14px/1.3 var(--font-ui);
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
}
.btn--sm { padding: 8px 14px; }
.btn--primary { background: var(--action-primary-bg); color: var(--action-primary-text); }
.btn--secondary { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-subtle); }
.btn--primary:hover { background: color-mix(in srgb, var(--action-primary-bg) 86%, var(--bg-surface)); }
.btn--secondary:hover { background: var(--bg-page); }
.btn--static, .btn--static:hover { cursor: default; }
.btn--primary.btn--static:hover { background: var(--action-primary-bg); }
.btn--secondary.btn--static:hover { background: var(--bg-surface); }
.btn[disabled], .btn[aria-busy="true"] { cursor: progress; }
.btn[disabled]:hover { background: var(--action-primary-bg); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card--image { display: flex; flex-direction: column; position: relative; }
.card__img { width: 100%; height: 160px; object-fit: cover; }
.card__caption {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px 10px;
  white-space: nowrap;
}
.card__title { font: 500 14px/1.3 var(--font-ui); color: var(--text-primary); }
.card__meta { font: 400 13px/1.5 var(--font-mono); color: var(--text-secondary); }
.card--text { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.card--dashed { border: 1.5px dashed var(--accent-highlight); }
.card--selected { border: 1.5px solid var(--accent-highlight); }
.card--lifted { box-shadow: var(--shadow-lifted); opacity: 0.9; }

.card--palette { display: flex; }
.swatch { flex: 1 0 0; height: 90px; }
/* The palette card shows a saved palette, so its swatches keep their colours in both themes. */
.swatch--1 { background: #4A33E6; }
.swatch--2 { background: #FF9ACB; }
.swatch--3 { background: #2B1D9E; }
.swatch--4 { background: #111116; }

.panel { display: flex; flex-direction: column; }
.panel__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 14px 16px 12px; white-space: nowrap;
}
.panel__head--tight { padding: 12px 14px 10px; }
.panel__head--wide { padding: 14px 18px 12px; }
.panel__head--stack { flex-direction: column; gap: 3px; padding: 14px 18px 12px; }
.panel__row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px; border-top: 1px solid var(--border-subtle); white-space: nowrap;
}
.panel__line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel__foot { padding: 12px 16px 14px; border-top: 1px solid var(--border-subtle); }
.panel__foot--wide { padding: 12px 18px 14px; }
.panel__foot--actions { display: flex; gap: 8px; }

.import-status { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-highlight); }
.import-status.is-done { color: var(--text-secondary); }

.fake-field {
  padding: 8px 10px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  color: var(--text-secondary); white-space: nowrap;
}
.fake-field--active { padding: 6px 8px; border-color: var(--accent-highlight); }
.needs { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }

.dropzone {
  display: flex; flex-direction: column; gap: 5px;
  padding: 54px 22px 22px;
  background: var(--bg-page);
  border: 1px dashed var(--text-secondary); border-radius: var(--radius);
  white-space: nowrap;
}

.sticky {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 18px 18px;
  background: var(--accent-signal);
  color: var(--text-on-signal);
}
.sticky__text { font: 400 16px/1.5 var(--font-ui); }
.sticky__by { font: 400 13px/1.5 var(--font-mono); white-space: nowrap; }

.tag, .text-object__tag, .map-here__tag, .badge, .marker, .chip, .cursor__tag {
  display: inline-block;
  padding: 3px 7px;
  font: 400 13px/1.5 var(--font-mono);
  white-space: pre;
}
.tag, .text-object__tag, .map-here__tag, .badge, .marker {
  background: var(--accent-highlight); color: var(--text-inverse);
}
.tag--round, .badge, .chip, .cursor__tag { border-radius: var(--radius); }
.badge--warn { background: var(--bg-surface); color: var(--accent-highlight); border: 1px solid var(--border-subtle); }
.chip--signal { background: var(--accent-signal); color: var(--text-on-signal); }
.chip--outline { border: 1px solid var(--border-subtle); color: var(--accent-highlight); }

/* Selected text object: violet box, corner handles and a type tag */
.text-object {
  position: relative;
  padding: 6.5px 5px 0 6.5px;
  border: 1.5px solid var(--accent-highlight);
}
.text-object__tag { position: absolute; left: -1.5px; bottom: 100%; margin-bottom: 0.5px; }
.handle {
  position: absolute; width: 8px; height: 8px;
  background: var(--bg-surface); border: 1.5px solid var(--accent-highlight);
}
.handle--tl { left: -5.5px; top: -5.5px; }
.handle--tr { right: -5.5px; top: -5.5px; }
.handle--bl { left: -5.5px; bottom: -5.5px; }
.handle--br { right: -5.5px; bottom: -5.5px; }

.display-hero > span { display: block; }
.hero-sub { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.hero-sub__copy { font: 400 18px/1.5 var(--font-ui); color: var(--text-secondary); max-width: 600px; }
.hero-sub__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.backlinks { display: flex; flex-direction: column; gap: 6px; color: var(--text-link); }
.backlinks li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.backlinks li::before { content: ""; width: 6px; height: 6px; background: var(--accent-highlight); flex: none; }

.minigraph { display: block; width: 100%; height: 220px; background: var(--bg-raised); }
.node rect, rect.node { fill: var(--text-primary); }
rect.node--hub { fill: var(--accent-highlight); }

.wires { pointer-events: none; overflow: visible; }
.wire line, line.wire { stroke: var(--text-secondary); stroke-width: 1; }
.wire--soft line { opacity: 0.6; }
.minigraph .wire--soft line { opacity: 0.5; }
.wire--strong line { opacity: 0.7; stroke-width: 1.2; }
.wire--map line { opacity: 0.35; }
line.wire--main { stroke: var(--text-primary); stroke-width: 1.5; }
.wire--branch line { stroke: var(--accent-highlight); stroke-width: 1.5; }
line.wire--accent { stroke: var(--accent-highlight); stroke-width: 1.2; }
.wire-end rect { fill: var(--text-secondary); }

.milestone { display: flex; flex-direction: column; }
.milestone__canvas { position: relative; height: 130px; background: var(--bg-raised); overflow: hidden; }
.milestone__canvas img { position: absolute; width: 42px; object-fit: cover; }
.milestone__canvas .m1 { left: 14px; top: 16px; height: 56px; object-position: 50% 20%; }
.milestone__canvas .m2 { left: 64px; top: 38px; height: 66px; }
.milestone__canvas .m3 { left: 114px; top: 16px; height: 76px; }
.milestone__canvas .m4 { left: 164px; top: 38px; height: 56px; object-position: 30% 50%; }
.m-note {
  position: absolute; left: 150px; top: 80px; width: 56px; height: 30px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
}
.milestone--alt .milestone__canvas img { filter: grayscale(1) brightness(1.2); }
.milestone__tab { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 10px; white-space: nowrap; }

.works-with { padding: 8px 14px; box-shadow: none; white-space: nowrap; }
html:not(.is-canvas) .works-with { white-space: normal; }
.cta { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; box-shadow: none; white-space: nowrap; }

.marker { position: absolute; top: 11px; right: 7px; }

.footnote { padding: 20px 22px; }
.footnote__head {
  display: flex; align-items: baseline; gap: 12px; padding-bottom: 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.15;
  letter-spacing: -0.015em; white-space: nowrap;
}
.footnote__row { position: relative; display: flex; flex-direction: column; gap: 3px; min-height: 62px; padding-left: 26px; white-space: nowrap; }
.footnote__row dd { margin: 0; }
.footnote__row::before { content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; }
.footnote__row::after { content: ""; position: absolute; left: 4.5px; top: 15px; width: 1px; height: 47px; background: var(--border-subtle); }
.footnote__row--found::before { background: var(--text-secondary); }
.footnote__row--points::before { background: var(--text-link); }
.footnote__row--created::before { background: var(--accent-highlight); }
.footnote__row--created::after { display: none; }
.footnote__status { display: flex; gap: 8px; padding-top: 8px; }

.ref { display: flex; gap: 10px; padding: 11px 18px; border-top: 1px solid var(--border-subtle); }
.ref__text { display: flex; flex-direction: column; gap: 3px; width: 240px; }
.ref__text .mono { white-space: nowrap; }
.ref--current { background: var(--bg-raised); border-top: 0; border-left: 3px solid var(--accent-highlight); padding-left: 15px; }

.menu { padding: 6px; }
.menu__item { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 10px; border-radius: var(--radius); white-space: nowrap; }
.menu__item--current { background: var(--bg-raised); }

.badge { position: absolute; top: 6.5px; left: 6.5px; }

.review__item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border-subtle); }
.review__text { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.check { width: 12px; height: 12px; flex: none; border: 1px solid var(--text-secondary); }
.check--on { background: var(--text-primary); border-color: var(--text-primary); }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: var(--radius);
  font: 500 11px/1 var(--font-ui); color: var(--text-on-signal);
}
.avatar--you { background: var(--accent-signal); }
.avatar--sam { background: var(--mark-sunny); }
.avatar--priya { background: var(--mark-coral); }
.person, .change { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border-subtle); white-space: nowrap; }
.person .mono { margin-left: auto; }
.change__text { display: flex; flex-direction: column; gap: 2px; }
.panel__foot--invite { display: flex; align-items: center; gap: 8px; }
.panel__foot--invite .fake-field { flex: 1 1 auto; }

/* Made for cards. The example boards are small canvases with a finer grid. */
.use { display: flex; flex-direction: column; padding: 22px; box-shadow: var(--shadow-card); }
.use__title { font: 600 22px/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); }
.use--open { border: 1.5px dashed var(--text-secondary); box-shadow: none; }
.use__text { margin-top: 8px; font: 400 15px/1.45 var(--font-ui); color: var(--text-secondary); }
.use__board {
  position: relative; flex: 1 1 auto; margin-top: 18px; overflow: hidden;
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  background-color: var(--bg-raised);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 20px;
}
.use__board > * { position: absolute; }
.use__board .card__img { height: 86px; }
.use__board .sticky { padding: 10px 12px; }
.use__board .sticky__text { font-size: 14px; line-height: 1.4; }
.use__palette { left: 12px; top: 16px; width: 132px; }
.use__palette .swatch { height: 30px; }
.use__img--a { left: 56px; top: 60px; width: 124px; rotate: 3deg; }
.use__img--a .card__img { height: 78px; }
.use__sticky { left: 12px; top: 196px; width: 126px; rotate: -3deg; }
.use__img--b { left: 12px; top: 16px; width: 118px; }
.use__img--b .card__img { height: 78px; }
.use__img--c { left: 72px; top: 116px; width: 112px; rotate: 2deg; }
.use__img--c .card__img { height: 64px; }
.use__note { left: 12px; top: 210px; width: 156px; gap: 4px; padding: 10px 12px; }
.use__pdf { left: 12px; top: 16px; width: 168px; gap: 4px; padding: 12px 14px; }
.use__refs { left: 16px; top: 124px; width: 168px; padding: 4px 0; }
.use__ref { display: flex; gap: 8px; padding: 8px 12px; }
.use__ref + .use__ref { border-top: 1px solid var(--border-subtle); }
.use__ref .body-s { font-size: 13px; line-height: 1.4; }
.use__draft { left: 12px; top: 16px; width: 170px; gap: 6px; padding: 12px 14px; }
.use__source { left: 28px; top: 108px; width: 156px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; }
.use__sticky--b { left: 14px; top: 232px; width: 118px; rotate: 2deg; }
.use__quote { left: 12px; top: 16px; width: 164px; gap: 4px; padding: 12px 14px; }
.use__link { left: 32px; top: 116px; width: 152px; gap: 4px; padding: 12px 14px; }
.use__add {
  left: 12px; top: 212px; width: 156px; height: 72px;
  display: grid; place-items: center;
  border: 1px dashed var(--text-secondary); border-radius: var(--radius); background: var(--bg-surface);
}

/* Your own cursor on the canvas: a "You" tag that follows the mouse (ambient.js). */
.cursor-live { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity 120ms ease; }
.cursor-live.is-on { opacity: 1; }
.cursor-live .cursor__tag { position: absolute; left: 12px; top: 20px; background: var(--accent-signal); color: var(--text-on-signal); }
html:not(.is-canvas) .cursor-live { display: none; }
/* With a live cursor, the painted "You" cursors on the boards would be a second you. */
.is-canvas.has-live-you .board .cursor--you { display: none; }

.ghost { object-fit: cover; opacity: 0.35; border: 1px solid var(--border-subtle); }

/* The contact form is the one block meant to stand out: an Ultraviolet panel. Text on it uses
   text/inverse, and the button is the panel turned inside out, so it reads in both themes. */
.contact {
  position: relative;
  display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: var(--accent-highlight);
  border-color: var(--accent-highlight);
  box-shadow: 0 22px 48px color-mix(in srgb, var(--accent-highlight) 32%, transparent);
  color: var(--text-inverse);
}
.contact :focus-visible { outline-color: var(--text-inverse); }
.contact .btn--primary { background: var(--text-inverse); color: var(--accent-highlight); }
.contact .btn--primary:hover { background: color-mix(in srgb, var(--text-inverse) 86%, var(--accent-highlight)); }
.contact .btn[disabled]:hover { background: var(--text-inverse); }
.contact__lead { font: 500 16px/1.45 var(--font-ui); color: var(--text-inverse); }
.contact__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field__label { font: 500 12px/1.3 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-inverse); }
.field__input {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px;
  background: var(--bg-surface); color: var(--text-primary);
  border: 1px solid transparent; border-radius: var(--radius);
  font: 400 16px/1.5 var(--font-ui);
}
.field__input--area { height: 84px; max-height: 220px; padding: 10px 12px; resize: vertical; }
.field__input::placeholder { color: var(--text-secondary); opacity: 1; }
.field__input:focus-visible { outline: 2px solid var(--text-inverse); outline-offset: 2px; }
.field__input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--accent-signal); }
.contact__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact [hidden] { display: none !important; }
.contact__body { display: flex; flex-direction: column; gap: 14px; }
.contact__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.contact__alt { white-space: normal; color: var(--text-inverse); }
/* Under the email field when it's missing or malformed. */
.field__error {
  align-self: flex-start; padding: 2px 8px; border-radius: var(--radius);
  background: var(--accent-signal); color: var(--text-on-signal);
  font: 500 13px/1.4 var(--font-ui);
}
/* When sending fails: a callout in place of the intro line, so the form doesn't grow. */
.contact__error {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
  border-radius: var(--radius); background: var(--accent-signal); color: var(--text-on-signal);
}
.contact__error-title { font: 600 16px/1.35 var(--font-ui); }
.contact__error-text { font: 400 14px/1.45 var(--font-ui); }
.contact__error a { color: inherit; text-underline-offset: 3px; }
.contact.has-error .contact__lead,
.contact.has-error .contact__alt { display: none; }
.contact__lead a { color: inherit; text-underline-offset: 3px; }
/* When it's sent: the form turns into a confirmation. */
.contact__done { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; flex: 1 1 auto; }
.contact.is-done { justify-content: center; }
.contact__tick {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px;
  border-radius: var(--radius); background: var(--text-inverse); color: var(--accent-highlight);
}
.contact__done-title { font: 600 26px/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--text-inverse); outline: none; }
.contact__done-text { font: 400 16px/1.5 var(--font-ui); color: var(--text-inverse); overflow-wrap: anywhere; }
.contact__done-text strong { font-weight: 600; }
.contact .btn--secondary { margin-top: 6px; background: transparent; color: var(--text-inverse); border-color: var(--text-inverse); }
.contact .btn--secondary:hover { background: color-mix(in srgb, var(--text-inverse) 14%, transparent); }
.field__hint { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.85; }
.contact__alt a { color: inherit; text-underline-offset: 3px; }

.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  padding: 8px 14px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  white-space: nowrap;
}
.site-footer a { display: inline-block; padding: 4px 0; margin: -4px 0; color: inherit; text-decoration: none; border-radius: var(--radius); }
.site-footer a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__theme { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.site-footer__theme:hover { color: var(--text-primary); }

/* Cursors: an arrow and a name tag */
.cursor { width: 12px; height: 14px; pointer-events: none; }
.cursor__arrow { display: block; width: 12px; height: 14px; overflow: visible; transform: rotate(-25deg); }
.cursor--you .cursor__arrow path { fill: var(--accent-signal); }
.cursor--agent .cursor__arrow path { fill: var(--accent-highlight); }
.cursor__tag { position: absolute; left: 7.6px; top: 17.19px; }
.cursor--you .cursor__tag { background: var(--accent-signal); color: var(--text-on-signal); }
/* Teammates (examples) take colours from the mark, with ink text in both themes. */
.cursor--sam .cursor__arrow path { fill: var(--mark-sunny); }
.cursor--priya .cursor__arrow path { fill: var(--mark-coral); }
.cursor--sam .cursor__tag { background: var(--mark-sunny); color: var(--text-on-signal); }
.cursor--priya .cursor__tag { background: var(--mark-coral); color: var(--text-on-signal); }
.cursor--agent .cursor__tag { background: var(--accent-highlight); color: var(--text-inverse); }

/* The loader. Its tiles keep the mark's own colours; seats follow the theme. */
oma-loader {
  display: inline-block; flex: none;
  width: 32px; height: 32px;
  vertical-align: middle; line-height: 0;
}
oma-loader .oma-mark { display: block; width: 100%; height: 100%; overflow: visible; }
oma-loader .seats { fill: var(--mark-seat); }
oma-loader.is-small .seats { display: none; }
oma-loader .tile { transform-box: fill-box; transform-origin: center; }
oma-loader .b { fill: var(--mark-bubblegum); }
oma-loader .n { fill: var(--mark-sky); }
oma-loader .d { fill: var(--mark-dusk); }
oma-loader .c { fill: var(--mark-coral); }
oma-loader .s { fill: var(--mark-sunny); }
oma-loader .l { fill: var(--mark-lilac); }
.btn oma-loader { margin-left: -2px; }

/* ---------- Top bar ---------- */

.topbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}
.toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px 8px 12px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  min-width: 0;
}
.toolbar__home { display: flex; align-items: center; gap: 12px; text-decoration: none; border-radius: var(--radius); }
.toolbar__name { font: 500 14px/1.3 var(--font-ui); color: var(--text-primary); }
.toolbar__rule { width: 1px; height: 16px; background: var(--border-subtle); flex: none; }
.toolbar__crumbs { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.toolbar__theme {
  display: grid; place-items: center; width: 20px; height: 20px; margin: -2px 0;
  padding: 0; border: 0; background: none; color: var(--text-secondary);
  border-radius: var(--radius); cursor: pointer;
}
.toolbar__theme:hover { color: var(--text-primary); }
:root[data-theme-current="dark"] .toolbar__theme svg { transform: rotate(180deg); }

.account { display: flex; align-items: center; gap: 16px; }
.account__login { font: 500 14px/1.3 var(--font-ui); color: var(--text-primary); text-decoration: none; border-radius: var(--radius); }
.account__login:hover { text-decoration: underline; text-underline-offset: 3px; }

.bottombar { display: none; }

/* ---------- Stacked layout (default) ---------- */

.canvas { display: block; outline: none; }
.screen { position: relative; }
.board {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px;
  max-width: 760px; margin: 0 auto;
  padding: 56px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
}
html:not(.is-canvas) .deco { display: none; }
html:not(.is-canvas) .board > .card,
html:not(.is-canvas) .board > .sticky,
html:not(.is-canvas) .board > .dropzone { width: min(100%, 320px); }
html:not(.is-canvas) .board > .panel,
html:not(.is-canvas) .board > .footnote { width: min(100%, 360px); }
html:not(.is-canvas) .region-label,
html:not(.is-canvas) .hero-sub,
html:not(.is-canvas) .board > .overline,
html:not(.is-canvas) .text-object,
html:not(.is-canvas) .contact,
html:not(.is-canvas) .site-footer { flex: 1 1 100%; }
html:not(.is-canvas) .region-label { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
html:not(.is-canvas) .region-headline { font-size: clamp(32px, 9vw, 44px); }
html:not(.is-canvas) .sticky { rotate: -1deg; }
html:not(.is-canvas) .card__img { height: 180px; }
html:not(.is-canvas) .board > .card--image { width: calc(50% - 10px); max-width: 240px; }
html:not(.is-canvas) .board > .card--image .card__img { height: 150px; }
html:not(.is-canvas) .card__caption { white-space: normal; }

html:not(.is-canvas) #intro .board { padding-top: 48px; }
html:not(.is-canvas) .text-object { margin-top: 28px; padding-bottom: 6px; }
html:not(.is-canvas) .display-hero { font-size: clamp(44px, 11.5vw, 112px); }
html:not(.is-canvas) .display-join { font-size: clamp(40px, 10.5vw, 104px); }
html:not(.is-canvas) .hero-sub { align-items: flex-start; text-align: left; gap: 16px; }
html:not(.is-canvas) .hero-sub__actions { justify-content: flex-start; }

html:not(.is-canvas) .milestones { display: flex; flex-wrap: wrap; gap: 16px; flex: 1 1 100%; }
html:not(.is-canvas) .milestone { width: calc(50% - 8px); max-width: 220px; }

@media (max-width: 479px) {
  html:not(.is-canvas) .contact__fields { grid-template-columns: 1fr; }
}
html:not(.is-canvas) .uses { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
html:not(.is-canvas) .use__board { flex: none; height: 300px; }
html:not(.is-canvas) .use__board .card__img { height: 78px; }
html:not(.is-canvas) .use__board .use__img--c .card__img { height: 64px; }
html:not(.is-canvas) #join .board { padding-bottom: 64px; }
html:not(.is-canvas) .site-footer { white-space: normal; }
html:not(.is-canvas) .badge { position: absolute; }

/* The map becomes a sticky index */
html:not(.is-canvas) .screen--map {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg-raised) 92%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-subtle);
}
html:not(.is-canvas) .board--map { display: block; max-width: none; padding: 0; }
html:not(.is-canvas) .map-list {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
html:not(.is-canvas) .map-list::-webkit-scrollbar { display: none; }
html:not(.is-canvas) .region {
  display: block; padding: 6px 10px; text-decoration: none;
  background: var(--bg-page); border: 1px dashed var(--text-secondary); border-radius: var(--radius);
}
html:not(.is-canvas) .region--intro { border-color: var(--text-secondary); }
html:not(.is-canvas) .region--intro .overline { color: var(--text-secondary); }
html:not(.is-canvas) .region[aria-current="true"] { border-style: solid; border-color: var(--accent-highlight); }
html:not(.is-canvas) .region[aria-current="true"] .overline { color: var(--accent-highlight); }
html:not(.is-canvas) .region__thumbs,
html:not(.is-canvas) .region__title,
html:not(.is-canvas) .region__teaser { display: none; }
html:not(.is-canvas) .screen:not(.screen--map) { scroll-margin-top: 52px; }

@media (min-width: 720px) {
  html:not(.is-canvas) .board { gap: 24px; }
}

/* ---------- Canvas layout ---------- */

.is-canvas, .is-canvas body { height: 100%; overflow: hidden; }
.is-canvas body { background: var(--bg-raised); overscroll-behavior: none; }

.is-canvas .topbar {
  position: fixed; z-index: 30; left: 24px; right: 24px; top: 20px;
  padding: 0; align-items: flex-start; pointer-events: none;
}
.is-canvas .topbar > * { pointer-events: auto; }

.is-canvas .canvas { position: fixed; inset: 0; overflow: hidden; }
.is-canvas .screen { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: -1; }
/* Stacking: hidden and warm views at the back, the map above them, the current view above
   the map, and a view being flown into on top. */
.is-canvas #overview { z-index: 0; }
.is-canvas .screen.is-warm { opacity: 0.01; }
.is-canvas.is-moving .screen.is-warm:not(.is-target) { opacity: 0; }
.is-canvas .screen.is-target:not(#overview) { z-index: 2; }
/* While scrolling, only the two views being scrubbed between are shown, over the map. */
.is-canvas.is-scrubbing .screen:not(.is-pair) { opacity: 0 !important; }
.is-canvas.is-scrubbing .screen.is-pair { z-index: 2; }
.is-canvas.is-scrubbing #overview { z-index: 0; }
/* A scrub seeks the camera from script, so tell the browser the boards will keep moving.
   Without this it repaints them at every new zoom level, which drops about half the frames. */
.is-canvas.is-scrubbing .screen.is-pair .board { will-change: transform; }
.is-canvas .board {
  display: block; position: absolute; left: 0; top: 0;
  width: 1440px; height: 900px; max-width: none; margin: 0; padding: 0;
  transform-origin: 0 0;
  transform: translate(var(--ox, 0px), var(--oy, 0px)) scale(var(--k, 1));
}
.is-canvas .board::before {
  content: ""; position: absolute; inset: -1000px; pointer-events: none;
  background-color: var(--bg-raised);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}
.is-canvas .board--map::before { background-size: 20px 20px; }
.is-canvas .board > * { position: absolute; }
.is-canvas .wires { left: 0; top: 0; width: 1440px; height: 900px; }
.is-canvas .wires--front { z-index: 2; }
.is-canvas .text-object, .is-canvas .hero-sub { z-index: 3; }
.is-canvas .cursor { z-index: 6; }
.is-canvas .it.is-dragging { z-index: 5; }
.is-canvas .milestones, .is-canvas .map-list { inset: 0; }
.is-canvas .milestones > *, .is-canvas .map-list > li > * { position: absolute; }

/* Rest state: the current view fills the screen. canvas.js animates between views. */
.is-canvas[data-view="intro"] #intro,
.is-canvas[data-view="made-for"] #made-for,
.is-canvas[data-view="overview"] #overview,
.is-canvas[data-view="collect"] #collect,
.is-canvas[data-view="connect"] #connect,
.is-canvas[data-view="branch"] #branch,
.is-canvas[data-view="credit"] #credit,
.is-canvas[data-view="agents"] #agents,
.is-canvas[data-view="multiplayer"] #multiplayer,
.is-canvas[data-view="join"] #join { opacity: 1; pointer-events: auto; z-index: 1; }

/* Persistent controls */
.is-canvas .bottombar { display: block; }
.is-canvas .zoom, .is-canvas .stepnav, .is-canvas .minimap, .is-canvas .hint { position: fixed; z-index: 30; }
.zoom {
  left: 24px; bottom: 24px;
  display: flex; align-items: center; gap: 14px; padding: 7px 12px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
}
.zoom button { padding: 0; border: 0; background: none; font: inherit; color: var(--text-secondary); cursor: pointer; border-radius: var(--radius); }
.zoom button:hover { color: var(--text-primary); }
.zoom button[disabled] { opacity: 0.4; cursor: default; }
.zoom [data-zoom-level] { color: var(--text-primary); min-width: 4ch; text-align: center; font-variant-numeric: tabular-nums; }
.hint { left: 50%; bottom: 20px; transform: translateX(-50%); white-space: nowrap; pointer-events: none; }
.stepnav {
  left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
}
.stepnav a { padding: 8px 16px; text-decoration: none; white-space: pre; color: var(--text-secondary); }
.stepnav a + a { border-left: 1px solid var(--border-subtle); }
.stepnav a:hover { color: var(--text-primary); background: var(--bg-page); }
.stepnav [data-step="overview"] { color: var(--text-primary); }
.minimap {
  right: 24px; bottom: 24px; width: 200px; height: 128px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
}
.mm { position: absolute; width: 42px; height: 28px; background: var(--border-subtle); }
.mm:hover { background: color-mix(in srgb, var(--accent-highlight) 35%, var(--border-subtle)); }
.mm--made-for { left: 19px; top: 50px; }
.mm--collect { left: 19px; top: 13px; }
.mm--connect { left: 79px; top: 13px; }
.mm--branch { left: 139px; top: 13px; }
.mm--intro { left: 79px; top: 50px; }
.mm--credit { left: 139px; top: 50px; }
.mm--agents { left: 139px; top: 87px; }
.mm--multiplayer { left: 79px; top: 87px; }
.mm--join { left: 19px; top: 87px; }
.mm.is-current { background: var(--accent-highlight); }
.mm--intro.is-current { background: var(--border-subtle); }
.mm-frame {
  position: absolute; width: 52px; height: 36px; pointer-events: none;
  left: 0; top: 0;
  border: 1.5px solid var(--accent-highlight);
  transition: transform 320ms cubic-bezier(0.65, 0, 0.35, 1);
}
.is-canvas .stepnav, .is-canvas .minimap, .is-canvas .hint {
  transition: opacity 220ms ease 80ms, visibility 0s linear 0s;
}
.is-canvas.is-moving .hint,
.is-canvas[data-view="overview"] .minimap,
.is-canvas[data-view="overview"] .stepnav,
.is-canvas[data-view="intro"] .stepnav,
.is-canvas:not([data-view="intro"]):not([data-view="overview"]) .hint {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 160ms ease, visibility 0s linear 160ms;
}

/* Intro (Hero 219:1113) */
/* A clear hero: one headline, one line about the product, two actions, teammates' cursors. */
.is-canvas .p-hero-overline,
.is-canvas .p-hero-title,
.is-canvas .p-hero-sub { left: 50%; transform: translateX(-50%); }
.is-canvas .p-hero-overline { top: 196px; }
.is-canvas .p-hero-title { top: 252px; width: max-content; padding-bottom: 8px; text-align: center; }
.is-canvas .p-hero-sub { top: 612px; width: 640px; }
.is-canvas .p-hero-sam { left: 302.4px; top: 300.81px; }
.is-canvas .p-hero-agent { left: 1102.4px; top: 470.81px; }
.is-canvas .p-hero-priya { left: 1002.4px; top: 742.81px; }

/* Overview (Map 219:1329) */
.region {
  display: block; overflow: hidden; text-decoration: none;
  background: var(--bg-page); border: 1px dashed var(--text-secondary);
}
.region--intro { border-color: var(--accent-highlight); }
.region--intro .overline { color: var(--accent-highlight); }
.is-canvas .region:hover { border-style: solid; }
.is-canvas .region .overline { position: absolute; left: 10px; top: 8px; }
.is-canvas .region__title { position: absolute; left: 12px; bottom: 31px; white-space: nowrap; }
.is-canvas .region__teaser { position: absolute; left: 12px; bottom: 8px; }
.is-canvas .region__title--intro { top: 38px; bottom: auto; width: 276px; white-space: normal; }
.region__thumbs > * { position: absolute; border: 1px solid var(--border-subtle); background: var(--bg-surface); }
.region__thumbs img { object-fit: cover; }
.region__thumbs .t1 { left: 12px; top: 36px; width: 70px; height: 56px; object-position: 30% 100%; }
.region__thumbs .t2 { left: 92px; top: 36px; width: 54px; height: 40px; }
.region__thumbs .t3 { left: 156px; top: 36px; width: 60px; height: 70px; object-position: 50% 70%; }
.region__thumbs .t4 { left: 92px; top: 84px; width: 54px; height: 30px; }
.region__thumbs .t5 { left: 12px; top: 100px; width: 70px; height: 24px; }
.region__thumbs--grey img { filter: grayscale(1); }
.region__title--intro > span { display: block; }
/* A ring round Intro, clockwise in reading order. Keep in step with BOX_DESK in canvas.js. */
.is-canvas .map-list .region { width: 300px; height: 188px; }
.is-canvas .p-map-made-for { left: 150px; top: 356px; }
.is-canvas .p-map-collect { left: 150px; top: 98px; }
.is-canvas .p-map-connect { left: 570px; top: 98px; }
.is-canvas .p-map-branch { left: 990px; top: 98px; }
.is-canvas .p-map-intro { left: 570px; top: 356px; }
.is-canvas .p-map-credit { left: 990px; top: 356px; }
.is-canvas .p-map-agents { left: 990px; top: 614px; }
.is-canvas .p-map-multiplayer { left: 570px; top: 614px; }
.is-canvas .p-map-join { left: 150px; top: 614px; }
.map-here { left: 558px; top: 344px; width: 324px; height: 212px; border: 2px solid var(--accent-highlight); pointer-events: none; z-index: 2; }
.map-here__tag { position: absolute; left: -2px; top: calc(100% + 8px); }

/* Shared region label (01 Collect 219:1984 and siblings) */
.is-canvas .p-label { left: 120px; top: 96px; display: flex; flex-direction: column; gap: 8px; }
.is-canvas .p-label .region-body { margin-top: 4px; }
.is-canvas .p-label--collect { width: 400px; }
.is-canvas .p-label--connect { width: 420px; }
.is-canvas .p-label--branch, .is-canvas .p-label--credit { width: 560px; }
.is-canvas .p-label--agents { width: 860px; }
.is-canvas .p-label--agents .region-body { max-width: 560px; }

/* Made for (added after the Figma frames): four fields, each with a small example board */
.is-canvas .p-label--made-for { width: 1000px; }
.is-canvas .uses { inset: 0; }
.is-canvas .uses > .use { position: absolute; top: 208px; width: 232px; height: 500px; padding: 20px 18px; }
.is-canvas .p-use-design { left: 120px; }
.is-canvas .p-use-arch { left: 362px; }
.is-canvas .p-use-academic { left: 604px; }
.is-canvas .p-use-writing { left: 846px; }
.is-canvas .p-use-any { left: 1088px; }
.is-canvas .uses .use__board { flex: none; height: 306px; margin-top: auto; }
.is-canvas .p-uses-sam { left: 702.4px; top: 750.81px; }
.is-canvas .p-uses-you { left: 1342.4px; top: 160.81px; }

/* 01 Collect */
.is-canvas .p-collect-import { left: 120px; top: 300px; width: 320px; }
.is-canvas .p-collect-dune { left: 540px; top: 170px; width: 200px; }
.is-canvas .p-collect-dune .card__img { height: 240px; }
.is-canvas .p-collect-texture { left: 780px; top: 130px; width: 180px; }
.is-canvas .p-collect-texture .card__img { height: 140px; }
.is-canvas .p-collect-canopy { left: 808.56px; top: 338.31px; width: 170px; rotate: 6deg; }
.is-canvas .p-collect-canopy .card__img { height: 150px; }
.is-canvas .p-collect-needs { left: 1040px; top: 160px; width: 260px; }
.is-canvas .p-collect-needs .card__img { height: 150px; }
.is-canvas .p-collect-needs .accent-text { width: 236px; }
.is-canvas .p-collect-drop { left: 1000px; top: 520px; width: 320px; height: 170px; }
.is-canvas .p-collect-sticky { left: 538px; top: 564.15px; width: 240px; rotate: 2deg; }
.is-canvas .p-collect-you { left: 992.4px; top: 316.81px; }

/* 02 Connect */
.is-canvas .p-connect-dune { left: 120px; top: 370px; width: 200px; }
.is-canvas .p-connect-dune .card__img { height: 230px; }
.is-canvas .p-connect-texture { left: 600px; top: 120px; width: 180px; }
.is-canvas .p-connect-texture .card__img { height: 130px; }
.is-canvas .p-connect-canopy { left: 380px; top: 620px; width: 180px; }
.is-canvas .p-connect-canopy .card__img { height: 120px; }
.is-canvas .p-connect-note { left: 640px; top: 360px; width: 260px; gap: 6px; padding: 14px 16px; }
.is-canvas .p-connect-backlinks { left: 640px; top: 500px; width: 260px; gap: 6px; padding: 12px 14px; }
.is-canvas .p-connect-pdf { left: 960px; top: 600px; width: 200px; gap: 6px; padding: 12px 14px; }
.is-canvas .p-connect-graph { left: 1060px; top: 130px; width: 260px; }
.is-canvas .p-connect-sticky { left: 1082.27px; top: 435.77px; width: 240px; rotate: -2deg; }
.is-canvas .p-connect-you { left: 907.4px; top: 376.81px; }

/* 03 Branch */
.is-canvas .milestone { width: 220px; }
.is-canvas .p-branch-m1 { left: 150px; top: 330px; }
.is-canvas .p-branch-m2 { left: 430px; top: 330px; }
.is-canvas .p-branch-m3 { left: 710px; top: 330px; }
.is-canvas .p-branch-m4 { left: 990px; top: 330px; }
.is-canvas .p-branch-a1 { left: 560px; top: 570px; }
.is-canvas .p-branch-a2 { left: 820px; top: 570px; }
.is-canvas .p-branch-sticky { left: 1112.69px; top: 555.94px; width: 230px; rotate: -2deg; }
.is-canvas .p-branch-cta { left: 120px; top: 780px; }
.is-canvas .p-branch-you { left: 1002.4px; top: 516.81px; }

/* 04 Credit */
.is-canvas .p-credit-canopy { left: 120px; top: 300px; width: 340px; }
.is-canvas .p-credit-canopy .card__img { height: 250px; }
.is-canvas .p-credit-footnote { left: 540px; top: 280px; width: 360px; }
.is-canvas .p-credit-refs { left: 1000px; top: 100px; width: 320px; }
.is-canvas .p-credit-menu { left: 1000px; top: 560px; width: 220px; }
.is-canvas .p-credit-sticky { left: 557.59px; top: 644.15px; width: 240px; rotate: 2deg; }
.is-canvas .p-credit-you { left: 1182.4px; top: 596.81px; }

/* 05 Agents */
.is-canvas .p-agents-branch { left: 120px; top: 300px; }
.is-canvas .p-agents-dune { left: 120px; top: 350px; width: 200px; }
.is-canvas .p-agents-dune .card__img { height: 240px; }
.is-canvas .p-agents-colour { left: 360px; top: 340px; width: 190px; }
.is-canvas .p-agents-colour .card__img { height: 140px; }
.is-canvas .p-agents-shapes { left: 360px; top: 570px; width: 190px; }
.is-canvas .p-agents-shapes .card__img { height: 130px; }
.is-canvas .p-agents-untitled { left: 590px; top: 390px; width: 180px; }
.is-canvas .p-agents-untitled .card__img { height: 150px; }
.is-canvas .p-agents-type { left: 590px; top: 620px; width: 180px; }
.is-canvas .p-agents-type .card__img { height: 120px; }
.is-canvas .p-agents-review { left: 1000px; top: 100px; width: 320px; }
.is-canvas .p-agents-works { left: 1000px; top: 640px; }
.is-canvas .p-agents-sticky { left: 122.27px; top: 685.77px; width: 240px; rotate: -2deg; }
.is-canvas .p-agents-agent { left: 762.4px; top: 376.81px; }

/* 06 Multiplayer (added after the Figma frames, laid out to match the other regions) */
.is-canvas .p-label--multiplayer { width: 520px; }
.is-canvas .p-team-dune { left: 640px; top: 150px; width: 210px; }
.is-canvas .p-team-dune .card__img { height: 250px; }
.is-canvas .p-team-note { left: 780px; top: 372px; width: 220px; rotate: 3deg; }
.is-canvas .p-team-changes { left: 120px; top: 420px; width: 380px; }
.is-canvas .p-team-invite { left: 1040px; top: 100px; width: 300px; }
.is-canvas .p-team-review { left: 1040px; top: 520px; width: 300px; }
.is-canvas .p-team-sam { left: 1002.4px; top: 352.81px; }
.is-canvas .p-team-priya { left: 512.4px; top: 560.81px; }
.is-canvas .p-team-you { left: 1322.4px; top: 692.81px; }

/* 07 Join */
.is-canvas .p-join-g1 { left: 90px; top: 120px; width: 180px; height: 130px; }
.is-canvas .p-join-g2 { left: 1150px; top: 90px; width: 170px; height: 120px; }
.is-canvas .p-join-g3 { left: 1180px; top: 560px; width: 160px; height: 120px; }
.is-canvas .p-join-g4 { left: 80px; top: 600px; width: 170px; height: 110px; }
.is-canvas .p-join-overline { left: 300px; top: 104px; }
.is-canvas .p-join-title { left: 292px; top: 150px; width: 836px; height: 214px; }
.is-canvas .p-join-title .display-join { width: 820px; }
.is-canvas .p-join-form { left: 300px; top: 388px; width: 760px; }
.is-canvas .p-join-footer { left: 120px; top: 790px; flex-wrap: nowrap; }
.is-canvas .p-join-you { left: 1072.4px; top: 596.81px; }
.is-canvas .p-join-agent { left: 1132.4px; top: 300.81px; }

/* ---------- Phone canvas ---------- */
/* Portrait screens below the desktop size (.is-phone, set by boot.js) use the same camera
   over 390 x 700 boards. Each region shows only the objects marked .ph, placed below in
   board pixels. The grid behind the boards runs on past their edges, so a board that does
   not fill a tall screen still reads as one canvas. */

html:not(.is-phone) .ph-only { display: none !important; }
.is-phone .ph-hide { display: none !important; }
.is-phone .board > :not(.ph),
.is-phone .milestones > :not(.ph) { display: none; }

.is-phone .board { width: 390px; height: 700px; }
.is-phone .wires { width: 390px; height: 700px; }
/* Swipes move the camera; two-finger pinch zoom still works. */
.is-phone .canvas { touch-action: pinch-zoom; }
.is-phone [data-drag] { cursor: auto; }

/* Chrome: a compact top bar, and the step navigation at the bottom. */
.is-phone .topbar { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); }
.is-phone .toolbar { gap: 10px; padding: 8px 10px; }
.is-phone .toolbar__crumbs,
.is-phone .toolbar__crumbs + .toolbar__rule { display: none; }
.is-phone .account { gap: 12px; }
.is-phone .zoom, .is-phone .minimap { display: none; }
.is-phone .stepnav, .is-phone .hint { bottom: max(14px, env(safe-area-inset-bottom)); }
.is-phone .stepnav a { padding: 9px 12px; }
@media (max-width: 379px) {
  .is-phone .account__login { display: none; }
  .is-phone .stepnav__name { display: none; }
  .is-phone .stepnav__arrow { white-space: nowrap; }
}

/* Type at phone size */
.is-phone .region-headline { font-size: 34px; line-height: 1.08; }
.is-phone .region-body { font-size: 15px; line-height: 1.45; }
.is-phone .p-label { left: 20px; top: 80px; width: 350px; }
.is-phone .p-label .region-body { margin-top: 2px; max-width: none; }

/* Intro */
.is-phone .p-hero-overline { top: 118px; }
.is-phone .p-hero-title { top: 172px; width: max-content; max-width: 358px; height: auto; }
.is-phone .p-hero-title .display-hero { font-size: 52px; }
.is-phone .p-hero-sub { top: 360px; width: 340px; gap: 20px; }
.is-phone .p-hero-sub .hero-sub__copy { font-size: 15px; }
.is-phone .p-hero-sam { left: 318px; top: 290px; }
.is-phone .p-hero-agent { left: 120px; top: 580px; }

/* Overview: a 3 x 3 grid of portrait regions, the same arrangement as the desktop map. */
.is-phone .board--map::before { background-size: 20px 20px; }
.is-phone .p-map-made-for { left: 24px; top: 266px; }
.is-phone .p-map-collect { left: 24px; top: 70px; }
.is-phone .p-map-connect { left: 146px; top: 70px; }
.is-phone .p-map-branch { left: 268px; top: 70px; }
.is-phone .p-map-intro { left: 146px; top: 266px; }
.is-phone .p-map-credit { left: 268px; top: 266px; }
.is-phone .p-map-agents { left: 268px; top: 462px; }
.is-phone .p-map-multiplayer { left: 146px; top: 462px; }
.is-phone .p-map-join { left: 24px; top: 462px; }
.is-phone .map-list .region {
  width: 98px; height: 176px;
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
}
.is-phone .region .overline,
.is-phone .region__title,
.is-phone .region__teaser { position: static; }
.is-phone .region .overline { font-size: 10px; }
.is-phone .region__thumbs { display: block; position: relative; height: 54px; }
.is-phone .region__thumbs .t1 { left: 0; top: 0; width: 46px; height: 42px; }
.is-phone .region__thumbs .t2 { display: none; }
.is-phone .region__thumbs .t3 { left: 50px; top: 0; width: 32px; height: 54px; }
.is-phone .region__title { margin-top: auto; font-size: 18px; }
.is-phone .region__title--long { font-size: 14px; letter-spacing: -0.02em; }
.is-phone .p-map-multiplayer .overline { font-size: 9px; letter-spacing: 0; }
.is-phone .region__teaser { font-size: 10px; line-height: 1.35; white-space: normal; }
.is-phone .region__title--intro { width: auto; margin-top: 2px; font-size: 15px; line-height: 1.15; white-space: normal; }
.is-phone .map-here { border-width: 1.5px; }
.is-phone .map-here__tag { left: 50%; top: auto; bottom: -10px; transform: translateX(-50%); padding: 0 5px; font-size: 11px; }

/* Made for: one row per field, with its example board shrunk to a thumbnail */
.is-phone .p-label--made-for { width: 350px; }
.is-phone .uses > .use { left: 20px; width: 350px; height: 78px; padding: 12px 76px 12px 14px; }
.is-phone .uses > .p-use-design { top: 202px; }
.is-phone .uses > .p-use-arch { top: 288px; }
.is-phone .uses > .p-use-academic { top: 374px; }
.is-phone .uses > .p-use-writing { top: 460px; }
.is-phone .uses > .p-use-any { top: 546px; }
.is-phone .use__title { font-size: 17px; }
.is-phone .use__text { margin-top: 3px; font-size: 13px; line-height: 1.35; }
.is-phone .uses .use__board { position: absolute; right: 8px; top: 6px; margin: 0; width: 196px; height: 300px; transform: scale(0.22); transform-origin: top right; }

/* 01 Collect */
.is-phone .p-collect-import { left: 20px; top: 290px; width: 262px; }
.is-phone .p-collect-import .panel__foot,
.is-phone .p-collect-import .panel__row:nth-child(4) { display: none; }
.is-phone .p-collect-canopy { left: 284px; top: 256px; width: 112px; rotate: 6deg; z-index: 2; }
.is-phone .p-collect-canopy .card__img { height: 80px; }
.is-phone .p-collect-sticky { left: 156px; top: 474px; width: 206px; rotate: 2deg; z-index: 2; }
.is-phone .p-collect-sticky .sticky__text { font-size: 15px; }
.is-phone .p-collect-you { left: 128px; top: 452px; }

/* 02 Connect */
.is-phone .p-connect-dune { left: 20px; top: 330px; width: 140px; }
.is-phone .p-connect-dune .card__img { height: 150px; }
.is-phone .p-connect-note { left: 200px; top: 350px; width: 170px; }
.is-phone .p-connect-note .body { font-size: 15px; }
.is-phone .p-connect-backlinks { left: 186px; top: 524px; width: 170px; }
.is-phone .p-connect-you { left: 300px; top: 494px; }

/* 03 Branch */
.is-phone .milestone { width: 160px; }
.is-phone .milestone__canvas { height: 96px; }
.is-phone .milestone__canvas img { width: 32px; }
.is-phone .milestone__canvas .m1 { left: 10px; top: 12px; height: 46px; }
.is-phone .milestone__canvas .m2 { left: 46px; top: 30px; height: 52px; }
.is-phone .milestone__canvas .m3 { left: 82px; top: 12px; height: 60px; }
.is-phone .milestone__canvas .m4 { left: 118px; top: 30px; height: 44px; }
.is-phone .m-note { left: 108px; top: 62px; width: 40px; height: 22px; }
.is-phone .p-branch-m2 { left: 20px; top: 328px; }
.is-phone .p-branch-m3 { left: 210px; top: 328px; }
.is-phone .p-branch-a1 { left: 150px; top: 500px; }
.is-phone .p-branch-you { left: 318px; top: 584px; }

/* 04 Credit */
.is-phone .p-credit-footnote { left: 20px; top: 352px; width: 330px; padding: 16px 18px; }
.is-phone .footnote__head { font-size: 24px; padding-bottom: 12px; }
.is-phone .footnote__row { min-height: 50px; }
.is-phone .footnote__row::after { height: 35px; }
.is-phone .footnote__status { flex-wrap: wrap; }
.is-phone .p-credit-canopy { left: 286px; top: 318px; width: 124px; rotate: 4deg; z-index: 2; }
.is-phone .p-credit-canopy .card__img { height: 80px; }
.is-phone .p-credit-you { left: 322px; top: 584px; }

/* 05 Agents */
.is-phone .p-agents-review { left: 20px; top: 330px; width: 272px; }
.is-phone .p-agents-works { left: 18px; top: 604px; padding: 5px 8px; font-size: 12px; }
.is-phone .p-agents-review .review__item:nth-child(2),
.is-phone .p-agents-review .review__item:nth-child(3),
.is-phone .p-agents-review .review__item:nth-child(5),
.is-phone .p-agents-review .review__item:nth-child(6) { display: none; }
.is-phone .p-agents-colour { left: 272px; top: 346px; width: 112px; rotate: 3deg; z-index: 2; }
.is-phone .p-agents-colour .card__img { height: 70px; }
/* The agent's name tag sits to the left of its arrow here, to stay on screen. */
.is-phone .p-agents-agent { left: 360px; top: 470px; }
.is-phone .p-agents-agent .cursor__tag { left: auto; right: 6px; }

/* 06 Multiplayer */
.is-phone .p-team-changes { left: 20px; top: 326px; width: 250px; }
.is-phone .p-team-changes .change { padding: 9px 14px; }
.is-phone .p-team-dune { left: 274px; top: 316px; width: 108px; rotate: 4deg; z-index: 2; }
.is-phone .p-team-dune .card__img { height: 92px; }
.is-phone .p-team-note { left: 156px; top: 556px; width: 200px; rotate: -2deg; z-index: 2; }
.is-phone .p-team-note .sticky__text { font-size: 15px; }
.is-phone .p-team-sam { left: 344px; top: 530px; }
.is-phone .p-team-priya { left: 40px; top: 590px; }

/* 07 Join */
.is-phone .p-join-overline { left: 22px; top: 82px; }
.is-phone .p-join-title { left: 16px; top: 134px; width: 358px; height: auto; padding-bottom: 6px; }
.is-phone .p-join-title .display-join { width: auto; font-size: 42px; }
.is-phone .p-join-form { left: 20px; top: 240px; width: 350px; padding: 18px; gap: 12px; }
.is-phone .contact__body { gap: 12px; }
.is-phone .contact__alt { display: none; } /* on phones the email address is in the intro line */
/* Phones have no room to spare: while the email field shows its error, the intro line steps aside. */
.is-phone .contact.has-field-error .contact__lead { display: none; }
.is-phone .contact__done-title { font-size: 22px; }
.is-phone .contact__lead { font-size: 14px; }
.is-phone .contact__fields { gap: 10px; }
.is-phone .field__input { height: 42px; }
.is-phone .field__input--area { height: 64px; }
.is-phone .contact__submit { flex: 1 1 100%; }
.is-phone .p-join-footer { left: 20px; top: 594px; width: 350px; flex-wrap: wrap; white-space: normal; gap: 6px 14px; }
/* On phones the footer keeps to one line: the sign-off goes, and the theme switch is in the toolbar. */
.is-phone .p-join-footer p:first-child,
.is-phone .p-join-footer .site-footer__theme { display: none; }
.is-phone .p-join-you { left: 330px; top: 500px; }
.is-phone .p-join-agent { left: 300px; top: 220px; }

/* Living canvas: drag and spring back, drifting cursors */
.is-canvas [data-drag] { touch-action: none; cursor: grab; }
.is-canvas [data-drag].is-dragging { cursor: grabbing; }
.it.is-springing { transition: translate 520ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.cursor.is-drifting { transition: translate 2400ms cubic-bezier(0.45, 0, 0.55, 1); }

@media (prefers-reduced-motion: reduce) {
  .mm-frame, .it.is-springing, .cursor.is-drifting, .cursor-live,
  .is-canvas .stepnav, .is-canvas .minimap, .is-canvas .hint { transition: none !important; }
}

/* ---------- 404 and confirmation pages ---------- */

.plain {
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  min-height: calc(100vh - 80px);
  max-width: 760px; margin: 0 auto;
  padding: 48px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left));
}
.plain .display-l { white-space: normal; font-size: clamp(40px, 10vw, 64px); }
.plain .body a { color: var(--text-link); text-underline-offset: 4px; }

/* ---------- Privacy and terms ---------- */
/* Each is one document card on the grid. Unfilled details show as highlighted [placeholders]. */

.legal {
  max-width: 760px; margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left));
  outline: none;
}
.legal__doc {
  padding: 28px 22px 32px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  font-size: 16px; line-height: 1.6; color: var(--text-primary);
}
.legal__doc > * + * { margin-top: 12px; }
.legal__title {
  font-family: var(--font-display); font-weight: 600; font-variation-settings: "wdth" 100;
  font-size: clamp(40px, 9vw, 56px); line-height: 1.05; letter-spacing: -0.025em;
}
.legal__doc .legal__meta { margin-top: 8px; white-space: normal; }
.legal__lead { font-size: 18px; line-height: 1.55; color: var(--text-secondary); }
.legal__doc h2 { margin-top: 36px; font: 600 22px/1.3 var(--font-ui); letter-spacing: -0.005em; }
.legal__doc h3 { margin-top: 22px; font: 500 16px/1.4 var(--font-ui); }
.legal__doc ul { padding-left: 1.25em; list-style: disc; }
.legal__doc li + li { margin-top: 6px; }
.legal__doc a { color: var(--text-link); text-underline-offset: 3px; }
.placeholder {
  padding: 1px 6px; border-radius: var(--radius);
  background: var(--accent-signal); color: var(--text-on-signal);
  font: 400 0.875em/1.4 var(--font-mono);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.legal__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; padding: 0 4px; }
.legal__nav a { color: var(--text-secondary); text-decoration: none; border-radius: var(--radius); }
.legal__nav a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.legal__nav a[aria-current="page"] { color: var(--text-primary); }

@media (min-width: 720px) {
  .legal { padding-top: 48px; }
  .legal__doc { padding: 44px 48px 48px; }
}
