/*
 * pasteorder.com
 *
 * Brand from the App Store listing (listing/store/build.py): warm paper,
 * tangerine, near-black ink, Bricolage Grotesque headlines, Instrument Sans
 * body, IBM Plex Mono for anything a buyer typed. Dark mode follows the
 * device. The product drawings (.ui) stay light in both modes: they stand for
 * the Shopify admin and for paper purchase orders.
 */

:root {
  color-scheme: light dark;

  --paper: #fff7ef;
  --paper-deep: #fdeee0;
  --tile: #ffe7cf;
  --ink: #1b1a19;
  --ink-soft: #3d3631;
  --muted: #6f655c;
  --line: #efe1d2;
  --line-strong: #dcc6af;
  --accent: #9a4310;
  --mark: #ffd9b3;

  --btn: #c2560f;
  --btn-hover: #a84a0c;
  --btn-text: #ffffff;

  --band: #1f1712;
  --band-text: #fff7ef;
  --band-muted: #cdbfb1;
  --band-line: #3a2d23;

  --tang: #e0691a;
  --tang-light: #f79a3e;
  --tang-ink: #2b1d14;

  /* Inside the drawings only */
  --ui-ink: #1b1a19;
  --ui-muted: #6f655c;
  --ui-faint: #a39486;
  --ui-line: #f1e7dd;
  --ui-paper: #fffaf5;
  --ok: #2f9e5b;
  --ok-bg: #e7f6ec;
  --ok-text: #1d6b3d;
  --warn: #e0a73a;
  --warn-bg: #fdf3dc;
  --warn-text: #8a5b0d;
  --bad: #d8453c;
  --bad-bg: #fbe9e7;
  --bad-text: #a12b24;
  --ui-link: #24559a;

  --shadow: 0 30px 70px -24px rgba(140, 70, 15, 0.28), 0 2px 6px rgba(140, 70, 15, 0.06);
  --shadow-sm: 0 14px 34px -18px rgba(140, 70, 15, 0.3), 0 1px 3px rgba(140, 70, 15, 0.06);

  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16110d;
    --paper-deep: #1c1611;
    --tile: #2a1d13;
    --ink: #fbefe3;
    --ink-soft: #e6d7c8;
    --muted: #b3a699;
    --line: #30251c;
    --line-strong: #4a3a2c;
    --accent: #f79a3e;
    --mark: rgba(247, 154, 62, 0.34);

    --btn: #f79a3e;
    --btn-hover: #ffb066;
    --btn-text: #1b1a19;

    --band: #231a13;
    --band-line: #3d2f24;

    --shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 14px 34px -18px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

/*
 * Bricolage at weight 700 with the optical size pinned to a text size: the
 * display cut (opsz 96, weight 800) has ink traps and tight joins that fuse
 * letters like "ft" at headline sizes.
 */
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "opsz" 28;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 4.7vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- buttons, labels ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--btn);
  color: var(--btn-text);
  box-shadow: 0 10px 22px -12px rgba(194, 86, 15, 0.7);
}

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

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

.btn--quiet:hover {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 0.9375rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.label::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section {
  padding: clamp(72px, 10vw, 128px) 0;
}

.section--deep {
  background: var(--paper-deep);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head p {
  margin-top: 18px;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand svg {
  width: 24px;
  height: auto;
}

.brand .clip {
  fill: var(--tang-ink);
}

@media (prefers-color-scheme: dark) {
  .brand .clip {
    fill: #f3e3d3;
  }
  .brand .clip-slot {
    fill: var(--tang-ink);
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a:not(.btn) {
  font-size: 0.9688rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}

.nav__links a:not(.btn):hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--tang-light);
}

@media (max-width: 860px) {
  .nav__text {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(72px, 9vw, 120px);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(48px, 6vw, 64px);
  align-items: center;
}

@media (min-width: 1040px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.eyebrow {
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hero h1 {
  margin-bottom: 26px;
}

.hero h1 mark {
  padding: 0 0.06em;
  margin: 0 -0.06em;
  background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%);
  color: inherit;
}

.lede {
  max-width: 36rem;
  font-size: clamp(1.125rem, 1.7vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.fine {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* The demo: an email from a buyer, and what PasteOrder makes of it. */

.demo {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.demo::before {
  content: "";
  position: absolute;
  top: 120px;
  bottom: -160px;
  left: 30%;
  right: calc(-1 * var(--gutter) - 50vw);
  border-radius: 240px 0 0 0;
  background: var(--tile);
}

.ui {
  position: relative;
  background: #fff;
  border: 1px solid #efe1d2;
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: var(--ui-ink);
  font-family: var(--sans);
  line-height: 1.45;
}

.po {
  grid-column: 1 / span 9;
  grid-row: 1;
  align-self: start;
  padding: 20px 22px 22px;
  transform: rotate(-2deg);
  transform-origin: top left;
}

.review {
  grid-column: 2 / -1;
  grid-row: 1;
  margin-top: 262px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .po {
    grid-column: 1 / -1;
    transform: rotate(-1.2deg);
  }
  .review {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: -18px;
  }
  .demo::before {
    top: 200px;
    left: 18%;
  }
}

.po__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed #e7d5c2;
  font-size: 0.8125rem;
  color: var(--ui-muted);
}

.po__from {
  font-weight: 600;
  color: var(--ui-ink);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f4ede6;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a433d;
  white-space: nowrap;
}

.po__body {
  font-family: var(--mono);
  font-size: 0.8438rem;
  line-height: 1.85;
}

.po__line {
  display: flex;
  gap: 12px;
  margin: 0 -8px;
  padding: 0 8px;
  border-radius: 6px;
}

.po__line .n {
  flex: none;
  width: 1.1em;
  font-size: 0.6875rem;
  color: var(--ui-faint);
  text-align: right;
}

.po__note {
  color: var(--ui-muted);
  padding-left: calc(1.1em + 12px);
}

.review__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--ui-line);
}

.review__title {
  font-weight: 600;
}

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

.rv {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  grid-template-areas: "n product qty" "n status status";
  gap: 6px 14px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ui-line);
}

@media (min-width: 520px) {
  .rv {
    grid-template-columns: 18px minmax(0, 1fr) 58px auto;
    grid-template-areas: "n product qty status";
  }
}

.rv__n {
  grid-area: n;
  align-self: start;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ui-faint);
}

.rv__product {
  grid-area: product;
  min-width: 0;
}

.rv__name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.rv__meta {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 0.7188rem;
  color: #8a7d71;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rv__meta--warn {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--warn-text);
  white-space: normal;
}

.rv__qty {
  grid-area: qty;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rv__qty small {
  display: block;
  font-size: 0.7188rem;
  color: #8a7d71;
  white-space: nowrap;
}

.rv__status {
  grid-area: status;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (min-width: 520px) {
  .rv__status {
    justify-content: flex-end;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.chip--ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.chip--warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.chip--bad {
  background: var(--bad-bg);
  color: var(--bad-text);
}

.chip--learned {
  background: #fde6d3;
  color: #9a4310;
}

.chip--learned::before {
  display: none;
}

.review__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--ui-paper);
}

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

.review__sum strong {
  display: block;
  font-size: 1.0625rem;
  color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 10px;
  background: #1b1a19;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

.replay {
  position: relative;
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 14px;
  padding: 6px 4px;
  border: 0;
  background: none;
  font: 500 0.8125rem/1 var(--mono);
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  visibility: hidden;
}

.js .replay {
  visibility: visible;
}

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

@media (prefers-reduced-motion: reduce) {
  .replay {
    display: none;
  }
}

/*
 * The demo plays once when the review card comes into view: each email line is
 * marked as it is read, then its row lands in the review. Rows are only hidden
 * while an animation is pending (fill-mode both), so if the script never runs,
 * or motion is reduced, the finished review is simply shown.
 */
@media (prefers-reduced-motion: no-preference) {
  .demo.is-live .po__line[data-step] {
    animation: read 1.1s ease both;
    animation-delay: calc(var(--i) * 0.55s + 0.3s);
  }

  .demo.is-live .rv {
    animation: land 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i) * 0.55s + 0.65s);
  }

  .demo.is-live .rv .chip {
    animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both;
    animation-delay: calc(var(--i) * 0.55s + 0.9s);
  }

  .demo.is-live .review__foot {
    animation: land 0.5s ease both;
    animation-delay: 3.6s;
  }
}

@keyframes read {
  0% {
    background-color: transparent;
  }
  35% {
    background-color: #ffdcb8;
  }
  100% {
    background-color: #fff3e6;
  }
}

@keyframes land {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* ---------- formats ---------- */

.formats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 18px;
  list-style: none;
  padding: 0;
}

.format {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sheet {
  position: relative;
  height: 150px;
  padding: 16px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.sheet--email .mono-lines,
.sheet--pdf .mono-lines {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.75;
  color: var(--ui-ink);
  white-space: nowrap;
}

.sheet .dim {
  color: var(--ui-muted);
}

.sheet--chat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: #f6efe7;
}

.bubble {
  max-width: 88%;
  padding: 7px 11px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ui-ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.bubble small {
  display: block;
  margin-top: 2px;
  font-size: 0.625rem;
  color: var(--ui-faint);
  text-align: right;
}

.grid-mini {
  display: grid;
  grid-template-columns: 2.6fr 0.8fr 1fr;
  border: 1px solid #e3e6ea;
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.625rem;
  line-height: 1;
}

.grid-mini span {
  padding: 7px 6px;
  border-right: 1px solid #e3e6ea;
  border-bottom: 1px solid #e3e6ea;
  color: #4a4a4a;
  white-space: nowrap;
  overflow: hidden;
}

.grid-mini span:nth-child(3n) {
  border-right: 0;
}

.grid-mini .h {
  background: #f6f7f8;
  font-weight: 500;
  color: var(--ui-ink);
}

.grid-mini .sel {
  background: #e7f6ec;
}

.sheet--pdf {
  padding: 18px 20px;
}

.sheet--pdf .doc-title {
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ext {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #1b1a19;
  color: #fff;
  font: 600 0.625rem/1.2 var(--sans);
  letter-spacing: 0.04em;
}

.format h3 {
  font-size: 1.0625rem;
}

.format p {
  margin-top: 4px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.aside-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 720px;
  margin-top: 36px;
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 0.9688rem;
  color: var(--ink-soft);
}

.aside-note svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

/* ---------- steps ---------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 64px;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--tang);
  font: 500 0.875rem/1 var(--mono);
  color: var(--accent);
}

.step::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 52px;
  bottom: -30px;
  border-left: 2px dashed var(--line-strong);
}

.step:last-child::after {
  display: none;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.9688rem;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }
  .step {
    padding-left: 0;
    padding-top: 70px;
  }
  .step::after {
    left: 56px;
    right: -22px;
    top: 22px;
    bottom: auto;
    border-left: 0;
    border-top: 2px dashed var(--line-strong);
  }
}

.handoff {
  margin-top: 44px;
  max-width: 720px;
  font-size: 0.9688rem;
  color: var(--muted);
}

/* ---------- checks ---------- */

.checks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

@media (min-width: 1000px) {
  .checks {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 64px;
  }
  .checks .section-head {
    position: sticky;
    top: 110px;
  }
}

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

.flag {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 20px;
  padding: 18px 20px 18px 22px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.flag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--warn);
}

.flag--bad::before {
  background: var(--bad);
}

@media (min-width: 620px) {
  .flag {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
  }
}

.flag__name {
  font-weight: 600;
  line-height: 1.3;
}

.flag__sku {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #8a7d71;
}

.flag__detail {
  font-size: 0.9063rem;
  color: #4a433d;
}

.flag__detail b {
  font-size: 1.0625rem;
  color: var(--ui-ink);
}

.flag__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

@media (min-width: 620px) {
  .flag__side {
    align-items: flex-end;
  }
}

.flag__action {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ui-link);
}

.states {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  list-style: none;
  padding-left: 0;
}

@media (min-width: 700px) {
  .states {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.states .chip {
  margin-bottom: 10px;
  font-size: 0.8125rem;
}

.states p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* ---------- band: how matching works ---------- */

.band {
  background: var(--band);
  color: var(--band-text);
}

.band .label {
  color: var(--tang-light);
}

.band .section-head p,
.band .facts li {
  color: var(--band-muted);
}

.mechanism {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

@media (min-width: 1000px) {
  .mechanism {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }
}

.pick {
  padding: 22px 22px 14px;
  border-color: transparent;
}

.pick__line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px dashed #e7d5c2;
}

.pick__line span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-muted);
}

.pick__line code {
  font-size: 0.9375rem;
}

.pick__caption {
  margin: 12px 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-muted);
}

.cand {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 54px;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--ui-line);
  list-style: none;
}

.cand:last-child {
  border-bottom: 0;
}

.cand__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #cdbfb1;
}

.cand--chosen .cand__radio {
  box-shadow: inset 0 0 0 5px var(--ok);
}

.cand__name {
  font-size: 0.9375rem;
  font-weight: 600;
}

.cand--none .cand__name {
  font-weight: 500;
  font-style: italic;
  color: var(--ui-muted);
}

.cand__sku {
  display: block;
  font-family: var(--mono);
  font-size: 0.7188rem;
  font-weight: 400;
  color: #8a7d71;
}

.cand__bar {
  grid-column: 2 / 3;
  height: 6px;
  border-radius: 3px;
  background: #f1e7dd;
  overflow: hidden;
}

.cand__bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #cdbfb1;
}

.cand--chosen .cand__bar i {
  background: var(--ok);
}

.cand__pct {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ui-muted);
}

.cand--chosen .cand__pct {
  font-weight: 600;
  color: var(--ok-text);
}

.pick ul {
  margin: 0;
  padding: 0;
}

.facts {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  padding: 0;
  list-style: none;
}

.facts li {
  position: relative;
  padding-left: 30px;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--tang-light);
  border-bottom: 2.5px solid var(--tang-light);
  transform: rotate(-45deg);
}

.facts strong {
  color: var(--band-text);
  font-weight: 600;
}

/* ---------- memory ---------- */

.memory {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

@media (min-width: 1000px) {
  .memory {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }
}

.memory__copy p + p {
  margin-top: 16px;
}

.memory__copy p {
  color: var(--ink-soft);
}

.timeline {
  display: grid;
  gap: 0;
  list-style: none;
  padding: 0;
}

.moment {
  padding: 18px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.moment__when {
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-muted);
}

.moment__said {
  font-family: var(--mono);
  font-size: 0.875rem;
}

.moment__result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
}

.moment__result .rv__name {
  font-size: 0.9375rem;
}

.moment__chips {
  display: flex;
  gap: 6px;
}

.alts {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--ui-muted);
}

.alts b {
  color: var(--ui-ink);
  font-weight: 600;
}

.joint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 14px 26px;
  font-size: 0.875rem;
  color: var(--muted);
}

.joint::before {
  content: "";
  align-self: stretch;
  border-left: 2px dashed var(--line-strong);
  margin-right: 8px;
}

/* ---------- admin surfaces ---------- */

.places {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  list-style: none;
  padding: 0;
}

@media (min-width: 900px) {
  .places {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.place {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 60%, var(--paper-deep));
}

.place h3 {
  margin-bottom: 10px;
}

.place p {
  font-size: 0.9688rem;
  color: var(--ink-soft);
}

.path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.path span:not(:last-child)::after {
  content: "›";
  margin-left: 6px;
  color: var(--muted);
}

.path .here {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--tile);
  color: var(--accent);
  font-weight: 500;
}

.place .note {
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- keyboard ---------- */

.kb {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

@media (min-width: 1000px) {
  .kb {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }
}

/* Keycaps sit on the dark band in both color schemes. */
kbd,
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #4a3a2c;
  border-radius: 8px;
  background: #2c2219;
  box-shadow: 0 3px 0 #0b0806, inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #fbefe3;
  font: 600 0.9375rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.keys {
  margin: 34px 0 0;
  border-top: 1px solid var(--band-line);
}

.keys > div {
  display: grid;
  grid-template-columns: clamp(104px, 28vw, 132px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--band-line);
}

.keys dt {
  display: flex;
  align-items: center;
  gap: 6px;
}

.keys dd {
  margin: 0;
  color: var(--band-muted);
  font-size: 0.9688rem;
}

.keys .or {
  font-size: 0.75rem;
  color: var(--band-muted);
}

.kbdemo {
  overflow: hidden;
  border-color: transparent;
  transition: box-shadow 0.2s ease;
}

.kbdemo:focus {
  outline: none;
}

.kbdemo:focus-within {
  box-shadow: 0 0 0 3px var(--tang-light), var(--shadow);
}

.kbdemo__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--ui-line);
  font-weight: 600;
}

.kbdemo__count {
  font-size: 0.8125rem;
  color: var(--warn-text);
}

.kbdemo.is-done .kbdemo__count {
  color: var(--ok-text);
}

.kbdemo__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kr {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: start;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ui-line);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.kr.is-focus {
  background: #fff4e8;
  box-shadow: inset 4px 0 0 var(--tang);
}

.kr__n {
  padding-top: 2px;
  font: 0.75rem/1.4 var(--mono);
  color: var(--ui-faint);
}

.kr__main {
  min-width: 0;
}

.kr__src {
  display: block;
  font: 0.75rem/1.4 var(--mono);
  color: #8a7d71;
}

.kr__name {
  display: block;
  margin-top: 2px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.kr__sku {
  margin-left: 8px;
  white-space: nowrap;
  font: 400 0.7188rem var(--mono);
  color: #8a7d71;
}

.kr__note {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--warn-text);
}

.kr__alts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.kr__alt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px 3px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #fff;
  font-size: 0.75rem;
  color: #4a433d;
  white-space: nowrap;
}

.kr__alt b {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  background: #1b1a19;
  color: #fff;
  font: 500 0.6875rem/1 var(--mono);
}

.kr__status {
  padding-top: 1px;
}

.kr[data-state="ok"] .kr__note,
.kr[data-state="ok"] .kr__alts,
.kr[data-state="ok"] .chip--warn,
.kr[data-state="look"] .chip--ok {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .kr.just-settled .chip--ok {
    animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both;
  }
}

.kbdemo__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--ui-paper);
}

.kbdemo__hint {
  font: 500 0.8125rem/1.3 var(--mono);
  color: var(--ui-muted);
}

.kbdemo__armed,
.kbdemo:focus-within .kbdemo__idle,
.no-js .kbdemo__hint {
  display: none;
}

.kbdemo:focus-within .kbdemo__armed {
  display: inline;
  color: #9a4310;
}

.kbdemo__reset {
  padding: 6px 10px;
  border: 1px solid #e3d5c6;
  border-radius: 8px;
  background: #fff;
  font: 600 0.8125rem/1 var(--sans);
  color: var(--ui-ink);
  cursor: pointer;
}

.kbdemo__reset:hover {
  border-color: #1b1a19;
}

.keypad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.key {
  flex-direction: column;
  gap: 3px;
  min-width: 54px;
  height: 54px;
  padding: 0 12px;
  border-radius: 11px;
  box-shadow: 0 4px 0 #0b0806, inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: 1.0625rem;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.08s ease;
}

.key small {
  font: 500 0.625rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--band-muted);
}

.key--wide {
  min-width: 84px;
}

.key:hover {
  border-color: var(--tang-light);
}

.key:active,
.key.is-pressed {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0b0806, inset 0 1px 0 rgba(255, 255, 255, 0.07);
  border-color: var(--tang-light);
}

.no-js .keypad,
.no-js .kbdemo__help {
  display: none;
}

.kbdemo__help {
  margin-top: 16px;
  font-size: 0.9063rem;
  color: var(--band-muted);
}

/* ---------- pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.plan--free {
  background: var(--tile);
  border-color: transparent;
}

.plan__name {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.plan__price {
  margin-top: 14px;
  font-family: var(--display);
  font-size: 2.75rem;
  font-weight: 700;
  font-variation-settings: "opsz" 28;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan__price small {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.plan__amount {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
  font-weight: 600;
}

.plan__per {
  margin-top: 2px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.plan-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px 40px;
  margin-top: 34px;
  padding: 0;
  list-style: none;
  font-size: 0.9688rem;
  color: var(--ink-soft);
}

@media (min-width: 800px) {
  .plan-notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.plan-notes strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.pricing-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 40px;
}

.pricing-cta p {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- faq ---------- */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

@media (min-width: 1000px) {
  .faq-layout {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 64px;
  }
}

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

.faq details {
  border-bottom: 1px solid var(--line-strong);
}

.faq summary {
  position: relative;
  display: block;
  padding: 20px 44px 20px 0;
  font-size: 1.0938rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  margin-top: -3px;
  transform: rotate(-135deg);
}

.faq .answer {
  padding: 0 0 22px;
  max-width: 64ch;
  color: var(--ink-soft);
}

.faq .answer p + p {
  margin-top: 12px;
}

.faq a,
.prose a,
.closing a,
.site-footer a {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--tang-light);
}

/* ---------- closing ---------- */

.closing {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) clamp(24px, 6vw, 72px);
  border-radius: 28px;
  background: var(--tile);
}

.closing::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 300px;
  height: 340px;
  background: url("./favicon_light.svg") center / contain no-repeat;
  opacity: 0.16;
  transform: rotate(10deg);
  pointer-events: none;
}

.closing h2 {
  max-width: 14ch;
}

.closing p {
  position: relative;
  z-index: 1;
  max-width: 54ch;
  margin-top: 18px;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--ink-soft);
}

.closing .cta-row {
  position: relative;
  z-index: 1;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  }
}

.footer-grid h2 {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.footer-grid a {
  color: var(--ink-soft);
}

.footer-about p {
  margin-top: 12px;
  max-width: 34ch;
}

.legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8438rem;
}

/* ---------- long-form pages (privacy) ---------- */

.doc-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(24px, 4vw, 40px);
}

.doc-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

.doc-hero p {
  margin-top: 16px;
  max-width: 60ch;
  color: var(--ink-soft);
}

.prose {
  max-width: 760px;
  padding-bottom: clamp(64px, 9vw, 112px);
  color: var(--ink-soft);
}

.prose h2 {
  margin: 56px 0 16px;
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  color: var(--ink);
}

.prose h3 {
  margin: 32px 0 10px;
  font-size: 1.1875rem;
  color: var(--ink);
}

.prose p,
.prose ul,
.prose .table-wrap {
  margin-bottom: 16px;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 6px;
}

.prose strong {
  color: var(--ink);
}

.prose .meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--paper-deep);
  color: var(--ink);
  font-weight: 600;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.toc {
  margin: 8px 0 8px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  columns: 2 220px;
  column-gap: 32px;
  font-size: 0.9375rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}
