/* longyan.app. See DESIGN.md for the reasoning behind the tokens. */
:root {
  --night: #000;
  --ink: #f5f5f7;
  --graphite: #86868b;
  --hairline: rgba(255, 255, 255, .12);
  --t1: #e39e94; --t2: #9ecca8; --t3: #a1bde3; --t4: #c2abe0; --t5: #8e8e93;
  /* The app's light-mode tones, for UI drawn on light surfaces. */
  --t1-ink: #a8544d; --t2-ink: #4a8761; --t3-ink: #4a73a6; --t4-ink: #8061a3; --t5-ink: #8e8e93;
  --lost: #b05c80; --culture: #458280;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", system-ui, sans-serif;
  --zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 17px/1.5 var(--text);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
[lang="zh-CN"] { font-family: var(--zh); letter-spacing: 0; }
a { color: inherit; }
a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--t3); outline-offset: 3px; border-radius: 8px;
}
img { display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
h1, h2 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
h2 { font-size: 48px; line-height: 1.08; letter-spacing: -0.032em; }
section { position: relative; }

.section-head { margin-bottom: 56px; }
.section-head p { font-size: 21px; line-height: 1.45; color: var(--graphite); margin: 16px 0 0; max-width: 34em; letter-spacing: -0.016em; }
.section-head.center { text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* Navigation: Apple's translucent bar. */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 30;
  background: rgba(0, 0, 0, 0);
  transition: transform .45s var(--ease-out), background-color .3s;
  border-bottom: .5px solid transparent;
}
.bar.solid { background: rgba(0, 0, 0, .62); border-bottom-color: var(--hairline); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.bar.tucked { transform: translateY(-100%); }
.bar-inner { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 52px; display: flex; align-items: center; justify-content: space-between; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: -0.01em; }
/* The mark alone, white on the black bar: the app icon's negative. Its width set so its
   height sits with the cap height of the name beside it. */
.brand-mark { width: 25px; height: auto; flex: none; color: var(--ink); }
.bar-links { display: flex; align-items: center; gap: 26px; font-size: 13.5px; }
.bar-links a { text-decoration: none; color: rgba(245, 245, 247, .72); transition: color .2s; }
.bar-links a:hover { color: var(--ink); }
.bar-links .bar-download { background: var(--ink); color: #000; padding: 5px 13px; border-radius: 999px; font-weight: 500; }
.bar-links .bar-download:hover { color: #000; background: #fff; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #000;
  font: 500 17px/1 var(--text); letter-spacing: -0.012em;
  height: 50px; padding: 0 28px; border-radius: 999px; text-decoration: none;
  transition: background .2s, transform .25s var(--ease-out);
}
.button:hover { background: #fff; }
.button:active { transform: scale(.97); }

/* The opening: pinned while the eye comes apart and the sentence forms. */
/* 100vh pinned, 75vh of scroll to form the sentence, 60vh to try it (hero.js). */
.story { height: 235vh; }
.story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: #000; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy {
  position: absolute; z-index: 2; top: 45%;
  left: max(28px, calc((100vw - 1120px) / 2 + 28px));
  width: min(560px, 46vw);
  transform: translateY(-50%);
  transition: opacity .5s var(--ease-out), transform .8s var(--ease-out);
}
.is-away .hero-copy { opacity: 0; transform: translateY(calc(-50% - 40px)); pointer-events: none; }
/* Two lines on a wide screen, "Read & Learn Chinese" and "anywhere.", sized to the space
   beside the eye. */
h1 { font-size: min(72px, 4.7vw); line-height: 1; letter-spacing: -0.04em; }
@media (min-width: 761px) { h1 { width: max-content; } h1 .rise > span { white-space: nowrap; } }
.rise { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.rise > span { display: block; }
.hero-sub { font-size: 21px; line-height: 1.42; color: rgba(245, 245, 247, .62); margin: 24px 0 34px; max-width: 21em; text-wrap: balance; letter-spacing: -0.016em; }
.hero-actions { display: flex; align-items: flex-start; gap: 28px; flex-wrap: wrap; }
.download { display: flex; flex-direction: column; align-items: center; }
.download .fine { margin: 14px 0 0; }
.hero-actions .button-quiet { height: 50px; }
.button-quiet { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 500; text-decoration: none; color: rgba(245, 245, 247, .86); transition: color .2s; }
.button-quiet svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-out); }
.button-quiet:hover { color: #fff; }
.button-quiet:hover svg { transform: translateY(2px); }
.fine { margin: 22px 0 0; font-size: 13px; color: #6e6e73; }

/* A quiet hint at the bottom right, gone once you've pointed at a word. */
.hint {
  position: absolute; z-index: 2; margin: 0; right: max(28px, calc((100vw - 1120px) / 2 + 28px)); bottom: 34px;
  font-size: 13px; letter-spacing: -0.005em; color: rgba(245, 245, 247, .5); pointer-events: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.motion .hint { opacity: 0; transform: translateY(6px); }
.motion.hero-ready .hint { opacity: 1; transform: none; transition-delay: 2.8s; }
.hint.done, .motion.hero-ready .hint.done, .is-away .hint, .motion.hero-ready .is-away .hint { opacity: 0; transition-delay: 0s; }
.og .hint { display: none; }
@media (max-width: 760px) { .hint { right: 0; left: 0; text-align: center; bottom: 22px; } }

/* The opening plays in once: the lines rise, then the rest fades up. */
.motion .rise > span { transform: translateY(105%); }
.motion .hero-sub, .motion .hero-actions, .motion .fine { opacity: 0; transform: translateY(12px); }
.motion.hero-ready .rise > span { transform: none; transition: transform 1.1s var(--ease-out) .25s; }
.motion.hero-ready .rise + .rise > span { transition-delay: .37s; }
.motion.hero-ready .hero-sub, .motion.hero-ready .hero-actions, .motion.hero-ready .fine { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); }
.motion.hero-ready .hero-sub { transition-delay: .7s; }
.motion.hero-ready .hero-actions { transition-delay: .82s; }
.motion.hero-ready .fine { transition-delay: .94s; }

/* The sentences, once formed: three lines like lyrics, the middle one to read. */
/* The sentence hands over from the canvas to text in one frame, with no fade, so it never
   doubles up or dims; only the heading fades in, on its own. */
.try { position: absolute; inset: 0; z-index: 3; visibility: hidden; }
.is-formed .try { visibility: visible; }
.try-head {
  position: absolute; left: 0; right: 0; padding: 0 24px; text-align: center;
  top: calc(var(--top-y) - 36px); transform: translateY(calc(-100% + 8px)); opacity: 0;
  transition: opacity .3s ease-out, transform .3s ease-out;
}
.is-formed .try-head { opacity: 1; transform: translateY(-100%); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); }
.try-head p { font-size: 19px; color: var(--graphite); margin: 12px auto 0; max-width: 34em; text-wrap: balance; letter-spacing: -0.014em; }
.lines { position: absolute; inset: 0; pointer-events: none; }
.line {
  position: absolute; white-space: nowrap; color: var(--ink); pointer-events: auto;
  font: 400 calc(var(--size) * .9)/calc(var(--size) * 1.3) var(--zh);
  user-select: none; -webkit-user-select: none; touch-action: none;
  opacity: .3; cursor: pointer;
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .75s cubic-bezier(.22, 1, .36, 1);
}
.line.current { opacity: 1; cursor: text; }
.line .w, .line .punct { display: inline-block; position: relative; }
.line .c { display: inline-block; width: var(--size); text-align: center; position: relative; z-index: 1; }
/* No marks on the words: the line is just text, to select the way you would anywhere. */
.line .w:focus-visible { outline: none; background: rgba(255, 255, 255, .1); border-radius: 4px; }
/* The selection: the system's blue with an iridescent sheen of violet and rose moving
   through it. The sheen is sized to the selection itself, so one character shows it as
   clearly as a whole sentence. While you drag it follows the pointer exactly; letting go, it
   eases onto whole words. */
.line .hi {
  position: absolute; top: calc(var(--size) * .07); height: calc(var(--size) * 1.16); border-radius: calc(var(--size) * .08);
  background: linear-gradient(105deg,
    rgba(10, 132, 255, .64) 0%, rgba(84, 116, 255, .62) 18%, rgba(150, 110, 248, .6) 32%, rgba(214, 118, 214, .56) 42%,
    rgba(120, 132, 255, .62) 54%, rgba(40, 156, 255, .64) 68%, rgba(10, 132, 255, .64) 100%);
  background-size: 200% 100%; background-repeat: repeat-x;
  animation: hi-sheen 4.5s linear infinite;
  opacity: 0; pointer-events: none; transition: opacity .12s ease-out;
}
.line .hi.on { opacity: 1; }
.line .hi.snap { transition: opacity .12s ease-out, left .16s cubic-bezier(.22, 1, .36, 1), width .16s cubic-bezier(.22, 1, .36, 1); }
/* With the image twice the box, 0% to 200% moves it exactly one image width: a seamless loop. */
@keyframes hi-sheen { from { background-position: 0% 0; } to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .line .hi { animation: none; } }


/* The lookup card (card.js), as the app draws it in dark appearance on Liquid Glass. Every
   size is the app's, in points, times the card's zoom. */
.lc-card {
  --primary: rgba(255, 255, 255, .85); --secondary: rgba(255, 255, 255, .55); --tertiary: rgba(255, 255, 255, .25);
  --accent: #0a84ff;
  --lc-tone1: rgb(227, 158, 148); --lc-tone2: rgb(158, 204, 168); --lc-tone3: rgb(161, 189, 227); --lc-tone4: rgb(194, 171, 224); --lc-secondary: var(--secondary);
  --u: calc(1px * var(--z));
  position: fixed; z-index: 60; border-radius: calc(20 * var(--u));
  color: var(--primary); text-align: left;
  font: 400 calc(13 * var(--u))/1.3 var(--text); letter-spacing: 0;
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.lc-glass {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015) 40%, rgba(255, 255, 255, 0)), rgba(20, 20, 23, .38);
  -webkit-backdrop-filter: blur(22px) saturate(1.9); backdrop-filter: blur(22px) saturate(1.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .16), 0 .5px 3px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .5);
}
.lc-card[data-refract] .lc-glass { -webkit-backdrop-filter: url(#lc-refract) blur(22px) saturate(1.9); backdrop-filter: url(#lc-refract) blur(22px) saturate(1.9); }
/* The glass's lit rim: brighter where the light catches the top left and bottom right. */
.lc-glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .08) 28%, rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, .14) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.lc-glass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -.5px 0 rgba(255, 255, 255, .05); }
.lc-scroll { position: relative; height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; border-radius: inherit; }
.lc-scroll::-webkit-scrollbar { display: none; }
.lc-content { padding: calc(16 * var(--u)) calc(16 * var(--u)) calc(12 * var(--u)); }
.lc-card.moving, .lc-card.moving * { cursor: grabbing !important; }

.lc-v { display: flex; flex-direction: column; }
.lc-v.m { gap: calc(12 * var(--u)); } .lc-v.s { gap: calc(8 * var(--u)); } .lc-v.xs { gap: calc(4 * var(--u)); }
.lc-v > [hidden] { display: none; }
.lc-head { display: flex; align-items: baseline; gap: calc(8 * var(--u)); }
.lc-hw { font: 500 calc(34 * var(--u))/1.12 var(--zh); white-space: nowrap; }
.lc-py { font-size: calc(15 * var(--u)); white-space: nowrap; }
.lc-spacer { flex: 1; }
.lc-slot { flex: none; width: var(--slot, 48px); height: 22px; align-self: center; }
.lc-meaning { display: flex; flex-direction: column; gap: calc(2 * var(--u)); }
.lc-meaning[hidden] { display: none; }
.lc-headline { font-size: calc(19 * var(--u)); font-weight: 600; line-height: 1.26; letter-spacing: -.005em; }
.lc-sub, .lc-caption { font-size: calc(11 * var(--u)); color: var(--secondary); }
.lc-status { display: flex; flex-direction: column; align-items: flex-start; gap: calc(4 * var(--u)); }
.lc-status[hidden], .lc-dstatus[hidden], .lc-note-slot[hidden] { display: none; }
.lc-back {
  display: inline-flex; align-items: center; gap: calc(4 * var(--u)); padding: 0; border: 0; background: none; cursor: pointer;
  font: 400 calc(12 * var(--u))/1.3 var(--text); color: var(--accent); text-align: left;
}
.lc-back .lc-sym { width: calc(11 * var(--u)); height: calc(11 * var(--u)); flex: none; stroke-width: 1.8; }
.lc-back:active { opacity: .6; }
.lc-divider { height: 1px; background: rgba(255, 255, 255, .08); }
.lc-label { font-size: calc(11 * var(--u)); font-weight: 600; color: var(--secondary); }
.lc-list, .lc-rows { display: flex; flex-direction: column; }

/* CardRowStyle: highlights reaching 8 pt past the text. */
.lc-row {
  display: flex; align-items: baseline; gap: calc(6 * var(--u));
  width: calc(100% + 16 * var(--u)); margin: 0 calc(-8 * var(--u)); padding: calc(5 * var(--u)) calc(8 * var(--u));
  border: 0; border-radius: calc(6 * var(--u)); background: transparent; color: inherit; font: inherit; text-align: left; cursor: default;
  transition: background-color .2s ease-out;
}
.lc-row.tight { padding-top: calc(3 * var(--u)); padding-bottom: calc(3 * var(--u)); }
.lc-row:hover { background: rgba(255, 255, 255, .05); transition-duration: .08s; }
.lc-row:active { background: rgba(255, 255, 255, .09); transition-duration: .08s; }
.lc-row:disabled { background: none; }
.lc-sense { flex: 1; display: flex; align-items: baseline; gap: calc(6 * var(--u)); min-width: 0; }
.lc-sense.body { font-size: calc(13 * var(--u)); } .lc-sense.callout { font-size: calc(12 * var(--u)); }
.lc-num { flex: none; width: calc(9 * var(--u)); text-align: right; font-size: calc(1em - 1 * var(--u)); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--tertiary); }
.lc-sense.wide .lc-num { width: calc(15 * var(--u)); }
.lc-def { flex: 1; min-width: 0; line-height: 1.32; transition: color .2s; }
.lc-def.chosen { font-weight: 600; }
.lc-def.dim { color: var(--secondary); }
.lc-pos { font-style: italic; color: var(--secondary); }
.lc-check { flex: none; width: calc(14 * var(--u)); color: var(--accent); opacity: 0; transform: scale(.6); align-self: center; display: grid; place-items: center; transition: opacity var(--lc-motion-t) var(--lc-motion), transform var(--lc-motion-t) var(--lc-motion); }
.lc-check.on { opacity: 1; transform: none; }
.lc-check .lc-sym { width: calc(12 * var(--u)); height: calc(12 * var(--u)); stroke-width: 2.2; }
.lc-notemark { flex: none; color: var(--tertiary); align-self: center; display: grid; }
.lc-notemark .lc-sym { width: calc(11 * var(--u)); height: calc(11 * var(--u)); }
.lc-reading { font-size: calc(11 * var(--u)); font-weight: 600; color: var(--secondary); padding: calc(8 * var(--u)) 0 calc(1 * var(--u)); }
.lc-reading.first { padding-top: 0; }
.lc-more { color: var(--accent); font-size: calc(12 * var(--u)); font-weight: 500; gap: calc(4 * var(--u)); align-items: center; }
.lc-more-chev { display: grid; transition: transform var(--lc-motion-t) var(--lc-motion); }
.lc-more-chev .lc-sym { width: calc(10 * var(--u)); height: calc(10 * var(--u)); stroke-width: 2; }
.lc-more-chev.up { transform: rotate(180deg); }

/* NuanceView */
.lc-note { padding: calc(10 * var(--u)) calc(12 * var(--u)); border-radius: calc(10 * var(--u)); background: rgba(255, 255, 255, .045); }
.lc-note-head { display: flex; align-items: center; gap: calc(5 * var(--u)); font-size: calc(11 * var(--u)); font-weight: 600; color: var(--secondary); margin-bottom: calc(4 * var(--u)); }
.lc-note-head > span { display: grid; }
.lc-note-head .lc-sym { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }
.lc-note-head .lost { color: rgb(230, 163, 194); } .lc-note-head .culture { color: rgb(148, 199, 194); }
.lc-note-text { font-size: calc(13 * var(--u)); line-height: calc(1em + 5 * var(--u)); }

/* In the word card the note keeps its 12 pt above it inside its own slot, so the space goes with it. */
.lc-v.m > .lc-note-slot { margin-top: calc(-12 * var(--u)); }
.lc-note-wrap > .lc-note { margin-top: calc(12 * var(--u)); }

/* PhraseView */
.lc-src-line { display: flex; align-items: flex-start; gap: calc(8 * var(--u)); }
.lc-src { flex: 1; font-size: calc(14 * var(--u)); line-height: 1.45; color: var(--secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.lc-src-line .lc-slot { margin-top: calc(-1 * var(--u)); }
.lc-translation { font-size: calc(16 * var(--u)); line-height: calc(1em + 6 * var(--u)); }
.lc-translation:empty { display: none; }
.lc-wordrow { align-items: baseline; gap: calc(12 * var(--u)); }
.lc-wordrow > .lc-chev, .lc-wordrow > .lc-notemark { align-self: flex-start; margin-top: calc(9 * var(--u)); }
.lc-wordrow:disabled { cursor: default; }
.lc-wcol { flex: none; display: flex; flex-direction: column; gap: calc(2 * var(--u)); }
.lc-wchars { font: 500 calc(21 * var(--u))/1.15 var(--zh); white-space: nowrap; }
.lc-wpy { font-size: calc(12.5 * var(--u)); white-space: nowrap; }
.lc-wgloss { flex: 1; min-width: 0; font-size: calc(15 * var(--u)); line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.lc-wgloss.open { -webkit-line-clamp: unset; display: block; }
.lc-wgloss.dim { color: var(--secondary); }
.lc-chev { flex: none; color: var(--tertiary); display: grid; transition: transform var(--lc-motion-t) var(--lc-motion); }
.lc-chev .lc-sym { width: calc(10 * var(--u)); height: calc(10 * var(--u)); stroke-width: 2; }
.lc-chev.open { transform: rotate(90deg); }
.lc-chev.none { visibility: hidden; }
.lc-detail { padding: calc(2 * var(--u)) 0 calc(8 * var(--u)); }
.lc-here { font-size: calc(12 * var(--u)); }
.lc-here b { font-weight: 500; }

/* Symbols */
.lc-sym { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.lc-sym .lc-fill { fill: currentColor; stroke: none; }
.lc-sym .lc-knock { stroke: rgba(20, 20, 23, .9); stroke-width: 1.1; }
.lc-sym .lc-knock-fill { fill: rgba(20, 20, 23, .9); stroke: none; }

/* CardActions: unscaled, fixed at the top right over the first line's slot. */
.lc-actions { position: absolute; z-index: 2; right: calc(16 * var(--u) - 6px); top: 16px; display: flex; gap: 2px; }
.lc-action {
  position: relative; width: 26px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: default;
  color: var(--tertiary); display: grid; place-items: center; transition: color .15s, background-color .15s;
}
.lc-card.hover .lc-action { color: var(--secondary); }
.lc-card .lc-action:hover { color: var(--primary); background: rgba(255, 255, 255, .07); }
.lc-action .lc-sym { width: 15px; height: 15px; stroke-width: 1.35; }
.lc-swap { position: absolute; inset: 0; display: grid; place-items: center; }
.lc-copy.on { color: var(--primary); }
.lc-listen.on { color: var(--accent) !important; }
.lc-listen.on .lc-w1 { animation: lc-wave 1s ease-in-out infinite; }
.lc-listen.on .lc-w2 { animation: lc-wave 1s ease-in-out .2s infinite; }
@keyframes lc-wave { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* The grip, the edge's bar, and the bands that resize. */
.lc-grip, .lc-grab { position: absolute; pointer-events: none; opacity: 0; transition: opacity .2s; }
.lc-grip {
  right: 5px; bottom: 5px; width: 13px; height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13' fill='none' stroke='white' stroke-opacity='.22' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M12 4 4 12M12 7.5 7.5 12M12 11 11 12'/%3E%3C/svg%3E") no-repeat;
}
.lc-grip i { display: none; }
.lc-grab { right: 3px; top: 50%; width: 3px; height: min(22px, 30%); border-radius: 2px; background: rgba(255, 255, 255, .2); transform: translateY(-50%); }
.lc-card.hover .lc-grip, .lc-card.hover .lc-grab, .lc-card.resizing .lc-grip, .lc-card.resizing .lc-grab { opacity: 1; }
.lc-band { position: absolute; z-index: 3; }
.lc-band-l, .lc-band-r { top: 14px; bottom: 14px; width: 8px; cursor: ew-resize; }
.lc-band-l { left: -4px; } .lc-band-r { right: -4px; }
.lc-band-tl, .lc-band-tr, .lc-band-bl, .lc-band-br { width: 16px; height: 16px; }
.lc-band-tl { left: -4px; top: -4px; cursor: nwse-resize; } .lc-band-br { right: -4px; bottom: -4px; cursor: nwse-resize; }
.lc-band-tr { right: -4px; top: -4px; cursor: nesw-resize; } .lc-band-bl { left: -4px; bottom: -4px; cursor: nesw-resize; }

/* The peek over the hero's eye: just the card's first lines. */
.lc-peek { pointer-events: none; white-space: nowrap; max-width: 340px; }
.lc-peek.glide { transition: left .22s cubic-bezier(.2, .8, .2, 1), top .22s cubic-bezier(.2, .8, .2, 1); }
.lc-peek .lc-content { padding: calc(12 * var(--u)) calc(16 * var(--u)) calc(13 * var(--u)); }
.lc-peek .lc-hw { font-size: calc(28 * var(--u)); }
.lc-peek .lc-headline { font-size: calc(16 * var(--u)); white-space: normal; }

@media (prefers-reduced-motion: reduce) { .line, .chip, .lc-check, .lc-chev, .lc-more-chev { transition: none !important; } }

/* The statement: three sentences that fade in one at a time as you scroll (motion.js), and
   beside them the app's card for a word in the demo sentence, to use. On a wide screen the
   section holds still while they come in: 100vh pinned plus 80vh of scroll, the last
   sentence in a third of the way, so there's time to read it and try the card. */
.statement { padding: 200px 0 220px; }
.statement .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: start; }
.lit { max-width: 640px; }
.lit-line { font: 600 44px/1.18 var(--display); letter-spacing: -0.03em; margin: 0 0 .62em; text-wrap: pretty; }
.lit-line:last-child { margin-bottom: 0; }
.lit-demo { margin: 6px 0 0; width: 396px; }
.lit-sentence { margin: 0 0 16px 2px; font: 400 21px/1.4 var(--zh); letter-spacing: .08em; color: rgba(245, 245, 247, .62); }
.lit-sentence mark { color: #fff; border-radius: 4px; padding: 1px 1px 2px 3px; margin: 0 -1px;
  background: linear-gradient(105deg, rgba(10, 132, 255, .64), rgba(150, 110, 248, .6) 60%, rgba(214, 118, 214, .56)); }
.motion .lit-line, .motion .lit-demo { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .6s ease-out; }
.motion .lit-line.on, .motion .lit-demo.on { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
@media (min-width: 1101px) {
  .statement { height: 180vh; padding: 0; }
  .statement-pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
  .statement-pin .wrap { width: 100%; }
}
.lc-card.lc-inline { position: relative; z-index: auto; max-width: 100%; will-change: auto; }

/* Paper: the color comes from paper.js; grain is laid over it here. */
.paper { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.paper-fallback { background: linear-gradient(135deg, #1f6fe0, #9fd2fa); }
.paper-box, .watch, .closing { isolation: isolate; }
.paper-box::after, .watch::after, .closing::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: var(--grain); background-size: 180px; opacity: .22; mix-blend-mode: overlay;
}
.paper-box { position: relative; overflow: hidden; border-radius: 26px; background: #1f1f24; }
.paper-box > :not(.paper) { position: relative; z-index: 2; }

/* Works where you read: full-bleed paper with the window cut off by its bottom edge. */
.watch { padding: 150px 0 0; overflow: hidden; text-align: center; background: #1f6fe0; }
.watch .paper { z-index: 0; }
.watch > .wrap { position: relative; z-index: 2; }
.watch-copy p { font-size: 21px; line-height: 1.45; color: rgba(255, 255, 255, .86); max-width: 31em; margin: 16px auto 0; text-wrap: balance; letter-spacing: -0.016em; }
.watch h2 { color: #fff; }
.video-window {
  margin: 64px auto -120px; max-width: 980px; text-align: left;
  background: rgba(28, 28, 32, .5); border-radius: 14px; overflow: hidden;
  -webkit-backdrop-filter: blur(40px) saturate(150%); backdrop-filter: blur(40px) saturate(150%);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .5), inset 0 0 0 .5px rgba(255, 255, 255, .14), 0 40px 100px rgba(0, 20, 80, .45);
  transform-origin: 50% 0; will-change: transform;
}
.window-bar { position: relative; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 15px; background: rgba(255, 255, 255, .06); border-bottom: .5px solid rgba(0, 0, 0, .35); }
.window-bar span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.window-bar span:nth-child(2) { background: #febc2e; }
.window-bar span:nth-child(3) { background: #28c840; }
.video-slot { position: relative; aspect-ratio: 16 / 10; }
.video-slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.video-slot video.ready { opacity: 1; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.video-placeholder svg {
  width: 72px; height: 72px; padding: 22px 20px 22px 24px; border-radius: 50%;
  fill: #fff; background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* Features */
.features { padding: 220px 0 0; }
.features .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 24px; }
.tile { margin: 0; }
.tile .paper-box { aspect-ratio: 11 / 8; display: grid; place-items: center; padding: 36px; }
figcaption { margin: 20px 4px 0; font-size: 17px; line-height: 1.47; color: var(--graphite); max-width: 31em; }
figcaption b { color: var(--ink); font-weight: 600; }

.ui {
  background: rgba(255, 255, 255, .96); color: #1d1d1f; border-radius: 20px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 24px 60px rgba(0, 0, 0, .22), 0 4px 14px rgba(0, 0, 0, .08);
  width: 100%; max-width: 380px;
}
.ui-notes { padding: 14px; display: grid; gap: 10px; }
.ui-tones { display: grid; grid-template-columns: repeat(4, 1fr); padding: 26px 18px 22px; text-align: center; max-width: 420px; }
.ui-tones span { display: block; font: 500 52px/1.1 var(--zh); }
.ui-tones i { display: block; font: 500 18px/1.6 var(--text); font-style: normal; }
.ui-tones small { display: block; font-size: 12.5px; color: #8e8e93; font-family: var(--text); }
.ui-history { padding: 6px 0 8px; font-size: 14px; }
.history-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid #ececec; }
.history-head b { font-size: 15px; }
.pill { font-size: 12px; font-weight: 500; background: #0a84ff; color: #fff; padding: 4px 10px; border-radius: 999px; }
.history-row { display: grid; grid-template-columns: 58px 1fr; column-gap: 10px; padding: 9px 16px; border-bottom: 1px solid #f2f2f2; }
.history-row:last-child { border-bottom: 0; }
.history-row .hz { grid-row: span 2; font: 500 22px/1.2 var(--zh); }
.history-row em { font-style: normal; color: #8e8e93; font-size: 12.5px; }
.ui-menu {
  background: rgba(246, 246, 248, .82); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  border-radius: 12px; padding: 6px; font-size: 13.5px; max-width: max-content; white-space: nowrap;
}
.menu-item { display: flex; justify-content: space-between; gap: 24px; padding: 4px 10px; border-radius: 5px; }
.menu-item.dim { color: #8e8e93; }
.menu-item .key { color: #8e8e93; }
.ui-menu hr { border: 0; height: 1px; background: rgba(0, 0, 0, .1); margin: 5px 10px; }

/* Tone colors on light surfaces. */
.ui .t1 { color: var(--t1-ink); } .ui .t2 { color: var(--t2-ink); }
.ui .t3 { color: var(--t3-ink); } .ui .t4 { color: var(--t4-ink); }
.ui .t5 { color: var(--t5-ink); }

/* Notes on the feature tile. */
.note { background: rgba(0, 0, 0, .045); border-radius: 13px; padding: 10px 12px 11px; }
.note-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.note-head svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.note.lost .note-head { color: var(--lost); }
.note.culture .note-head { color: var(--culture); }
.note p { margin: 0; font-size: 14px; line-height: 1.42; color: #1d1d1f; }

/* Install */
.install { margin-top: 200px; padding: 140px 0 150px; background: #0c0c0d; border-top: .5px solid var(--hairline); border-bottom: .5px solid var(--hairline); }
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.install-art { aspect-ratio: 5 / 4; display: grid; place-items: center; padding: 32px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { text-wrap: pretty; counter-increment: step; position: relative; padding: 0 0 24px 50px; font-size: 19px; line-height: 1.45; color: rgba(245, 245, 247, .82); letter-spacing: -0.014em; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; background: rgba(245, 245, 247, .1);
  display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.steps b { color: var(--ink); font-weight: 600; }
.aside { text-wrap: pretty; font-size: 15px; color: var(--graphite); margin: 4px 0 0 50px; max-width: 32em; }
.started { display: none; color: var(--t2); font-weight: 500; }
.started.on { display: block; }
.settings {
  width: 100%; max-width: 440px;
  background: rgba(30, 30, 32, .92); border-radius: 16px; padding: 20px 20px 24px;
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .5), inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 30px 70px rgba(0, 20, 80, .45);
  font-size: 13px; text-align: left;
}
.settings-title { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.settings-label { font-weight: 600; margin: 0 0 8px 4px; }
.settings-group { background: rgba(255, 255, 255, .06); border-radius: 10px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.settings-row + .settings-row { border-top: .5px solid rgba(255, 255, 255, .1); }
.settings-value { color: #a1a1a6; white-space: nowrap; }
.settings-button { background: #4b4b4f; padding: 4px 11px; border-radius: 6px; white-space: nowrap; font-weight: 500; }
.settings-row.highlight .settings-button { background: #0a84ff; box-shadow: 0 0 0 4px rgba(10, 132, 255, .3); }

/* Closing */
.closing { padding: 170px 0 180px; text-align: center; overflow: hidden; background: #6b2f86; }
.closing .paper { z-index: 0; }
.closing .wrap { position: relative; z-index: 2; }
.closing img { margin: 0 auto 30px; filter: drop-shadow(0 16px 30px rgba(40, 0, 60, .35)); }
.closing h2 { color: #fff; font-size: 56px; }
.closing p { text-wrap: balance; font-size: 21px; color: rgba(255, 255, 255, .84); margin: 16px auto 36px; max-width: 30em; letter-spacing: -0.016em; }
.closing p a { color: #fff; }
.closing .button { background: #fff; }
.closing .closing-fine { font-size: 13px; color: rgba(255, 255, 255, .66); margin: 18px auto 0; }

footer { padding: 28px 0 44px; font-size: 12.5px; color: #6e6e73; }
footer p { margin: 0 0 6px; }
footer a { color: #a1a1a6; }

/* Scroll reveals (only when motion is allowed; see motion.js). */
.motion [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
.motion [data-reveal].in { opacity: 1; transform: none; }
.motion .grid [data-reveal]:nth-child(2n) { transition-delay: .1s; }

/* The social preview (?og): the eye, the land and the headline. */
.og .bar, .og .hero-actions, .og .fine { display: none; }
.og .story { height: auto; }
.og .story-pin { height: 630px; min-height: 0; }

@media (max-width: 1100px) {
  .lit-line { font-size: 38px; }
  .statement .wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .lit-demo { width: 100%; max-width: 396px; }
}
@media (max-width: 760px) {
  .hero-copy { top: auto; bottom: max(40px, 6vh); transform: none; width: auto; right: 16px; left: 16px; }
  .hero-copy::before { content: ""; position: absolute; inset: -60px -16px -60px; z-index: -1; background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.75) 30%, rgba(0,0,0,.75)); }
  .is-away .hero-copy { transform: translateY(-30px); }
  h1 { font-size: 56px; }
}
@media (max-width: 900px) {
  h2, .closing h2 { font-size: 40px; }
  .features .grid { grid-template-columns: 1fr; gap: 56px; }
  .install-grid { grid-template-columns: 1fr; gap: 48px; }
  .video-window { margin-bottom: -60px; }
}
@media (max-width: 600px) {
  .wrap, .bar-inner { padding: 0 16px; }
  h1 { font-size: 42px; }
  h2, .closing h2 { font-size: 32px; }
  .hero-sub, .section-head p, .watch-copy p, .closing p { font-size: 17px; }
  .hide-small { display: none; }
  .bar-links { gap: 18px; }
  .watch { padding-top: 100px; }
  .video-window { margin: 40px auto -30px; border-radius: 10px; }
  .window-bar { height: 28px; gap: 6px; padding: 0 10px; }
  .window-bar span { width: 9px; height: 9px; }
  .features { padding-top: 130px; }
  .paper-box { border-radius: 20px; }
  .tile .paper-box { padding: 18px; aspect-ratio: auto; min-height: 320px; }
  .ui-tones span { font-size: 40px; }
  .steps li { font-size: 17px; padding-left: 44px; }
  .aside { margin-left: 44px; }
  .ui-menu { white-space: normal; max-width: 100%; }
  .install { margin-top: 130px; padding: 100px 0; }
  .install-art { padding: 16px; aspect-ratio: auto; min-height: 280px; }
  .settings-row { flex-wrap: wrap; }
  .closing { padding: 120px 0 130px; }
  .hero-sub { margin: 16px 0 24px; }
  .try-head p { font-size: 16px; }
  .lit-line { font-size: 30px; }
  .statement { padding: 130px 0 150px; }
}

/* Instructions in the visitor's terms: click on a Mac, tap on a phone. */
.coarse-pointer { display: none; }
@media (pointer: coarse) { .fine-pointer { display: none; } .coarse-pointer { display: inline; } }

/* The narrowest phones: just the name and Download. */
@media (max-width: 380px) { .bar-links a[href*="github.com"]:not(.bar-download) { display: none; } }
