/* Overview tab: what the project holds, how full it is, who is on it and what
   happened lately. */

.ov-shell {
  display: grid;
  gap: var(--panel-gap);
}

.ov-masthead { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); }
.ov-description { margin: 0; max-width: 70ch; color: var(--muted); font: italic var(--text-reading)/1.5 var(--serif); }
.ov-meta-row { display: flex; flex-wrap: wrap; gap: 6px 26px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-control); }
.ov-meta-row b { margin-right: 6px; color: var(--muted); font-size: var(--text-meta); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; }

.ov-ledger { display: flex; flex-wrap: wrap; border-block: 1px solid var(--line); }
.ov-stat { flex: 1 1 130px; display: grid; gap: 4px; padding: 14px 12px; border: 0; border-left: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; text-align: left; transition: background .12s; }
.ov-stat:first-child { border-left: 0; }
.ov-stat:hover { background: var(--paper); }
.ov-stat:hover .ov-stat-val { color: var(--blue); }
.ov-stat-val { font: 400 var(--text-stat)/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ov-stat-lbl { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: var(--text-meta); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--panel-gap); align-items: start; }
.ov-main, .ov-rail { min-width: 0; display: grid; gap: var(--panel-gap); }

.ov-card { min-width: 0; max-width: 100%; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); }
.ov-card-hd { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.ov-card-title { min-width: 0; }
.ov-jump { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: var(--text-control); }
.ov-jump:hover { text-decoration: underline; text-underline-offset: 2px; }
.ov-card-bd { min-width: 0; max-width: 100%; padding: 14px 14px 16px; }
.ov-empty { margin: 0; color: var(--muted); font-size: var(--text-body); }

/* Presentations card: same deck-thumbnail trick as the Presentations tab's
   own list (.pres-deck-thumb/.pres-thumb-page, from presentations.css). */
.ov-decks { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 4px; }
.ov-deck { position: relative; width: 108px; }
.ov-deck-open { width: 100%; display: grid; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.ov-deck-title { overflow: hidden; font-size: var(--text-control); text-overflow: ellipsis; white-space: nowrap; }
.ov-deck-unlink { position: absolute; top: 2px; right: 2px; opacity: 0; background: color-mix(in srgb, var(--paper-raised) 88%, transparent); transition: opacity .12s; }
.ov-deck:hover .ov-deck-unlink, .ov-deck-unlink:focus-visible { opacity: 1; }
.ov-deck-link { display: block; margin-top: 4px; }

/* Storage and composition bars */
.ov-bar { height: 5px; overflow: hidden; background: var(--line); }
.ov-bar span { display: block; height: 100%; background: var(--blue); }
.ov-bar.is-full span { background: var(--red); }
.ov-bar-note { margin: 9px 0 0; color: var(--muted); font-size: var(--text-label); font-variant-numeric: tabular-nums; }
.ov-storage-free { margin: 0; color: var(--muted); font-size: var(--text-control); }

.ov-comp { display: grid; gap: 8px; }
.ov-comp-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 28px; gap: 9px; align-items: center; }
.ov-comp-type { overflow: hidden; }
.ov-comp-type .type-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-comp-bar { height: 4px; overflow: hidden; background: var(--line); }
.ov-comp-bar span { display: block; height: 100%; border-right: 2px solid var(--blue); background: var(--blue-soft); }
.ov-comp-count { color: var(--muted); font-size: var(--text-label); font-variant-numeric: tabular-nums; text-align: right; }

/* Pulse: one bar per day for the last month */
.ov-pulse { height: 76px; display: flex; align-items: flex-end; gap: 3px; }
.ov-pulse-bar { min-height: 2px; height: var(--h); flex: 1; background: var(--blue); }
.ov-pulse-bar.is-idle { height: 2px; background: var(--line); }

.ov-people, .ov-activity { margin: 0; padding: 0; list-style: none; }
.ov-people li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ov-people li:last-child, .ov-activity li:last-child { border-bottom: 0; }
.ov-person { min-width: 0; overflow: hidden; font-size: var(--text-body); text-overflow: ellipsis; white-space: nowrap; }
.ov-role { color: var(--muted); font-size: var(--text-meta); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.ov-activity li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ov-act-summary { overflow: hidden; font-size: var(--text-control); text-overflow: ellipsis; white-space: nowrap; }
.ov-act-meta { color: var(--muted); font-size: var(--text-meta); }

.ov-notes { width: 100%; min-height: 190px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper-raised); color: var(--ink); font: var(--text-body)/1.6 var(--sans); resize: vertical; }
.ov-notes:focus { border-color: var(--blue); outline: 0; }
.ov-notes-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.ov-notes-status { color: var(--green); font-size: var(--text-label); letter-spacing: .04em; }

/* Title, inline fields and project actions */
.ov-title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; }
.ov-title { min-width: 0; margin: 0; overflow-wrap: anywhere; font: var(--font-page-title); letter-spacing: -.03em; }
.ov-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-actions .button { min-height: 32px; font-size: var(--text-control); }

.ov-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px 24px; }
.ov-fields .ov-field:first-child { grid-column: 1 / -1; }
.ov-field { display: grid; gap: 4px; }
.ov-field-label { color: var(--muted); font-size: var(--text-meta); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.ov-field-value { font-size: var(--text-body); }
/* Same contract as .field input in base.css — a visible resting border, not
   just a hover reveal, so an empty/unedited field still reads as editable. */
.ov-inline { width: 100%; padding: 7px 0; border: 0; border-bottom: 1px solid var(--muted-line); border-radius: 0; background: transparent; color: var(--ink); font: var(--text-body)/1.5 var(--sans); resize: vertical; transition: border-color .12s; }
.ov-inline:hover { border-color: var(--line); }
.ov-inline:focus { border-color: var(--blue); outline: 0; background: transparent; }
.ov-inline::placeholder { color: var(--muted-line); }

/* Notes read as markdown until the edit button is pressed */
.ov-notes-view { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.ov-notes-view pre { max-width: 100%; }
.ov-notes-view table { display: block; max-width: 100%; overflow-x: auto; }
.ov-notes-tools { display: flex; gap: 12px; }
.ov-title-input { flex: 1; min-width: 240px; max-width: 100%; padding: 2px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; outline: 0; background: transparent; color: var(--ink); }
.ov-title-input:hover { border-color: var(--line); }
.ov-title-input:focus { border-color: var(--blue); background: transparent; }

@media (max-width: 900px) {
  .ov-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .ov-masthead { padding: 17px 14px; }

  /* Four stats on a flex row with flex-basis 130px wrap two-and-two, but the
     left divider stays on the third, so the second row reads as if it were
     indented. An explicit two-column grid draws the dividers where the cells
     actually are. */
  .ov-ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-stat { min-width: 0; padding: 12px 10px; border-left: 1px solid var(--line); }
  .ov-stat:nth-child(odd) { border-left: 0; }
  .ov-stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  /* The actions take their own row: sharing the title's line leaves the name
     a few characters wide before the buttons start pushing it. */
  .ov-title-row { align-items: stretch; flex-direction: column; gap: 10px; }
  .ov-title-input { min-width: 0; }
  .ov-actions { justify-content: flex-start; }
}
