/* overview: orbit hero, needs-you queue, KPI band, tabs (activity, products, work) and the product drawer. */

/* Hero: the business and its products beside everything that needs the chairman. */
.overview-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: stretch;
}
.overview-orbit,
.overview-needs {
  min-width: 0;
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.overview-orbit { position: relative; display: flex; flex-direction: column; padding: var(--s-4) var(--s-5); }
.overview-orbit .viz { flex: 1; align-content: center; }
.overview-orbit .viz-orbit-wrap { padding-block: 0 var(--s-2); }
/* The business monogram stays at the center even on the compact dial. */
.overview-orbit .viz-orbit-center { padding: var(--s-1); }
.overview-orbit .viz-orbit-center-mark { display: grid; margin-bottom: 2px; }
/* The orbit's summary sentence repeats the page summary for sight; it stays for assistive technology. */
.overview-orbit .viz-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.overview-orbit-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2) var(--s-4);
  margin: 0;
  padding: var(--s-3) 0 0;
  border-top: 1px solid var(--line-subtle);
  color: var(--text-3);
  font-size: var(--fs-xs);
  line-height: var(--lh-xs);
  list-style: none;
}
.overview-orbit-key li { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; }
.overview-orbit-key li::before {
  content: "";
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--text-2);
  border-radius: var(--r-full);
}
.overview-orbit-key .is-attention::before { border-color: var(--warn); border-style: dashed; background: var(--warn-soft); }
.overview-orbit-key .is-off::before { border-color: var(--text-3); border-style: dotted; }
.overview-orbit-key .is-badge::before { width: 10px; height: 10px; border: 0; background: var(--warn); }
/* Waiting decisions read in the warn tone everywhere they are counted (sidebar, Needs you, this orbit). */
.overview-orbit .viz-orbit-badge { background: var(--warn); color: var(--surface); }
.overview-orbit-key .is-arc::before { border-color: transparent; border-top-color: var(--text-2); border-right-color: var(--text-2); transform: rotate(-45deg); }

/* Needs you */
.overview-needs { display: flex; flex-direction: column; padding: var(--s-5); }
.overview-needs-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }
.overview-needs-head h2 { font-size: var(--fs-lg); line-height: var(--lh-lg); }
.overview-needs-list { margin: 0; padding: 0; list-style: none; }
.overview-need {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  margin: 0;
  padding: var(--s-3) var(--s-2);
  border-top: 1px solid var(--line-subtle);
  transition: background-color var(--t-micro) var(--ease-move);
}
.overview-need:first-child { border-top: 0; }
.overview-need:hover { background: var(--neutral-soft); }
.overview-need[data-tone="danger"] { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.overview-need:has(.overview-need-title:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-sm); }
.overview-need-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); color: var(--text-2); }
.overview-need-mark:has(> .icon) { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-subtle); }
.overview-need[data-tone="danger"] .overview-need-mark:has(> .icon) { background: var(--danger-soft); color: var(--danger); }
.overview-need[data-tone="warn"] .overview-need-mark:has(> .icon) { background: var(--warn-soft); color: var(--warn); }
.overview-need-text { display: grid; min-width: 0; }
.overview-need-title,
.overview-need-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-need-title { color: var(--text); font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 500; text-decoration: none; }
.overview-need-title:hover { text-decoration: none; }
.overview-need-title:focus-visible { outline: none; }
.overview-need-title::after { content: ""; position: absolute; inset: 0; }
.overview-need-meta { color: var(--text-3); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.overview-need-side { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-1); }
.overview-need-side .ui-pill { white-space: nowrap; }
.overview-needs .ui-empty { flex: 1; align-content: center; }
.overview-needs-note { display: flex; align-items: flex-start; gap: var(--s-2); margin: var(--s-3) 0 0; color: var(--text-2); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.overview-needs-note .icon { flex: none; color: var(--text-3); }
.overview-needs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: auto; padding-top: var(--s-4); }

/* KPI band: the hero's gutter, so column edges line up. */
.overview-kpis .ui-stat-grid { gap: var(--gutter); }

/* Products strip: six products in one row under the figures; the ring (subscription days left of 30) wraps the mark. */
.overview-strip { border: 1px solid var(--line-subtle); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-panel); }
.overview-strip-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.overview-strip-list li { min-width: 0; margin: 0; border-left: 1px solid var(--line-subtle); }
.overview-strip-list li:first-child { border-left: 0; }
.overview-strip-open { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 64px; padding: var(--s-3) var(--s-4); border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.overview-strip-list li:first-child .overview-strip-open { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.overview-strip-list li:last-child .overview-strip-open { border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.overview-strip-open:hover { background: var(--neutral-soft); }
.overview-strip-open:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.overview-strip-dial { position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; }
.overview-strip-dial .viz-ring { position: absolute; inset: 0; }
.overview-strip-dial .viz-ring-text { display: none; }
.overview-strip-dial .mark { position: relative; }
.overview-strip-list li[data-state="disconnected"] .mark { opacity: 0.45; filter: grayscale(1); }
.overview-strip-text { display: grid; gap: 1px; min-width: 0; }
.overview-strip-name { overflow: hidden; color: var(--text); font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.overview-strip-state { overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); line-height: var(--lh-xs); text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.overview-strip-list li[data-tone="warn"] .overview-strip-state { color: var(--warn); }
.overview-strip-list li[data-tone="danger"] .overview-strip-state { color: var(--danger); }
.overview-strip-badge { flex: none; min-width: 20px; margin-left: auto; padding: 0 6px; border-radius: var(--r-full); background: var(--warn); color: var(--surface); font-size: var(--fs-xs); line-height: 20px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 1199px) { .overview-strip-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } .overview-strip-list li:nth-child(4) { border-left: 0; } .overview-strip-list li:nth-child(n + 4) { border-top: 1px solid var(--line-subtle); } .overview-strip-list li .overview-strip-open { border-radius: 0; } }
@media (max-width: 639px) { .overview-strip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-strip-list li:nth-child(odd) { border-left: 0; } .overview-strip-list li:nth-child(n + 3) { border-top: 1px solid var(--line-subtle); } .overview-strip-list li:nth-child(4) { border-left: 1px solid var(--line-subtle); } }

/* Owner sections other lanes render under the KPI band (setup checklist, billing): full-width rows, one above the
   other, so a tall checklist never sits beside a one-line summary. */
.overview-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); }
.overview-aside > * { min-width: 0; margin: 0; }

/* Activity tab */
.overview-activity { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.overview-activity > .ui-disclosure, .overview-activity > .overview-anchors { grid-column: 1 / -1; }
.overview-categories { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.overview-categories dt { color: var(--text); font-weight: 500; }
.overview-categories dd { margin: 0; color: var(--text-2); }
.overview-notes { display: grid; gap: var(--s-2); margin: 0; padding-left: var(--s-5); color: var(--text-2); font-size: var(--fs-sm); line-height: var(--lh-sm); }

/* Products tab */
.overview-products { margin: 0; padding: 0; border: 1px solid var(--line-subtle); border-radius: var(--r-md); background: var(--surface); list-style: none; }
.overview-product {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(180px, 1fr) minmax(0, 2fr) minmax(0, 1.5fr) 16px;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin: 0;
  padding: var(--s-4);
  border-top: 1px solid var(--line-subtle);
  transition: background-color var(--t-micro) var(--ease-move);
}
.overview-product:first-child { border-top: 0; border-radius: var(--r-md) var(--r-md) 0 0; }
.overview-product:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.overview-product:hover { background: var(--neutral-soft); }
.overview-product:has(.overview-product-open:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.overview-product > .icon { color: var(--text-3); }
.overview-product[data-state="disconnected"] > .mark { opacity: 0.5; filter: grayscale(1); }
.overview-product-name { display: grid; justify-items: start; gap: var(--s-1); min-width: 0; }
.overview-product-open {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.overview-product-open:hover { background: none; color: var(--text); }
.overview-product-open:focus-visible { outline: none; }
.overview-product-open::after { content: ""; position: absolute; inset: 0; }
.overview-product-metrics,
.overview-product-usage { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); min-width: 0; margin: 0; }
.overview-product-metrics > div,
.overview-product-usage > div { display: grid; gap: 2px; min-width: 0; max-width: 220px; }
.overview-product dt { overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); line-height: var(--lh-xs); text-overflow: ellipsis; white-space: nowrap; }
.overview-product dd { overflow: hidden; margin: 0; color: var(--text); font-size: var(--fs-md); line-height: var(--lh-md); font-weight: 600; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.overview-product .is-empty dd { color: var(--text-3); font-size: var(--fs-sm); font-weight: 450; }

/* Work tab */
.overview-work { display: grid; gap: var(--s-4); }
.overview-work-mix { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.overview-work-mix > span:first-child { margin-right: var(--s-2); }
.overview-tab-foot { margin: 0; font-size: var(--fs-sm); }

/* Product drawer */
.overview-drawer-hero { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.overview-drawer-hero > div { display: grid; justify-items: start; gap: var(--s-1); }
.overview-drawer-hero p { margin: 0; }
.overview-drawer-section { display: grid; gap: var(--s-4); justify-items: stretch; }
.overview-drawer-section > .button { justify-self: start; }
.overview-drawer-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); margin: 0; }
.overview-drawer-metrics > div { display: grid; gap: var(--s-1); padding: var(--s-3) var(--s-4); border: 1px solid var(--line-subtle); border-radius: var(--r-md); background: var(--raised); }
.overview-drawer-metrics dt { color: var(--text-3); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.overview-drawer-metrics dd { margin: 0; color: var(--text); font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.overview-drawer-items,
.overview-drawer-caps { margin: 0; padding: 0; border-top: 1px solid var(--line-subtle); list-style: none; }
.overview-drawer-items li,
.overview-drawer-caps li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0; padding: var(--s-2) 0; border-bottom: 1px solid var(--line-subtle); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.overview-drawer-status { flex: none; color: var(--text-2); }
.overview-drawer-lede { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.overview-drawer-spark { display: grid; gap: var(--s-2); }
.overview-drawer-spark p { margin: 0; }
.overview-drawer-foot { display: flex; gap: var(--s-2); margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line-subtle); }

@media (max-width: 1099px) {
  .overview-product { grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr) 16px; }
  .overview-product-usage { grid-column: 3; }
  .overview-product-metrics { grid-column: 2 / 4; grid-row: 2; }
  .overview-product > .icon { grid-column: 4; grid-row: 1; }
}
@media (max-width: 899px) {
  .overview-hero,
  .overview-activity { grid-template-columns: minmax(0, 1fr); }
}
/* Below 480px the orbit becomes a list whose rows spell out state and counts, so the ring key would explain nothing. */
@media (max-width: 479px) {
  .overview-orbit-key { display: none; }
}
@media (max-width: 639px) {
  .overview-orbit { padding: var(--s-3) var(--s-4); }
  .overview-orbit .viz-orbit-wrap { padding-block: 0 var(--s-2); }
  .overview-needs { padding: var(--s-4); }
  .overview-need { grid-template-columns: 28px minmax(0, 1fr); padding-inline: 0; }
  .overview-need-side { grid-column: 2; justify-content: flex-start; }
  .overview-need-title,
  .overview-need-meta { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  .overview-needs-foot > * { flex: 1 1 auto; text-align: center; justify-content: center; }
  .overview-product { grid-template-columns: 36px minmax(0, 1fr) 16px; padding: var(--s-3); }
  .overview-product-metrics,
  .overview-product-usage { grid-column: 2 / 4; grid-row: auto; }
  .overview-product > .icon { grid-column: 3; grid-row: 1; }
}
