/* ────────────────────────────────────────────────────────────────
   Tenney North Park — CONTENT-LEVEL styles only.
   The dashboard framework is EB's CX_DASH css (scoped .cx-root),
   used verbatim. This file may only:
   1) re-point the accent inside .tn-cx (teal = the asset accent)
   2) style the hub-header logo
   3) style the card metadata zone (tn-props) + locked 3-line narrative
   Never add framework styles here (Playbook §2).
   ──────────────────────────────────────────────────────────────── */
:root {
  --tn-accent: #3AB5A2;
  --tn-accent-deep: #2B9082;
  --tn-accent-soft: rgba(58, 181, 162, 0.12);
}

/* Teal accent inside the Tenney dashboard only */
.cx-root.tn-cx { --accent: var(--tn-accent); --accent-muted: #8CD9CC; }
.cx-root.tn-cx .card-pill.good { background: var(--tn-accent-soft); color: var(--tn-accent-deep); }

/* Hub-header logo: dark plate on a light page — round it and cap height */
/* Hub-header logo: dark plate on a light page — round it, cap height,
   and give the wordmark breathing room inside the plate */
.hubh-brand.tn-logo {
  height: 44px;
  width: auto;
  border-radius: 9px;
  padding: 8px 12px;
  box-sizing: border-box;
  background: rgb(42, 47, 50);
  object-fit: contain;
}

/* Hub banner: property photo under the header row (replaces the description) */
.tn-banner {
  margin-top: 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.tn-banner img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center 62%;
}

/* Lock card summary to exactly 3 lines so every card is the same height */
.cx-root.tn-cx .card-narrative {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: calc(3 * 1.6em);
}

/* Card-side metadata zone (project metadata: Owner / Status / Priority) */
.tn-props { display: flex; flex-direction: column; gap: 13px; }
.tn-prop {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 8px;
}
.tn-prop__k { font: 400 12px/1.3 'Inter'; color: var(--muted-foreground, #615D5A); }
.tn-prop__v { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tn-prop__name { font: 400 12.5px/1.3 'Inter'; color: var(--fg-dark, #171412); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-av {
  width: 24px; height: 24px; border-radius: 999px; flex: none;
  display: grid; place-items: center;
  background: rgba(38,24,17,0.06);
  font: 500 10px/1 'Inter'; letter-spacing: 0.03em;
  color: var(--fg-dark, #171412);
}
.tn-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(38,24,17,0.05);
  font: 400 12.5px/1.2 'Inter';
  color: var(--fg-dark, #171412);
  white-space: nowrap;
}
/* Control + Context views: extra states of the framework's view toggle */
.tn-pill__dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex: none; }
.cx-root .about-view, .cx-root .control-view { display: none; }
.cx-root .about-view.active, .cx-root .control-view.active { display: block; }

/* ── Artifact tables in Control-page style (values mirror hub_tabs cc-table) ── */
.cx-root.tn-cx .tn-tablewrap { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; margin-bottom: 24px; }
.cx-root.tn-cx table.tn-cctable { width: 100%; border-collapse: collapse; }
.cx-root.tn-cx table.tn-cctable thead th {
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted-foreground); text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: #FAF7F4; white-space: nowrap;
}
.cx-root.tn-cx table.tn-cctable thead th.r { text-align: right; }
.cx-root.tn-cx table.tn-cctable td {
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--foreground); font-weight: 300; vertical-align: middle;
}
.cx-root.tn-cx table.tn-cctable tbody tr:last-child td { border-bottom: none; }
.cx-root.tn-cx table.tn-cctable tbody tr:hover td { background: rgba(38,24,17,0.018); }
.cx-root.tn-cx table.tn-cctable td.r { text-align: right; }
.cx-root.tn-cx table.tn-cctable td.m { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-root.tn-cx .tn-cell-name { font-size: 13px; font-weight: 500; color: var(--foreground); letter-spacing: -0.01em; }
.cx-root.tn-cx .tn-cell-sub { font-size: 11.5px; color: var(--muted-foreground); font-weight: 300; margin-top: 2px; }
.cx-root.tn-cx tr.tn-total td { font-weight: 500; background: #FAF7F4; }
.cx-root.tn-cx .tn-secintro { font-size: 13px; color: var(--muted-foreground); font-weight: 300; line-height: 1.55; margin: 0 0 14px; }
.cx-root.tn-cx .tn-adlist { margin-bottom: 24px; }

/* BOV PDF preview: pdf.js page stack */
.cx-root .bov-pages { display: flex; flex-direction: column; gap: 14px; }
.cx-root .bov-page {
  position: relative;
  width: 100%;
  aspect-ratio: 1224 / 792;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(23,20,18,0.06);
}
.cx-root .bov-page canvas { display: block; }
.cx-root .bov-page__num {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: 300 12px/1 'Inter'; color: var(--muted-foreground);
}
.cx-root .bov-pages__loading { padding: 40px 0; text-align: center; font: 300 13px/1.5 'Inter'; color: var(--muted-foreground); }

/* Data-sheet content flags (applied by TN's render pass) */
/* File pill: Excel icon + filename as one chip */
.tn-filepill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 7px;
  border: 1px solid var(--border, #EFEBE7);
  border-radius: 999px;
  background: #FFFFFF;
  font-weight: 500;
  color: var(--foreground, #33302E);
  white-space: nowrap;
}
.tn-filepill__ico { width: 15px; height: 15px; object-fit: contain; flex: none; }
/* Source icon in meta bars — mirrors the library's Source column */
.tn-srcico { display: inline-flex; align-items: center; }
.tn-srcico img { width: 15px; height: 15px; object-fit: contain; }
.cx-root .sheet td.tn-vacant { color: var(--destructive, #C0392B); font-weight: 500; }
.cx-root .sheet td.tn-sheet-label { font-weight: 500; }

/* Denser sheet inside the TN hub: smaller type/padding, narrow row-num gutter */
.cx-root.tn-cx .sheet th,
.cx-root.tn-cx .sheet td { font-size: 11px; padding: 4px 8px; }
.cx-root.tn-cx .sheet th.row-num,
.cx-root.tn-cx .sheet td.row-num { width: 34px; min-width: 34px; max-width: 34px; padding: 4px 6px; }

/* ════ Project DP (TN-10) — standalone tracker ════
   Framework vocabulary only: stat cells, section labels, cc tables, tn pills.
   pj-* covers what the framework has no primitive for (gantt, mini-calendar). */
.pj-root { font-family: 'Inter'; }
.pj-head { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin: -34px 0 16px; }
.pj-title { margin: 6px 0 0; font: 500 22px/1.25 'Inter'; color: var(--foreground); letter-spacing: -0.015em; }
.pj-sub { margin-top: 4px; font: 300 12.5px/1.4 'Inter'; color: var(--muted-foreground); }
.pj-toggle { flex: none; }
.pj-stats { margin-bottom: 20px; }
.pj-seclabel { margin-top: 4px; }

/* Lens tabs + filters bar */
.pj-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.pj-lenses { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.pj-lens {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 9px 14px; margin-bottom: -1px;
  font: 300 13.5px/1 'Inter'; color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
  transition: color 140ms ease;
}
.pj-lens:hover { color: var(--foreground); }
.pj-lens.is-active { font-weight: 500; color: var(--foreground); border-bottom-color: var(--foreground); }
.pj-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pj-search, .pj-select, .pj-input {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-white, #FFFCFA);
  padding: 0 10px;
  font: 300 12.5px/1 'Inter';
  color: var(--foreground);
}
.pj-search { width: 170px; }
.pj-search:focus, .pj-select:focus, .pj-input:focus { outline: none; border-color: var(--muted-foreground); }
.pj-input.is-err { border-color: var(--destructive); }
.pj-newbtn {
  appearance: none; border: 0; cursor: pointer;
  height: 32px; padding: 0 14px;
  border-radius: 7px;
  background: var(--foreground);
  color: var(--bg-white, #FFFCFA);
  font: 500 12.5px/1 'Inter';
  transition: opacity 140ms ease;
}
.pj-newbtn:hover { opacity: 0.88; }
.pj-ghostbtn {
  appearance: none; cursor: pointer;
  height: 32px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 7px;
  background: transparent;
  font: 400 12.5px/1 'Inter'; color: var(--foreground);
}
.pj-ghostbtn:hover { background: var(--muted); }
.pj-empty { padding: 40px 0; text-align: center; font: 300 13px/1.5 'Inter'; color: var(--muted-foreground); }

/* Task list (tn-tablewrap card look) */
.pj-list { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.pj-group {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: #FAF7F4;
  border-top: 1px solid var(--border);
  cursor: pointer; user-select: none;
}
.pj-list > div:first-child .pj-group { border-top: 0; }
.pj-group__label { margin: 0 !important; }
.pj-group__count { margin-left: auto; font: 300 11.5px/1 'Inter'; color: var(--muted-foreground); }
.pj-chev { color: var(--muted-foreground); transition: transform 140ms ease; }
.pj-chev.is-collapsed { transform: rotate(-90deg); }
.pj-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background 120ms ease;
}
.pj-row:hover { background: rgba(38,24,17,0.018); }
.pj-row__name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 7px; font: 300 13px/1.4 'Inter'; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-row__due { width: 56px; text-align: right; font: 300 12px/1 'Inter'; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.pj-row__due.is-overdue { color: var(--destructive); font-weight: 500; }
.pj-row__pct { width: 34px; text-align: right; font: 300 11.5px/1 'Inter'; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.pj-st { color: var(--foreground); flex: none; }
.pj-st--idle { color: var(--muted-foreground); }
.pj-st--blocked { color: var(--destructive); }
.pj-st--done { color: var(--tn-accent-deep); }
.pj-progress {
  display: inline-block; width: 68px; height: 4px;
  background: var(--muted); border-radius: 999px; overflow: hidden; flex: none;
}
.pj-progress__fill { display: block; height: 100%; background: var(--foreground); border-radius: 999px; }
.pj-ms-diamond {
  display: inline-block; width: 7px; height: 7px; flex: none;
  background: var(--foreground); border-radius: 1.5px;
  transform: rotate(45deg);
}
.pj-ms-diamond.is-open { background: transparent; border: 1px solid var(--foreground); }

/* Milestone strip */
.pj-msstrip { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin-bottom: 24px; }
.pj-msstrip::-webkit-scrollbar { display: none; }
.pj-mscard {
  flex: none; min-width: 168px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  padding: 13px 15px; cursor: pointer;
  transition: background 120ms ease;
}
.pj-mscard:hover { background: rgba(38,24,17,0.018); }
.pj-mscard__top { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.pj-mscard__date { font: 300 11.5px/1 'Inter'; color: var(--muted-foreground); }
.pj-mscard__name { font: 500 13px/1.35 'Inter'; color: var(--foreground); letter-spacing: -0.01em; }
.pj-mscard__sub { margin-top: 3px; font: 300 11.5px/1.3 'Inter'; color: var(--muted-foreground); }

/* Gantt */
.pj-gantt { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow-x: auto; }
.pj-gantt__hdr, .pj-gantt__wsrow, .pj-gantt__row { display: flex; min-width: 640px; }
.pj-gantt__labelcol { width: 210px; min-width: 210px; padding: 7px 14px; display: flex; align-items: center; }
.pj-gantt__track { flex: 1; position: relative; padding: 7px 10px 7px 0; }
.pj-gantt__hdr { border-bottom: 1px solid var(--border); }
.pj-gantt__month { position: absolute; top: 6px; padding-left: 5px; font: 300 11px/1 'Inter'; color: var(--muted-foreground); }
.pj-gantt__wsrow { border-top: 1px solid var(--border); background: #FAF7F4; }
.pj-gantt__wsrow .pj-gantt__labelcol { padding: 5px 14px; }
.pj-gantt__row { border-top: 1px solid var(--border); transition: background 120ms ease; }
.pj-gantt__row:hover { background: rgba(38,24,17,0.018); }
.pj-gantt__task { font: 300 12.5px/1.3 'Inter'; color: var(--foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-gantt__mline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); pointer-events: none; }
.pj-gantt__today { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted-foreground); opacity: 0.5; pointer-events: none; }
.pj-gantt__bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 11px; border-radius: 999px;
  background: var(--border); overflow: hidden; cursor: pointer;
  transition: opacity 130ms ease;
}
.pj-gantt__bar:hover { opacity: 0.75; }
.pj-gantt__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--foreground); border-radius: 999px; }
.pj-gantt__msdot {
  position: absolute; top: 50%;
  width: 9px; height: 9px;
  background: var(--foreground); border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
  cursor: pointer;
}
.pj-legend { display: flex; align-items: center; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.pj-legend > span { display: inline-flex; align-items: center; gap: 7px; font: 300 11.5px/1 'Inter'; color: var(--muted-foreground); }
.pj-legend__bar { display: inline-block; width: 20px; height: 8px; border-radius: 999px; background: var(--border); position: relative; overflow: hidden; }
.pj-legend__bar span { position: absolute; left: 0; top: 0; bottom: 0; width: 55%; background: var(--foreground); }
.pj-legend__planned { display: inline-block; width: 20px; height: 8px; border-radius: 999px; background: var(--border); }
.pj-legend__today { display: inline-block; width: 1px; height: 13px; background: var(--muted-foreground); opacity: 0.5; }

/* Calendar */
.pj-calhdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pj-calnav { display: flex; gap: 5px; }
.pj-calnav button {
  appearance: none; cursor: pointer;
  width: 28px; height: 28px;
  border: 1px solid var(--border); border-radius: 7px;
  background: transparent;
  font: 400 15px/1 'Inter'; color: var(--muted-foreground);
}
.pj-calnav button:hover { background: var(--muted); color: var(--foreground); }
.pj-calgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .pj-calgrid3 { grid-template-columns: 1fr; } }
.pj-calmonth { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 13px; }
.pj-calmonth__name { text-align: center; font: 500 13px/1.3 'Inter'; color: var(--foreground); margin-bottom: 9px; }
.pj-calweek { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 3px; }
.pj-calweek span { text-align: center; font: 300 10.5px/1 'Inter'; color: var(--muted-foreground); }
.pj-caldays { display: grid; grid-template-columns: repeat(7, 1fr); }
.pj-calday {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0 3px;
  border-radius: 6px;
  font: 300 11.5px/1 'Inter'; color: var(--foreground);
}
.pj-calday.is-empty { visibility: hidden; }
.pj-calday.has-items { cursor: pointer; }
.pj-calday.has-items:hover { background: var(--muted); }
.pj-calday.is-selected { background: var(--muted); }
.pj-calday__num { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; }
.pj-calday.is-today .pj-calday__num { background: var(--foreground); color: var(--bg-white, #FFFCFA); border-radius: 999px; }
.pj-calday__marks { display: flex; align-items: center; gap: 3px; height: 7px; }
.pj-calday__marks .pj-ms-diamond { width: 5px; height: 5px; }
.pj-caldot { width: 4px; height: 4px; border-radius: 999px; background: var(--muted-foreground); }
.pj-chip {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; margin-bottom: 12px;
  border-radius: 999px; background: var(--muted);
  font: 300 12px/1 'Inter'; color: var(--muted-foreground);
}
.pj-chip:hover { color: var(--foreground); }

/* Data face */
.pj-data { display: block; }
.pj-sheetwrap { max-height: none; }

/* Control face */
.pj-hubx { min-height: 0; }
.pj-agentdesc { font: 300 13px/1.55 'Inter'; color: var(--muted-foreground); margin: 0 0 14px; }

/* Context face */
.pj-context .drawer-section-label { margin-top: 22px; }
.pj-context .drawer-section-label:first-of-type { margin-top: 8px; }

/* Detail panel */
.pj-detailroot { position: fixed; inset: 0; z-index: 130; }
.pj-detail__scrim { position: absolute; inset: 0; background: rgba(23,20,18,0.3); animation: pjScrimIn 160ms ease-out; }
@keyframes pjScrimIn { from { opacity: 0; } to { opacity: 1; } }
.pj-detail {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--background, #FFFCFA);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 48px -24px rgba(23,20,18,0.3);
  display: flex; flex-direction: column;
  animation: pjDetailIn 200ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes pjDetailIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.pj-detail__head {
  flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.pj-detail__title { margin: 0; font: 500 17px/1.3 'Inter'; color: var(--foreground); letter-spacing: -0.015em; }
.pj-detail__close {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  width: 28px; height: 28px; border-radius: 7px;
  font: 400 13px/1 'Inter'; color: var(--muted-foreground);
}
.pj-detail__close:hover { background: var(--muted); color: var(--foreground); }
.pj-detail__body { flex: 1; overflow-y: auto; padding: 18px 22px 26px; }
.pj-detail__chips { display: flex; gap: 8px; margin-bottom: 14px; }
.pj-detail__desc { margin: 0 0 18px; font: 300 13px/1.6 'Inter'; color: var(--foreground); }
.pj-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-bottom: 18px; }
.pj-detail__v { display: flex; align-items: center; gap: 8px; margin-top: 4px; font: 300 13px/1.3 'Inter'; color: var(--foreground); }
.pj-detail__prog { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; }
.pj-detail__sec { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; margin-bottom: 14px; }
.pj-detail__dep { display: flex; align-items: center; gap: 8px; padding: 5px 0; font: 300 12.5px/1.4 'Inter'; color: var(--foreground); }
.pj-detail__notes { margin: 6px 0 0; font: 300 12.5px/1.55 'Inter'; color: var(--foreground); }
.pj-form { display: flex; flex-direction: column; gap: 13px; }
.pj-form label { display: flex; flex-direction: column; gap: 5px; }
.pj-form .pj-input, .pj-form .pj-select { width: 100%; box-sizing: border-box; }
.pj-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pj-form__check { flex-direction: row !important; align-items: center; gap: 8px !important; padding-top: 16px; }
.pj-form__actions { display: flex; gap: 8px; margin-top: 6px; }
