:root {
  color-scheme: dark;
  --ink: #f6f2e8;
  --muted: #bfc8c2;
  --soft: #8fa09a;
  --bg: #101416;
  --panel: #182124;
  --panel-2: #202a2d;
  --line: rgba(246, 242, 232, 0.15);
  --water: #52c7d8;
  --green: #83d38a;
  --gold: #f0c95c;
  --rose: #ef7d85;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(82, 199, 216, 0.16), transparent 30rem),
    radial-gradient(circle at 86% 20%, rgba(240, 201, 92, 0.11), transparent 24rem),
    linear-gradient(135deg, #101416 0%, #161f20 50%, #111718 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(16, 20, 22, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  image-rendering: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
}

nav a {
  padding: 0.55rem 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
}

nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.app-page {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  background: rgba(16, 20, 22, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.app-mode-pill {
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--water);
  background: rgba(82, 199, 216, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
}

.app-main {
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - 4.5rem);
  display: grid;
  align-items: start;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.app-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hero-section {
  min-height: calc(100vh - 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.75fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding: clamp(3rem, 8vh, 6rem) 0 2rem;
}

.hero-copy {
  max-width: 740px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--water);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 100%;
  margin-bottom: 1rem;
  font-size: 5.2rem;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.35rem;
  line-height: 1.1;
}

.lede {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button,
button {
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.76rem 1rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.button.primary,
#cleanButton {
  color: #071315;
  background: var(--water);
  border-color: transparent;
}

.button.secondary {
  color: var(--ink);
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

.signal-panel,
.demo-card,
.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(32, 42, 45, 0.94), rgba(19, 27, 29, 0.92));
  box-shadow: var(--shadow);
}

.signal-panel {
  min-height: 28rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem;
  overflow: hidden;
}

.panel-topline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 800;
}

.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 24px rgba(131, 211, 138, 0.85);
}

.thought-stream {
  display: grid;
  gap: 0.9rem;
}

.raw-line,
.clean-line {
  margin: 0;
  padding: 1rem;
  border-radius: 8px;
  line-height: 1.5;
}

.raw-line {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.clean-line {
  color: #061416;
  background: rgba(82, 199, 216, 0.92);
}

.clean-line.muted {
  color: var(--ink);
  background: rgba(240, 201, 92, 0.16);
}

.section {
  padding: clamp(3rem, 8vh, 6rem) 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.section-head p:not(.eyebrow),
.proof-list p,
.product-card p,
.privacy-section p {
  color: var(--muted);
  line-height: 1.6;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.demo-card {
  padding: 1rem;
}

.live-stream-box {
  display: none;
  min-height: 7rem;
  max-height: 12rem;
  overflow: auto;
  margin-bottom: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(8, 12, 13, 0.72);
  font: 1rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.is-recording .live-stream-box {
  display: block;
}

.is-recording #messyInput {
  display: none;
}

.live-stream-box .interim {
  color: var(--water);
  opacity: 0.78;
}

.record-button.recording {
  color: #071315;
  background: var(--rose);
  border-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.walk-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.85rem 0 0.5rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.walk-mode-row[data-active="true"] {
  border-color: rgba(126, 216, 229, 0.7);
  background: rgba(126, 216, 229, 0.08);
}

.walk-mode-button {
  flex: 1;
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.7rem 0.85rem;
  font-weight: 900;
  text-align: left;
}

.walk-mode-button[aria-pressed="true"] {
  color: #071315;
  background: var(--water);
  border-color: transparent;
}

.walk-mode-title {
  font-size: 1rem;
}

.walk-mode-state {
  min-width: 3.2rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.11);
  font-size: 0.8rem;
  font-weight: 900;
}

.walk-mode-button[aria-pressed="true"] .walk-mode-state {
  color: #071315;
  background: rgba(7, 19, 21, 0.16);
}

.walk-timer {
  min-width: 4.6rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
  font: 900 1rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--water);
  background: rgba(8, 12, 13, 0.72);
}

.walk-mode-active .live-stream-box {
  min-height: 9rem;
  max-height: 16rem;
}

.pocket-lock {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  color: #d8f7ef;
  background: #000;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.pocket-lock[hidden] {
  display: none;
}

.pocket-lock-inner {
  width: min(100%, 24rem);
  display: grid;
  gap: 0.9rem;
  text-align: center;
}

.pocket-lock-eyebrow {
  margin: 0;
  color: #4dbac8;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pocket-lock-title {
  margin: 0;
  color: #f6f2e8;
  font-size: 1.75rem;
  font-weight: 900;
}

.pocket-lock-timer {
  margin: 0.35rem 0;
  color: #7ed8e5;
  font: 900 3rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pocket-lock-copy {
  max-width: 20rem;
  margin: 0 auto;
  color: #8ba7a2;
  font-size: 0.92rem;
  line-height: 1.45;
}

.pocket-unlock-button {
  position: relative;
  min-height: 3.5rem;
  overflow: hidden;
  color: #071315;
  background: #7ed8e5;
  border-color: transparent;
  font-weight: 900;
}

.pocket-unlock-button::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: rgba(255, 255, 255, 0.38);
}

.pocket-unlock-button.is-holding::before {
  width: 100%;
  transition: width 1.2s linear;
}

.pocket-unlock-button.needs-relock {
  background: #f0c95c;
}

.pocket-unlock-button.needs-relock::after {
  content: "Tap the black area to re-lock fullscreen";
  display: block;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.pocket-lock-active {
  overflow: hidden;
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.2rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.mode-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  font-weight: 800;
}

.more-format-label {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mode-row .more-format-label {
  border: 0;
  background: transparent;
  padding: 0 0.1rem;
}

.more-format-select {
  min-height: 2.25rem;
  max-width: 11rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.35rem 0.5rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
}

.more-format-select,
.settings-grid select {
  color-scheme: light;
}

.more-format-select option,
.settings-grid select option {
  color: #061416;
  background: #f6f2e8;
}

.mode-row input {
  accent-color: var(--water);
}

.custom-prompt {
  min-height: 5rem;
  margin-bottom: 0.75rem;
  font-family: inherit;
}

.private-settings {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.private-settings summary {
  cursor: pointer;
  font-weight: 900;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.settings-grid label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.settings-grid select,
.settings-grid input[type="password"] {
  width: 100%;
  min-height: 2.4rem;
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.45rem 0.55rem;
  color: var(--ink);
  background: rgba(8, 12, 13, 0.72);
  font: inherit;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.4rem;
}

.inline-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--water);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.settings-actions button {
  min-height: 2.35rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
}

.private-settings .microcopy[data-tone="ok"] {
  color: var(--green);
}

.private-settings .microcopy[data-tone="warn"] {
  color: var(--gold);
}

label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 800;
}

.mode-row .more-format-label {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin: 0;
}

.mode-row .more-format-select {
  display: inline-flex;
  align-items: center;
  width: 11rem;
  height: 2.35rem;
  line-height: 1.2;
}

textarea {
  width: 100%;
  min-height: 18rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--ink);
  background: rgba(8, 12, 13, 0.65);
  font: 1rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

textarea:focus,
button:focus-visible,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(82, 199, 216, 0.65);
  outline-offset: 3px;
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.output-actions button {
  min-height: 2.45rem;
  padding: 0.55rem 0.85rem;
}

.microcopy {
  margin: 0.8rem 0 0;
  color: var(--soft);
  font-size: 0.92rem;
}

.recovery-copy {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.recovery-copy[data-tone="ok"] {
  color: var(--green);
  border-color: rgba(131, 211, 138, 0.38);
  background: rgba(131, 211, 138, 0.08);
}

.recovery-copy[data-tone="warn"] {
  color: var(--gold);
  border-color: rgba(240, 201, 92, 0.4);
  background: rgba(240, 201, 92, 0.08);
}

.recovery-copy a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.inline-action-button {
  margin-left: 0.55rem;
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(240, 201, 92, 0.46);
  border-radius: 6px;
  color: inherit;
  background: rgba(240, 201, 92, 0.12);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.inline-action-button:hover {
  background: rgba(240, 201, 92, 0.2);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 1rem;
}

.product-card {
  min-height: 20rem;
  display: flex;
  flex-direction: column;
  padding: 1.1rem;
}

.product-card.featured {
  border-color: rgba(82, 199, 216, 0.48);
}

.product-card a,
.quiet-link {
  margin-top: auto;
  color: var(--water);
  font-weight: 800;
}

.status {
  align-self: flex-start;
  margin-bottom: 1.2rem;
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  color: #071315;
}

.status.available {
  background: var(--green);
}

.status.private {
  background: var(--gold);
}

.status.prototype {
  background: var(--water);
}

.status.secure {
  background: var(--rose);
}

.phone-section {
  border-top: 1px solid var(--line);
}

.phone-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, 0.92fr));
  gap: 1rem;
}

.phone-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 20rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.primary-phone-panel {
  background:
    linear-gradient(145deg, rgba(82, 199, 216, 0.16), rgba(131, 211, 138, 0.08)),
    rgba(32, 42, 45, 0.94);
}

.phone-panel p,
.feature-list {
  color: var(--muted);
  line-height: 1.6;
}

.phone-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.download-meta {
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 800;
}

.feature-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding-left: 1.25rem;
}

.checksum {
  display: block;
  overflow-wrap: anywhere;
  padding: 0.75rem;
  border: 1px solid rgba(82, 199, 216, 0.32);
  border-radius: 7px;
  color: var(--water);
  background: rgba(8, 12, 13, 0.72);
  font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.proof-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-list {
  display: grid;
  gap: 1rem;
}

.contest-section {
  display: grid;
  gap: 1.5rem;
}

.contest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contest-card {
  display: grid;
  gap: 0.65rem;
  min-height: 12rem;
  padding: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(82, 199, 216, 0.12), rgba(47, 182, 122, 0.08)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.contest-card:hover,
.contest-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(82, 199, 216, 0.56);
}

.contest-card span {
  color: var(--water);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contest-card strong {
  font-size: 1.1rem;
}

.contest-card p {
  margin: 0;
  color: var(--soft);
}

.privacy-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

footer {
  width: min(1180px, calc(100% - 2rem));
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: 2rem 0;
  color: var(--soft);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .hero-section,
  .demo-grid,
  .app-workspace,
  .phone-grid,
  .proof-section,
  .privacy-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  h1 {
    font-size: 4.4rem;
  }

  .signal-panel {
    min-height: 20rem;
  }

  .product-grid,
  .phone-grid,
  .contest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .privacy-section {
    display: grid;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  h1 {
    max-width: 100%;
    font-size: 3.1rem;
    line-height: 0.98;
    overflow-wrap: anywhere;
  }

  .product-grid,
  .phone-grid,
  .contest-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .demo-controls {
    flex-direction: column;
  }

  .walk-mode-row {
    align-items: stretch;
    flex-direction: column;
  }

  .walk-timer {
    width: 100%;
    min-height: 2.6rem;
    display: grid;
    place-items: center;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .button,
  button {
    width: 100%;
  }

  .output-head {
    align-items: stretch;
    flex-direction: column;
  }

  .output-actions {
    width: 100%;
  }

  footer {
    flex-direction: column;
  }
}
