/* projects.css — Projects inside Meetings (Randy 2026-10-04): the project
 * page (js/views/meetings/project.js + project-ai.js) and its sheets
 * (project-sheets.js). 2.0 tokens only, the Meetings accent through
 * --accent*, relative sizing. The library's Projects list lives in
 * meetings.css; the inset slider in shell.css. Reuses: .v2-dsec /
 * .v2-dlabel / .v2-dgist / .v2-dainote (the meeting's Gist look), .v2-trow
 * (the Tasks rows), .v2-dph-grid / .v2-dph-viewer (the meeting's photos),
 * .sharesheet + .v2-share (the 2.0 sheet). */

/* ---------- page head: title + subtitle on the page, above the pinned tabs */
.v2-proj__intro {
  padding: 2px var(--pad-x) 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.v2-proj__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 760;
  letter-spacing: -0.6px;
  line-height: 1.15;
  color: var(--t-primary);
  overflow-wrap: anywhere;
}
.v2-proj__sub {
  margin: 0;
  font-size: 0.86rem;
  color: var(--t-muted);
  font-variant-numeric: tabular-nums;
}
.v2-proj__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.v2-proj__quiet,
.v2-proj__count {
  margin: 4px 4px 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--t-muted);
}
.v2-proj__gone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--t-body);
}
.v2-proj__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font: inherit;
  font-weight: 640;
  text-decoration: none;
}
.v2-proj__sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v2-proj__label,
.v2-proj__glabel {
  margin: 0 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--t-label);
}
.v2-proj__glabel {
  text-transform: none;
  letter-spacing: -0.1px;
  font-size: 0.86rem;
  font-weight: 660;
  color: var(--t-primary);
}
.v2-proj__gmeta {
  font-weight: 500;
  color: var(--t-muted);
  font-size: 0.78rem;
}
.v2-proj__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* The first group's heading row carries the Reorder / Done toggle (item
 * 10b): the heading keeps its own line, the toggle sits at its far end. */
.v2-proj__ghead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.v2-proj__ghead > .v2-proj__glabel {
  flex: 1 1 auto;
  min-width: 0;
}
.v2-proj__ghead > .v2-reorder-toggle {
  margin-right: 4px;
}
.v2-proj__rows {
  padding: 2px 14px;
}
.v2-proj__rows .v2-trow + .v2-trow {
  border-top: 1px solid var(--strip-line);
}

/* ---------- task rows: the Tasks screen's row + its source line + a grip */
.v2-ptrow__src {
  display: block;
  color: var(--t-muted);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-ptrow__grip {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: -8px;
  color: var(--t-chevron);
  touch-action: none;
  cursor: grab;
}

/* ---------- buttons: the sheet buttons' recipes (accent + glow / raised) */
.v2-pbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 2.6rem;
  padding: 0 1.1rem;
  border-radius: var(--r2-round);
  background: var(--s-card);
  border: 1px solid var(--raised-line);
  box-shadow: var(--sh-raised);
  color: var(--t-primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}
.v2-pbtn--primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: 0 0 12px var(--accent-glow), inset 0 1px 0 var(--glow-inset);
}
.v2-pbtn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---------- Overview: the brief */
.v2-pbrief {
  margin: 0;
}
.v2-pbrief__note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--t-muted);
}
.v2-pbrief__omit {
  margin: 0 4px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--t-muted);
}
/* The brief card (Randy's approved redesign, 2026-10-07): one restrained
 * card — a hairline, no shadow, no condensed display face. Sparkle + muted
 * header, title, one paragraph, then the key points under a hairline (no
 * block at all when none).
 * Batch 3 §8 (Randy 2026-10-08, option A — neutral, no pink): the card sat
 * in --s-panel ON the project's --s-panel page, so it never stood out. Now
 * --s-brief: one ramp step off the panel — light one step DARKER (the
 * well), dark one step LIGHTER (the card) — with its hairline --brief-line,
 * which the divider above the key points uses too (css/tokens.css). */
.v2-pbcard {
  margin: 0;
  padding: 16px;
  border-radius: var(--r2-card);
  border: 0.5px solid var(--brief-line);
  background: var(--s-brief);
  overflow-wrap: anywhere;
}
.v2-pbcard__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--brief-head); /* AA in both themes (batch 4 §3a) */
}
.v2-pbcard__head > svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.v2-pbcard__title {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--t-primary);
}
/* The paragraph reads in the same primary text color as the bullets, both
 * themes (Randy 2026-10-08, 10a: --t-muted was too faint, worst in dark). */
.v2-pbcard__para {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--t-primary);
}
.v2-pbcard__bullets {
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 0.5px solid var(--brief-line); /* the card's own hairline (batch 3 §8) */
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-pbcard__bullet {
  position: relative;
  padding-left: 13px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--t-primary);
}
.v2-pbcard__bullet::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.7em - 2.5px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
/* The subtle "out of date" hint. */
.v2-pstale {
  margin: 0 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--t-muted);
}
.v2-pstale svg {
  flex: none;
}

/* ---------- Tasks: suggested order */
.v2-porder__banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: var(--r2-card);
  background: var(--accent-glass-tint);
  border: 1px solid var(--accent-glass-line);
  color: var(--accent-ink);
  font-size: 0.86rem;
  font-weight: 600;
}
.v2-porder__banner > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.v2-porder__banner svg {
  flex: none;
}
.v2-porder__resuggest {
  flex: none;
  padding: 6px 12px;
  border-radius: var(--r2-round);
  background: var(--s-card);
  border: 1px solid var(--raised-line);
  box-shadow: var(--sh-raised);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.v2-porder__resuggest:disabled {
  opacity: 0.55;
}

/* ---------- Meetings tab: library-style cards that can be unlinked */
.v2-pmeets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v2-pmeet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 14px 14px;
}
/* The whole card opens the meeting; the remove button sits above the link. */
.v2-pmeet__link {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  -webkit-tap-highlight-color: transparent;
}
.v2-pmeet__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.v2-pmeet__status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-ink);
}
/* Item 27: the meeting's length on the right of the top row. */
.v2-pmeet__dur {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--t-label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.v2-pmeet__dur + .v2-pmeet__remove {
  margin-left: 0;
}
.v2-pmeet__remove {
  position: relative;
  z-index: 1;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: -6px;
  border: 0;
  border-radius: var(--r2-round);
  background: none;
  color: var(--t-chevron);
  cursor: pointer;
}
.v2-pmeet__title {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 680;
  letter-spacing: -0.3px;
  line-height: 1.25;
  color: var(--t-primary);
}
.v2-pmeet__meta,
.v2-pmeet__tasks {
  margin: 0;
  font-size: 0.82rem;
  color: var(--t-muted);
  font-variant-numeric: tabular-nums;
}
/* The dashed "+ Add meetings" (and the sheets' "+ New project" row). */
.v2-padd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 3rem;
  border-radius: var(--r2-card);
  background: transparent;
  border: 1px dashed var(--accent-tint-line);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 640;
  cursor: pointer;
}

/* ---------- Photos tab: the source meeting under each tile */
.v2-pphoto__src {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- the meeting header's project pill (item 22): the tag pill's
 * style + a folder glyph, before the tag. */
.v2-dtag.v2-dproj {
  gap: 5px;
  text-decoration: none;
}
.v2-dtag.v2-dproj svg {
  flex: none;
}

/* ---------- the header pill's projects bubble (item 11, 2026-10-06 second
 * batch — project-sheets.js openMeetingProjectsBubble): bubble.js's content
 * mode wearing its own menu rows edge to edge; the list scrolls when long,
 * the bottom row (Edit projects / Cancel · Save) stays put under it. */
.v2-bubble.v2-pbub-host .v2-bubble__body {
  max-width: min(20rem, calc(100vw - 16px));
  padding: 0;
}
.v2-pbub-host .v2-bubble__text {
  font-size: inherit;
  line-height: normal;
  color: var(--t-primary);
}
.v2-pbub__list {
  max-height: min(50vh, 22rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.v2-pbub .v2-bubble__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-pbub__foot {
  display: flex;
  border-top: 1px solid var(--strip-line);
}
.v2-pbub__btn {
  flex: 1 1 0;
  min-height: var(--hit-min);
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--t-primary);
  font: inherit;
  font-size: var(--pop-size);
  font-weight: var(--pop-weight);
  letter-spacing: var(--pop-track);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v2-pbub__btn:active {
  background: var(--s-chip);
}
.v2-pbub__foot.is-split .v2-pbub__btn {
  text-align: center;
}
.v2-pbub__foot.is-split .v2-pbub__btn + .v2-pbub__btn {
  border-left: 1px solid var(--strip-line);
}
.v2-pbub__edit,
.v2-pbub__save {
  color: var(--accent-ink);
  font-weight: 650;
}
.v2-pbub__save:disabled {
  opacity: 0.6;
}

/* ---------- sheets (.sharesheet + .v2-share + .v2-psheet) */
.v2-psheet .v2-psheet__name {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  min-height: 2.9rem;
  padding: 0 14px;
  border-radius: var(--r2-well);
  background: var(--s-well);
  border: 1px solid var(--raised-line);
  box-shadow: var(--sh-well);
  color: var(--t-primary);
  font: inherit;
  font-size: 1rem;
}
.v2-psheet .v2-psheet__name::placeholder {
  color: var(--t-placeholder);
}
.v2-psheet__switch {
  margin: 14px 0 12px;
}
.v2-psheet__pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v2-psheet .v2-psheet__rows {
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.v2-psheet__newrow {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 0;
  background: none;
  box-shadow: inset 0 1px 0 var(--strip-line);
  color: var(--accent-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 620;
  cursor: pointer;
}
.v2-psheet__empty {
  margin: 12px 15px;
  font-size: 0.88rem;
  color: var(--t-muted);
}
.v2-psheet__note {
  margin: 12px 2px 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--t-muted);
}
.v2-psheet__search {
  flex: none;
}
/* ---------- full pages: New project, Add meetings (item 25, 2026-10-06)
 * Fixed over everything, FULL height and opaque (item 9, second batch): the
 * keyboard simply covers the bottom — the layer never ends on the keyboard,
 * which left the page behind showing wherever the keyboard isn't solid. The
 * body's bottom padding grows by the keyboard height (--kb-inset) so every
 * row above the keyboard scrolls into reach; the page behind is locked
 * (html.v2-ppage-open). The top row reuses the flow head (Cancel pill ·
 * action pill, pink / dimmed). */
.v2-ppage {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--s-page);
  animation: v2-ppage-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes v2-ppage-in {
  from {
    transform: translateY(1.5rem);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .v2-ppage {
    animation: none;
  }
}
html.v2-ppage-open,
html.v2-ppage-open body {
  overflow: hidden;
  overscroll-behavior: none;
}
.v2-ppage__scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.v2-ppage .v2-ppage__head {
  margin-top: 0;
}
.v2-ppage__cancel {
  padding: 0 16px;
}
.v2-ppage__body {
  display: flex;
  flex-direction: column;
  padding: 0.25rem var(--pad-x) calc(max(env(safe-area-inset-bottom, 0px), var(--kb-inset, 0px)) + 2rem);
}
.v2-ppage__title {
  margin: 0.5rem 0 1.25rem;
  font-size: 1.75rem;
}
.v2-ppage__sub {
  margin: -0.9rem 0 1.1rem;
  font-size: 0.95rem;
  color: var(--t-muted);
}
.v2-ppage__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--t-muted);
}
.v2-ppage .v2-psheet__name {
  margin-top: 0.5rem;
}
.v2-ppage .v2-psheet__switch {
  margin: 1.25rem 0 1rem;
}
.v2-ppage__line {
  margin-top: 0.25rem;
}
/* The page's lists: stacked rows, NO divider lines, comfortable spacing. */
.v2-ppage .v2-ppage__rows {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.v2-ppage .v2-ppage__rows .sharerow {
  min-height: 3.25rem;
  padding: 0 0.15rem;
  box-shadow: none;
}
.v2-ppage .v2-psheet__search {
  margin-bottom: 0.5rem;
}

/* Radio rows: the share sheet's checkbox, round, with a dot. */
.v2-share .sharerow.is-radio .sharerow__box {
  border-radius: var(--r2-round);
}

/* ---------- Automatic brief / order (Randy 2026-10-05) ----------
 * The inline progress line: a small ring spinning like the audio play
 * button's loader (shell.css .v2-player.is-loading), then the words. */
.v2-pwork {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.25rem 0 0.75rem;
  color: var(--t-muted);
  font-size: 14px;
  font-weight: 560;
}
.v2-pwork__ring {
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2.5px solid var(--accent-tint);
  border-top-color: var(--accent);
  animation: v2PlayerSpin 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .v2-pwork__ring {
    animation: none;
    border-color: var(--accent);
    border-style: dashed;
  }
}
.v2-pquiet {
  margin: 0.25rem 0 0.75rem;
}
.v2-pbrief .v2-pbrief__note {
  margin: 0.6rem 0 0;
}

/* ---------- Photos: grid | timeline (item 11, Randy 2026-10-05)
 * Timeline: days newest first; a vertical line with a dot per photo; each
 * row a square rounded thumbnail, the photo's title, "Meeting · time". */
.v2-pphotos__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.v2-pphotos__head .v2-proj__count {
  margin: 0;
}
.v2-ptl__day + .v2-ptl__day {
  margin-top: 18px;
}
.v2-ptl__label {
  margin: 8px 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--t-label);
}
.v2-ptl__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* the vertical line, through the dots' centres */
.v2-ptl__list::before {
  content: "";
  position: absolute;
  left: calc(0.375rem - 1px);
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  border-radius: 1px;
  background: var(--s-track);
}
.v2-ptl__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v2-ptl__dot {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--s-panel);
  z-index: 1;
}
.v2-ptl__row .v2-ptl__thumb {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  aspect-ratio: 1;
  border-radius: var(--r2-tile);
  overflow: hidden;
}
.v2-ptl__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.v2-ptl__title {
  font-size: 0.95rem;
  font-weight: 620;
  color: var(--t-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-ptl__meta {
  font-size: 0.78rem;
  color: var(--t-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
