#monti-landing {
    --forest: light-dark(#103f2f, #0b3025);
    --forest-top: light-dark(#225641, #174634);
    --ivory: #f6fbf4;
    --on-forest: #d9e9dc;
    --pine: light-dark(#174332, #edf8ef);
    --muted: light-dark(#415e50, #c3d9cb);
    --paper: light-dark(#edf4eb, #183c30);
    --surface: light-dark(#fbfdf9, #1b4938);
    --selected: light-dark(#e7f2e8, #25543f);
    --line: light-dark(#bbd0c2, #5b806f);
    --gutter: clamp(16px, 5.4vw, 44px);
    color-scheme: light dark;
    color: var(--pine);
    font: 400 16px/1.5 "DM Sans", system-ui, sans-serif;
  }

#monti-landing {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
}

#monti-landing a { color: inherit; }
#monti-landing main > .hero { position: relative; padding-top: 83px; }

.account-nav {
  position: absolute;
  inset-block-start: 17px;
  inset-inline-end: var(--gutter);
  display: flex;
  align-items: center;
  gap: 9px;
}

.account-nav a, .account-nav button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.account-nav form { margin: 0; }
#monti-landing .account-primary { background: #f6fbf4; color: #174332; border-color: #f6fbf4; }
.account-nav button:hover, .account-nav a:hover { box-shadow: inset 0 0 0 1px currentColor; }
#monti-landing .path { cursor: pointer; }
#monti-landing button:disabled { cursor: wait; opacity: .7; }

#monti-landing .button.primary {
  background: light-dark(#174332, #c5dcc8);
  border-color: light-dark(#174332, #c5dcc8);
  color: light-dark(#f6fbf4, #173e30);
}

.entry-gate p { margin: 0 0 11px; }
.entry-gate .button + .button { margin-inline-start: 7px; }
.entry-help { margin: 8px 0 12px; color: var(--muted); font-size: 14px; }
.entry-status { margin: 10px 0 0; }
.entry-status:empty { display: none; }
.intake { text-align: start; }
#chat-turns { display: grid; gap: 12px; margin-block: 0 18px; }
.chat-bubble { width: fit-content; max-width: min(94%, 55ch); padding: 12px 16px; border-radius: 13px; overflow-wrap: anywhere; background: var(--paper); border: 1px solid var(--line); }
.chat-bubble.from-user { justify-self: end; background: var(--selected); }
.chat-bubble strong { font-size: .83rem; color: var(--muted); }
.chat-bubble p { margin: 4px 0 0; white-space: pre-wrap; }
.reply-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chat-result { overflow-wrap: anywhere; }
.chat-result p { white-space: pre-line; }
.chat-result h3 { margin: 20px 0 8px; }
.chat-result a { color: inherit; text-decoration: underline; text-underline-offset: .16em; }
.chat-result summary { cursor: pointer; font-weight: 650; }
.chat-result details li { margin-block: 1em; }
.chat-result details blockquote { margin: .4em 0 .6em; padding-inline-start: .9em; border-inline-start: 2px solid currentColor; }
#entry > .timeline-delete { margin-top: 15px; }
.guidance { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.guidance h3, .guidance h4 { margin: 0; }
.guidance p, .guidance ul { margin: 6px 0 13px; }

.sign-in-main { max-width: 460px; margin: 0 auto; padding: 54px 18px 48px; }
.back-link { display: inline-block; margin-bottom: 16px; }
.sign-in-card {
  padding: clamp(22px, 6vw, 34px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}
.sign-in-icon { border-radius: 14px; }
.sign-in-card h1 { margin: 8px 0 19px; font-size: 27px; font-weight: 650; line-height: 1.2; }
.sign-in-card p:last-child { margin: 17px 0 0; }
.sign-in-actions { display: grid; gap: 9px; }
.sign-in-error { padding: 8px; border-radius: 6px; background: var(--selected); }

.members-main { max-width: 1140px; margin: 0 auto; padding: 42px var(--gutter); }
.members-main h1 { margin: 0; font-size: clamp(32px, 5vw, 43px); line-height: 1.12; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.table-scroll table { width: 100%; border-collapse: collapse; text-align: left; }
.table-scroll th, .table-scroll td { padding: 11px 13px; border-bottom: 1px solid var(--line); }
.table-scroll th { background: var(--selected); font-weight: 650; white-space: nowrap; }
.table-scroll td { overflow-wrap: anywhere; }
.table-scroll tr:last-child td { border-bottom: 0; }
.member-pages { display: flex; gap: 17px; margin-top: 16px; }

#monti-landing [hidden] { display: none; }
#monti-landing[data-signed-in="true"] .workspace-layout {
  display: grid;
  grid-template-columns: minmax(220px, 258px) minmax(0, 1fr);
  min-height: 100vh;
}
.workspace-layout main { min-width: 0; }
#monti-landing .timeline {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 21px 14px 14px;
  border-inline-end: 1px solid var(--line);
  background: var(--surface);
}
#monti-landing .timeline[hidden] { display: none; }
.timeline-top { display: flex; align-items: center; gap: 8px; }
.timeline-top .button { width: 100%; gap: 8px; }
.timeline h2 { margin: 24px 0 9px; font-size: 14px; font-weight: 700; }
.timeline-scroll { min-height: 0; overflow-y: auto; }
.timeline-scroll ul { margin: 0; padding: 0; list-style: none; }
.timeline-scroll ul button {
  display: block;
  width: 100%;
  padding: 9px 8px;
  color: inherit;
  text-align: left;
  font: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}
.timeline-scroll ul button:is(:hover, [aria-current="true"]) {
  border-color: var(--line);
  background: var(--selected);
}
.timeline-row-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-row-date, .timeline-status { color: var(--muted); font-size: 13px; }
.timeline-status { margin: 4px 0 8px; }
.timeline-status:empty { display: none; }
#timeline-more { margin: 12px 0; }
.timeline-membership { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.timeline-membership a { font-size: 14px; font-weight: 650; }
.timeline-membership progress { display: block; width: 100%; height: 8px; accent-color: #488063; }
.timeline-delete { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
#monti-landing .timeline-toggle, #monti-landing .timeline-close, #monti-landing .timeline-backdrop { display: none; }
.billing-summary {
  padding: 12px 16px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.billing-summary p { margin: 0; }
.billing-summary p + p, .reconnect-form { margin-top: 8px; }
.billing-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.membership-main { max-width: 770px; }

@media (max-width: 720px) {
  #monti-landing[data-signed-in="true"] .workspace-layout { display: block; }
  #monti-landing .timeline-toggle:not([hidden]) {
    position: absolute;
    display: inline-flex;
    inset-block-start: 17px;
    inset-inline-start: var(--gutter);
  }
  #monti-landing .timeline { display: none; }
  #monti-landing[data-timeline-open="true"] .timeline {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 4;
    display: flex;
    width: min(290px, 88vw);
  }
  #monti-landing[data-timeline-open="true"] .timeline-close {
    display: block;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: inherit;
    font-size: 25px;
    cursor: pointer;
  }
  #monti-landing[data-timeline-open="true"] .timeline-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    border: 0;
    background: #091f18a1;
  }
}

  #monti-landing,
  #monti-landing * { box-sizing: border-box; }

  #monti-landing .hero {
    padding: clamp(46px, 7.8vw, 66px) var(--gutter) 44px;
    background: radial-gradient(ellipse at 50% -8%, var(--forest-top), transparent 75%), var(--forest);
    color: var(--ivory);
  }

  #monti-landing .lockup,
  #monti-landing .intro { text-align: center; }

  #monti-landing .emblem {
    position: relative;
    display: grid;
    place-items: center;
    width: 180px;
    height: clamp(132px, 22vw, 164px);
    margin-inline: auto;
  }

  #monti-landing .mountain-mark {
    position: relative;
    top: 23%;
    width: calc(85% * var(--mark-scale, 1));
    aspect-ratio: 2.04;
    margin-inline: auto;
  }

  #monti-landing .mountain-mark span {
    position: absolute;
    inset: 0;
  }

  #monti-landing .cloud-behind {
    background: linear-gradient(90deg, #fff7, #fffd 53%);
    clip-path: polygon(
      0 52%, 5% 49%, 11% 47%, 17% 46%, 24% 46%, 31% 47%,
      38% 49%, 45% 50%, 53% 50%, 61% 47%, 57% 52%, 51% 55%,
      44% 56%, 37% 55%, 29% 53%, 21% 51%, 14% 50%, 7% 50%
    );
  }

  #monti-landing .peak {
    background: linear-gradient(116deg, #c5dcc8 18%, #a5c8af 90%);
    clip-path: polygon(18% 94%, 56% 3%, 94% 94%, 66% 94%, 56% 77%, 46% 94%);
  }

  #monti-landing .snow {
    background: var(--ivory);
    clip-path: polygon(56% 3%, 69% 34%, 61% 28%, 56% 36%, 51% 28%, 43% 34%);
  }

  #monti-landing .cloud-front {
    background: linear-gradient(90deg, #fffb, #fff 41%);
    clip-path: polygon(
      3% 68%, 9% 64%, 16% 61%, 23% 60%, 30% 60%, 38% 62%, 46% 64%,
      54% 65%, 61% 64%, 68% 61%, 74% 56%, 70% 62%, 65% 67%,
      59% 70%, 52% 72%, 44% 72%, 36% 70%, 28% 67%, 21% 65%, 14% 65%, 8% 66%
    );
  }

  #monti-landing .mark-frame {
    position: absolute;
    top: 4%;
    left: 50%;
    height: 89%;
    aspect-ratio: .65;
    border: 2px solid #cee5d4;
    border-radius: 16px;
    background: linear-gradient(145deg, #2d654f, #174735);
    box-shadow: 0 8px 22px #09261c50;
    transform: translateX(-50%) rotate(-10deg);
  }

  #monti-landing .mark-frame::before {
    content: "";
    position: absolute;
    top: 8%;
    inset-inline: 36%;
    height: 2px;
    border-radius: 999px;
    background: #cee5d4a6;
  }

  #monti-landing .pocket-front {
    position: absolute;
    inset: 63% 13% 0;
    background: linear-gradient(135deg, #c5dcc8, #96bea2);
    clip-path: polygon(
      0 0, 50% 17%, 100% 0, 100% 55%, 97% 70%, 89% 81%,
      76% 91%, 50% 100%, 24% 91%, 11% 81%, 3% 70%, 0 55%
    );
  }

  #monti-landing .pocket-front::before {
    content: "";
    position: absolute;
    inset: 9% 5% auto;
    height: 26%;
    background: #46705a73;
    clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 12%, 50% 68%, 0 12%);
  }

  #monti-landing .wordmark {
    margin: 6px 0 0;
    padding-inline-end: .055em;
    font: 400 clamp(76px, 13.5vw, 104px)/.88 Georgia, "Times New Roman", serif;
    letter-spacing: -.075em;
  }

  #monti-landing .tagline {
    margin: 15px 0 0;
    color: var(--on-forest);
    font-size: 16px;
    font-weight: 650;
  }

  #monti-landing .intro { margin: 31px auto 0; }

  #monti-landing .intro h2 {
    max-width: 585px;
    margin: 0 auto;
    font-size: clamp(29px, 5.7vw, 42px);
    font-weight: 650;
    letter-spacing: -.041em;
    line-height: 1.1;
    text-wrap: balance;
  }

  #monti-landing .intro p {
    max-width: 525px;
    margin: 13px auto 0;
    color: var(--on-forest);
    text-wrap: pretty;
  }

  #monti-landing .intro strong { color: var(--ivory); font-weight: 700; }

  #monti-landing .entry-area { max-width: 626px; margin: 28px auto 0; }

  #monti-landing .paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  #monti-landing .path,
  #monti-landing .entry {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--pine);
  }

  #monti-landing .path {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 135px;
    text-align: left;
    font: inherit;
  }

  #monti-landing .path:hover,
  #monti-landing .path[aria-expanded="true"] { background: var(--selected); }

  #monti-landing .path[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--pine); }
  #monti-landing .path strong { font-size: 17px; font-weight: 700; }
  #monti-landing .path span { color: var(--muted); font-size: 15px; line-height: 1.45; }
  #monti-landing .entry { margin-top: 13px; }
  #monti-landing .entry[hidden] { display: none; }
  #monti-landing .entry label { display: block; font-size: 15px; font-weight: 650; }

  #monti-landing .entry textarea {
    display: block;
    width: 100%;
    min-height: 102px;
    margin-top: 8px;
    padding: 10px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--pine);
    font: 400 16px/1.45 "DM Sans", system-ui, sans-serif;
  }

  #monti-landing .entry textarea::placeholder { color: var(--muted); }

  #monti-landing .appointment {
    padding: 33px var(--gutter) 41px;
    background: var(--paper);
  }

  #monti-landing .appointment-content, #monti-landing .stories-content { max-width: 626px; margin-inline: auto; }

  #monti-landing .appointment h2, #monti-landing .stories h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 30px);
    font-weight: 650;
    letter-spacing: -.036em;
    line-height: 1.16;
    text-wrap: balance;
  }

  #monti-landing .appointment p {
    margin: 12px 0 0;
    color: var(--muted);
    text-wrap: pretty;
  }


  @media (max-width: 535px) {
    #monti-landing .hero { padding-bottom: 31px; }
    #monti-landing .intro { margin-top: 27px; }
    #monti-landing .entry-area { margin-top: 22px; }
    #monti-landing .paths { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    #monti-landing .path { min-height: 0; padding: 13px; }
    #monti-landing .appointment { padding-block: 27px 34px; }
  }

  #monti-landing .stories {
    padding: 36px var(--gutter) 45px;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  #monti-landing .story-source {
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 14px;
  }

  #monti-landing .story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  #monti-landing .story {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
  }

  #monti-landing .story h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }

  #monti-landing .story blockquote {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.56;
    text-wrap: pretty;
  }
@media (max-width: 535px) {
    #monti-landing .stories { padding-block: 30px 35px; }
    #monti-landing .story-grid { grid-template-columns: minmax(0, 1fr); }
    #monti-landing .story { padding: 15px; }
}
