/* The Otter Vault home page: a timeline, because a launch post explains the product faster than a
   hero section does. Dark by default, light on request, and it collapses to one column on phones. */
:root {
  --bg: #000;
  --panel: #0a0a0a;
  --line: #22272b;
  --ink: #e9f1ec;
  --muted: #8b9a92;
  --mint: #9fe2b0;
  --mint-strong: #6fd39a;
  --deep: #0f2e26;
  --rail: 268px;
  --right: 340px;
  --radius: 16px;
}
:root[data-theme='light'] {
  --bg: #fbf8ef;
  --panel: #fff;
  --line: #e2e0d5;
  --ink: #12261f;
  --muted: #5a6b63;
  --deep: #17362f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
:root[data-theme='light'] { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, "SF Pro Rounded", ui-rounded, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 620px) var(--right);
  justify-content: center;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- left rail ---------- */
.rail { position: sticky; top: 0; height: 100vh; padding: 14px 12px; border-right: 1px solid var(--line); }
.rail-inner { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.brand { display: block; padding: 6px 10px 10px; }
.brand img { width: 46px; height: 46px; }
.nav a {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 999px; font-size: 19px; font-weight: 500;
}
.nav a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nav a.active { font-weight: 700; }
.nav svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle {
  display: flex; align-items: center; gap: 12px; margin-top: 4px;
  padding: 10px 14px; border-radius: 999px; font-size: 15px; color: var(--muted);
  border: 1px solid var(--line);
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
:root[data-theme='light'] .theme-moon, :root:not([data-theme='light']) .theme-sun { display: none; }
.post-button {
  margin-top: 12px; padding: 14px; border-radius: 999px; font-size: 16px; font-weight: 700;
  background: var(--mint); color: var(--deep);
}
.post-button:hover { background: var(--mint-strong); }
.account {
  display: flex; align-items: center; gap: 10px; margin-top: auto; margin-bottom: 8px;
  padding: 9px 12px; border-radius: 999px;
}
.account:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.account img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.account span { display: grid; line-height: 1.25; }
.account small { color: var(--muted); font-size: 13px; }

/* ---------- timeline ---------- */
.timeline { border-right: 1px solid var(--line); min-width: 0; }
.timeline-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px);
}
.timeline-head h1 { margin: 0; font-size: 21px; }
.timeline-head .live { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 22%, transparent); }

.post { display: flex; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.post > img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.post-body { flex: 1; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.post-meta strong { font-size: 16px; }
.post-meta span { color: var(--muted); }
.verified { width: 17px; height: 17px; border-radius: 50%; background: var(--mint); color: var(--deep); font-size: 11px; display: grid; place-items: center; font-weight: 800; }
.post-copy { margin: 6px 0 12px; font-size: 21px; line-height: 1.35; }
.typing-cursor { display: inline-block; width: 2px; height: 1em; background: var(--mint); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.demo-button {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 18px;
  border-radius: var(--radius); text-align: left;
  background: linear-gradient(120deg, #cdeed8, #9fe2b0);
  color: var(--deep);
}
.demo-button:hover { filter: brightness(1.04); }
.play-disc { width: 52px; height: 52px; border-radius: 50%; background: var(--deep); display: grid; place-items: center; flex: none; }
.play-disc svg { width: 26px; height: 26px; fill: var(--mint); }
.demo-copy { display: grid; gap: 2px; }
.demo-copy strong { font-size: 17px; }
.demo-copy small { opacity: .75; }
.demo-arrow { margin-left: auto; font-size: 20px; }

.actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); }
.actions button { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; font-size: 14px; }
.actions button:hover { color: var(--mint); background: color-mix(in srgb, var(--mint) 12%, transparent); }
.actions svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.actions .share { margin-left: auto; }

/* ---------- anonymous replies ---------- */
.replies { border-bottom: 1px solid var(--line); padding: 16px 18px 10px; }
.replies-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kicker { display: block; font-size: 11px; letter-spacing: .12em; color: var(--mint-strong); font-weight: 700; }
.replies-head h2 { margin: 2px 0 0; font-size: 18px; }
.badge { margin-left: auto; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }

.reply-form { display: flex; gap: 12px; align-items: flex-start; }
.anon-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--mint); color: var(--deep); display: grid; place-items: center; font-weight: 800; }
.reply-compose { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 10px; }
.reply-compose textarea {
  flex: 1; min-height: 42px; max-height: 140px; padding: 10px 14px; resize: none;
  border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: inherit; font: inherit;
}
.reply-compose textarea::placeholder { color: var(--muted); }
.reply-compose textarea:focus { outline: 2px solid var(--mint); outline-offset: -1px; }
.reply-compose button {
  padding: 10px 20px; border-radius: 999px; font-weight: 700; background: var(--mint); color: var(--deep);
}
.reply-compose button:disabled { opacity: .5; cursor: default; }
.reply-status { margin: 0; padding: 0 0 0 50px; font-size: 13px; color: var(--muted); }
.reply-status:empty { display: none; }

.reply { display: flex; gap: 12px; padding: 14px 0; }
.reply + .reply { border-top: 1px solid var(--line); }
.reply-meta { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.reply-meta span { color: var(--muted); }
.reply p { margin: 3px 0 0; }

/* ---------- other routes ---------- */
.page { display: none; }
.page.active { display: block; }
.section-intro { padding: 22px 18px 6px; }
.section-intro span { font-size: 11px; letter-spacing: .12em; color: var(--mint-strong); font-weight: 700; }
.section-intro h2 { margin: 8px 0; font-size: 26px; line-height: 1.2; }
.section-intro p { margin: 0; color: var(--muted); }
.feature { display: flex; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.feature-icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); font-weight: 700; }
.feature small { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.feature h3 { margin: 4px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }

.waitlist-cover { height: 170px; overflow: hidden; background: linear-gradient(120deg, var(--deep), #1d5a4a); display: grid; place-items: center; }
.waitlist-cover img { height: 150px; }
.waitlist-body { padding: 18px; }
.waitlist-body h2 { margin: 10px 0; font-size: 26px; }
.waitlist-body p { color: var(--muted); }
.waitlist-button { display: inline-flex; gap: 8px; align-items: center; margin-top: 8px; padding: 13px 22px; border-radius: 999px; background: var(--mint); color: var(--deep); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips i { font-style: normal; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

.profile-cover { height: 130px; background: linear-gradient(120deg, var(--deep), #2b6f5c); }
.profile { padding: 0 18px 18px; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--bg); object-fit: cover; margin-top: -48px; }
.profile h2 { margin: 10px 0 2px; font-size: 24px; display: flex; align-items: center; gap: 8px; }
.handle { margin: 0 0 10px; color: var(--muted); }
.profile-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.profile-links a { color: var(--mint); }

/* ---------- right rail ---------- */
.right { padding: 12px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.search { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.card { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card h2 { margin: 0 0 10px; font-size: 18px; }
.card a.trend { display: block; padding: 8px 0; }
.card a.trend:hover { opacity: .8; }
.card small { display: block; color: var(--muted); font-size: 12px; }
.card .trend strong { display: block; font-size: 15px; margin: 2px 0; }
.card .trend span { color: var(--muted); font-size: 13px; }
.follow-row { display: flex; align-items: center; gap: 10px; }
.follow-row img { width: 40px; height: 40px; border-radius: 50%; }
.follow-row span { display: grid; line-height: 1.25; min-width: 0; }
.follow-row small { color: var(--muted); font-size: 13px; }
.follow-row a { margin-left: auto; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; }
.right footer { padding: 14px 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* ---------- demo dialog ---------- */
dialog { border: 0; padding: 0; background: none; max-width: min(1000px, 94vw); }
dialog::backdrop { background: rgba(0, 0, 0, .74); backdrop-filter: blur(3px); }
.dialog-surface { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.dialog-surface header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.dialog-surface h2 { margin: 2px 0 0; font-size: 19px; }
.dialog-surface video { display: block; width: 100%; background: #000; }
.dialog-surface header button { margin-left: auto; font-size: 24px; color: var(--muted); }

/* ---------- mobile ---------- */
.mobile-header, .mobile-nav { display: none; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 88px minmax(0, 1fr); }
  .right { display: none; }
  .rail { padding: 14px 8px; }
  .nav a span, .account span, .account b, .theme-label { display: none; }
  .nav a { justify-content: center; }
  .post-button { font-size: 0; padding: 14px 0; }
  .post-button::after { content: '↑'; font-size: 20px; }
  .theme-toggle { justify-content: center; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .timeline { border: 0; }
  .mobile-header {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 6;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  }
  .mobile-header img { width: 32px; height: 32px; }
  .mobile-header .theme-toggle { margin-left: auto; border: 0; padding: 8px; }
  .timeline-head { top: 53px; }
  .post-copy { font-size: 19px; }
  .mobile-nav {
    display: flex; position: sticky; bottom: 0; z-index: 6;
    border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px);
    padding: 8px max(10px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom));
  }
  .mobile-nav a { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 6px 0; font-size: 11px; color: var(--muted); }
  .mobile-nav a.active { color: var(--ink); }
  .mobile-nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .reply-compose { flex-direction: column; align-items: stretch; }
  .reply-compose button { align-self: flex-end; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- author composer and updates ---------- */
.author-composer { display: flex; gap: 14px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.author-composer img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.author-composer > div { flex: 1; min-width: 0; }
.author-composer textarea {
  width: 100%; min-height: 44px; max-height: 200px; resize: none; padding: 6px 0 10px;
  border: 0; background: none; color: inherit; font-size: 19px; line-height: 1.4; font-family: inherit;
}
.author-composer textarea:focus { outline: none; }
.author-composer textarea::placeholder { color: var(--muted); }
.author-row { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.author-row button[type='submit'] { margin-left: auto; padding: 9px 20px; border-radius: 999px; background: var(--mint); color: var(--deep); font-weight: 700; }
.link-button { color: var(--muted); font-size: 13px; }
.link-button:hover { color: var(--ink); }
.update-copy { font-size: 18px; white-space: pre-wrap; }
.reply-thread { margin-top: 4px; }
.reply-empty { margin: 0; padding: 14px 0 4px 50px; color: var(--muted); font-size: 14px; }
.reply-remove { margin-left: auto; font-size: 12px; color: var(--muted); }
.reply-remove:hover { color: #ff8b8b; }
#updates .actions button span { font-size: 14px; }

/* the author's own preview of the visitor view */
.visitor-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 18px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  font-size: 14px; color: var(--muted);
}
.visitor-bar button { padding: 7px 14px; border-radius: 999px; background: var(--mint); color: var(--deep); font-weight: 700; font-size: 13px; }
@media (max-width: 720px) { .visitor-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }

/* install call to action inside the launch post */
.install-button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--mint); color: var(--deep); font-weight: 700;
}
.install-button:hover { background: var(--mint-strong); }
.rail .post-button { display: block; text-align: center; }
.quiet-link { color: var(--mint); font-size: 14px; }
