/* speakpact.net
 *
 * The App's palette and the App's type rule, on a page: paper, ink, one
 * orange-red. Instrument Serif carries the English — it is the material the
 * learner reads aloud, and it has no Chinese glyphs, so it never carries a
 * Chinese word. The system sans carries everything the site says in Chinese.
 * IBM Plex Mono carries times, counters and scores.
 *
 * Light only, because the App is.
 */

:root {
  --paper: #F7F5F0;
  --ink: #17150F;
  --orange: #FF4D2E;
  --muted: #726C60;
  --line: #E5E1D4;
  --light: #F1EEE5;
  --faint: #C9C4B4;
  --white: #FFFFFF;

  --on-ink: #F7F5F0;
  --on-ink-muted: rgba(247, 245, 240, 0.58);
  --on-ink-line: rgba(247, 245, 240, 0.14);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
  --gutter: 24px;
  --radius: 20px;

  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.8 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

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

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 3px; }

img, svg { max-width: 100%; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0; text-wrap: balance; }
::selection { background: var(--orange); color: var(--paper); }
[id] { scroll-margin-top: 80px; }

.en { font-family: var(--serif); font-weight: 400; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

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

/* The App's Eyebrow: sans, tracking 0.18em, muted. Used only inside drawings
   of the App itself. */
.eyebrow {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); line-height: 1.6;
}

/* ------------------------------------------------------------------ top */

.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink); color: var(--on-ink);
}
.top .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--serif); font-size: 23px; line-height: 1;
  white-space: nowrap;
}
.brand .mark { display: block; }

.top nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; }
.top nav a { color: var(--on-ink-muted); text-decoration: none; transition: color 0.15s; }
.top nav a:hover { color: var(--on-ink); }

/* The App Store button, in its two states. */
.store {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--paper); color: var(--ink);
  font-size: 15px; font-weight: 500; line-height: 1;
  padding: 15px 22px 15px 18px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
}
a.store:hover { background: var(--white); }
.store.soon { background: transparent; color: inherit; border: 1px solid currentColor; opacity: 0.85; }
.store.small { font-size: 13px; padding: 10px 16px 10px 13px; }
.store.small .apple { width: 14px; height: 14px; }
.soon-text { font-size: 13px; color: var(--on-ink-muted); white-space: nowrap; }

@media (max-width: 760px) {
  .top nav { display: none; }
  .top .store, .top .soon-text { margin-left: auto; }
}

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

.hero { background: var(--ink); color: var(--on-ink); padding: 72px 0 104px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center;
}
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); line-height: 1.16; margin-bottom: 26px; }
.hero .lede { font-size: 18px; line-height: 1.75; color: var(--on-ink-muted); max-width: 25em; margin-bottom: 36px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.trial { font-size: 14px; color: var(--on-ink-muted); }

.hero .facts {
  list-style: none; padding: 24px 0 0; margin: 60px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 36px;
  border-top: 1px solid var(--on-ink-line);
  font-size: 13px; color: var(--on-ink-muted);
}
.hero .facts li { display: flex; align-items: center; gap: 9px; }
.hero .facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }

/* The phone stands on the paper below: it belongs to both. */
.device { align-self: center; }

@media (max-width: 900px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero .lede { max-width: none; }
  .hero .facts { margin-top: 40px; }
}

/* The deck: the meter, the clock, the take's score in a hairline orange ring. */
.deck {
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--on-ink); border-radius: 16px;
  padding: 12px 14px; margin-top: 18px;
}
.wave { display: flex; align-items: center; justify-content: space-between; height: 28px; flex: 1; min-width: 0; }
.wave i {
  display: block; width: 3px; flex: 0 0 3px; border-radius: 2px;
  height: var(--h); background: var(--orange);
  transition: height 0.35s ease, background-color 0.25s ease;
}
/* After the take: the bars sit in paper until playback runs orange over them. */
[data-phase="verdict"] .wave i { background: rgba(247, 245, 240, 0.4); }
[data-phase="verdict"] .wave i.played { background: var(--orange); }
.clock { font-size: 12px; opacity: 0.6; }
.ring {
  flex: 0 0 auto; width: 34px; height: 34px;
  border: 1.5px solid var(--orange); border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; color: var(--orange);
  transition: opacity 0.3s ease;
}
.notice { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 12px; transition: opacity 0.35s ease; }
.gloss { font-size: 13px; color: var(--muted); }
.by { font-style: italic; font-size: 14px; color: var(--muted); margin-top: 10px; }
.quote { display: block; font-family: var(--serif); font-size: 54px; line-height: 1; color: var(--orange); height: 30px; margin-top: 22px; }

/* The take, played through. The words light as they are heard; afterwards
   the ones that were off stay lit and underlined, and the deck names them. */
.w { transition: color 0.2s ease; }
.w.heard { color: var(--orange); }
[data-take]:not([data-phase]) .w[data-off], [data-phase="verdict"] .w[data-off] {
  color: var(--orange);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em;
  text-decoration-color: var(--orange);
}
[data-phase="idle"] .wave i, [data-phase="rec"] .wave i { height: 3px; }
[data-phase="idle"] .wave i { background: rgba(247, 245, 240, 0.35); }
[data-phase="idle"] .notice, [data-phase="rec"] .notice, [data-phase="score"] .notice { opacity: 0; }
[data-phase="idle"] .ring, [data-phase="rec"] .ring { opacity: 0.35; }
[data-phase="rec"] .wave i { animation: bob 0.62s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.09s); }
@keyframes bob { from { height: 4px; } to { height: calc(var(--h) * 0.9 + 10%); } }

/* ------------------------------------------------------------- sections */

.sec { padding: 120px 0; }
.sec h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3; margin-bottom: 18px; }
.sec .lede { font-size: 17px; line-height: 1.8; color: var(--muted); max-width: 32em; }
.sec > .wrap > .lede { margin-bottom: 52px; }

.points { margin: 40px 0 0; display: grid; gap: 22px; }
.points div { padding-left: 18px; border-left: 2px solid var(--line); }
.points dt { font-weight: 600; font-size: 15px; }
.points dd { margin: 4px 0 0; font-size: 14px; line-height: 1.75; color: var(--muted); }

@media (max-width: 720px) { .sec { padding: 84px 0; } }

/* ------------------------------------------------------------ the pushes */

.pushes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.push {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px 24px; display: flex; flex-direction: column;
}
.push-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.push-top .meta { font-weight: 400; color: var(--muted); font-size: 12px; text-align: right; }
.push .quote { font-size: 44px; height: 24px; margin-top: 6px; }
.push .line { font-size: 30px; line-height: 1.22; }
.push .gloss { margin-top: 8px; }
.push-title { font-size: 26px; line-height: 1.25; margin: 6px 0 4px; }
.role { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.foot-note { margin-top: auto; padding-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.dl { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid var(--light); }
.dl .who { font-size: 11px; color: var(--faint); padding-top: 4px; }
.dl.you .who { color: var(--orange); font-weight: 500; }
.dl .en { display: block; font-size: 19px; line-height: 1.3; color: var(--muted); }
.dl.you .en { color: var(--ink); }
.dl .gloss { display: block; font-size: 12px; margin-top: 2px; }
.focus { font-style: normal; color: var(--orange); }

.ns { margin-top: 10px; }
.ns .en { display: block; font-size: 20px; line-height: 1.3; }
.ns .gloss { display: block; font-size: 12px; margin-top: 2px; }

.word { font-size: 44px; line-height: 1.1; margin-top: 8px; display: flex; align-items: baseline; gap: 10px; }
.word .pos { font-size: 12px; color: var(--muted); }
.meaning { font-size: 14px; margin-top: 4px; }

@media (max-width: 560px) {
  .pushes { grid-template-columns: minmax(0, 1fr); }
  .push { padding: 20px 22px 22px; }
  .disc { font-size: 12px; }
}

/* ------------------------------------------------------------- the take */

.take-figure {
  margin: 0; background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: 24px;
  padding: 30px 32px 28px;
}
.take-figure .eyebrow { margin-bottom: 18px; }
.take-figure .line { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.18; }
.take-figure .gloss { font-size: 14px; margin-top: 14px; }
.deck.big { padding: 16px 18px; margin-top: 26px; gap: 18px; }
.deck.big .wave { height: 44px; }
.deck.big .clock { font-size: 13px; }
.deck.big .ring { width: 44px; height: 44px; font-size: 16px; }
.take-figure .notice { font-size: 14px; margin-top: 16px; }
.hero-take { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); border-color: transparent; }

.points.row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 48px; }
@media (max-width: 800px) { .points.row { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
@media (max-width: 720px) { .take-figure { padding: 24px 22px 22px; } }

/* ---------------------------------------------------------- the calendar */

.streak-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.calendar { display: flex; justify-content: center; }
.daycard {
  width: 100%; max-width: 480px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px 26px;
}
.dc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 500; }
.dc-top .run { color: var(--orange); font-size: 13px; }
.strip { display: flex; margin-top: 22px; }
.dayc { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 3px; }
.disc {
  width: 100%; max-width: 46px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; background: rgba(255, 77, 46, var(--wash));
}
.disc.full { color: var(--paper); }
.wd { font-size: 11px; color: var(--muted); }
.dayc.today .wd { color: var(--ink); font-weight: 500; }
.span { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 11px; color: var(--muted); }
.span i { flex: 1; height: 1px; background: var(--line); }

@media (max-width: 900px) {
  .streak-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .streak .calendar { order: 2; justify-content: flex-start; }
}

/* ----------------------------------------------------------------- plus */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 760px; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px 26px; }
.plan.dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.plan-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.save { font-size: 11px; font-weight: 500; color: var(--orange); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; }
.price { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; line-height: 1; }
.price .cur { font-size: 22px; }
.price .amt { font-size: 64px; letter-spacing: -0.01em; }
.price .per { font-size: 14px; color: var(--muted); margin-left: 6px; }
.plan.dark .per { color: var(--on-ink-muted); }
.plan-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.plan.dark .plan-note { color: var(--on-ink-muted); }
.plan-fine { font-size: 13px; color: var(--muted); max-width: 40em; margin-top: 22px; line-height: 1.75; }

@media (max-width: 560px) { .plans { grid-template-columns: minmax(0, 1fr); } }

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

.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  cursor: pointer; list-style: none; padding: 20px 36px 20px 0; font-size: 17px; font-weight: 500;
  position: relative;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.qa details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.qa p { padding: 0 0 22px; font-size: 15px; color: var(--muted); max-width: 40em; }

@media (max-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* ---------------------------------------------------------------- close */

.close { background: var(--ink); color: var(--on-ink); text-align: center; padding: 110px 0; }
.close-line { font-size: clamp(26px, 3.2vw, 38px); color: var(--on-ink-muted); font-style: italic; margin-bottom: 14px; }
.close h2 { font-size: clamp(32px, 4.4vw, 54px); margin-bottom: 36px; }
.close .actions { justify-content: center; }

/* ---------------------------------------------------------------- prose */

.doc-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 80px; padding-top: 64px; padding-bottom: 110px; }
.toc { position: sticky; top: 96px; font-size: 13px; align-self: start; }
.toc p { color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; color: var(--muted); text-decoration: none; margin-left: -1px; border-left: 1px solid transparent; }
.toc li a:hover { color: var(--ink); border-left-color: var(--ink); }
.toc li a.on { color: var(--ink); border-left-color: var(--orange); }

.prose { max-width: 42rem; }
.prose h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.3; margin-bottom: 20px; }
.prose .updated { font-size: 13px; color: var(--muted); margin-bottom: 36px; }
.prose h2 { font-size: 19px; margin: 44px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 14px; padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--faint); }
.prose strong { font-weight: 600; }
.prose.lede-first > h1 + p { font-size: 18px; line-height: 1.7; margin-bottom: 8px; }

@media (max-width: 800px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 40px; padding-bottom: 80px; }
  .toc { display: none; }
}

/* ------------------------------------------------------------------ 404 */

.missing { padding: 120px 0 140px; max-width: 40rem; }
.missing-line { font-style: italic; font-size: 24px; color: var(--muted); margin-bottom: 18px; }
.missing h1 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 16px; }
.missing p { color: var(--muted); }

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

.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand .brand { font-size: 20px; }
.foot-brand p { margin-top: 14px; color: var(--muted); }
.foot-h { font-weight: 600; margin-bottom: 8px; }
.foot-grid a:not(.brand) { display: block; text-decoration: none; color: var(--muted); padding: 3px 0; }
.foot-grid a:not(.brand):hover { color: var(--ink); }
.foot-brand .brand { text-decoration: none; }
.foot-small { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

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

@media print {
  .top, .foot, .toc, .skip { display: none; }
  body { background: #fff; font-size: 12pt; }
  .doc-grid { display: block; padding: 0; }
  .prose { max-width: none; }
  .prose h2 { break-after: avoid; }
  a { text-decoration: none; }
}
