@view-transition {
      navigation: auto;
    }
    ::view-transition-old(root),
    ::view-transition-new(root) {
      animation-duration: 0.65s;
      animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
      background-color: #f6f2ea;
    }

    body {
      margin: 0;
      padding: 0;
      background-color: #f6f2ea !important;
      color: #181715 !important;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      opacity: 1;
      transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
      animation: essayFadeIn 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    }

    body.is-fading-out {
      opacity: 0;
      pointer-events: none;
    }

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

    .serif {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    }

    /* Subtle Top Navigation Back to Lore42 */
    .top-nav {
      position: fixed;
      top: 18px;
      left: 22px;
      z-index: 40;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .back-home-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      text-decoration: none;
      color: #57534d;
      background: rgba(246, 242, 234, 0.86);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(24, 23, 21, 0.12);
      border-radius: 99px;
      padding: 6px 13px;
      font-size: 12.5px;
      font-weight: 700;
      letter-spacing: 0.02em;
      transition: all 0.2s ease;
    }

    .back-home-link:hover {
      color: #181715;
      border-color: rgba(24, 23, 21, 0.3);
      transform: translateY(-1px);
    }

    /* ==========================================================================
       SCREEN 1: INITIAL COVER SLIDE (TITLE + 2-3 LINES + MOBILE NOTIFICATION)
       ========================================================================== */
    .cover-screen {
      min-height: 94vh;
      max-width: 560px;
      margin: 0 auto;
      padding: 48px 24px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      opacity: 1;
      transform: translateY(0);
      transition: opacity 0.58s cubic-bezier(0.22, 1, 0.36, 1),
                  transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .cover-screen.is-fading-out {
      opacity: 0;
      transform: translateY(-10px) scale(0.985);
      pointer-events: none;
    }

    .cover-title {
      font-size: clamp(2.8rem, 6vw, 4.2rem);
      line-height: 1.05;
      margin: 0 0 14px;
      color: #181715;
      letter-spacing: -0.02em;
    }

    .cover-sub {
      font-size: 18px;
      line-height: 1.52;
      color: #57534d;
      max-width: 460px;
      margin: 0 auto 14px;
      font-weight: 400;
    }

    .cover-byline {
      font-size: 13px;
      color: #7a756c;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 700;
      margin-bottom: 42px;
    }

    .notif-card {
      width: 100%;
      max-width: 440px;
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(24, 23, 21, 0.12);
      border-radius: 22px;
      padding: 18px 20px;
      box-shadow: 0 18px 40px rgba(24, 23, 21, 0.08);
      text-align: left;
      cursor: pointer;
      transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .notif-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 24px 48px rgba(24, 23, 21, 0.12);
    }

    .notif-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      font-size: 12px;
      color: #7a756c;
      font-weight: 600;
    }

    .notif-app {
      display: flex;
      align-items: center;
      gap: 7px;
      font-weight: 700;
      color: #181715;
    }

    .app-icon-dot {
      width: 20px;
      height: 20px;
      border-radius: 5px;
      background: #007aff;
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
    }

    .notif-sender {
      font-weight: 700;
      font-size: 15px;
      color: #181715;
      margin-bottom: 1px;
    }

    .notif-subject {
      font-weight: 700;
      font-size: 14px;
      color: #181715;
      margin-bottom: 4px;
    }

    .notif-body {
      font-size: 14.5px;
      color: #4a4640;
      margin: 0 0 14px;
      line-height: 1.42;
    }

    .notif-cta {
      font-size: 13px;
      font-weight: 700;
      color: #007aff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 10px;
      border-top: 1px solid rgba(24, 23, 21, 0.08);
    }

    /* Main Essay Experience Container (Fades in after clicking notification) */
    .essay-experience {
      display: none;
      opacity: 0;
      transition: opacity 0.78s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .essay-experience.is-open {
      display: block;
    }

    .essay-experience.is-visible {
      opacity: 1;
    }

    /* ==========================================================================
       SCROLL-FADING SECTIONS (EMAIL THREAD EPISODES vs. ARTICLE CHAPTERS)
       ========================================================================== */
    .scroll-section {
      transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                  transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                  filter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: opacity, transform;
    }

    /* ==========================================================================
       EMAIL THREAD EPISODE STAGES
       ========================================================================== */
    .thread-stage {
      min-height: 94vh;
      max-width: 580px;
      margin: 0 auto;
      padding: 68px 18px 96px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .thread-stage.cold-open {
      min-height: 98vh;
      padding-top: 64px;
      padding-bottom: 110px;
    }

    .thread-window {
      width: 100%;
    }

    /* Mobile Email Thread Subject Header */
    .mobile-email-subject-bar {
      background: #ffffff;
      border: 1px solid rgba(24, 23, 21, 0.1);
      border-radius: 14px;
      padding: 14px 16px;
      margin-bottom: 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      box-shadow: 0 2px 10px rgba(24, 23, 21, 0.03);
    }

    .subject-bar-left {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .subject-bar-title {
      font-size: 15px;
      font-weight: 700;
      color: #181715;
      line-height: 1.3;
    }

    .subject-bar-sub {
      font-size: 12px;
      color: #7a756c;
    }

    .inbox-badge {
      flex-shrink: 0;
      background: #ece6da;
      color: #57534d;
      font-size: 10.5px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 6px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    /* Time Dividers */
    .time-divider {
      text-align: center;
      margin: 18px 0 26px;
      opacity: 0;
      transform: translateY(8px);
      display: none;
    }

    .time-divider.is-visible {
      display: block;
      animation: slowReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .time-divider span {
      display: inline-block;
      background: #e8e1d5;
      color: #57534d;
      padding: 5px 14px;
      border-radius: 99px;
      font-size: 11.5px;
      font-weight: 700;
      letter-spacing: 0.05em;
    }

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

    /* Mobile Email Cards in the Thread */
    .msg-row {
      display: none;
      margin-bottom: 26px;
      flex-direction: column;
      align-items: flex-start;
    }

    .msg-row.is-visible {
      display: flex;
      animation: slowBubbleAppear 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .msg-row.outgoing {
      align-items: flex-end;
    }

    @keyframes slowBubbleAppear {
      0% {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .msg-bubble {
      width: 95%;
      background: #ffffff;
      border: 1px solid rgba(24, 23, 21, 0.12);
      border-left: 3.5px solid #2b4c7e;
      border-radius: 16px;
      padding: 15px 18px;
      box-shadow: 0 6px 18px rgba(24, 23, 21, 0.05);
      position: relative;
    }

    .msg-row.outgoing .msg-bubble {
      background: #f4faf7;
      border-color: rgba(13, 122, 111, 0.22);
      border-left: 3.5px solid #0d7a6f;
    }

    /* Mobile Email Envelope Header Inside Each Card */
    .email-env-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding-bottom: 11px;
      margin-bottom: 12px;
      border-bottom: 1px solid rgba(24, 23, 21, 0.07);
    }

    .email-env-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .email-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: #2b4c7e;
      color: #ffffff;
      font-weight: 700;
      font-size: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .msg-row.outgoing .email-avatar {
      background: #0d7a6f;
    }

    .email-from-stack {
      display: flex;
      flex-direction: column;
      min-width: 0;
      line-height: 1.25;
    }

    .email-from-name {
      font-size: 14px;
      font-weight: 700;
      color: #181715;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
    }

    .email-latency-tag {
      font-size: 11px;
      font-weight: 600;
      color: #0d7a6f;
      background: rgba(13, 122, 111, 0.1);
      padding: 1px 7px;
      border-radius: 99px;
    }

    .email-to-line {
      font-size: 12px;
      color: #7a756c;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 2px;
    }

    .cc-dorian-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #fbe5e0;
      color: #b8331a;
      border: 1px solid rgba(217, 78, 52, 0.35);
      border-radius: 6px;
      padding: 1px 7px;
      font-size: 11px;
      font-weight: 700;
    }

    .email-env-right {
      font-size: 11.5px;
      color: #7a756c;
      font-weight: 600;
      flex-shrink: 0;
      text-align: right;
    }

    .email-attachment {
      margin-top: 10px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #ffffff;
      border: 1px solid rgba(13, 122, 111, 0.25);
      border-radius: 9px;
      padding: 6px 11px;
      font-size: 12.5px;
      font-weight: 600;
      color: #181715;
    }

    .msg-bubble.is-recalling {
      animation: recallPulse 0.9s ease forwards;
    }

    @keyframes recallPulse {
      0% { transform: scale(1); opacity: 1; }
      40% { transform: scale(1.015); background: #fbe5e0; }
      100% { transform: scale(0.92); opacity: 0.15; }
    }

    .bubble-text {
      margin: 0;
      font-size: 15.5px;
      line-height: 1.56;
      color: #181715;
    }

    .dorian-mention {
      display: inline-block;
      background: #fbe5e0;
      color: #b8331a;
      font-weight: 700;
      padding: 0px 6px;
      border-radius: 5px;
    }

    .bubble-meta-line {
      margin-top: 8px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
      font-size: 12px;
      color: #7a756c;
    }

    .seen-receipt {
      color: #0d7a6f;
      font-weight: 600;
    }

    .edited-link {
      background: none;
      border: none;
      padding: 0;
      font-size: 12px;
      font-weight: 600;
      color: #b8331a;
      text-decoration: underline;
      cursor: pointer;
    }

    .draft-drawer {
      display: none;
      margin-top: 10px;
      padding: 10px 12px;
      background: rgba(24, 23, 21, 0.04);
      border-left: 3px solid #d94e34;
      border-radius: 6px;
      font-size: 13.5px;
      color: #57534d;
      font-style: italic;
    }

    .draft-drawer.is-open {
      display: block;
    }

    /* Slow Typing Indicator inside Each Thread Episode */
    .typing-stage {
      display: none;
      flex-direction: column;
      align-items: flex-start;
      margin: 10px 0 24px;
      animation: slowReveal 0.55s ease forwards;
    }

    .typing-stage.is-active {
      display: flex;
    }

    .typing-stage.outgoing {
      align-items: flex-end;
    }

    .typing-pill {
      background: #ffffff;
      border: 1px solid rgba(24, 23, 21, 0.1);
      border-radius: 20px;
      padding: 12px 18px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      box-shadow: 0 4px 12px rgba(24, 23, 21, 0.04);
    }

    .typing-stage.outgoing .typing-pill {
      background: #e3f5ec;
    }

    .t-dot {
      width: 7px;
      height: 7px;
      background: #8c867c;
      border-radius: 50%;
      animation: dotPulse 1.5s infinite ease-in-out;
    }
    .t-dot:nth-child(2) { animation-delay: 0.25s; }
    .t-dot:nth-child(3) { animation-delay: 0.5s; }

    @keyframes dotPulse {
      0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
      40% { transform: translateY(-4px); opacity: 1; }
    }

    .typing-caption {
      font-size: 12.5px;
      color: #7a756c;
      margin: 7px 12px 0;
      font-style: italic;
    }

    /* Scroll Cue Appearing After @Dorian is Tagged */
    .thread-scroll-cue {
      margin-top: 26px;
      text-align: center;
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.85s ease, transform 0.85s ease;
      pointer-events: none;
    }

    .thread-scroll-cue.is-ready {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    .scroll-cue-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(24, 23, 21, 0.06);
      color: #57534d;
      border: 1px solid rgba(24, 23, 21, 0.12);
      padding: 8px 18px;
      border-radius: 99px;
      font-size: 12.5px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      text-decoration: none;
    }

    /* ==========================================================================
       CENTERED EDITORIAL ARTICLE CHAPTERS + SCROLL-ANIMATED DATA FIGURES
       ========================================================================== */
    .article-chapter {
      max-width: 740px;
      margin: 0 auto;
      padding: 84px 24px 104px;
    }

    /* Official Essay Title Block (Appears Right After Opening Email Exchange) */
    .essay-hero-header {
      text-align: center;
      max-width: 640px;
      margin: 0 auto 56px;
      padding-bottom: 40px;
      border-bottom: 1px solid rgba(24, 23, 21, 0.14);
    }

    .essay-kicker {
      font-size: 12.5px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #7a756c;
      margin-bottom: 16px;
    }

    .essay-main-title {
      font-size: clamp(2.8rem, 6vw, 4.35rem);
      line-height: 1.04;
      margin: 0 0 18px;
      color: #181715;
      letter-spacing: -0.025em;
    }

    .essay-main-subtitle {
      font-size: clamp(1.12rem, 2.2vw, 1.32rem);
      line-height: 1.5;
      color: #57534d;
      max-width: 520px;
      margin: 0 auto;
      font-weight: 400;
    }

    /* Centered Reading Column */
    .prose-column {
      max-width: 600px;
      margin: 0 auto;
    }

    .chapter-label {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #b8331a;
      margin: 0 0 10px;
      display: block;
    }

    .chapter-heading {
      font-size: clamp(1.75rem, 3.5vw, 2.3rem);
      line-height: 1.18;
      margin: 0 0 24px;
      color: #181715;
      letter-spacing: -0.015em;
    }

    .prose-column p {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
      font-size: 19.5px;
      line-height: 1.76;
      color: #22201d;
      margin: 0 0 24px;
    }

    .prose-column p.lead-in-thread {
      margin-top: 32px;
      padding-top: 24px;
      border-top: 1px dashed rgba(24, 23, 21, 0.15);
      color: #4a4640;
      font-style: italic;
    }

    /* Inline Data Highlights */
    .pill {
      display: inline-block;
      padding: 0px 7px;
      border-radius: 5px;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
      font-size: 0.88em;
      font-weight: 700;
    }
    .pill-teal { background: #dff3f0; color: #095c53; }
    .pill-ochre { background: #fdf0d5; color: #945805; }
    .pill-terracotta { background: #fbe5e0; color: #b8331a; }

    /* Standalone Scroll-Animated Data Figure Cards in the Essay */
    .editorial-figure {
      max-width: 680px;
      margin: 44px auto;
      background: #ffffff;
      border: 1px solid rgba(24, 23, 21, 0.12);
      border-radius: 18px;
      padding: 22px 24px 18px;
      box-shadow: 0 10px 28px rgba(24, 23, 21, 0.05);
    }

    .figure-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
      margin-bottom: 6px;
    }

    .figure-title {
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #181715;
    }

    .figure-sub {
      font-size: 13.5px;
      color: #57534d;
      margin: 0 0 16px;
    }

    .replay-link {
      background: none;
      border: none;
      color: #d94e34;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      padding: 0;
      flex-shrink: 0;
    }

    .chart-canvas-box {
      width: 100%;
      height: 220px;
      position: relative;
    }

    .chart-canvas-box canvas {
      width: 100%;
      height: 100%;
      display: block;
    }

    .chart-source-note {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid rgba(24, 23, 21, 0.07);
      font-size: 12px;
      color: #7a756c;
    }

    /* Interactive Unread Guilt Calculator at the End of Chapter IV */
    .calculator-card {
      max-width: 640px;
      margin: 48px auto 0;
      background: #ffffff;
      border: 1.5px solid #181715;
      border-radius: 20px;
      padding: 28px 26px;
      box-shadow: 0 14px 34px rgba(24, 23, 21, 0.07);
    }

    .calc-kicker {
      font-size: 11.5px;
      font-weight: 820;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #0d7a6f;
      margin-bottom: 6px;
      display: block;
    }

    .calc-title {
      font-size: 24px;
      margin: 0 0 8px;
      color: #181715;
    }

    .calc-desc {
      font-size: 14.5px;
      color: #57534d;
      margin: 0 0 20px;
    }

    .option-group-label {
      font-size: 12px;
      font-weight: 700;
      color: #7a756c;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 9px;
      display: block;
    }

    .delay-chips-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 18px;
    }

    .choice-chip {
      background: #f6f2ea;
      color: #181715;
      border: 1px solid #d5cdbd;
      border-radius: 99px;
      padding: 7px 14px;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .choice-chip:hover {
      border-color: #181715;
    }

    .choice-chip.is-selected {
      background: #181715;
      color: #ffffff;
      border-color: #181715;
    }

    .calc-result-box {
      margin-top: 20px;
      padding: 18px 20px;
      background: #faf8f4;
      border: 1px solid #e2dbd0;
      border-left: 4px solid #0d7a6f;
      border-radius: 12px;
    }

    .calc-result-verdict {
      font-size: 15.5px;
      line-height: 1.6;
      color: #181715;
      margin: 0 0 12px;
    }

    .calc-Suggested-draft {
      font-family: "Iowan Old Style", Palatino, Georgia, serif;
      font-style: italic;
      font-size: 15.5px;
      color: #3d3a35;
      background: #ffffff;
      border: 1px dashed #c8bfb0;
      padding: 12px 14px;
      border-radius: 8px;
      margin: 0;
    }

    /* Essay Footer */
    .essay-footer {
      max-width: 600px;
      margin: 40px auto 96px;
      padding: 28px 24px 0;
      border-top: 1px solid rgba(24, 23, 21, 0.14);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 14px;
      font-size: 13px;
      color: #7a756c;
    }

    /* Gate sections below an unfinished chat so the user cannot scroll past until the chat ends */
    [data-gated-after] {
      display: none !important;
    }

    article[data-gated-after].is-unlocked {
      display: block !important;
    }

    section.thread-stage[data-gated-after].is-unlocked,
    footer.essay-footer[data-gated-after].is-unlocked {
      display: flex !important;
    }