/*
 * App-consistent product previews for the marketing site.
 * Values mirror the current web app: neutral surfaces, 10px control radius,
 * 14px content type / 12px meta, brand orange reserved for the AI entry.
 * Scope: .app-preview. Marketing chrome stays in site-v7.css.
 */
.app-preview {
  --ap-ink: #1c1c1a;
  --ap-muted: #6f6f6a;
  --ap-faint: #73736d;
  --ap-line: #e8e6e0;
  --ap-line-soft: #f0eee9;
  --ap-panel: #ffffff;
  --ap-soft: #f4f2ec;
  --ap-soft-2: #faf9f6;
  --ap-accent: #ff4500;
  --ap-red: #b4432f;
  --ap-blue: #dfeafb;
  --ap-blue-ink: #33506f;
  --ap-purple: #e8e1f6;
  --ap-purple-ink: #4f4270;
  --ap-green: #e1efe2;
  --ap-green-ink: #35533a;
  --ap-yellow: #f6edd3;
  --ap-yellow-ink: #6a5726;
  --ap-radius: 10px;
  --ap-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ap-hand:
    "HanziPen SC", "Hannotate SC", "Kaiti SC", STKaiti, KaiTi, "Songti SC",
    cursive;
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1010px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 14px;
  background: var(--ap-panel);
  color: var(--ap-ink);
  font-family: var(--ap-font);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 24px 70px #172a2340;
  isolation: isolate;
}
.app-preview *,
.app-preview *::before,
.app-preview *::after {
  box-sizing: border-box;
}
.app-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.app-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sidebar */
.app-sidebar {
  width: 21.5%;
  min-width: 190px;
  flex: none;
  padding: 14px 12px 18px;
  background: var(--ap-soft-2);
  border-right: 1px solid var(--ap-line-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.app-sidebar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 6px;
}
.app-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: #dfe7e2;
  color: #3f5149;
  font-size: 10px;
  font-weight: 600;
}
.app-search {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--ap-faint);
  font-size: 11px;
}
.app-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.app-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 7px;
  color: #464641;
  font-size: 12.5px;
}
.app-nav-item .app-icon {
  width: 15px;
  height: 15px;
  color: var(--ap-muted);
}
.app-nav-item.is-active {
  background: #ebe8e1;
  color: var(--ap-ink);
  font-weight: 600;
}
.app-nav-item.is-active .app-icon {
  color: var(--ap-ink);
}
.app-nav-sep {
  height: 1px;
  margin: 9px 8px;
  background: var(--ap-line);
}
.app-nav-caption {
  padding: 0 8px;
  color: var(--ap-faint);
  font-size: 10.5px;
}

/* Main column */
.app-main {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 12px 22px 22px;
  background: var(--ap-panel);
}
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-height: 30px;
}
.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}
.app-chip-alert {
  color: #a2473a;
  background: #f7e8e3;
}
.app-chip-ai {
  color: #3b3b36;
  background: var(--ap-soft);
}
.app-chip-ai .app-icon {
  width: 12px;
  height: 12px;
  color: var(--ap-accent);
}
.app-icon-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--ap-muted);
}
.app-icon-btn .app-icon {
  width: 15px;
  height: 15px;
}

/* Today header */
.app-today {
  display: grid;
  grid-template-columns: 22% minmax(0, 1fr) 24%;
  align-items: start;
  gap: 0;
  padding: 12px 0 16px;
}
.app-date {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.app-date-num {
  font-size: 52px;
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.app-date-meta {
  padding-top: 4px;
  color: var(--ap-muted);
  font-size: 11.5px;
  line-height: 1.55;
}
.app-date-meta strong {
  display: block;
  color: var(--ap-ink);
  font-weight: 600;
}
.app-coach-note {
  max-width: 340px;
  margin-left: 6%;
  padding: 10px 12px;
  border-radius: var(--ap-radius);
  background: #f6f3ec;
  color: #4c4a43;
  font-size: 12px;
  line-height: 1.7;
}
.app-coach-note p {
  margin: 0;
}
.app-coach-note strong {
  color: var(--ap-ink);
  font-weight: 600;
}

/* Document / tasks */
.app-doc {
  width: 47%;
  min-width: 300px;
  margin-left: 20%;
}
.app-group {
  padding: 0 0 14px;
}
.app-group h3 {
  margin: 0 0 4px;
  color: var(--ap-faint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.app-task {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 4px;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.55;
}
.app-task + .app-task {
  border-top: 1px solid var(--ap-line-soft);
}
.app-check {
  position: relative;
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  border: 1.4px solid #b9b7b0;
  border-radius: 50%;
}
.app-check.is-done {
  border-color: #8e8b83;
  background: #8e8b83;
}
.app-check.is-done::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2.5px;
  width: 4px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.4px 1.4px 0;
  transform: rotate(42deg);
}
.app-task-title {
  min-width: 0;
  color: var(--ap-ink);
}
.app-task.is-done .app-task-title {
  color: var(--ap-faint);
}
.app-task-meta {
  margin-left: auto;
  padding-left: 8px;
  color: var(--ap-faint);
  font-size: 11px;
  white-space: nowrap;
}
.app-task-sub {
  flex-basis: 100%;
  margin: 2px 0 0 24px;
  color: var(--ap-muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.app-task > .app-task-sub {
  padding-left: 0;
}

/* Handwritten annotations */
.app-annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.app-note {
  position: absolute;
  width: 160px;
  color: #2f2d29;
  font-family: var(--ap-hand);
  font-size: 14.5px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: rotate(var(--note-rotate, -1deg)) translateY(9px);
  transition:
    opacity 620ms ease 160ms,
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1) 160ms;
}
.app-note p {
  margin: 0;
}
.app-note--a {
  left: 21.5%;
  top: 39%;
  --note-rotate: -1.4deg;
}
.app-note--b {
  right: 2.5%;
  top: 50%;
  width: 165px;
  --note-rotate: 1.1deg;
}
.app-note--c {
  left: 20%;
  bottom: 7%;
  --note-rotate: -0.7deg;
}
.app-arrow {
  display: block;
  width: 100%;
  height: 52px;
  margin-bottom: 2px;
  overflow: visible;
  fill: none;
  stroke: var(--ap-red);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-arrow path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 900ms cubic-bezier(0.33, 1, 0.68, 1);
}
.app-note--b .app-arrow {
  height: 74px;
  transform: scaleY(-1);
}
.app-note--c .app-arrow {
  height: 66px;
  margin-bottom: 0;
  transform: scaleY(-1);
}
.app-note.is-drawn {
  opacity: 1;
  transform: rotate(var(--note-rotate, -1deg)) translateY(0);
}
.app-note.is-drawn .app-arrow path {
  stroke-dashoffset: 0;
}
.app-hl {
  background: linear-gradient(transparent 58%, #f3dfa2 58%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 700ms ease 260ms;
}
.app-preview.is-drawn .app-hl {
  background-size: 100% 100%;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .app-note,
  .app-note.is-drawn {
    opacity: 1;
    transform: rotate(var(--note-rotate, -1deg));
    transition: none;
  }
  .app-arrow path,
  .app-note.is-drawn .app-arrow path {
    stroke-dashoffset: 0;
    transition: none;
  }
  .app-hl,
  .app-preview.is-drawn .app-hl {
    background-size: 100% 100%;
    transition: none;
  }
}

/* Narrow screens: drop the sidebar, keep the document readable. */
@media (max-width: 1080px) {
  .app-preview {
    display: block;
    border-radius: 12px;
  }
  .app-sidebar {
    display: none;
  }
  .app-main {
    padding: 10px 16px 14px;
  }
  .app-today {
    grid-template-columns: 1fr;
    padding: 8px 0 12px;
  }
  .app-date-num {
    font-size: 44px;
  }
  .app-coach-note {
    margin: 10px 0 0;
    max-width: none;
  }
  .app-doc {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
  .app-annotations {
    position: static;
    display: grid;
    gap: 8px;
    padding: 10px 16px 16px;
    border-top: 1px solid var(--ap-line-soft);
    background: #fbfaf7;
  }
  .app-note,
  .app-note.is-drawn {
    position: static;
    width: auto;
    padding-left: 12px;
    border-left: 2px solid #e2d8c6;
    font-size: 14px;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .app-arrow {
    display: none;
  }
}

/* The third note points down to the evening task: note first, arrow below. */
.app-note--c {
  bottom: 10%;
  display: flex;
  flex-direction: column;
}
.app-note--c p {
  order: 1;
}
.app-note--c .app-arrow {
  order: 2;
  width: 170px;
  margin: 2px 0 0 12px;
}
.app-note--a .app-arrow {
  width: 196px;
  margin-left: 8px;
}
.app-note--b .app-arrow {
  width: 248px;
  margin-left: -88px;
}

/* Today dashboard: four app cards, matching /today's grid rather than a document column. */
.app-preview {
  max-width: 1100px;
}
.app-main-dash {
  padding: 8px 18px 18px;
}
.app-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.app-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 16px 20px 18px;
  border: 1px solid #e9e7e1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 40px -10px #0000000f;
}
.app-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 10px;
}
.app-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.app-count {
  color: var(--ap-faint);
  font-size: 11px;
}
.app-icon-btn-sm {
  width: 24px;
  height: 24px;
  margin-left: auto;
}
.app-icon-btn-sm .app-icon {
  width: 14px;
  height: 14px;
}
.app-month-chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f2f0ea;
  color: #6f6f6a;
  font-size: 11px;
  font-weight: 600;
}
.app-date-big {
  margin-top: 4px;
  font-size: 72px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}
.app-date-week {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
}
.app-date-week span {
  margin-left: 6px;
  color: var(--ap-accent);
  font-size: 11px;
  font-weight: 600;
}
.app-date-rule {
  height: 1px;
  margin: 14px 0 12px;
  background: var(--ap-line-soft);
}
.app-date-line {
  margin: 0;
  color: var(--ap-muted);
  font-size: 12px;
  line-height: 1.7;
}
.app-task-group h4 {
  margin: 8px 0 2px;
  color: var(--ap-faint);
  font-size: 10.5px;
  font-weight: 500;
}
.app-card-tasks .app-task {
  padding: 6px 0;
  font-size: 13px;
}
.app-card-tasks .app-task + .app-task {
  border-top: 1px solid #f2f1ee;
}
.app-card-tasks .app-task-sub {
  margin-top: 1px;
  font-size: 11px;
}
.app-journal {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
}
.app-journal strong {
  font-weight: 600;
}
.app-journal-meta {
  margin: 10px 0 0;
  color: var(--ap-faint);
  font-size: 11px;
}
.app-journal-quote {
  margin-top: auto;
  padding: 10px 0 0 11px;
  border-left: 2px solid #e6dfd0;
  color: #5d5c56;
  font-size: 12px;
  line-height: 1.7;
}
.app-month-view {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f2f0ea;
  color: #6f6f6a;
  font-size: 10.5px;
}
.app-month-week,
.app-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}
.app-month-week span {
  padding: 3px 0 5px;
  color: var(--ap-faint);
  font-size: 10px;
}
.app-month-grid span {
  padding: 5px 0;
  border-radius: 6px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.app-month-grid .is-muted {
  color: #c4c2bb;
}
.app-month-grid .is-today {
  background: #23231f;
  color: #fff;
  font-weight: 600;
}
.app-month-events {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
  color: #5f5f5a;
  font-size: 11px;
}
.app-ev {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 2px;
}
.app-ev-blue {
  background: #9dbbdf;
}
.app-ev-green {
  background: #a9c4a6;
}

/* Notes sit over the card edge, like the approved annotated screenshots. */
.app-note--a {
  left: auto;
  right: 4%;
  top: 13%;
}
.app-note--b {
  left: auto;
  right: 2.5%;
  top: 54%;
}
@media (max-width: 1080px) {
  .app-dashboard {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .app-card {
    min-height: 0;
    border-radius: 18px;
  }
  .app-date-big {
    font-size: 58px;
  }
}

/* In-card task meta stays left, so the handwritten note keeps the right edge clear. */
.app-card-tasks .app-task-meta {
  margin-left: 8px;
  padding-left: 0;
}

/* Calendar week view, rendered as markup so it matches the app instead of a screenshot. */
.calendar-clean {
  padding: 28px;
  border-radius: 14px;
  background: #edf2f3;
}
.calendar-app {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.app-calendar-view {
  max-width: 1100px;
}
.app-main-cal {
  padding: 10px 18px 8px;
  zoom: 0.9;
  min-width: 0;
}
.app-cal-top > .app-seg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.app-cal-top .app-cal-title {
  flex-direction: column;
  gap: 0;
  max-width: calc(50% - 60px);
  white-space: nowrap;
}
.app-cal-top .app-cal-title strong {
  font-size: 14px;
}
.app-cal-lists {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-right: 6px;
}
.app-cal-lists .app-ev {
  margin: 0;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  border: 1.5px solid #fff;
}
.app-cal-lists .app-ev + .app-ev {
  margin-left: -4px;
}
.app-ev-yellow {
  background: #c4a46a;
}
.app-ev-purple {
  background: #b8a1d8;
}
.app-cal-more {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 5px;
}
.app-cal-more i {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: currentColor;
}
.app-cal-date-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 2px;
  border-radius: 7px;
  background: #fafaf9;
}
.app-month-item {
  display: block;
  margin-top: 3px;
  padding: 1px 4px;
  font-size: 10px;
  line-height: 14px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-month-item {
  --month-color: #dfeafb;
}
.app-month-item.ev-green {
  --month-color: #e1efe2;
}
.app-month-item.ev-purple {
  --month-color: #e8e1f6;
}
.app-month-item.ev-yellow {
  --month-color: #f6edd3;
}
.app-month-item.ev-gray {
  --month-color: #e9e8e4;
}
.app-month-item.is-done {
  background: color-mix(in srgb, var(--month-color) 55%, transparent);
  color: #6b7280;
  opacity: 0.6;
}
.app-month-item[hidden],
.app-month-more[hidden] {
  display: none;
}
.app-month-more {
  position: absolute;
  right: 2px;
  top: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 3px;
  border-radius: 3px;
  background: #f2f1eb;
  color: #6f6f6a;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}
.app-month-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: default;
}
.app-month-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-month-item.has-more .app-month-title {
  padding-right: 23px;
}
.app-month-check {
  appearance: none;
  flex: none;
  display: none;
  place-items: center;
  width: 10px;
  height: 10px;
  margin: 0;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}
.app-month-check:checked::after {
  content: "";
  width: 4.5px;
  height: 2.5px;
  margin-top: -1px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
}
.app-month-check:focus-visible {
  outline: 2px solid var(--ap-accent);
  outline-offset: 2px;
}
.app-month-item.is-done .app-month-title {
  text-decoration: line-through;
  text-decoration-color: #6b7280b3;
}
.home-bridge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px 40px;
  margin-top: 52px;
  padding: 34px 24px;
  color: var(--muted);
  font-size: 17px;
}
.home-bridge > span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.home-bridge svg {
  width: 25px;
  height: 25px;
  flex: none;
}
.home-section.calendar-section {
  padding-top: 64px;
}
@media (max-width: 760px) {
  .app-cal-top .app-cal-title strong {
    font-size: 12px;
  }
  .app-cal-top .app-cal-title span {
    display: none;
  }
  .app-cal-top .app-cal-lists {
    display: none;
  }
  .app-cal-top .app-cal-actions {
    gap: 0;
  }
  .app-cal-top .app-cal-nav {
    width: 18px;
  }
  .app-cal-top .app-chip {
    padding-inline: 4px;
  }
  .app-calendar-view .app-cal-top {
    min-height: 74px;
    align-items: flex-start;
    padding-top: 4px;
  }
  .app-cal-top > .app-seg {
    top: 38px;
  }
  .app-cal-top .app-cal-title {
    max-width: none;
  }
  .home-bridge {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 32px;
    padding: 24px 4px;
    gap: 22px 4px;
    font-size: 13px;
    justify-items: stretch;
  }
  .home-bridge > span {
    grid-column: span 2;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    white-space: nowrap;
    text-align: center;
    font-size: clamp(11px, 2.8vw, 13px);
  }
  .home-bridge > span:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .home-bridge > span:nth-child(5) {
    grid-column: 4 / span 2;
  }
  .home-bridge svg {
    width: 22px;
    height: 22px;
  }
  .home-section.calendar-section {
    padding-top: 40px;
  }
}
.app-cal-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}
.app-cal-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.app-cal-title strong {
  font-size: 16px;
  font-weight: 600;
}
.app-cal-title span {
  color: var(--ap-faint);
  font-size: 11px;
}
.app-cal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--ap-soft);
}
.app-seg b {
  padding: 4px 9px;
  border-radius: 6px;
  color: var(--ap-muted);
  font-size: 10.5px;
  font-weight: 500;
}
.app-seg b.is-on {
  background: #fff;
  color: var(--ap-ink);
  box-shadow: 0 1px 2px #0000001a;
}
.app-cal-nav {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--ap-muted);
  font-size: 15px;
}
.app-cal-head {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(0, 1fr));
  align-items: center;
  min-height: 42px;
  margin-top: 6px;
  border-bottom: 1px solid var(--ap-line-soft);
  color: var(--ap-muted);
  font-size: 10.5px;
  text-align: center;
}
.app-cal-head span b {
  display: block;
  margin-top: 1px;
  color: var(--ap-ink);
  font-size: 11px;
  font-weight: 600;
}
.app-cal-head .is-today {
  color: var(--ap-ink);
}
.app-cal-head .is-today b {
  color: var(--ap-accent);
}
.app-cal-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  height: 624px;
}
.app-cal-hours {
  display: flex;
  flex-direction: column;
  padding-top: 0;
  color: var(--ap-faint);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}
.app-cal-hours span {
  flex-shrink: 0;
  height: 52px;
  padding-right: 7px;
  text-align: right;
  transform: translateY(-4px);
}
.app-cal-hours span:last-child {
  height: 0;
}
.app-cal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  height: 624px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 51px,
    #f1f0ec 51px 52px
  );
  border-top: 1px solid #f1f0ec;
}
.app-cal-col {
  position: relative;
  min-width: 0;
  border-left: 1px solid #f1f0ec;
}
.app-cal-col:last-child {
  border-right: 1px solid #f1f0ec;
}
.app-cal-event {
  /* Leave a visible gap before the next scheduled item without moving its start. */
  clip-path: inset(0 0 4px round 5px);
  box-sizing: border-box;
  position: absolute;
  left: 2px;
  right: 2px;
  overflow: hidden;
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.35;
}
.app-cal-event.is-done {
  background: #f1f0ec;
  color: #a3a09a;
}
.app-cal-event.is-done strong {
  text-decoration: line-through;
}
.app-cal-event strong {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-cal-event span {
  display: block;
  font-size: 9px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}
.ev-blue {
  background: #dfeafb;
  color: #33506f;
}
.ev-purple {
  background: #e8e1f6;
  color: #4f4270;
}
.ev-green {
  background: #e1efe2;
  color: #35533a;
}
.ev-yellow {
  background: #f6edd3;
  color: #6a5726;
}
.ev-gray {
  background: #e9e8e4;
  color: #55554f;
}
.app-cal-event.ev-suggested {
  border: 1px dashed #6f8f6a;
  background: #ecf4ea;
}
.app-cal-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.app-calendar-view .app-note {
  width: 148px;
  font-size: 13.5px;
  line-height: 1.7;
}
.app-note--cal-a {
  left: 26%;
  top: 17%;
  --note-rotate: -1.2deg;
}
.app-note--cal-b {
  left: 49%;
  top: 28%;
  --note-rotate: 1deg;
}
.app-note--cal-c {
  left: 70%;
  top: 46%;
  --note-rotate: -0.8deg;
}
.app-calendar-view .app-arrow {
  height: 44px;
}
@media (max-width: 1080px) {
  .calendar-clean {
    padding: 12px;
  }
  .app-calendar-view .app-sidebar {
    display: none;
  }
  .app-cal-top {
    flex-wrap: wrap;
    min-height: 0;
    padding-bottom: 6px;
  }
  .app-cal-actions {
    flex-wrap: wrap;
  }
  .app-cal-head {
    grid-template-columns: 34px repeat(7, minmax(0, 1fr));
    font-size: 9px;
  }
  .app-cal-head span b {
    font-size: 10px;
  }
  .app-cal-body {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .app-calendar-view .app-note {
    position: static;
    width: auto;
    margin-top: 8px;
    padding-left: 10px;
    border-left: 2px solid #e2d8c6;
  }
  .app-cal-notes {
    position: static;
    display: grid;
    gap: 8px;
    padding: 10px 4px 0;
  }
  .app-calendar-view .app-arrow {
    display: none;
  }
}

/* Document hero: a little more air so the preview reads as a full page, not a strip. */
.app-doc .app-task {
  padding: 9px 4px;
}
.app-doc .app-group {
  padding-bottom: 16px;
}
.app-doc .app-task-sub {
  margin-top: 3px;
}
.app-today {
  padding: 16px 0 20px;
}

/* Calendar chapter: calendar left, copy right, no repeated sidebar. */
.calendar-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 48px;
  align-items: center;
}
.calendar-visual {
  min-width: 0;
}
.calendar-visual .app-calendar-view {
  max-width: none;
}
.calendar-copy h2 {
  margin: 14px 0 0;
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 550;
  line-height: 1.4;
  letter-spacing: -0.035em;
}
.calendar-copy > p:not(.home-kicker) {
  margin: 18px 0 0;
  color: var(--ap-muted);
  font-size: 15px;
  line-height: 1.85;
}
/* Reuse the coach chapter's vertical tabs, with colors for the white section. */
.calendar-view-tabs {
  --ai-text: var(--ink);
  --ai-muted: var(--muted);
  --ai-rule: var(--line);
  --ai-highlight: var(--accent);
}
.calendar-view-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* View switch */
.app-seg button {
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ap-muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.app-seg button[aria-selected="true"] {
  background: #fff;
  color: var(--ap-ink);
  box-shadow: 0 1px 2px #0000001a;
}
.app-cal-panel {
  position: relative;
  height: 672px;
}
.app-cal-panel[hidden] {
  display: none;
}
.app-calendar-view .app-cal-notes {
  z-index: 2;
}

/* Month view */
.app-month-head {
  min-height: 42px;
  align-items: center;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 6px;
  border-bottom: 1px solid var(--ap-line-soft);
}
.app-month-head span {
  padding: 8px 0;
  color: var(--ap-faint);
  font-size: 10px;
  text-align: center;
}
.app-month-body {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  height: 624px;
  border-left: 1px solid #f1f0ec;
}
.app-month-cell {
  position: relative;
  padding: 6px 4px 3px;
  border-right: 1px solid #f1f0ec;
  border-bottom: 1px solid #f1f0ec;
  color: var(--ap-muted);
  font-size: 10px;
  line-height: 1.4;
  overflow: hidden;
}
.app-month-cell b {
  display: block;
  margin-bottom: 5px;
  color: var(--ap-ink);
  font-size: 12px;
  font-weight: 500;
}
.app-month-cell.is-muted b {
  color: #c4c2bb;
}
.app-month-cell.is-today {
  background: #fbfaf7;
}
.app-month-cell.is-today b {
  position: relative;
  isolation: isolate;
  width: 17px;
  text-align: center;
  color: #fff;
}
.app-month-cell.is-today b::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 21px;
  height: 21px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #23231f;
}
.app-month-cell .app-ev {
  margin-right: 3px;
}

/* Day view */
.app-day-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 230px;
  align-items: center;
  min-height: 42px;
  margin-top: 6px;
  border-bottom: 1px solid var(--ap-line-soft);
  color: var(--ap-muted);
  font-size: 10.5px;
  text-align: center;
}
.app-day-head b {
  color: var(--ap-ink);
  font-size: 11px;
}
.app-day-head span:last-child {
  text-align: left;
  padding-left: 18px;
}
.app-day-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 230px;
  height: 624px;
}
.app-day-col {
  position: relative;
  height: 624px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 51px,
    #f1f0ec 51px 52px
  );
  border-left: 1px solid #f1f0ec;
  border-right: 1px solid #f1f0ec;
}
.app-day-tasks {
  padding: 12px 0 0 18px;
}
.app-day-tasks .ai-ui-label {
  margin-bottom: 10px;
}
.app-day-tasks .app-task {
  padding: 8px 0;
  font-size: 12.5px;
}
.app-day-tasks .app-task + .app-task {
  border-top: 1px solid #f2f1ee;
}
.app-note--cal-m {
  right: 3%;
  bottom: 5%;
  width: 170px;
}
.app-note--cal-d {
  left: 41%;
  top: 22%;
  width: 150px;
}
@media (max-width: 1080px) {
  .calendar-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .calendar-copy {
    order: -1;
  }
}

/* Narrow screens: keep the calendar readable, one pane at a time. */
@media (max-width: 760px) {
  .app-day-head,
  .app-day-body {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .app-day-head span:last-child,
  .app-day-tasks {
    display: none;
  }
  .app-month-cell {
    padding: 4px;
    font-size: 9px;
  }
  .app-month-cell .app-ev {
    display: none;
  }
  .app-month-cell b {
    font-size: 10.5px;
  }
}

/* Today header: date and coach note align with the task column. */
.app-today {
  display: block;
  width: 47%;
  min-width: 300px;
  margin-left: 20%;
  padding: 10px 0 18px;
}
.app-date {
  gap: 12px;
}
.app-date-num {
  font-size: 64px;
  line-height: 0.82;
}
.app-date-meta {
  padding-top: 9px;
  font-size: 11.5px;
}
.app-date-meta strong {
  font-size: 13px;
}
.app-date-week {
  display: block;
  margin-top: 2px;
  color: var(--ap-muted);
  font-size: 11.5px;
}
.app-hl-inline {
  padding: 0 1px;
  background: linear-gradient(transparent 55%, #f3dfa2 55%);
  color: inherit;
}
.app-coach-note {
  max-width: none;
  margin: 16px 0 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: #3f3d37;
  font-family: var(--ap-hand);
  font-size: 16px;
  line-height: 1.75;
}
.app-coach-note p {
  margin: 0;
}

/* Annotation targets: stay inside the main column, short arrows to the row. */
.app-note--a {
  left: 250px;
  top: 206px;
  width: 170px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
}
.app-note--a p {
  order: 1;
}
.app-note--a .app-arrow {
  order: 2;
  width: 56px;
  height: 38px;
  flex: none;
  margin-left: auto;
  transform: none;
}
.app-note--b {
  right: auto;
  left: 820px;
  top: 279px;
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
}
.app-note--b p {
  order: 1;
}
.app-note--b .app-arrow {
  order: 2;
  width: 120px;
  flex: none;
  margin-left: -120px;
}
.app-note--c {
  left: 250px;
  top: 446px;
  bottom: auto;
  width: 170px;
  font-size: 13.5px;
}
.app-note--c .app-arrow {
  width: 54px;
  height: 30px;
  flex: none;
  margin-left: auto;
  transform: none;
}

@media (max-width: 1080px) {
  .app-today {
    width: auto;
    min-width: 0;
    margin-left: 0;
  }
}

@media (max-width: 1080px) {
  .app-note--a,
  .app-note--b,
  .app-note--c {
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    display: block;
    width: auto;
    font-size: 14px;
  }
}

/* Sidebar top: search sits at the right edge as in the app, icon only. */
.app-sidebar-top .app-search {
  margin-left: auto;
  width: 24px;
  height: 24px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.app-sidebar-top .app-search:hover {
  background: #ecebe6;
}

/* App header: no tinted pills behind the status and AI hint. */
.app-topbar .app-chip {
  padding-inline: 2px;
  background: transparent;
}
.app-avatar svg {
  width: 17px;
  height: 17px;
}

/* Hero window keeps its height after the completed group was removed. */
.app-preview[data-app-today] {
  min-height: 792px;
}
@media (max-width: 900px) {
  .app-preview[data-app-today] {
    min-height: 0;
  }
}

/* Header hints share one quiet gray; no tinted pills, no overflow menu. */
.app-topbar .app-chip {
  color: #8b8982;
}
.app-topbar .app-chip-ai .app-icon {
  color: inherit;
}

/* Avatar with the account name beside it. */
.app-sidebar-top {
  gap: 7px;
}
.app-avatar {
  overflow: hidden;
  background: #e7eeea;
}
.app-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-avatar-name {
  color: var(--ap-ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
