/* Organizational chart (page-orgchart.php), old theme.
   Ported from the debesmscat-2027 theme. The 2027 theme's tokens and shared
   components (chips, search, empty state) are redefined here, scoped to .oc,
   using this theme's palette: #194a40, #4d774e, #9dc88d, #f1b24a. */
.oc {
  --eden: #194a40;
  --eden-deep: #12362f;
  --flame-y: #f1b24a;
  --flame-o: #e89a2c;
  --flame: linear-gradient(135deg, #ffc86e, #f1b24a);
  --bg: #fff;
  --surface: #fff;
  --band: #f4f9f1;
  --ink: #191919;
  --muted: #4f5f58;
  --line: #d5e6cd;
  --heading: #194a40;
  --on-chrome: #fff;
  --on-flame: #191919;
  --chip: #eef6ea;
  --shadow: 0 1px 2px rgb(25 74 64 / .06), 0 8px 24px rgb(25 74 64 / .08);
  --focus: #f1b24a;
  --f-display: Georgia, "Times New Roman", Times, serif;
  --f-body: Verdana, Geneva, Tahoma, sans-serif;
  --radius: 14px;

  float: none;
  width: 1400px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px 64px;
  font: 400 15px/1.5 var(--f-body);
  color: var(--ink);
}
.oc *, .oc *::before, .oc *::after { box-sizing: border-box; }
.oc [hidden] { display: none !important; }
.oc h2, .oc h3, .oc p { margin: 0; }
.oc a { color: var(--eden); }
.oc :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.oc .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.oc-lede { font-size: 17px; color: var(--muted); max-width: 62ch; margin-bottom: 1.5rem; }
.oc .edit-link { margin-top: 1.5rem; font-size: .85rem; }
.oc-contact a { font-weight: 400; }

/* Chips, search and empty state (from the 2027 theme's main.css) */
.oc .chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.oc .chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .5rem .95rem; font: 400 13px/1 var(--f-body); cursor: pointer; display: inline-flex; align-items: center; }
.oc .chip:hover { border-color: var(--eden); }
.oc .chip[aria-pressed="true"] { background: var(--eden); border-color: var(--eden); color: var(--on-chrome); }
.oc .search { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .3rem .2rem 1rem; min-width: 0; color: var(--muted); }
.oc .search input { border: 0; background: transparent; font: 400 15px/1 var(--f-body); color: var(--ink); padding: .6rem 0; flex: 1; min-width: 0; outline: none; -webkit-appearance: none; appearance: none; }
.oc .search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.oc .empty { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.oc ul, .oc ol { list-style: none; margin: 0; padding: 0; }

/* Top bar: filters and search left, board resolution and strategic plan right */
.oc-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem 2.5rem; margin-bottom: 2.5rem; }
.oc-filter { display: grid; gap: .8rem; flex: 1 1 auto; min-width: 0; }
.oc-filter .search { max-width: 420px; }
.oc-count { font-size: .85rem; color: var(--muted); min-height: 1.2em; }
.oc-refs { flex: 0 1 380px; text-align: right; display: grid; gap: .35rem; }
.oc-refs a { font: 400 .98rem/1.35 var(--f-display); color: var(--heading); text-decoration: none; }
.oc-refs a:hover { text-decoration: underline; }

/* Tiers, joined by a vertical connector */
.oc-chart { display: grid; }
.oc-tier { display: grid; justify-items: center; }
.oc-tier:not(.is-first)::before { content: ""; width: 2px; height: 2.5rem; background: var(--eden); }
.oc-tier-title { font: 600 .75rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--eden); margin: .5rem 0 1rem; }
.oc-tier > .oc-root, .oc-tier > .oc-cols, .oc-tier > .oc-grid { width: 100%; }
.oc-root > li > .oc-card { max-width: 380px; margin-inline: auto; }

/* Cards */
.oc-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: .9rem; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--eden); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.oc-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--chip); border: 3px solid var(--flame-y); }
.oc-info { min-width: 0; display: grid; gap: .1rem; }
.oc-name { font: 400 1.02rem/1.25 var(--f-display); color: var(--heading); }
.oc-pos { font-weight: 600; font-size: .86rem; color: var(--eden); line-height: 1.3; }
.oc-office { font-size: .84rem; color: var(--muted); line-height: 1.35; }
.oc-contact { margin-top: .35rem !important; display: grid; gap: .1rem; font-size: .8rem; }
.oc-contact a { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); text-decoration: none; max-width: 100%; }
.oc-contact a > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.oc-contact a:hover { color: var(--eden); text-decoration: underline; }
.oc-contact svg { flex: none; color: var(--eden); }

/* Units: offices or bodies with no single person */
.oc-card.is-unit { display: block; text-align: center; padding: .6rem .9rem; background: var(--band); border-left-width: 1px; box-shadow: none; }
.oc-card.is-unit .oc-name { font: 600 .86rem/1.3 var(--f-body); color: var(--ink); }
.oc-card.is-unit .oc-office { font-size: .78rem; margin-top: .15rem; }
.oc-gov .oc-root > li > .oc-card.is-unit,
.oc-councils .oc-card.is-unit { background: var(--eden); border-color: var(--eden); }
.oc-gov .oc-root > li > .oc-card.is-unit { background: var(--eden-deep); padding: 1rem 1.5rem; }
.oc-gov .oc-root > li > .oc-card.is-unit .oc-name { font: 400 1.25rem/1.2 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.oc-gov .oc-root > li > .oc-card.is-unit .oc-name,
.oc-councils .oc-card.is-unit .oc-name { color: var(--on-chrome); }
.oc-gov .oc-root > li > .oc-card.is-unit .oc-office { color: var(--on-chrome); opacity: .8; }

/* Governance: Commission on Audit and Board Secretary sit beside the main line */
.oc-staff { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 1rem 4rem; margin-top: 1.25rem !important; position: relative; }
.oc-staff::before { content: ""; position: absolute; left: 50%; top: -1.25rem; bottom: -1rem; width: 2px; margin-left: -1px; background: var(--eden); }
.oc-staff > li { display: grid; }
.oc-staff > li > .oc-card { width: 100%; }
.oc-staff .oc-card.is-unit { display: flex; flex-direction: column; justify-content: center; }
.oc-staff > li:first-child > .oc-card { border-style: dashed; border-left-style: dashed; }

/* Office of the President */
.oc-councils { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.5rem !important; }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .9rem; margin-top: 1.25rem !important; }
.oc-grid > li { display: grid; }

/* Vice presidents: three columns under a shared bar */
/* --n (set by orgchart.js) is the number of visible columns; the bar runs between their centres. */
.oc-cols { --n: 3; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1.25rem; position: relative; padding-top: 1.75rem; align-items: start; }
.oc-cols::before { content: ""; position: absolute; top: 0; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 2px; background: var(--eden); }
.oc-col { position: relative; min-width: 0; }
.oc-col::before { content: ""; position: absolute; top: -1.75rem; left: 50%; width: 2px; height: 1.75rem; margin-left: -1px; background: var(--eden); }
.oc-col-title { text-align: center; font: 600 .75rem/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--eden); margin-bottom: .6rem; }
.oc-col .oc-root > li > .oc-card { max-width: none; border-left-color: var(--flame-o); }

/* Nested lists inside a branch: left rule with ticks */
.oc-tree { margin: .6rem 0 0 .9rem !important; padding-left: 1.1rem !important; border-left: 2px solid rgb(25 74 64 / .35); }
/* --tick: where the branch line meets the card (about the photo's centre; units are shorter). */
.oc-tree > li { --tick: 2.6rem; position: relative; margin-top: .6rem; }
.oc-tree > li:has(> .is-unit) { --tick: 1.2rem; }
.oc-tree > li::before { content: ""; position: absolute; left: -1.1rem; top: var(--tick); width: 1rem; height: 2px; background: rgb(25 74 64 / .35); }
.oc-tree > li:last-child::after { content: ""; position: absolute; left: calc(-1.1rem - 2px); top: calc(var(--tick) + 2px); bottom: 0; width: 2px; background: var(--bg); }
.oc-tree .oc-card { grid-template-columns: 56px minmax(0, 1fr); gap: .75rem; padding: .75rem .85rem; }
.oc-tree .oc-photo { width: 56px; height: 56px; }
.oc-tree .oc-card.is-unit { text-align: left; }

/* Colleges */
.oc-colleges .oc-grid { margin-top: 0 !important; }
.oc-card.is-college .oc-photo { border-color: var(--eden); }
.oc-ribbon { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2rem; margin-top: 2rem !important; }
.oc-ribbon li { position: relative; background: var(--flame); color: var(--on-flame); font: 600 .78rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; padding: .7rem 1.4rem; border-radius: 999px; }
.oc-ribbon li + li::before { content: "→"; position: absolute; left: -1.45rem; top: 50%; transform: translateY(-50%); color: var(--eden); letter-spacing: 0; }

.oc-chart > .empty { margin-top: 1rem; }

/* Vision, mission, core values, quality policy */
.oc-vmq { display: grid; grid-template-columns: 1fr 1.8fr .8fr 1.3fr; gap: 1.5rem 2rem; margin-top: 4rem; padding: 2rem; border-radius: var(--radius); background: var(--flame); color: var(--on-flame); }
.oc-vmq h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.oc-vmq p, .oc-vmq li { font-size: .92rem; }
.oc-vmq ol { list-style: decimal; padding-left: 1.2rem; display: grid; gap: .3rem; }
.oc-values { display: grid; gap: .15rem; }
.oc-values b { color: var(--eden-deep); font-size: 1.05rem; }

@media (max-width: 1000px) {
  .oc-vmq { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .oc-bar { flex-direction: column; }
  .oc-refs { order: -1; text-align: left; flex-basis: auto; }
  .oc-refs a { font-size: .9rem; }
  .oc-filter .search { max-width: none; }
  .oc-cols { grid-auto-flow: row; gap: 2rem; padding-top: 0; }
  .oc-cols::before, .oc-col::before { display: none; }
  .oc-staff { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .oc-staff::before { display: none; }
}
@media (max-width: 560px) {
  .oc-councils { grid-template-columns: minmax(0, 1fr); }
  .oc-grid { grid-template-columns: minmax(0, 1fr); }
  .oc-card { grid-template-columns: 56px minmax(0, 1fr); padding: .8rem; }
  .oc-photo { width: 56px; height: 56px; }
  .oc-tree { margin-left: .4rem !important; padding-left: .9rem !important; }
  .oc-tree > li::before { left: -.9rem; width: .8rem; }
  .oc-tree > li:last-child::after { left: calc(-.9rem - 2px); }
  .oc-vmq { grid-template-columns: minmax(0, 1fr); padding: 1.5rem 1.25rem; }
}
