/* Live Transcription: quiet, Apple-like, the app's colours (its icon's spectrum) in a few places only. */

:root {
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.09);
  --raised: #f5f5f7;
  --menu: rgba(255, 255, 255, 0.92);
  --button-bg: #1d1d1f;
  --button-fg: #ffffff;
  --link: #0066cc;
  --teal: #12b89c;
  --azure: #2e8bff;
  --indigo: #5b5df0;
  --violet: #a35ff5;
  /* The app's transcripts window, in the page's appearance. */
  --win-bg: #ffffff;
  --win-sidebar: #f2f2f5;
  --win-field: rgba(0, 0, 0, 0.06);
  --win-selected: rgba(0, 0, 0, 0.08);
  --win-fg: #1d1d1f;
  --win-muted: #86868b;
  --win-blue: #007aff;
  --win-green: #28b44a;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --fg: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.13);
    --raised: #161618;
    --menu: rgba(30, 30, 32, 0.94);
    --button-bg: #f5f5f7;
    --button-fg: #1d1d1f;
    --link: #2997ff;
    --teal: #1fe5c2;
    --azure: #4aa8ff;
    --indigo: #7d7fff;
    --violet: #c08bff;
    --win-bg: #1f1f22;
    --win-sidebar: #2b2b2f;
    --win-field: rgba(255, 255, 255, 0.08);
    --win-selected: rgba(255, 255, 255, 0.1);
    --win-fg: #f5f5f7;
    --win-muted: #98989d;
    --win-blue: #0a84ff;
    --win-green: #30d158;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --fg: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.13);
  --raised: #161618;
  --menu: rgba(30, 30, 32, 0.94);
  --button-bg: #f5f5f7;
  --button-fg: #1d1d1f;
  --link: #2997ff;
  --teal: #1fe5c2;
  --azure: #4aa8ff;
  --indigo: #7d7fff;
  --violet: #c08bff;
  --win-bg: #1f1f22;
  --win-sidebar: #2b2b2f;
  --win-field: rgba(255, 255, 255, 0.08);
  --win-selected: rgba(255, 255, 255, 0.1);
  --win-fg: #f5f5f7;
  --win-muted: #98989d;
  --win-blue: #0a84ff;
  --win-green: #30d158;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang HK", "Microsoft JhengHei", sans-serif; }
:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
:lang(ko) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

main { flex: 1; width: 100%; }

h1, h2 { margin: 0; font-weight: 700; letter-spacing: -0.015em; }

.icon { flex: none; }

/* --- top and bottom ---------------------------------------------------------------------------------------- */

.top, .foot {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.top { height: 56px; justify-content: flex-end; }

.brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 600;
  font-size: 15px;
}
.brand:hover { text-decoration: none; }

.languages { position: relative; }
.languages summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  user-select: none;
}
.languages summary::-webkit-details-marker { display: none; }
.languages summary:hover, .languages[open] summary { color: var(--fg); background: var(--raised); }
.languages ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 180px;
  background: var(--menu);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}
.languages a {
  display: block;
  padding: 6px 12px;
  border-radius: 7px;
  color: var(--fg);
  font-size: 14px;
}
.languages a:hover { background: var(--raised); text-decoration: none; }
.languages a[aria-current] { font-weight: 600; }
.languages a[aria-current]::after { content: " ✓"; color: var(--muted); font-weight: 400; }

.foot {
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 32px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 13px;
}
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--fg); }

/* --- buttons ----------------------------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.button:hover { text-decoration: none; opacity: 0.88; }
.button:active { transform: scale(0.98); }

.meta { margin: 0; color: var(--muted); font-size: 14px; text-wrap: balance; }

/* --- home -------------------------------------------------------------------------------------------------- */

.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 16px 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.app-icon {
  display: block;
  filter: drop-shadow(0 10px 24px rgba(40, 30, 120, 0.28));
}
.hero h1 {
  margin-top: 20px;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1.05;
}
.tagline {
  margin: 14px 0 32px;
  font-size: clamp(20px, 3.2vw, 28px);
  line-height: 1.3;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.store img { display: block; }
/* Free, for good: said right under the download, in the icon's colours. */
.free {
  margin: 10px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.free strong {
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--teal), var(--azure) 35%, var(--indigo) 65%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.free span { color: var(--fg); font-size: 15px; font-weight: 500; text-wrap: balance; }

/* The app at work: a Mac's screen with the floating window over it. */
.scene {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}
.screen {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: clamp(10px, 2vw, 20px);
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 12% 95%, rgba(31, 229, 194, 0.85), transparent 70%),
    radial-gradient(55% 65% at 92% 88%, rgba(183, 107, 255, 0.9), transparent 70%),
    radial-gradient(70% 60% at 55% 8%, rgba(46, 155, 255, 0.85), transparent 72%),
    radial-gradient(50% 50% at 40% 55%, rgba(106, 108, 255, 0.7), transparent 75%),
    #141433;
  box-shadow: 0 30px 80px rgba(20, 20, 60, 0.25), 0 0 0 1px var(--line);
}
.menubar {
  position: absolute;
  inset: 0 0 auto 0;
  height: max(18px, 3.4cqw);
  padding: 0 2cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}
.menubar .left, .menubar .right { display: flex; align-items: center; gap: 1.8cqw; }
.menubar i {
  display: block;
  height: 0.9cqw;
  width: 3.2cqw;
  border-radius: 1cqw;
  background: rgba(255, 255, 255, 0.55);
}
.menubar .left i:first-child { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.menubar .left i:nth-child(2) { width: 5cqw; background: rgba(255, 255, 255, 0.85); }
.menubar .right i { width: 1.6cqw; height: 1.6cqw; border-radius: 0.4cqw; }
.menubar .glyph {
  width: 2.1cqw;
  height: 2.1cqw;
  min-width: 11px;
  min-height: 11px;
  padding: 0.35cqw;
  box-sizing: content-box;
  border-radius: 0.6cqw;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.menubar time { font-size: max(9px, 1.45cqw); font-weight: 600; letter-spacing: 0.01em; }

/* The transcripts window (HistoryView.swift): the sessions, the live one selected, and its transcript. */
.window {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 12%;
  height: 47%;
  display: flex;
  border-radius: 1.6cqw;
  overflow: hidden;
  background: var(--win-bg);
  color: var(--win-fg);
  box-shadow: 0 2.4cqw 6cqw rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(0, 0, 0, 0.12);
  font-size: 1.25cqw;
  line-height: 1.35;
  text-align: left;
}
.sidebar {
  flex: none;
  width: 31%;
  margin: 0.7cqw;
  padding: 0.9cqw 0.7cqw;
  border-radius: 1.1cqw;
  background: var(--win-sidebar);
  display: flex;
  flex-direction: column;
  gap: 0.9cqw;
  min-width: 0;
}
.lights { display: flex; gap: 0.6cqw; padding: 0.2cqw 0.4cqw 0.3cqw; }
.lights i { width: 1.05cqw; height: 1.05cqw; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.search {
  display: flex;
  align-items: center;
  gap: 0.5cqw;
  height: 2.3cqw;
  padding: 0 0.8cqw;
  border-radius: 1.2cqw;
  background: var(--win-field);
  color: var(--win-muted);
  font-size: 1.1cqw;
  white-space: nowrap;
  overflow: hidden;
}
.search svg { flex: none; width: 1.1cqw; height: 1.1cqw; }
.sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2cqw; }
.sessions li {
  padding: 0.6cqw 0.8cqw;
  border-radius: 0.8cqw;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 0.5cqw;
}
.sessions li.selected { background: var(--win-selected); }
.sessions b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sessions em {
  font-style: normal;
  font-size: 0.85cqw;
  font-weight: 600;
  color: #fff;
  background: #ff3b30;
  border-radius: 1cqw;
  padding: 0.05cqw 0.55cqw;
  white-space: nowrap;
}
.sessions small {
  grid-column: 1 / -1;
  color: var(--win-muted);
  font-size: 1.05cqw;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1cqw;
  padding: 1.2cqw 1.4cqw 0.8cqw 1.2cqw;
}
.titlebar div { display: flex; flex-direction: column; min-width: 0; }
.titlebar b { font-size: 1.3cqw; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar small { color: var(--win-muted); font-size: 1.05cqw; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tools {
  flex: none;
  display: flex;
  gap: 1cqw;
  padding: 0.55cqw 1cqw;
  border-radius: 1.6cqw;
  background: var(--win-field);
  color: var(--win-muted);
}
.tools svg { width: 1.3cqw; height: 1.3cqw; display: block; }
/* Time, speaker and text columns, as the app lays out a transcript, from the top; site.js keeps the newest line in
   view, as the app follows a live session. */
.transcript {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-content: start;
  column-gap: 1.3cqw;
  row-gap: 0.6cqw;
  padding: 0.6cqw 1.6cqw 1.5cqw 1.4cqw;
  font-size: 1.4cqw;
}
.transcript p { display: contents; }
.transcript time, .transcript b { font-size: 1.2cqw; line-height: 1.6; }
.transcript time { color: var(--win-muted); font-variant-numeric: tabular-nums; }
.transcript b { font-weight: 600; }
.transcript b.others { color: var(--win-blue); }
.transcript b.me { color: var(--win-green); }
.transcript .new > * { animation: arrive 0.6s ease; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }

/* The floating window: dark frosted glass at the bottom of the screen, as the app draws it. */
.overlay {
  position: absolute;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  width: 64%;
  padding: 1.5cqw 2.2cqw;
  border-radius: 1.8cqw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.6cqw;
  background: rgba(16, 16, 22, 0.52);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  backdrop-filter: blur(28px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: max(11px, 2.25cqw);
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  transition: opacity 0.8s ease;
  z-index: 1;
}
.overlay.faded { opacity: 0; }
.overlay .line {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 1cqw;
  min-width: 0;
}
.overlay .line b { flex: none; font-weight: 500; }
.overlay .line.others b { color: rgb(115, 217, 255); }
.overlay .line.me b { color: rgb(115, 242, 140); }
.overlay .line span {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.overlay .line.final span { color: rgba(255, 255, 255, 0.72); }

/* What it does: four things, an icon and a few words each. */
.features {
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 16px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 28px;
}
.feature .icon { width: 34px; height: 34px; }
.feature h2 { margin: 14px 0 6px; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; text-wrap: pretty; }
.f1 .icon { color: var(--teal); }
.f2 .icon { color: var(--azure); }
.f3 .icon { color: var(--indigo); }
.f4 .icon { color: var(--violet); }

@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
/* On a phone the screen is closer to square, so the floating window and its words can be larger. */
@media (max-width: 600px) {
  .screen { aspect-ratio: 3 / 4; }
  .overlay { width: 90%; bottom: 5%; font-size: max(12px, 3.9cqw); padding: 2.6cqw 3.4cqw; border-radius: 3cqw; }
  /* Just the transcript: the list of sessions would be too small to read. */
  .window { left: 5%; right: 5%; top: 8%; height: 60%; border-radius: 3.4cqw; }
  .sidebar { display: none; }
  .titlebar { padding: 3cqw 3.4cqw 2cqw; }
  .titlebar b { font-size: 3.4cqw; }
  .titlebar small { font-size: 2.8cqw; }
  .tools { display: none; }
  .transcript { font-size: 3.6cqw; column-gap: 2.6cqw; row-gap: 1.4cqw; padding: 1cqw 3.4cqw 3.4cqw; }
  .transcript time, .transcript b { font-size: 3cqw; }
}
@media (max-width: 480px) {
  .hero { padding-top: 24px; }
  .features { grid-template-columns: 1fr; padding-top: 48px; gap: 28px; }
}

/* --- privacy, support -------------------------------------------------------------------------------------- */

.doc {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 24px;
}
.doc h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.1; margin-bottom: 28px; }
.doc h2 { font-size: 19px; margin: 32px 0 6px; letter-spacing: -0.01em; }
.doc p { margin: 0 0 12px; }
.doc > .meta { margin-top: 36px; }

.points {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.points li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--raised);
  font-weight: 600;
  line-height: 1.3;
}
.points .icon { color: var(--teal); }
@media (max-width: 520px) { .points { grid-template-columns: 1fr; } }

.menu {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 1px;
  border-radius: 6px;
  background: var(--raised);
  border: 1px solid var(--line);
  font-size: 0.92em;
  font-weight: 500;
  white-space: nowrap;
}

/* The contact address: a click copies it (it isn't a link), "Copied" shows beside it for a moment. */
.copy-email { display: inline-flex; align-items: center; gap: 10px; }
.copy-email button {
  font: inherit;
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--raised);
  white-space: nowrap;
}
.copy-email button:hover { border-color: var(--muted); }
.copy-email .icon { color: var(--muted); }
.copy-email .icon-done { display: none; }
.copy-email.copied .icon-copy { display: none; }
.copy-email.copied .icon-done { display: block; color: var(--teal); }
.copy-email .note { color: var(--teal); font-size: 0.9em; }
.copy-email.large button { padding: 12px 20px; border-radius: 999px; font-size: 17px; font-weight: 600; gap: 10px; }
.copy-email.large .icon:first-child { color: var(--fg); }
.contact { margin-bottom: 24px; }

.faq { display: grid; gap: 12px; margin-top: 12px; }
.qa { padding: 18px 20px; border-radius: 14px; background: var(--raised); }
.qa h2 { margin: 0 0 6px; font-size: 17px; }
.qa p { margin: 0; color: var(--muted); line-height: 1.9; }
.qa .menu { background: var(--bg); color: var(--fg); }

/* --- not found --------------------------------------------------------------------------------------------- */

.missing main { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.missing h1 { margin: 0; font-size: 48px; }

@media (prefers-reduced-motion: reduce) {
  .overlay, .button { transition: none; }
}
