/* ==========================================================================
   Design Operations Hub: the product theme for Case Study 05.
   One portfolio design system, multiple product expressions: the portfolio page keeps the site's
   tokens, and everything inside a recreated product frame (.oh) uses this identity: people-centred,
   collaborative planning for a design organization (not HR software, not an admin console).
   Light, slightly warm surfaces; resource cards with initials; capacity bars; timelines; team ↔ project
   relationships; vendor and renewal markers. Sky for interaction; a little signal-orange tint
   (site token --brand-orange #e8501a family) only for time-sensitive renewal markers, never as large fill.
   Status always carries a word. Frames stay light in both site themes and adapt to their own width.
   Synthetic data only. Shared by design-ops-hub*.html and social-src/opshub-thumbnail.html.
   ========================================================================== */

.oh {
  --oh-bg: #faf8f5;           /* warm off-white */
  --oh-surface: #ffffff;
  --oh-soft: #f4f1ec;
  --oh-ink: #1c1917;          /* 17:1 on white */
  --oh-ink-2: #57534e;        /* 7.6:1 on white */
  --oh-ink-3: #6b6560;        /* 5.6:1 on white: hints and meta */
  --oh-line: #e9e4dd;
  --oh-line-2: #d6cfc5;
  --oh-accent: #0369a1;       /* Sky 700 */
  --oh-accent-soft: #e0f2fe;
  --oh-accent-ink: #075985;
  --oh-warm: #b8410f;         /* signal-orange family, darkened for text: 5.1:1 on its tint */
  --oh-warm-soft: #fdebe2;
  --oh-ok: #067647;
  --oh-ok-soft: #e7f6ed;
  --oh-over: #a8270f;         /* overallocated: 6:1 on its tint */
  --oh-over-soft: #fde4de;
  --oh-font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  container-type: inline-size;
  font-family: var(--oh-font);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--oh-ink);
  background: var(--oh-bg);
  -webkit-font-smoothing: antialiased;
}
.oh *,
.oh *::before,
.oh *::after {
  box-sizing: border-box;
}
.oh p,
.oh ul,
.oh ol {
  margin: 0;
}
.oh-app {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ddd5ca;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 18px 40px -24px rgba(28, 25, 23, 0.32);
}

/* Top bar and section tabs */
.oh-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 16px;
  background: var(--oh-surface);
  border-bottom: 1px solid var(--oh-line);
}
.oh-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}
.oh-brand svg {
  width: 18px;
  height: 18px;
  color: var(--oh-accent);
}
.oh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: 4px;
}
.oh-tabs span {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--oh-ink-2);
}
.oh-tabs .is-on {
  background: var(--oh-accent-soft);
  color: var(--oh-accent-ink);
}
.oh-me {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--oh-ink-2);
}
.oh-body {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px 16px 16px;
}

/* Type */
.oh-h {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.oh-h small {
  font-size: 12px;
  font-weight: 500;
  color: var(--oh-ink-3);
}
.oh-h2 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--oh-ink-3);
}
.oh-sub {
  color: var(--oh-ink-2);
}
.oh-meta {
  font-size: 10.5px;
  color: var(--oh-ink-3);
}
.oh-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.oh-head > div {
  display: grid;
  gap: 2px;
}
.oh-card {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--oh-line);
  background: var(--oh-surface);
}
.oh-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

/* Filters */
.oh-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.oh-seg span {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--oh-line-2);
  background: var(--oh-surface);
  font-size: 11px;
  color: var(--oh-ink-2);
}
.oh-seg span b {
  margin-left: 4px;
  font-weight: 600;
  color: var(--oh-ink-3);
}
.oh-seg .is-on {
  border-color: var(--oh-accent);
  background: var(--oh-accent-soft);
  color: var(--oh-accent-ink);
  font-weight: 600;
}

/* People: initials, never photos */
.oh-av {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--oh-soft);
  border: 1px solid var(--oh-line-2);
  color: var(--oh-ink);
  font-size: 10px;
  font-weight: 700;
}
.oh-av.is-c { /* contractor: dashed ring, in addition to the word */
  border-style: dashed;
  border-color: #a8a29e;
}
.oh-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.oh-person > span {
  display: grid;
  min-width: 0;
}
.oh-person b {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oh-person small {
  font-size: 10.5px;
  color: var(--oh-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Resource cards */
.oh-people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.oh-res {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--oh-line);
  background: var(--oh-surface);
}
.oh-res__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Chips: always a word */
.oh-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--oh-soft);
  color: var(--oh-ink-2);
}
.oh-chip.is-ft {
  background: var(--oh-accent-soft);
  color: var(--oh-accent-ink);
}
.oh-chip.is-c {
  background: var(--oh-surface);
  border: 1px dashed #a8a29e;
  color: var(--oh-ink-2);
}
.oh-chip.is-ok {
  background: var(--oh-ok-soft);
  color: var(--oh-ok);
}
.oh-chip.is-part {
  background: var(--oh-accent-soft);
  color: var(--oh-accent-ink);
}
.oh-chip.is-over {
  background: var(--oh-over-soft);
  color: var(--oh-over);
}
.oh-chip.is-renew {
  background: var(--oh-warm-soft);
  color: var(--oh-warm);
}

/* Capacity: a bar per person, split by project; 100% is marked; overallocation shows past the mark */
.oh-cap {
  display: grid;
  gap: 7px;
}
.oh-cap__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 74px;
  gap: 10px;
  align-items: center;
}
.oh-bar {
  position: relative;
  display: flex;
  height: 12px;
  border-radius: 4px;
  background: var(--oh-soft);
  overflow: visible;
}
.oh-bar i {
  display: block;
  height: 100%;
  width: var(--v);
}
.oh-bar i:first-child {
  border-radius: 4px 0 0 4px;
}
.oh-bar i.p1 { background: #0369a1; }
.oh-bar i.p2 { background: #7dd3fc; }
.oh-bar i.p3 { background: #a8a29e; }
.oh-bar i.over {
  background: repeating-linear-gradient(135deg, var(--oh-over) 0 3px, #e36b51 3px 6px);
  border-radius: 0 4px 4px 0;
}
.oh-bar::after { /* 100% capacity mark at 80% of the track, leaving room to show overallocation */
  content: "";
  position: absolute;
  left: 80%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--oh-ink);
}
.oh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 10.5px;
  color: var(--oh-ink-2);
}
.oh-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.oh-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Tables (grid rows) */
.oh-table {
  border: 1px solid var(--oh-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--oh-surface);
}
.oh-tr {
  display: grid;
  grid-template-columns: var(--oh-cols, repeat(4, minmax(0, 1fr)));
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-top: 1px solid var(--oh-line);
}
.oh-tr:first-child {
  border-top: 0;
}
.oh-tr--head {
  background: var(--oh-soft);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--oh-ink-3);
}
.oh-tr.is-flag {
  background: #fff7f2;
  box-shadow: inset 3px 0 0 var(--oh-warm);
}

/* Vendor cards */
.oh-vendors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.oh-vendor {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--oh-line);
  background: var(--oh-surface);
}
.oh-vendor b {
  font-weight: 700;
}
.oh-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--oh-ink-2);
}
.oh-kv b {
  color: var(--oh-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.oh-stack {
  display: flex;
  align-items: center;
}
.oh-stack .oh-av {
  margin-left: -2px;
  box-shadow: 0 0 0 2px var(--oh-surface);
}
.oh-stack .oh-av:first-child {
  margin-left: 0;
}

/* Two directions: project → people and person → projects */
.oh-toggle {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--oh-soft);
  width: fit-content;
}
.oh-toggle span {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--oh-ink-2);
}
.oh-toggle .is-on {
  background: var(--oh-surface);
  color: var(--oh-ink);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.12);
}
.oh-assign {
  display: grid;
  gap: 6px;
}
.oh-assign > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 44px;
  gap: 10px;
  align-items: center;
}
.oh-assign .oh-bar::after {
  display: none;
}
.oh-assign .oh-bar i {
  border-radius: 4px;
}
.oh-assign em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Timeline: the next quarter, renewal markers on it */
.oh-time {
  display: grid;
  gap: 6px;
}
.oh-months {
  display: grid;
  grid-template-columns: 110px repeat(3, minmax(0, 1fr));
  gap: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--oh-ink-3);
}
.oh-months span {
  padding-left: 6px;
  border-left: 1px solid var(--oh-line);
}
.oh-months span:first-child {
  border-left: 0;
  padding-left: 0;
}
.oh-lane {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 0;
}
.oh-lane__track {
  position: relative;
  height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent calc(33.33% - 0.5px), var(--oh-line) calc(33.33% - 0.5px) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), var(--oh-line) calc(66.66% - 0.5px) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)),
    var(--oh-soft);
}
.oh-span {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: var(--a);
  width: var(--w);
  border-radius: 4px;
  background: #bae6fd;
}
.oh-span.is-gap {
  background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(168, 39, 15, 0.22) 4px 6px);
  border: 1px dashed var(--oh-over);
}
.oh-mark { /* renewal / contract end: a diamond plus its word in the lane label */
  position: absolute;
  top: 50%;
  left: var(--a);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: var(--oh-warm);
  transform: rotate(45deg);
  border-radius: 1px;
  box-shadow: 0 0 0 2px var(--oh-surface);
}
.oh-today {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--a);
  width: 2px;
  background: var(--oh-accent);
}

/* Risk list and actions */
.oh-risks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
.oh-risks li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--oh-line);
  background: var(--oh-surface);
}
.oh-risks li > .oh-chip {
  grid-row: span 2;
  margin-top: 1px;
}
.oh-risks small {
  font-size: 10.5px;
  color: var(--oh-ink-2);
}
.oh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.oh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--oh-accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.oh-btn--ghost {
  background: var(--oh-surface);
  color: var(--oh-ink);
  border: 1px solid var(--oh-line-2);
}
.oh-link {
  color: var(--oh-accent);
  font-weight: 600;
  font-size: 11px;
}

/* Leadership summary */
.oh-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.oh-kpi {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--oh-line);
  background: var(--oh-surface);
}
.oh-kpi span {
  font-size: 10.5px;
  color: var(--oh-ink-3);
}
.oh-kpi b {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.oh-kpi small {
  font-size: 10.5px;
  color: var(--oh-ink-2);
}
.oh-mix {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--oh-soft);
}
.oh-mix i {
  display: block;
  height: 100%;
  width: var(--v);
}
.oh-mix .ft { background: #0369a1; }
.oh-mix .ct { background: repeating-linear-gradient(135deg, #7dd3fc 0 4px, #bae6fd 4px 8px); }

/* Medium frames: three columns become two, side panels stack */
@container (max-width: 760px) {
  .oh-people,
  .oh-vendors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .oh-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .oh-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .oh-tabs {
    display: none;
  }
}
/* Narrow frames (phones) */
@container (max-width: 440px) {
  .oh-people,
  .oh-vendors {
    grid-template-columns: minmax(0, 1fr);
  }
  .oh-body {
    padding: 12px;
  }
  .oh-cap__row {
    grid-template-columns: minmax(0, 1fr) 70px;
  }
  .oh-cap__row > .oh-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .oh-tr--head {
    display: none;
  }
  .oh-tr {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
  }
  .oh-tr > [data-label] {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
  }
  .oh-tr > [data-label]::before {
    content: attr(data-label);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--oh-ink-3);
    min-width: 72px;
  }
  .oh-months,
  .oh-lane {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .oh-months {
    grid-template-columns: 78px repeat(3, minmax(0, 1fr));
  }
  .oh-me span {
    display: none;
  }
}
