/* Speechless pages. Loaded after /styles.css. Black, white and dots: the only
   things that light up are the ones the keyboard itself lights up. */
.sp-page {
  --sp-paper: #f6f6f5;
  --sp-ink: #0b0b0b;
  --sp-mute: #57575b;
  --sp-line: #d9d9d6;
  --sp-key: #2c2c2e;
  --sp-on-ink: #b4b4b8;
  /* the mock keyboard, in the colours the real one has; it follows the visitor's light or dark like the real one does */
  --kb: #dcdde2;
  --kb-key: #fff;
  --kb-ink: #0b0b0b;
  --kb-mute: #5b5b60;
  --kb-go: #007aff;
  --sp-dot: 13px;
  background: var(--sp-paper);
  color: var(--sp-ink);
}

.sp-page .site-header {
  position: absolute;
}

.sp-page .site-header nav a,
.sp-page .lang {
  color: var(--sp-mute);
}

.sp-page .lang {
  border-color: #c9c9c6;
}

.sp-page .site-header nav a:hover,
.sp-page .lang:hover {
  color: var(--sp-ink);
}

.sp-wrap {
  width: min(1120px, 100% - 64px);
  margin: 0 auto;
}

/* ---------- Hero: the page is the text field, the bottom is the keyboard ---------- */
.sp-hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 88px;
}

.sp-hero-copy {
  margin-bottom: 36px;
}

.sp-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.sp-eyebrow img {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.sp-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(54px, 9.6vw, 124px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  word-spacing: 0.08em;
}

.sp-hero h1 .w {
  display: inline-block;
  margin-right: 0.16em;
  white-space: nowrap;
  transition: color 0.3s;
}

/* the full stops are the app's three dots */
.sp-hero h1 .pt {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin-left: 0.07em;
  border-radius: 50%;
  background: currentColor;
  overflow: hidden;
  text-indent: -2em;
}

.sp-hero[data-step] h1 .w {
  color: #8b8b8f;
}

.sp-hero[data-step="hold"] h1 .w:nth-child(1),
.sp-hero[data-step="talk"] h1 .w:nth-child(2),
.sp-hero[data-step="go"] h1 .w:nth-child(3) {
  color: var(--sp-ink);
}

.sp-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: start;
  margin-top: 26px;
}

.sp-lead {
  max-width: 34em;
  font-size: 19px;
  line-height: 1.6;
}

.sp-get {
  margin-bottom: 16px;
}

.sp-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.sp-status i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--sp-ink);
}

.sp-small {
  margin-top: 4px;
  color: var(--sp-mute);
  font-size: 15px;
  line-height: 1.5;
}

/* the text field */
.sp-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  margin-bottom: 18px;
  padding: 14px 22px;
  min-height: 64px;
  border: 1.5px solid #bdbdba;
  border-radius: 32px;
  background: #fff;
  font-size: 21px;
  line-height: 1.4;
}

.sp-field p {
  flex: 1;
  min-width: 0;
}

.sp-tag {
  flex: none;
  color: var(--sp-mute);
  font-size: 13px;
  font-weight: 600;
}

.sp-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  background: var(--sp-ink);
  vertical-align: -0.2em;
}

/* the keyboard */
.sp-kb {
  background: var(--kb);
  padding-bottom: 22px;
}

.sp-pad {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(208px, 30vh, 320px);
  padding: 0;
  border: 0;
  background-color: transparent;
  color: var(--kb-ink);
  font: inherit;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.sp-pad:focus-visible {
  outline: 3px solid var(--kb-ink);
  outline-offset: -6px;
  border-radius: 14px;
}

.sp-pad canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* without JavaScript the pad is dots in CSS */
html:not(.js) .sp-pad {
  background:
    radial-gradient(circle, var(--kb-ink) 6px, transparent 6.6px) calc(50% - 21px) 50% / 14px 14px no-repeat,
    radial-gradient(circle, var(--kb-ink) 6px, transparent 6.6px) 50% 50% / 14px 14px no-repeat,
    radial-gradient(circle, var(--kb-ink) 6px, transparent 6.6px) calc(50% + 21px) 50% / 14px 14px no-repeat,
    radial-gradient(circle, color-mix(in srgb, var(--kb-ink) 28%, transparent) 1.4px, transparent 1.9px) 50% 50% / var(--sp-dot) var(--sp-dot);
}

html:not(.js) .sp-hint {
  display: none;
}

.sp-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 2px 12px;
  border-radius: 6px;
  background: var(--kb);
  transform: translateX(-50%);
  color: var(--kb-mute);
  font-size: 14px;
  line-height: 1.4;
}

.sp-keys {
  display: grid;
  grid-template-columns: 64px 64px minmax(0, 1fr) 64px 112px;
  gap: 8px;
  max-width: 820px;
}

.sp-keys span {
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 10px;
  background: var(--kb-key);
  color: var(--kb-ink);
  font-size: 16px;
  font-weight: 500;
}

.sp-keys .go {
  background: var(--kb-go);
  color: #fff;
  font-weight: 600;
}

.sp-keys svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Sections ---------- */
.sp-section {
  padding: 120px 0;
}

#keys,
#service,
#mac {
  scroll-margin-top: 64px;
}

.sp-section + .sp-section:not(.sp-dark) {
  padding-top: 0;
}

.sp-dark + .sp-section:not(.sp-dark) {
  padding-top: 120px;
}

.sp-head {
  max-width: 700px;
  margin-bottom: 52px;
}

.sp-head h2 {
  font-size: clamp(34px, 4.8vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  word-spacing: 0.05em;
}

/* Chinese headings break at punctuation, not inside a word */
.sp-page:lang(zh-CN) h2 {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sp-head p {
  margin-top: 18px;
  color: var(--sp-mute);
  font-size: 18px;
}

/* gestures: each one is what the pad shows */
.sp-moves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-led {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: var(--kb);
}

.sp-led path {
  fill: none;
  stroke: var(--kb-ink);
  stroke-linecap: round;
}

.sp-moves h3 {
  margin-top: 20px;
  font-size: 22px;
  line-height: 1.3;
}

.sp-moves p {
  max-width: 30em;
  margin-top: 6px;
  color: var(--sp-mute);
}

/* you say / it types */
.sp-pairs {
  display: grid;
  gap: 0;
  margin: 0;
  border-bottom: 1.5px solid var(--sp-ink);
}

.sp-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 56px;
  padding: 28px 0 32px;
  border-top: 1.5px solid var(--sp-ink);
}

.sp-pair dt {
  color: var(--sp-mute);
  font-size: 14px;
  font-weight: 600;
}

.sp-pair dd {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.45;
}

.sp-pair .said {
  color: var(--sp-mute);
}

.sp-pair .typed {
  font-weight: 600;
}

.sp-pair s {
  text-decoration-thickness: 2px;
  text-decoration-color: #8b8b8f;
}

.sp-note {
  margin-top: 18px;
  color: var(--sp-mute);
  font-size: 15px;
}

/* text on the left, a ruled list on the right */
.sp-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 72px;
  align-items: start;
}

.sp-duo .sp-head {
  margin: 0;
}

.sp-keylist {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  text-align: left;
  font-size: 17px;
  line-height: 1.5;
}

.sp-keylist th,
.sp-keylist td {
  padding: 13px 18px 13px 0;
  border-bottom: 1px solid var(--sp-line);
  vertical-align: top;
}

.sp-keylist thead th {
  padding-top: 0;
  border-bottom: 1.5px solid var(--sp-ink);
  color: var(--sp-mute);
  font-size: 14px;
  font-weight: 600;
}

.sp-keylist tbody th {
  font-weight: 700;
  white-space: nowrap;
}

.sp-services {
  margin: 12px 0 0;
  padding: 0;
  border-top: 1.5px solid var(--sp-ink);
  list-style: none;
}

.sp-services li {
  display: grid;
  grid-template-columns: 22px auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: baseline;
  padding: 17px 0;
  border-bottom: 1px solid var(--sp-line);
  font-size: 20px;
  line-height: 1.4;
}

.sp-services li::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--sp-ink);
}

/* the one that is there from the start */
.sp-services li:first-child::before {
  background: var(--sp-ink);
}

.sp-services span {
  color: var(--sp-mute);
  font-size: 16px;
  text-align: right;
}

.sp-note a {
  color: var(--sp-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---------- Where your voice goes ---------- */
.sp-dark {
  background: var(--sp-ink);
  color: #fff;
}

.sp-dark .sp-head p {
  color: var(--sp-on-ink);
}

.sp-dark a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sp-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 117px minmax(0, 1.6fr);
  gap: 20px 0;
}

.sp-node {
  padding: 26px;
  border-radius: 20px;
  background: #1a1a1b;
}

.sp-node:first-child {
  grid-row: 1 / 3;
  align-self: stretch;
}

.sp-node:first-child::after {
  content: "";
  display: block;
  width: 54px;
  height: 12px;
  margin-top: 22px;
  background: radial-gradient(circle, #fff 5px, transparent 5.8px) -4.5px 0 / 21px 12px repeat-x;
}

.sp-node.a { grid-area: 1 / 3; }
.sp-node.b { grid-area: 2 / 3; }

/* a line of lit dots, on the keyboard's own grid */
.sp-link {
  align-self: center;
  height: var(--sp-dot);
  background: radial-gradient(circle, #fff 2.4px, transparent 3px) 0 0 / var(--sp-dot) var(--sp-dot);
}

.sp-link.a { grid-area: 1 / 2; }
.sp-link.b { grid-area: 2 / 2; }

.sp-node h3 {
  font-size: 20px;
  line-height: 1.35;
}

.sp-node p {
  margin-top: 6px;
  color: var(--sp-on-ink);
  font-size: 16px;
  line-height: 1.6;
}

.sp-node b {
  color: #fff;
  font-weight: 600;
}

.sp-four {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 64px;
  margin-top: 72px;
}

.sp-four h3 {
  padding-top: 18px;
  border-top: 1.5px solid #fff;
  font-size: 20px;
  line-height: 1.35;
}

.sp-four p,
.sp-four li {
  color: var(--sp-on-ink);
  font-size: 16px;
  line-height: 1.6;
}

.sp-four p {
  margin-top: 8px;
}

.sp-four ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.sp-four li {
  position: relative;
  padding-left: 18px;
}

.sp-four li + li {
  margin-top: 4px;
}

.sp-four li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.sp-more {
  margin-top: 48px;
  font-size: 17px;
}

/* ---------- Help ---------- */
.sp-help {
  border-top: 1px solid var(--sp-line);
}

.sp-page .doc {
  padding-top: 112px;
}

.sp-page .doc .sp-help-title {
  margin: 0 0 8px;
  font-size: clamp(34px, 4.8vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  word-spacing: 0.05em;
}

.sp-page .doc-note {
  background: #ebebe9;
}

.sp-page .doc a {
  color: var(--sp-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sp-page .doc-fine,
.sp-page .doc-meta,
.sp-page .doc-eyebrow {
  color: var(--sp-mute);
}

.sp-page.doc-page .doc {
  padding-top: 132px;
}

/* privacy policy: who gets what */
.sp-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.55;
  text-align: left;
}

.sp-table th,
.sp-table td {
  padding: 12px 18px 12px 0;
  border-bottom: 1px solid var(--sp-line);
  vertical-align: top;
}

.sp-table thead th {
  border-bottom: 1.5px solid var(--sp-ink);
  color: var(--sp-mute);
  font-size: 14px;
  font-weight: 600;
}

.sp-table tbody th {
  width: 30%;
  font-weight: 700;
}

.sp-dots3 {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
}

.sp-dots3 i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sp-ink);
}

@media (max-width: 900px) {
  .sp-hero {
    padding-top: 92px;
  }

  .sp-hero-row,
  .sp-duo {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-section {
    padding: 88px 0;
  }

  .sp-dark + .sp-section:not(.sp-dark) {
    padding-top: 88px;
  }

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

  /* the path runs downwards */
  .sp-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .sp-node:first-child { grid-area: 1 / 1; }
  .sp-link.a { grid-area: 2 / 1; }
  .sp-node.a { grid-area: 3 / 1; }
  .sp-link.b { grid-area: 4 / 1; }
  .sp-node.b { grid-area: 5 / 1; }

  .sp-link {
    justify-self: center;
    width: var(--sp-dot);
    height: 52px;
  }
}

@media (max-width: 640px) {
  .sp-wrap {
    width: calc(100% - 32px);
  }

  .sp-hero {
    padding-top: 80px;
  }

  .sp-hero-copy {
    margin-bottom: 24px;
  }

  .sp-hero h1 {
    margin-top: 16px;
  }

  .sp-hero-row {
    margin-top: 18px;
    gap: 20px;
  }

  .sp-lead {
    font-size: 17px;
    line-height: 1.55;
  }

  .sp-field {
    gap: 12px;
    min-height: 72px;
    padding: 10px 18px;
    border-radius: 26px;
    font-size: 17px;
  }

  .sp-kb .sp-wrap {
    width: calc(100% - 16px);
  }

  .sp-kb {
    padding-bottom: 14px;
  }

  .sp-pad {
    height: 184px;
  }

  .sp-hint {
    font-size: 13px;
  }

  .sp-keys {
    grid-template-columns: 46px 40px minmax(0, 1fr) 46px 82px;
    gap: 6px;
  }

  .sp-keys span {
    height: 44px;
    border-radius: 8px;
    font-size: 15px;
  }

  .sp-head {
    margin-bottom: 36px;
  }

  .sp-head p {
    font-size: 17px;
  }

  .sp-moves,
  .sp-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-moves {
    gap: 36px;
  }

  .sp-pair {
    gap: 18px;
    padding: 22px 0 26px;
  }

  .sp-pair dd {
    font-size: 20px;
  }

  .sp-keylist {
    font-size: 16px;
  }

  .sp-keylist th,
  .sp-keylist td {
    padding-right: 10px;
  }

  .sp-keylist tbody th {
    white-space: normal;
  }

  .sp-services li {
    grid-template-columns: 22px minmax(0, 1fr);
    font-size: 18px;
  }

  .sp-services span {
    grid-column: 2;
    text-align: left;
  }

  .sp-page .doc {
    padding-top: 88px;
  }

  .sp-page.doc-page .doc {
    padding-top: 100px;
  }

  /* each row becomes a block; the header words move into it */
  .sp-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .sp-table,
  .sp-table tbody,
  .sp-table tr,
  .sp-table th,
  .sp-table td {
    display: block;
    width: auto;
  }

  .sp-table tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--sp-line);
  }

  .sp-table tr:first-child {
    border-top: 1.5px solid var(--sp-ink);
  }

  .sp-table tbody th,
  .sp-table td {
    width: auto;
    padding: 0;
    border: 0;
  }

  .sp-table td {
    margin-top: 6px;
  }

  .sp-table td::before {
    content: attr(data-k);
    display: block;
    color: var(--sp-mute);
    font-size: 13px;
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-hero h1 .w {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .sp-page {
    --kb: #1c1c1e;
    --kb-key: #47474a;
    --kb-ink: #fff;
    --kb-mute: #b4b4b8;
    --kb-go: #0a84ff;
  }
}
