:root {
  --bg: #fdfdfc;
  --ink: #111;
  --body: rgba(0, 0, 0, 0.72);
  --whisper: rgba(0, 0, 0, 0.4);
  --soft: rgba(0, 0, 0, 0.5);
  --rule: #f2f2f2;
  --rule-strong: #ededed;
  --underline: #d9d9d9;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --measure: 36.375rem;
}

* { outline: 0; padding: 0; margin: 0; border: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

html:before {
  content: "";
  pointer-events: none;
  z-index: 9;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 8rem;
  background: linear-gradient(180deg, #fdfdfc 0, rgba(253, 253, 252, 0.74) 19%, rgba(253, 253, 252, 0) 100%);
}

body {
  min-height: 100%;
  overflow-y: scroll;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 460;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: none;
}

::selection { color: var(--ink); background: var(--rule-strong); }
:focus-visible { outline: 2px solid rgba(0, 122, 255, 0.5); }

a { color: inherit; text-decoration: none; }
a:hover { color: #000; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }

main {
  max-width: var(--measure);
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(5rem + env(safe-area-inset-top, 0px))
    calc(1rem + env(safe-area-inset-right, 0px))
    calc(3.5rem + env(safe-area-inset-bottom, 0px))
    calc(1rem + env(safe-area-inset-left, 0px));
  position: relative;
  z-index: 1;
}

.page {
  min-height: calc(100dvh - 8.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}
.chrome {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100%;
}
html.intro-open,
html.intro-open body { overflow: hidden; }

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3.5rem;
}

.mark {
  color: var(--whisper);
  font-size: 0.875rem;
  font-weight: 460;
  letter-spacing: -0.00563rem;
  line-height: 1.25rem;
}
.mark:hover { color: var(--ink); }

.lens {
  color: var(--whisper);
  padding: 4px;
  line-height: 0;
}
.lens:hover, .lens.on { color: var(--ink); }

.moment > * + * { margin-top: 1rem; }

html:not(.arrived) .moment > * {
  animation: staggerIn 0.5s ease both;
}
html:not(.arrived) .moment > :nth-child(1) { animation-delay: 0s; }
html:not(.arrived) .moment > :nth-child(2) { animation-delay: 0.05s; }
html:not(.arrived) .moment > :nth-child(3) { animation-delay: 0.1s; }
html:not(.arrived) .moment > :nth-child(4) { animation-delay: 0.15s; }
html:not(.arrived) .moment > :nth-child(5) { animation-delay: 0.2s; }
html:not(.arrived) .moment > :nth-child(n+6) { animation-delay: 0.25s; }

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.asked {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9375rem;
  font-weight: 430;
  line-height: 1.4;
  letter-spacing: 0.01rem;
  color: var(--soft);
}

.quote {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--serif);
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}
.quote.raw { color: var(--soft); }
.quote {
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: auto;
}
.quote:hover, .quote:focus-visible { text-decoration-color: var(--soft); }

.src {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0 0 0.5rem;
  color: var(--whisper);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.src-session { font-weight: 400; }
.src .time { font-size: inherit; line-height: inherit; }

.time {
  color: var(--whisper);
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
  font-variant-numeric: tabular-nums;
  position: relative;
  display: inline;
  width: fit-content;
  transition: color 0.2s ease;
}
.time:before {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  border-radius: 2px;
  background: var(--underline);
  transition: background 0.2s ease;
}
.time:hover { color: #000; }
.time:hover:before { background: #666; }
.time.on { color: var(--ink); }

.along { padding-top: 1.25rem; }
.along p {
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
  color: var(--soft);
  margin: 0 0 1rem;
}
.along .asked { margin: 1.25rem 0 0.5rem; }
.along p:last-child { margin-bottom: 0; }

.further {
  color: var(--whisper);
  font-size: 0.8125rem;
  font-weight: 460;
  letter-spacing: -0.0025rem;
  transition: opacity 0.15s ease;
}
.further:hover { opacity: 0.5; color: var(--whisper); }

.frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-top: 0.5rem;
  background: var(--rule);
  border-radius: 0.5rem;
  overflow: hidden;
}
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame-cap {
  color: var(--whisper);
  font-size: 0.75rem;
  font-weight: 460;
  letter-spacing: 0.00063rem;
  line-height: 1.2;
  margin-top: 0.5rem;
}
.frame-cap a { color: rgba(0, 0, 0, 0.65); }
.frame-cap a:hover { color: var(--ink); }

.ask { animation: staggerIn 0.5s ease both; }
.ask input {
  width: 100%;
  padding: 0 0 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
  color: var(--ink);
  background: transparent;
  border-bottom: 1px solid var(--rule);
  appearance: none;
  border-radius: 0;
}
.ask input:focus { border-bottom-color: var(--underline); }
.ask input::placeholder { color: var(--whisper); }
.ask .status {
  color: var(--whisper);
  font-size: 0.8125rem;
  font-weight: 460;
  letter-spacing: -0.0025rem;
  margin-top: 0.625rem;
  min-height: 1rem;
}

.results { margin-top: 1rem; }
.group { margin-top: 2.25rem; }
.group:first-child { margin-top: 1rem; }
.group-k {
  color: var(--whisper);
  font-size: 0.875rem;
  font-weight: 460;
  letter-spacing: -0.00563rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.735rem 0;
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.14s ease;
}
.result:last-child { border-bottom: none; }
.results:hover .result { opacity: 0.3; }
.results:hover .result:hover { opacity: 1; }

.result-main {
  flex: 1;
  min-width: 0;
  text-align: left;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 460;
  letter-spacing: -0.00563rem;
  line-height: 1.25rem;
}
.result-q {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-k {
  display: block;
  color: var(--whisper);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.result .time { flex-shrink: 0; }

.foot {
  margin-top: auto;
  padding-top: 3rem;
}
.about {
  color: var(--whisper);
  font-family: var(--serif);
  font-size: 0.875rem;
  font-weight: 460;
  letter-spacing: -0.0025rem;
  line-height: 1.25rem;
  padding: 0;
  min-width: 2.75rem;
  min-height: 2.75rem;
  text-align: left;
}
.about:hover, .about[aria-expanded="true"] { color: var(--ink); }

.intro-scrim {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(253, 253, 252, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding:
    calc(1.5rem + env(safe-area-inset-top, 0px))
    calc(1.25rem + env(safe-area-inset-right, 0px))
    calc(1.5rem + env(safe-area-inset-bottom, 0px))
    calc(1.25rem + env(safe-area-inset-left, 0px));
}
.intro {
  width: min(36.375rem, 100%);
  max-height: min(32rem, 80dvh);
  overflow: auto;
  padding: 1.25rem 0 0;
}
.intro p {
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.45;
  letter-spacing: -0.00563rem;
  color: var(--body);
  margin: 0 0 1rem;
}
.intro-how,
.intro-note { color: var(--whisper); }
.intro-x {
  color: var(--whisper);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}
.intro-x:hover { color: var(--ink); }

@media (max-width: 768px) {
  html:before { height: max(2.5rem, calc(env(safe-area-inset-top, 0px) + 2.5rem)); }
  main {
    padding:
      max(2rem, calc(env(safe-area-inset-top, 0px) + 0.9rem))
      calc(1.5rem + env(safe-area-inset-right, 0px))
      max(1.75rem, calc(env(safe-area-inset-bottom, 0px) + 1.15rem))
      calc(1.5rem + env(safe-area-inset-left, 0px));
  }
  .bar { margin-bottom: 2.5rem; }
  .page { min-height: calc(100dvh - 2.6rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .foot { padding-top: 2.5rem; }
}

@media (display-mode: standalone) {
  html:before { height: calc(env(safe-area-inset-top, 0px) + 2.5rem); }
  main {
    padding-top: calc(env(safe-area-inset-top, 0px) + 0.9rem);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.15rem);
  }
}

.intro strong { font-weight: 600; }
.intro a { color: inherit; text-underline-offset: 0.15em; }

/* Further reveals only the added paragraphs; existing text stays in place. */
.new-passage { animation: passageIn 0.35s ease both; }
@keyframes passageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .new-passage { animation: none; }
}
