:root {
  --bg: #faf7f0;
  --surface: #f3eee3;
  --ink: #1e1b21;
  --muted: #6c6670;
  --line: rgba(30, 27, 33, 0.1);
  --accent: #d9467f;
  --accent-ink: #b4336a;
  --jade: #3a7a5c;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --serif: ui-serif, "New York", Charter, "Iowan Old Style", Georgia, serif;
  --wrap: 1160px;
  --radius: 12px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3, p, figure, ul { margin: 0; }

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

/* Top bar */

.bar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img { width: 28px; height: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s, background-color 0.15s;
}

.btn:hover { border-color: rgba(30, 27, 33, 0.22); }

.btn-primary {
  gap: 8px;
  padding: 11px 22px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
}

.btn-primary:hover { background: #3a3540; border-color: #3a3540; }

/* Hero */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 72px 24px 0;
  text-align: center;
}

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 3.9vw, 54px);
  line-height: 1.1;
  text-wrap: balance;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 32em;
  text-wrap: balance;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.cta {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
}

/* Screenshot frame + crop.
   A .shot shows the part of its image given by --x, --y (top-left) and --w, --h (size),
   all as fractions of the image. Defaults show the whole image. */

.frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(30, 27, 33, 0.08),
    0 2px 4px rgba(30, 27, 33, 0.04),
    0 24px 48px -24px rgba(30, 27, 33, 0.28);
}

.shot {
  --x: 0; --y: 0; --w: 1; --h: 1;
  --iw: 2880; --ih: 1800;
  position: relative;
  overflow: hidden;
  aspect-ratio: calc(var(--w) * var(--iw)) / calc(var(--h) * var(--ih));
}

.shot img {
  position: absolute;
  max-width: none;
  width: calc(100% / var(--w));
  left: calc(-100% * var(--x) / var(--w));
  top: calc(-100% * var(--y) / var(--h));
}

/* The sidebar crop, the no-JS stand-in for the live sidebar: shown at 2× its pixels, never more. */
.shot[data-crop="sidebar"] { --x: 0.032; --y: 0.088; --w: 0.18; --h: 0.46; }

/* Tourmaline vs plain Markdown */

.versus {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 136px 24px 0;
  text-align: center;
}

.versus-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  text-align: left;
}

.versus-label {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.versus figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

/* Both shots crop to the same frame size, from the same part of the note. */
.shot[data-crop="versus-page"],
.shot[data-crop="versus-md"] { --x: 0.225; --y: 0.09; --w: 0.755; --h: 0.82; }

/* Tour */

.tour {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 64px 24px 0;
  text-align: center;
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.tabs { display: none; }

.js .tabs {
  position: relative;
  display: inline-flex;
  gap: 2px;
  scroll-margin-top: 28px;
  margin-top: 24px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tabs button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 15px/1.2 var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

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

.tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(30, 27, 33, 0.1), 0 0 0 1px rgba(30, 27, 33, 0.06);
}

.tabs button:focus-visible { outline-offset: 1px; }

.stage { margin-top: 32px; }

/* Without JS every panel is shown, one under another, with its label. */
.panel + .panel { margin-top: 72px; }

.panel-label {
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.caption {
  max-width: 34em;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 17px;
}

kbd {
  display: inline-block;
  min-width: 1.5em;
  margin: 0 1px;
  padding: 0 5px;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line);
  color: var(--ink);
  font: 500 14px/1.5 var(--sans);
  text-align: center;
}

/* With JS the panels sit on top of each other and crossfade. Inactive panels are
   display: none, so their screenshots are not downloaded until their tab is opened. */
.js .stage { display: grid; }

.js .panel {
  grid-area: 1 / 1;
  margin: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease, display 0.35s allow-discrete;
}

.js .panel.is-active {
  display: block;
  opacity: 1;
}

@starting-style {
  .js .panel.is-active { opacity: 0; }
}

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

/* Look: light and dark compared */

.compare { position: relative; --split: 50%; }

.compare-dark { display: none; }
.compare-handle, .compare-range, .compare-hint { display: none; }

/* No JS: light and dark side by side. */
.no-js .compare { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.no-js .compare-dark { display: block; }

.js .compare-dark {
  display: block;
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--split));
}

.js .compare-handle {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(30, 27, 33, 0.12);
  pointer-events: none;
}

.js .compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%231e1b21' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 6 3.5 10l4 4M12.5 6l4 4-4 4'/%3E%3C/svg%3E")
    center / 20px no-repeat;
  box-shadow: 0 1px 3px rgba(30, 27, 33, 0.2), 0 0 0 1px rgba(30, 27, 33, 0.08);
}

.js .compare-range {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.js .compare:has(.compare-range:focus-visible) .compare-handle::after {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.js .compare-hint { display: inline; }

/* Content for one case only: with or without JavaScript. */
.js .no-js-only, .no-js .js-only { display: none; }

/* Try it: a live copy of the app window over the demo vault in /demo/.
   Colors are the app's light "paper" tokens (Theme.swift), metrics are its points, icons are
   its glyphs (the sprite in index.html). Without JavaScript, or if the demo can't load, the
   screenshot stays in its place. */

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

.ic {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--sw, 1.5);
  stroke-miterlimit: 6;
  overflow: visible;
}
.f { fill: currentColor; stroke: none; }
.s85 { stroke-width: calc(var(--sw, 1.5) * 0.85); }
.s75 { stroke-width: calc(var(--sw, 1.5) * 0.75); }
.ic-flip { transform: scaleX(-1); }

.tm, .tm-preview {
  --tm-canvas: #f0e7d6;
  --tm-canvas-alt: #e6dac3;
  --tm-sheet: #fffdf8;
  --tm-sheet-alt: #f8f2e5;
  --tm-border: rgba(58, 46, 30, 0.1);
  --tm-hover: rgba(58, 46, 30, 0.055);
  --tm-active: rgba(58, 46, 30, 0.09);
  --tm-shadow: rgba(58, 46, 30, 0.1);
  --tm-text: #1f1c23;
  --tm-muted: #67626e;
  --tm-faint: #a7a1ae;
  --tm-accent: #b0407f;
  --tm-accent-soft: rgba(176, 64, 127, 0.11);
  --tm-saved: #2f8f66;
  --tm-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: var(--tm-canvas);
  color: var(--tm-text);
  font: 400 13px/1.25 var(--sans);
  text-align: left;
}

.tm { display: none; }

.js .tryit {
  position: relative;
  aspect-ratio: 16 / 10;
}
.js .tryit > .shot { display: none; }

.js .tryit .tm {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: 0 0;
  -webkit-user-select: none;
  user-select: none;
}

.js .tryit.is-fallback { aspect-ratio: auto; }
.js .tryit.is-fallback > .shot { display: block; }
.js .tryit.is-fallback .tm { display: none; }

.tm:focus { outline: none; }

/* Reset at class weight, so each control's own rules below win. */
.tm :where(button) {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tm button:focus-visible { outline-offset: 0; }

.tm-icon {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--tm-muted);
}
.tm button.tm-icon:hover { background: var(--tm-hover); color: var(--tm-text); }
.tm button.tm-icon:active { background: var(--tm-active); }
.tm button.tm-icon[aria-pressed="true"] { background: var(--tm-accent-soft); color: var(--tm-accent); }
.tm button.tm-icon:disabled { background: none; color: var(--tm-muted); opacity: 0.4; cursor: default; }

/* Titlebar: traffic lights and the sidebar toggle over the sidebar, then the tab pills. */

.tm-titlebar {
  flex: none;
  height: 40px;
  display: flex;
  align-items: center;
}

.tm-lead {
  flex: none;
  width: 322px;
  display: flex;
  align-items: center;
  padding-right: 15px;
}
.tm:not(.is-side-open) .tm-lead { width: 121px; }

.tm-lights { display: flex; gap: 8px; padding-left: 15px; }
.tm-lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.tm-lights span:nth-child(2) { background: #febc2e; }
.tm-lights span:nth-child(3) { background: #28c840; }

.tm-toggle { margin-left: auto; }

.tm-tabs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tm-tab {
  min-width: 104px;
  max-width: 240px;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 12px;
  border-radius: 14px;
  background: var(--tm-sheet);
  box-shadow: 0 0 0 1px var(--tm-border), 0 1px 6px var(--tm-shadow);
  font-weight: 500;
}
.tm-gem { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tm-saved); }
.tm-tab-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tm-inspector { margin-right: 6px; }

/* Body: ribbon, sidebar, and the page sheet. */

.tm-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}

.tm-ribbon {
  flex: none;
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.tm-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: var(--tm-canvas-alt);
}

.tm-side {
  flex: none;
  width: 266px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--tm-canvas);
}
.tm:not(.is-side-open) .tm-side { display: none; }

.tm-side-head {
  flex: none;
  height: 44px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 8px 0 0;
}
.tm-side-head .tm-icon { --sw: 1.8; background: var(--tm-canvas-alt); }

.tm-tree {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(58, 46, 30, 0.2) transparent;
}

.tm-vault {
  flex: none;
  height: 22px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 32px;
  color: var(--tm-muted);
  font-size: 12px;
}
.tm-vault .ic { --sw: 1.8; width: 9px; height: 9px; color: var(--tm-faint); }

.tm-scrim { display: none; }

/* Tree rows: a chevron slot per level, one hairline per open ancestor, a quiet fill when open. */

.tm-row {
  --d: 0;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 14px 0 calc(32px + var(--d) * 16px);
  color: var(--tm-muted);
  text-align: left;
  white-space: nowrap;
}

.tm-row::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19.5px;
  width: calc(var(--d) * 16px);
  background: repeating-linear-gradient(to right, var(--tm-border) 0 1px, transparent 1px 16px);
  pointer-events: none;
}

.tm-row::after {
  content: "";
  position: absolute;
  inset: 1px 8px;
  z-index: -1;
  border-radius: 6px;
}

.tm-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.tm-chev {
  position: absolute;
  top: 6px;
  left: calc(12px + var(--d) * 16px);
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--tm-faint);
  transition: transform 0.15s ease;
}
.tm-chev .ic { --sw: 2.1; width: 12px; height: 12px; }
.tm-row[aria-expanded="true"] .tm-chev,
.tm-preview .tm-chev { transform: rotate(90deg); }

.tm-row.is-current { color: var(--tm-text); font-weight: 500; }
.tm-row.is-current::after { background: var(--tm-active); }
.tm-row.is-current .tm-chev { color: var(--tm-muted); }
button.tm-row:hover { color: var(--tm-text); }
button.tm-row:hover .tm-chev { color: var(--tm-muted); }
button.tm-row:not(.is-current):hover::after { background: var(--tm-hover); }
.tm button.tm-row:focus-visible { outline-offset: -2px; border-radius: 8px; }

.tm-group[hidden] { display: none; }

/* The page sheet: header, the view, and the floating status capsule. */

.tm-sheet {
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 1px 8px 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: var(--tm-sheet);
  box-shadow: 0 0 0 1px var(--tm-border), 0 1px 6px var(--tm-shadow);
}

.tm-head {
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.tm-nav { flex: none; display: flex; gap: 2px; }

.tm-crumbs {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1px;
  margin: 0 12px 0 4px;
}
.tm-crumb {
  min-width: 0;
  padding: 0 6px;
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tm-faint);
}
.tm-crumb.is-file { flex-shrink: 0.2; color: var(--tm-text); font-weight: 600; }
.tm-crumbs .ic { --sw: 1.8; flex: none; width: 9px; height: 9px; color: var(--tm-faint); }

.tm-trail { flex: none; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tm-modes { display: flex; align-items: center; gap: 4px; }
.tm-actions { display: flex; gap: 2px; }

.tm-capsule {
  position: relative;
  height: 28px;
  display: flex;
  padding: 2px;
  border-radius: 14px;
  background: var(--tm-sheet-alt);
}

.tm-wash {
  position: absolute;
  top: 2px;
  left: 0;
  width: 0;
  height: 24px;
  border-radius: 12px;
  background: var(--tm-accent-soft);
}
.tm-wash.is-moving { transition: transform 0.18s ease-out, width 0.18s ease-out; }
.tm.is-md .tm-wash { visibility: hidden; }

.tm .tm-seg {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--tm-muted);
  font-size: 12px;
  font-weight: 500;
}
.tm-seg .ic { --sw: 1.8; width: 11px; height: 11px; }
.tm .tm-seg:hover { color: var(--tm-text); }
.tm .tm-seg[aria-pressed="true"] { color: var(--tm-accent); }

.tm-view { position: relative; flex: 1; min-height: 0; }

.tm-frame, .tm-raw, .tm-md {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  border: 0;
  margin: 0;
}
.tm[data-view="page"] .tm-frame,
.tm[data-view="raw"] .tm-raw,
.tm[data-view="md"] .tm-md { display: block; }

.tm-frame { background: var(--tm-sheet); color-scheme: light; }

.tm-raw, .tm-md-text {
  overflow: auto;
  background: var(--tm-sheet);
  color: var(--tm-text);
  font: 13px/20px var(--tm-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 4;
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
  scrollbar-width: thin;
  scrollbar-color: rgba(58, 46, 30, 0.25) transparent;
}
.tm-raw { padding: 18px 20px 52px; }
.tm-raw:focus, .tm-md-text:focus { outline: none; }
.tm-raw::selection, .tm-md-text::selection, .tm-md-text ::selection { background: rgba(176, 64, 127, 0.2); }

.tm-md-text { height: 100%; margin: 0; padding: 20px 24px 52px; }
/* Keeps the first line clear of the Copy Markdown capsule, as the app's exclusion path does. */
.tm-md-text::before { content: ""; float: right; width: 128px; height: 20px; }
.tm-md-strong { font-weight: 600; }
.tm-md-quiet { color: var(--tm-muted); }

.tm .tm-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--tm-sheet);
  box-shadow: inset 0 0 0 1px var(--tm-border);
  color: var(--tm-muted);
  font-size: 12px;
  font-weight: 500;
}
.tm .tm-copy:hover { background: linear-gradient(var(--tm-hover), var(--tm-hover)) var(--tm-sheet); color: var(--tm-text); }
.tm .tm-copy:active { background: linear-gradient(var(--tm-active), var(--tm-active)) var(--tm-sheet); }
.tm-copy .ic { width: 12px; height: 12px; }
.tm .tm-copy.is-done { color: var(--tm-saved); }

.tm-status {
  position: absolute;
  right: 10px;
  bottom: 10px;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 0 3px;
  border-radius: 13px;
  background: var(--tm-sheet-alt);
  box-shadow: 0 0 0 1px var(--tm-border), 0 1px 6px var(--tm-shadow);
  color: var(--tm-muted);
  font-size: 11px;
  white-space: nowrap;
}
.tm-st { height: 20px; display: flex; align-items: center; padding: 0 7px; border-radius: 10px; }
.tm-st-save::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--tm-saved);
}
.tm-sep { color: var(--tm-faint); font-weight: 700; }
.tm-st-mode { background: var(--tm-accent-soft); color: var(--tm-accent); font-weight: 500; }
.tm-st-note { display: none; }
.tm[data-mode="visual"]:not(.is-md) .tm-st-note { display: flex; }
.tm[data-mode="visual"]:not(.is-md) .tm-st-save { display: none; }

/* The same sidebar, still, beside "Your notes stay yours". */
.tm-preview { padding: 10px 0 12px; }
.js .yours-shot > .shot { display: none; }
.js .yours-shot.is-fallback > .shot { display: block; }
.yours-shot.is-fallback .tm-preview, .no-js .tm-preview { display: none; }

/* Your notes stay yours */

.yours {
  max-width: 920px;
  margin: 0 auto;
  padding: 160px 24px 0;
  display: grid;
  grid-template-columns: 1fr 259px;
  align-items: center;
  gap: 72px;
}

.yours-text p {
  margin-top: 16px;
  max-width: 26em;
  color: var(--muted);
  font-size: 18px;
}

.yours-shot { width: 259px; justify-self: end; }

/* Extras */

.extras {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 144px 24px 0;
}

.extras ul {
  list-style: none;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  color: var(--muted);
  font-size: 16px;
}

.extras li + li::before {
  content: "·";
  margin: 0 14px;
  color: rgba(30, 27, 33, 0.3);
}

/* Footer */

.foot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.foot-brand { display: inline-flex; align-items: center; gap: 8px; }

.foot a { color: var(--ink); text-decoration-color: rgba(30, 27, 33, 0.3); text-underline-offset: 3px; }
.foot a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }

/* 404 */

.lost-main {
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

.lost-main h1 { font-size: clamp(28px, 3vw, 36px); }

/* Tablet */

@media (max-width: 1100px) {
  .hero { padding-top: 56px; }
  .tour { padding-top: 56px; }
  .versus { padding-top: 112px; }
  .yours { padding-top: 128px; gap: 48px; }
  .extras { padding-top: 112px; }
}

/* Phone: screenshots crop to the page area so the text in them stays readable. */

@media (max-width: 720px) {
  body { font-size: 16px; }

  .bar { padding: 14px 20px; }
  .brand img { width: 26px; height: 26px; }

  .hero { padding: 40px 20px 0; }
  .lede { font-size: 17px; margin-top: 14px; }
  .cta { margin-top: 24px; }

  .versus { padding: 88px 20px 0; }
  .versus-grid { grid-template-columns: 1fr; gap: 36px; margin-top: 24px; }
  .tour { padding: 44px 0 0; }
  .tour h2 { padding: 0 20px; }

  .js .tabs {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding: 2px 20px 6px;
    background: none;
    box-shadow: none;
    border-radius: 0;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .js .tabs::-webkit-scrollbar { display: none; }

  .tabs button {
    scroll-snap-align: center;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    padding: 8px 16px;
  }
  .tabs button[aria-selected="true"] {
    background: var(--ink);
    color: #fff;
    box-shadow: none;
  }

  .stage { margin-top: 20px; padding: 0 20px; }
  .caption { font-size: 16px; margin-top: 16px; padding: 0 4px; }

  /* Same 4:3 frame for every tour shot so the panels line up. */
  .shot[data-crop="tryit"]    { --x: 0.32;  --y: 0.1;   --w: 0.58; --h: 0.72; }
  .shot[data-crop="write"]    { --x: 0.32;  --y: 0.12;  --w: 0.58; --h: 0.72; }
  .shot[data-crop="organize"] { --x: 0;     --y: 0;     --w: 0.6;  --h: 0.72; }
  .shot[data-crop="find"]     { --x: 0.27;  --y: 0.15;  --w: 0.47; --h: 0.564; }
  .shot[data-crop="connect"]  { --x: 0.45;  --y: 0.03;  --w: 0.55; --h: 0.66; }
  .shot[data-crop="share"]    { --x: 0.225; --y: 0.04;  --w: 0.58; --h: 0.72; }
  .shot[data-crop="look"]     { --x: 0.32;  --y: 0.1;   --w: 0.58; --h: 0.72; }

  /* Try it on a phone: a taller frame, the sidebar as a drawer behind its toggle, and only the
     view controls in the header, so the page itself gets the room. */
  .js .tryit { aspect-ratio: 3 / 4; }
  .js .tryit.is-fallback { aspect-ratio: auto; }

  .tm-lead, .tm:not(.is-side-open) .tm-lead { width: auto; padding-right: 6px; }
  .tm-lights { gap: 6px; padding-left: 12px; }
  .tm-lights span { width: 10px; height: 10px; }
  .tm-toggle { margin-left: 8px; }
  .tm-tab { min-width: 0; max-width: none; margin-right: 8px; }
  .tm-newtab, .tm-inspector, .tm-ribbon, .tm-nav, .tm-crumbs, .tm-actions { display: none; }

  .tm-side, .tm:not(.is-side-open) .tm-side {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(266px, 84%);
    display: flex;
    box-shadow: 0 0 0 1px var(--tm-border), 0 12px 32px rgba(58, 46, 30, 0.22);
    border-radius: 0 12px 12px 0;
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s 0.22s;
  }
  .tm.is-side-open .tm-side { transform: none; visibility: visible; transition: transform 0.22s ease; }
  .tm.is-side-open .tm-scrim {
    display: block;
    position: absolute;
    z-index: 2;
    inset: 0;
    background: rgba(58, 46, 30, 0.18);
  }

  .tm-sheet { margin: 0 8px 8px; }
  .tm-trail { margin: 0 auto; }
  .tm-raw { padding: 14px 14px 48px; font-size: 12px; line-height: 18px; }
  .tm-md-text { padding: 46px 14px 48px; font-size: 12px; line-height: 18px; }
  .tm-md-text::before { display: none; }
  .tm-st-chars, .tm-sep-chars { display: none; }

  .no-js .compare { grid-template-columns: 1fr; }

  .yours {
    padding: 104px 20px 0;
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .yours-text p { margin-left: auto; margin-right: auto; font-size: 17px; }
  .yours-shot { width: min(259px, 72%); justify-self: center; }

  .extras { padding: 96px 20px 0; }
  .extras ul { font-size: 15px; padding: 20px 0; }
  .extras li + li::before { margin: 0 10px; }

  .foot { padding: 24px 20px 32px; flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .panel, .js .panel.is-active { transition: none; }
  .tm *, .tm *::before, .tm *::after { transition: none !important; }
}
