/* TextKeep website
   Two voices: the chat (system UI font, bubbles) and the record (Literata, documents). */

@font-face {
  font-family: "Literata";
  src: url("fonts/literata-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #ffffff;
  --mist: #eef3fd;
  --mist-2: #e2eafa;
  --ink: #0c1a3c;
  --slate: #4b5b7e;
  --line: #d8e1f2;
  --blue: #0a6cf0;
  --link: #0a5ad1;
  --royal: #0b3bc6;
  --royal-glow: rgba(70, 150, 255, 0.55);
  --star: #ffbf1f;
  --star-empty: #cfd8ea;
  --marker: #ffcf2e;
  --marker-soft: rgba(255, 207, 46, 0.32);
  --pdf: #e5402f;
  --csv: #1f9d55;
  --txt: #6b7590;
  --jpg: #ef8a1f;
  --seg-track: rgba(118, 118, 128, 0.14);
  --seg-thumb: #ffffff;
  --bubble-in: #e9ecf2;
  --bubble-in-ink: #0c1a3c;
  --paper-doc: #ffffff;
  --doc-ink: #14213d;
  --doc-muted: #66728e;
  --doc-line: #e4e9f2;
  --nav-glass: rgba(255, 255, 255, 0.86);
  --shadow-doc: 0 1px 2px rgba(12, 26, 60, 0.08), 0 30px 60px -24px rgba(12, 26, 60, 0.35);
  --footer: #0c1a3c;

  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.4l2.95 6.07 6.65.86-4.88 4.6 1.24 6.6L12 17.33 6.04 20.53l1.24-6.6L2.4 9.33l6.65-.86z'/%3E%3C/svg%3E");
  --gutter: 20px;
  --nav-h: 68px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #070e24;
  --mist: #0d1734;
  --mist-2: #14214a;
  --ink: #e8eeff;
  --slate: #a2b0d2;
  --line: #22305a;
  --link: #8ab8ff;
  --royal: #0a2f9f;
  --royal-glow: rgba(56, 132, 255, 0.42);
  --star-empty: #34416a;
  --seg-track: rgba(118, 118, 128, 0.26);
  --seg-thumb: #3a476d;
  --bubble-in: #1c2747;
  --bubble-in-ink: #e8eeff;
  --paper-doc: #f3f5fa;
  --nav-glass: rgba(7, 14, 36, 0.84);
  --shadow-doc: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 60px -20px rgba(0, 0, 0, 0.75);
  --footer: #040919;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #070e24;
    --mist: #0d1734;
    --mist-2: #14214a;
    --ink: #e8eeff;
    --slate: #a2b0d2;
    --line: #22305a;
    --link: #8ab8ff;
    --royal: #0a2f9f;
    --royal-glow: rgba(56, 132, 255, 0.42);
    --star-empty: #34416a;
    --seg-track: rgba(118, 118, 128, 0.26);
    --seg-thumb: #3a476d;
    --bubble-in: #1c2747;
    --bubble-in-ink: #e8eeff;
    --paper-doc: #f3f5fa;
    --nav-glass: rgba(7, 14, 36, 0.84);
    --shadow-doc: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 60px -20px rgba(0, 0, 0, 0.75);
    --footer: #040919;
    color-scheme: dark;
  }
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 1.45rem + 2.3vw, 3.25rem); }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

svg[aria-hidden="true"]:not(.sprite) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 10vw, 136px); }

.lede {
  margin-top: 16px;
  max-width: 36em;
  color: var(--slate);
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.skip {
  position: absolute;
  z-index: 100;
  top: -64px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Stars ---------- */

.stars {
  --size: 18px;
  --rating: 5;
  flex: none;
  display: inline-block;
  width: calc(var(--size) * 5);
  height: var(--size);
  background: linear-gradient(90deg, var(--star) calc(var(--rating) / 5 * 100%), var(--star-empty) 0);
  -webkit-mask: var(--star-mask) 0 0 / var(--size) var(--size) repeat-x;
  mask: var(--star-mask) 0 0 / var(--size) var(--size) repeat-x;
}
.stars--sm { --size: 14px; }

.rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.9375rem;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  color: #fff;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-solid,
.nav.is-open {
  background: var(--nav-glass);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}
.nav.is-open { background: var(--paper); }

.nav__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font: 700 1.1875rem/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }

.nav__menu {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav__menu a {
  padding: 10px 13px;
  border-radius: 999px;
  color: inherit;
  font: 500 0.9375rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
}
.nav__menu a:hover { background: rgba(255, 255, 255, 0.14); }
.nav.is-solid .nav__menu a:hover,
.nav.is-open .nav__menu a:hover { background: var(--mist); }

.nav__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.nav.is-solid .icon-btn,
.nav.is-open .icon-btn { border-color: var(--line); }

.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.menu-toggle { display: none; }
.menu-toggle .i-shut { display: none; }
.nav.is-open .menu-toggle .i-open { display: none; }
.nav.is-open .menu-toggle .i-shut { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 600 0.9375rem/1 var(--sans);
  text-decoration: none;
}
.btn--nav { background: #fff; color: var(--royal); }
.nav.is-solid .btn--nav,
.nav.is-open .btn--nav { background: var(--blue); color: #fff; }

@media (max-width: 1040px) {
  .menu-toggle { display: inline-grid; }
  .nav__actions { margin-left: auto; }
  .nav__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: var(--gutter);
    right: var(--gutter);
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 24px 48px -16px rgba(12, 26, 60, 0.35);
  }
  .nav.is-open .nav__menu { display: flex; }
  .nav__menu a { padding: 14px; border-radius: 12px; font-size: 1.0625rem; }
}
@media (max-width: 420px) {
  .btn--nav { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--mist);
  --overlap: clamp(72px, 12vw, 150px);
  position: relative;
  isolation: isolate;
  padding-top: calc(var(--nav-h) + clamp(36px, 6vw, 80px));
  color: #fff;
}
.hero__bg {
  position: absolute;
  inset: 0 0 var(--overlap) 0;
  z-index: -1;
  background:
    radial-gradient(58% 50% at 50% 88%, var(--royal-glow), transparent 72%),
    var(--royal);
}

.hero__copy {
  display: grid;
  justify-items: center;
  text-align: center;
}
.hero h1 {
  max-width: 13.5em;
  font-size: clamp(2.375rem, 1.45rem + 4.3vw, 4.75rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
}
.hero__lede {
  max-width: 40em;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.5;
  text-wrap: balance;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 32px;
}
.hero .rating { justify-content: center; color: rgba(255, 255, 255, 0.86); text-align: center; }
.hero .rating strong { color: #fff; }
.hero .stars { --star-empty: rgba(255, 255, 255, 0.3); }

.store-badge { display: inline-block; flex: none; border-radius: 10px; }
.store-badge img { width: auto; height: 54px; }

.stage {
  position: relative;
  width: min(100%, 1000px);
  aspect-ratio: 1000 / 520;
  margin: clamp(36px, 5vw, 60px) auto 0;
}
.stage img { position: absolute; }
.stage__phone { left: 9%; top: 0; z-index: 3; width: 31%; }
.stage__arrow { left: 36.5%; top: 27%; z-index: 2; width: 23%; }
.stage__pdf { right: 7%; top: 1%; width: 37%; }

@media (max-width: 640px) {
  .stage { aspect-ratio: 10 / 6.8; }
  .stage__phone { left: 1%; width: 43%; }
  .stage__arrow { left: 31%; top: 30%; width: 31%; }
  .stage__pdf { right: 0; top: 2%; width: 50%; }
}

@media (prefers-reduced-motion: no-preference) {
  .stage__phone { animation: tk-rise 0.8s cubic-bezier(0.2, 0.75, 0.25, 1) 0.1s both; }
  .stage__arrow { animation: tk-sweep 0.7s cubic-bezier(0.3, 0.7, 0.2, 1) 0.6s both; }
  .stage__pdf { animation: tk-land 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.95s both; }
}
@keyframes tk-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes tk-sweep {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes tk-land { from { opacity: 0; transform: translateY(22px) scale(0.95); } }

/* ---------- Chat apps ---------- */

.apps {
  background: var(--mist);
  padding-block: clamp(28px, 4vw, 48px) clamp(64px, 8vw, 104px);
  text-align: center;
}
.apps__title { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }
.apps__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 24px 12px;
  max-width: 880px;
  margin: 32px auto 0;
  padding: 0;
  list-style: none;
}
.apps__grid li { display: grid; justify-items: center; gap: 8px; }
.apps__grid img {
  width: 64px;
  height: 64px;
  border-radius: 22.5%;
  outline: 1px solid rgba(12, 26, 60, 0.08);
  outline-offset: -1px;
  box-shadow: 0 10px 20px -12px rgba(12, 26, 60, 0.5);
}
.apps__grid span { color: var(--slate); font-size: 0.8125rem; }
.apps__note { margin-top: 28px; color: var(--slate); }

@media (max-width: 640px) {
  .apps__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 340px; }
  .apps__grid img { width: 58px; height: 58px; }
}

/* ---------- Segmented control (iOS style tabs) ---------- */

.segmented {
  display: inline-grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 2px;
  max-width: 100%;
  margin-top: 32px;
  padding: 3px;
  border-radius: 12px;
  background: var(--seg-track);
}
.segmented [role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 9px 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: 600 0.9375rem/1.2 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.segmented [role="tab"][aria-selected="true"] {
  background: var(--seg-thumb);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.12);
}
.segmented [role="tab"]:focus-visible { outline-offset: 1px; }
.no-js .segmented { display: none; }

@media (max-width: 560px) {
  .segmented { display: grid; width: 100%; }
  .segmented [role="tab"] { padding-inline: 8px; }
}
@media (max-width: 400px) {
  .segmented [role="tab"] { padding-inline: 4px; font-size: 0.875rem; }
}

/* iPhone frame */
.phone {
  --w: 270px;
  width: var(--w);
  aspect-ratio: 9 / 19.4;
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.165);
  background: linear-gradient(150deg, #3a4560, #10182c 55%, #222c46);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 70px -30px rgba(12, 26, 60, 0.6);
}
.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.13);
  background: #fff;
}
.phone__screen::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: calc(var(--w) * 0.035);
  left: 50%;
  width: 33%;
  height: calc(var(--w) * 0.095);
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}
/* Small iOS-style chat, used in the JPG preview */
.ios-chat {
  --fs: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px 18px;
  background: #fff;
  color: #000;
  font: 400 var(--fs)/1.3 var(--sans);
}
.ios-chat__head {
  margin: 0 -12px 4px;
  padding: 14px 0 10px;
  border-bottom: 1px solid #e6e8ee;
  background: #f6f7f9;
  font-weight: 600;
  text-align: center;
}
.ios-chat__day {
  margin: 8px 0 2px;
  color: #8a8f9c;
  font-size: calc(var(--fs) * 0.8);
  text-align: center;
}
.bubble {
  max-width: 78%;
  padding: 0.55em 0.85em;
  border-radius: 1.3em;
}
.bubble.in { align-self: flex-start; background: #e9e9eb; }
.bubble.out { align-self: flex-end; background: #0a7cff; color: #fff; }

/* ---------- Quotes (App Store reviews) ---------- */

.quote { margin-top: 28px; }
.quote blockquote {
  max-width: 34em;
  margin: 0;
  padding: 14px 18px;
  border-radius: 20px 20px 20px 6px;
  background: var(--quote-bg, var(--bubble-in));
  color: var(--bubble-in-ink);
  font-size: 1rem;
  line-height: 1.5;
}
.quote figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  color: var(--slate);
  font-size: 0.875rem;
}

/* ---------- AI ---------- */

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

.art-stage {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 32px;
  background: radial-gradient(70% 62% at 50% 46%, #3577ea, #0b3bc6 62%, #072a8f);
}
.art-stage img { width: 90%; }

.checks {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.checks li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
}
.checks svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--blue);
}
.checks svg[aria-hidden="true"] { stroke-width: 2.4; }

.final-word {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.final-word h3 { font-size: 1.25rem; }
.final-word p { max-width: 34em; margin-top: 8px; color: var(--slate); }

/* ---------- Formats ---------- */

.formats { background: var(--mist); }
.formats__head { max-width: 44em; }
.segmented--formats { margin-top: 36px; }

.ext {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c, var(--slate));
}
.ext--pdf { --c: var(--pdf); }
.ext--csv { --c: var(--csv); }
.ext--txt { --c: var(--txt); }
.ext--jpg { --c: var(--jpg); }

.fmt {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-top: 28px;
}
.js .fmt:not(.is-active) { display: none; }
.no-js .fmt + .fmt { margin-top: 64px; }

@media (prefers-reduced-motion: no-preference) {
  .js .fmt.is-active .fmt__desk > * { animation: tk-swap 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes tk-swap { from { opacity: 0; transform: translateY(10px); } }

/* Every preview shares one desk height so switching formats doesn't move the page */
.fmt__desk {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  height: 660px;
  padding: clamp(20px, 4vw, 48px);
  border-radius: 32px;
  background: var(--mist-2);
}
.fmt__desk > * { max-height: 100%; }
.fmt__about h3 { font-size: 1.75rem; }
.fmt__about p { max-width: 30em; margin-top: 12px; color: var(--slate); }
.checks--compact { gap: 10px; margin-top: 20px; font-size: 1rem; }
.fmt__about .best-for {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.best-for strong { display: block; margin-bottom: 2px; color: var(--ink); font-weight: 650; }

.print-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 40px;
  color: var(--slate);
}
.print-note svg { flex: none; width: 24px; height: 24px; margin-top: 1px; color: var(--ink); }

/* PDF document */
.doc {
  position: relative;
  overflow: hidden;
  width: min(100%, 470px);
  padding: 26px 26px 18px;
  border-radius: 6px;
  background: var(--paper-doc);
  box-shadow: var(--shadow-doc);
  color: var(--doc-ink);
  font: 400 12.5px/1.45 var(--sans);
}
.doc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.doc__head img { width: 30px; height: 30px; }
.doc__kicker { color: var(--doc-muted); font-size: 11px; font-weight: 600; }
.doc__title { margin-top: 2px; font: 650 22px/1.15 var(--serif); letter-spacing: -0.01em; }
.doc__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #e9eef7;
}
.doc__meta dt { color: var(--doc-muted); font-size: 10.5px; }
.doc__meta dd { margin: 0; font-size: 12px; font-weight: 600; }
.doc__day {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 6px;
  color: var(--doc-muted);
  font-size: 10.5px;
  font-weight: 600;
}
.doc__day::before,
.doc__day::after { content: ""; flex: 1; height: 1px; background: var(--doc-line); }
.dmsg { max-width: 80%; margin-top: 8px; }
.dmsg--out { margin-left: auto; }
.dmsg__by {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 3px;
  color: var(--doc-muted);
  font-size: 10.5px;
  font-weight: 650;
}
.dmsg__by time { font-weight: 500; font-variant-numeric: tabular-nums; }
.dmsg__text { padding: 7px 11px; border-radius: 13px; background: #eceff5; }
.dmsg--out .dmsg__text { background: #0a6cf0; color: #fff; }
.doc__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--doc-line);
  color: var(--doc-muted);
  font-size: 10px;
}

/* Files: CSV, TXT, JPG */
.sheet, .textfile, .longshot {
  position: relative;
  width: min(100%, 560px);
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper-doc);
  box-shadow: var(--shadow-doc);
  color: var(--doc-ink);
}
.file-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--doc-line);
  background: #f5f7fb;
  font: 600 12.5px/1 var(--sans);
}

.sheet__scroll { overflow-x: auto; }
.sheet table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  table-layout: fixed;
  font: 12px/1.3 var(--sans);
}
.sheet th,
.sheet td {
  overflow: hidden;
  padding: 7px 9px;
  border: 1px solid #e3e8f0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet thead th {
  padding: 5px;
  background: #f2f4f8;
  color: #8a93a8;
  font-weight: 500;
  text-align: center;
}
.sheet .rn { width: 40px; padding-inline: 4px; background: #f2f4f8; color: #8a93a8; text-align: center; }
.sheet thead th:nth-child(2) { width: 92px; }
.sheet thead th:nth-child(3) { width: 72px; }
.sheet thead th:nth-child(4) { width: 70px; }
.sheet__header td:not(.rn) { font-weight: 700; }
.sheet td { font-variant-numeric: tabular-nums; }
.sheet__empty td { height: 30px; }

.textfile pre {
  margin: 0;
  padding: 18px 20px 22px;
  font: 12px/1.6 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.longshot { width: min(100%, 330px); }

/* Long files fade out at the bottom of the desk, like a page that continues */
.doc::after,
.sheet::after,
.textfile::after,
.longshot::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--paper-doc) 85%);
  pointer-events: none;
}

/* ---------- Organize ---------- */

.organize__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.features { display: grid; gap: 24px; margin-top: 32px; }
.features dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 650 1.0625rem/1.3 var(--sans);
}
.features dt svg { flex: none; width: 22px; height: 22px; color: var(--blue); }
.features dd { margin: 6px 0 0 32px; color: var(--slate); }

/* ---------- Stories ---------- */

.stories { --quote-bg: var(--paper); background: var(--mist); }
.stories__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
}
.stories__head h2 { max-width: 14em; }
.rating--quiet { color: var(--slate); }
.rating--quiet strong { color: var(--ink); }

.stories__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px);
  margin-top: 56px;
}
.story h3 { font-size: 1.5rem; }
.story > p { margin-top: 10px; color: var(--slate); }

/* ---------- Pricing ---------- */

.pricing__head { display: grid; justify-items: center; text-align: center; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 780px;
  margin: 56px auto 0;
}
.plan {
  position: relative;
  padding: 32px 28px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.plan--best { background: var(--mist); box-shadow: inset 0 0 0 2px var(--blue); }
.plan h3 { color: var(--slate); font: 650 1.0625rem/1.2 var(--sans); letter-spacing: 0; }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 10px; }
.plan__amount {
  font: 650 clamp(2.5rem, 2rem + 2vw, 3.25rem)/1 var(--serif);
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}
.plan__per { color: var(--slate); }
.plan__fit { margin-top: 14px; color: var(--slate); }
.plan__flag {
  position: absolute;
  top: -13px;
  left: 26px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 700 0.8125rem/1.1 var(--sans);
}

.pricing__includes { max-width: 780px; margin: 40px auto 0; }
.pricing__includes-title { font-weight: 650; }
.checks--inline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; margin-top: 14px; }
.pricing__cta { display: flex; justify-content: center; margin-top: 40px; }
.pricing__cta .store-badge img { height: 50px; }
.fine-print {
  max-width: 640px;
  margin: 20px auto 0;
  color: var(--slate);
  font-size: 0.8125rem;
  text-align: center;
}

/* ---------- FAQ ---------- */

.faq { background: var(--mist); }
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq__intro { position: sticky; top: calc(var(--nav-h) + 32px); }
.faq__intro p { max-width: 24em; margin-top: 16px; color: var(--slate); }

.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list details:first-child { border-top: 1px solid var(--line); }
.faq__list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font: 600 1.125rem/1.35 var(--sans);
  list-style: none;
  cursor: pointer;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 0.2s ease;
}
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { max-width: 40em; padding: 0 40px 24px 0; color: var(--slate); }

/* ---------- Closing ---------- */

.closing {
  overflow: hidden;
  padding-block: clamp(64px, 8vw, 112px) clamp(48px, 6vw, 80px);
  background:
    radial-gradient(55% 75% at 78% 62%, var(--royal-glow), transparent 70%),
    var(--royal);
  color: #fff;
}
.closing__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
}
.closing h2 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); }
.closing p { max-width: 26em; margin-top: 16px; color: rgba(255, 255, 255, 0.86); font-size: 1.25rem; }
.closing .store-badge { margin-top: 32px; }
.closing__art { justify-self: center; width: min(100%, 420px); }

/* ---------- Footer ---------- */

.footer {
  padding-block: 64px 40px;
  background: var(--footer);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
}
.footer :focus-visible { outline-color: #8ab8ff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer .brand { color: #fff; }
.footer__brand p { max-width: 22em; margin-top: 14px; }
.footer__col { display: grid; align-content: start; gap: 10px; }
.footer__title { margin-bottom: 4px; color: #fff; font-weight: 650; }
.footer__col a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer__col a:hover { color: #fff; text-decoration: underline; }
.footer__legal {
  display: grid;
  gap: 8px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8125rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .ai__grid,
  .organize__grid,
  .fmt,
  .faq__grid,
  .closing__grid { grid-template-columns: minmax(0, 1fr); }

  .art-stage { width: min(100%, 520px); }
  .organize__art { justify-self: center; }
  .stories__grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .fmt__desk { height: 540px; }
  .faq__intro { position: static; }
  .closing__art { width: min(80%, 360px); }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .plans { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .checks--inline { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq__list details p { padding-right: 0; }
  .closing__art { width: min(72%, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
