/* OnPoint · Sơ đồ tổ chức dự án — Newing CI
   Navy #122757 · Brass #FFD46C · Arial
   Layout: fixed 1040×545 diagram canvas, scaled/scrolled by frame. */

:root {
  --navy: #122757;
  --navy-2: #2B3A63;
  --muted: #4B5674;
  --faint: #6A7490;
  --brass: #FFD46C;
  --brass-deep: #E9B93F;
  --brass-wash: #FFFBF2;
  --brass-line: #F0DCA8;
  --paper: #FFFFFF;
  --desk: #F3F2ED;
  --line: #D5DBE8;
  --line-soft: #E6E9F1;
  --ghost: #A8B2C8;
  --radius: 5px;
  --font: Arial, "Liberation Sans", Helvetica, sans-serif;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk);
  color: var(--navy);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.4;
  overflow-x: hidden;
}

a { color: var(--navy); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  border-radius: 3px;
}
.skip-link:focus { left: 12px; }

.page {
  padding: 28px 24px 40px;
}

.sheet {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 44px 24px;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(18, 39, 87, .06), 0 24px 56px -28px rgba(18, 39, 87, .3);
}

.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  top: 0;
  height: 3px;
}
.sheet::before {
  left: 0;
  right: 0;
  background: var(--navy);
  border-radius: 6px 6px 0 0;
}
.sheet::after {
  left: 0;
  width: 96px;
  background: var(--brass);
  border-radius: 6px 0 0 0;
}

/* ---------- Masthead ---------- */

.masthead-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--navy);
  line-height: 1;
}

.brand-dot {
  width: 5px;
  height: 5px;
  background: var(--brass);
  border: 1px solid var(--brass-deep);
  transform: rotate(45deg);
}

.doc-meta {
  margin: 0;
  font-size: 9px;
  color: var(--faint);
  letter-spacing: .02em;
  white-space: nowrap;
}

.masthead-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-top: 16px;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--navy);
}

.doc-sub {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
  max-width: 62ch;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: none;
  padding-bottom: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  border: 1px solid var(--navy);
  border-radius: 4px;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: #1C3A76; border-color: #1C3A76; }
.btn-icon { flex: none; }

.btn-note {
  font-size: 8.5px;
  color: var(--faint);
  letter-spacing: .02em;
}

a:focus-visible,
.btn:focus-visible,
.diagram-viewport:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--brass);
}

/* ---------- Diagram chrome ---------- */

.diagram-section {
  margin-top: 20px;
}

.diagram-head {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 20px;
  margin-bottom: 8px;
}

.section-label {
  margin: 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--navy);
  flex: none;
}

.legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-size: 8.5px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.scroll-hint {
  display: none;
  margin: 0;
  font-size: 9px;
  color: var(--faint);
  font-style: italic;
}

.diagram-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-color: var(--ghost) transparent;
  scrollbar-width: thin;
}
.diagram-viewport::-webkit-scrollbar { height: 8px; }
.diagram-viewport::-webkit-scrollbar-thumb {
  background: #C3CADE;
  border-radius: 8px;
}
.diagram-viewport::-webkit-scrollbar-track { background: transparent; }

.canvas {
  position: relative;
  width: 1040px;
  height: 552px;
  margin: 0 auto;
}

.wires {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
}

/* ---------- Column headers ---------- */

.col-head {
  position: absolute;
  top: 0;
  height: 28px;
  border-bottom: 2px solid var(--brass);
}
.col-head--newing { left: 0; width: 740px; }
.col-head--client { left: 764px; width: 276px; }

.col-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--navy);
}

.col-sub {
  margin: 1px 0 0;
  font-size: 8.5px;
  line-height: 1.2;
  color: var(--faint);
}

/* ---------- Nodes ---------- */

.node {
  position: absolute;
  z-index: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  text-align: left;
  box-shadow: 0 1px 0 rgba(18, 39, 87, .03);
}

.node-name {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.005em;
}

.node-name--lg { font-size: 13.5px; line-height: 1.2; }

.node-role {
  margin: 2px 0 0;
  font-size: 9.6px;
  line-height: 1.3;
  color: var(--navy-2);
}

.node-role--italic { font-style: italic; }

.node-kicker {
  margin: 0 0 2px;
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--faint);
}

.node-kicker--strong {
  margin: 0;
  font-size: 10px;
  color: var(--navy);
}

.node-meta {
  margin: 2px 0 0;
  font-size: 8.8px;
  line-height: 1.25;
  color: var(--muted);
}

.node-note {
  margin: 3px 0 0;
  font-size: 8.8px;
  line-height: 1.3;
  color: var(--muted);
}

.node-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tag-dashed {
  flex: none;
  padding: 1px 5px;
  font-size: 7.5px;
  line-height: 1.3;
  color: var(--muted);
  border: 1px dashed var(--ghost);
  border-radius: 2px;
}

.people {
  margin: 2px 0 0;
  font-size: 9.7px;
  line-height: 1.3;
  color: var(--navy-2);
}
.people strong { color: var(--navy); }

/* ---------- CEO ---------- */

.ceo {
  left: 250px;
  top: 102px;
  width: 240px;
  height: 56px;
  padding: 6px 12px;
  background: var(--navy);
  border-color: var(--navy);
  border-bottom: 3px solid var(--brass);
  text-align: center;
  box-shadow: 0 3px 10px -4px rgba(18, 39, 87, .35);
}
.ceo .node-name { color: #fff; font-size: 13px; line-height: 1.18; }
.ceo-role {
  margin: 1px 0 0;
  font-size: 9.5px;
  line-height: 1.2;
  color: #fff;
  font-weight: 700;
}
.ceo-role--sub {
  margin-top: 0;
  font-size: 9px;
  font-weight: 400;
  color: #E7ECF7;
}

/* ---------- Engagement Manager ---------- */

.em {
  left: 250px;
  top: 172px;
  width: 240px;
  height: 54px;
  padding: 5px 12px;
  border-color: #C3CBDE;
}
.em .node-role { font-size: 8.8px; line-height: 1.25; }
.em-note {
  margin: 2px 0 0;
  font-size: 8px;
  line-height: 1.2;
  font-style: italic;
  color: var(--faint);
}

/* ---------- PMO ---------- */

.pmo {
  left: 20px;
  top: 256px;
  width: 340px;
  height: 194px;
  padding: 9px 12px 8px;
  border-color: #BFC8DB;
  border-left: 3px solid var(--brass);
  box-shadow: 0 2px 8px -5px rgba(18, 39, 87, .25);
}

.pmo .node-role {
  font-size: 9.2px;
  line-height: 1.28;
}

.badge {
  display: inline-block;
  margin: 4px 0 0;
  padding: 1px 7px;
  font-size: 8.4px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--navy);
  background: #FFF6DE;
  border: 1px solid var(--brass);
  border-radius: 2px;
}

.contact {
  margin: 3px 0 0;
  font-size: 9.2px;
  line-height: 1.3;
  color: var(--navy-2);
  white-space: nowrap;
}
.contact a { text-decoration: none; color: var(--navy-2); }
.contact a:hover { text-decoration: underline; }
.contact .dot { color: var(--brass-deep); padding: 0 2px; }

.duties-wrap {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--line-soft);
}

.duties-label {
  margin: 0 0 3px;
  font-size: 8.3px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--faint);
}

.duties {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: duty;
}

.duties li {
  position: relative;
  padding-left: 15px;
  counter-increment: duty;
  font-size: 9.4px;
  line-height: 1.3;
  color: var(--navy-2);
}
.duties li + li { margin-top: 2px; }
.duties li::before {
  content: counter(duty);
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  font-size: 8.2px;
  font-weight: 700;
  color: var(--navy);
}
.duties strong { color: var(--navy); font-weight: 700; }

/* ---------- Direct report ---------- */

.reports {
  left: 20px;
  top: 466px;
  width: 340px;
  height: 52px;
  padding: 8px 12px;
}
.reports .node-role { font-size: 9px; }

/* ---------- PO / Finance ---------- */

/* Ô PO là ô được làm nổi nhất trong khối Newing dưới PMO:
   tên lớn nhất, chức danh đậm rõ, nhãn "PO On-Point" nhỏ tách phía trên,
   hai dòng liên hệ bấm gọi / mở mail được ở cuối ô. */
.po {
  left: 380px;
  top: 256px;
  width: 173px;
  height: 118px;
  padding: 7px 11px 8px;
  border-color: #B7C1D6;
  border-left: 3px solid var(--brass);
  box-shadow: 0 3px 10px -4px rgba(18, 39, 87, .28);
}
.po .node-kicker {
  margin-bottom: 2px;
  font-size: 8.2px;
  letter-spacing: .07em;
  color: var(--muted);
}
.po .node-name {
  margin-bottom: 2px;
  font-size: 16.5px;
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.po .node-role {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy-2);
}
.po .node-meta {
  margin-top: 2px;
  font-size: 9.8px;
  line-height: 1.25;
  color: var(--muted);
}
.po .po-contact {
  margin: 1px 0 0;
  font-size: 9.2px;
  line-height: 1.2;
  color: var(--navy-2);
  white-space: nowrap;
}
.po .po-contact a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 1.5px;
}
.po .po-contact a:hover { text-decoration-thickness: 2px; }
.po .po-contact a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-radius: 1px;
}
.finance {
  left: 573px;
  top: 256px;
  width: 153px;
  height: 92px;
  padding: 9px 11px;
}
.finance .node-name { font-size: 12.3px; }
.finance .node-role { font-size: 9px; }

/* ---------- Sales / Coaches ---------- */

.sales {
  left: 380px;
  top: 384px;
  width: 346px;
  height: 76px;
  padding: 7px 11px;
  background: #FDFDFE;
  border-color: #C3CBDE;
}
.coaches {
  left: 380px;
  top: 468px;
  width: 346px;
  height: 78px;
  padding: 7px 11px;
  background: #FDFDFE;
  border-color: #C3CBDE;
}

/* ---------- Phase Module 0 ---------- */

.module0 {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 36px;
  width: 740px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 12px 7px 14px;
  background: var(--brass-wash);
  border: 1px solid var(--brass-line);
  border-left: 3px solid var(--brass);
  border-radius: var(--radius);
}

.m0-copy { min-width: 0; }

.m0-kicker {
  margin: 0 0 1px;
  font-size: 7.8px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .05em;
  color: #8C6B16;
}

.module0 h3 {
  margin: 0;
  font-size: 10.8px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.m0-flow {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: none;
}

.chip {
  position: relative;
  z-index: 1;
  width: 170px;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid var(--brass-line);
  border-radius: 3px;
}
.chip:last-child { width: 158px; }

.chip-name {
  display: block;
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.chip-role {
  display: block;
  margin-top: 1px;
  font-size: 7.8px;
  line-height: 1.15;
  color: var(--muted);
}

/* ---------- Client column ---------- */

.client-panel {
  position: absolute;
  left: 764px;
  top: 36px;
  width: 276px;
  height: 494px;
  padding: 12px 14px;
  background: #FCFCFD;
  border: 1px solid var(--line-soft);
  border-top: 2px solid var(--navy);
  border-radius: var(--radius);
}

.panel-label {
  margin: 0 0 7px;
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--faint);
}
.panel-label--spaced { margin-top: 16px; }

.panel-sub {
  margin: -3px 0 8px;
  font-size: 8.2px;
  line-height: 1.3;
  color: var(--faint);
}

.contact-card {
  position: static;
  width: auto;
  padding: 10px 11px;
  border-color: #C3CBDE;
  border-left: 3px solid var(--brass);
  box-shadow: 0 2px 8px -5px rgba(18, 39, 87, .22);
}

.contact-card .node-name { font-size: 13px; line-height: 1.25; }
.alt-name { font-size: 10.5px; font-weight: 400; color: var(--muted); }

.contact--stack {
  margin-top: 5px;
  font-size: 9.2px;
  line-height: 1.5;
  white-space: normal;
}
.contact--stack a { color: var(--navy-2); }

.zalo {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 7.5px;
  line-height: 1.45;
  color: var(--navy);
  background: #EAF4FF;
  border: 1px solid #BBD6F4;
  border-radius: 2px;
}

.title-field {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 8px 0 0;
  font-size: 8.2px;
  color: var(--faint);
}
.title-field-label { flex: none; }
.title-field-line {
  flex: 1;
  border-bottom: 1px solid var(--ghost);
  transform: translateY(-2px);
}

.placeholder {
  position: static;
  width: auto;
  height: 58px;
  margin-top: 10px;
  padding: 9px 11px;
  background: #FBFCFE;
  border: 1px dashed var(--ghost);
  border-left: 3px solid var(--brass);
  box-shadow: none;
}
.placeholder-role {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy);
}
.placeholder-text {
  margin: 3px 0 0;
  font-size: 9.2px;
  line-height: 1.2;
  color: var(--faint);
}

/* ---------- Role legend (Module 1–3) ---------- */

.role-legend {
  margin-top: 12px;
  padding: 9px 13px 10px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-top: 2px solid var(--brass);
  border-radius: 4px;
}

.role-legend-kicker {
  margin: 0 0 5px;
  font-size: 9.3px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--navy);
}

.role-legend-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-legend-item {
  font-size: 9.6px;
  line-height: 1.45;
  color: var(--navy-2);
}
.role-legend-item strong {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Role-boundary notes ---------- */

.notes {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 9px 13px;
  background: var(--brass-wash);
  border: 1px solid var(--brass-line);
  border-left: 3px solid var(--brass);
  border-radius: 4px;
}

.notes-mark { display: none; }

.notes-body h2 {
  margin: 0 0 2px;
  font-size: 9.3px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--navy);
}

.notes-body p {
  margin: 0;
  font-size: 9.6px;
  line-height: 1.45;
  color: var(--navy-2);
}
.notes-body strong { color: var(--navy); }

/* ---------- Footer ---------- */

.doc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-size: 8px;
  color: var(--faint);
}
.doc-footer p { margin: 0; }
.credit a { color: var(--faint); text-decoration: none; }
.credit a:hover { text-decoration: underline; }

/* ---------- Responsive (screen only) ---------- */

@media screen and (max-width: 1180px) {
  .page { padding: 20px 16px 32px; }
  .sheet { padding: 26px 28px 20px; }
}

@media screen and (max-width: 900px) {
  .page { padding: 0 12px 24px; }
  .sheet {
    margin-top: 12px;
    padding: 20px 16px 16px;
    border-radius: 4px;
  }
  .masthead-top { align-items: flex-start; }
  .doc-meta { text-align: right; white-space: normal; font-size: 8.5px; }
  .masthead-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 13px;
  }
  h1 { font-size: 21px; }
  .doc-sub { font-size: 10.5px; }
  .actions { align-items: flex-start; flex-direction: row; align-items: center; gap: 10px; }
  .diagram-section { margin-top: 16px; }
  .diagram-head { flex-wrap: wrap; gap: 8px 14px; }
  .legend { margin-left: 0; order: 3; width: 100%; }
  .scroll-hint { display: block; order: 2; margin-left: auto; }
  .diagram-viewport {
    margin-left: 0;
    margin-right: 0;
    padding: 10px 10px 6px;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 4px;
  }
  .scroll-hint-icon {
    display: inline-block;
    margin-right: 3px;
    font-weight: 700;
    color: var(--navy);
  }
  .role-legend { margin-top: 10px; padding: 8px 11px 9px; }
  .role-legend-list { grid-template-columns: 1fr; gap: 3px; }
  .notes { margin-top: 10px; }
  .doc-footer { font-size: 7.5px; }
}

@media screen and (max-width: 420px) {
  .sheet { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 20px; }
  .diagram-viewport { margin-left: 0; margin-right: 0; padding-left: 8px; padding-right: 8px; }
  .scroll-hint { margin-left: 0; width: 100%; }
}

@media screen and (prefers-color-scheme: dark) {
  body { background: #121829; }
  .sheet { box-shadow: 0 26px 70px -24px rgba(0, 0, 0, .7); }
}

@media screen and (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print: A4 landscape, one page ---------- */

@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  html, body {
    background: #fff !important;
    overflow: visible !important;
  }
  .page { padding: 0; margin: 0; }
  .sheet {
    width: 297mm;
    height: 210mm;
    max-width: none;
    margin: 0;
    padding: 6.5mm 8mm 4mm;
    border-radius: 0;
    box-shadow: none;
  }
  .sheet::before { border-radius: 0; }
  .sheet::after { border-radius: 0; }
  .no-print,
  .scroll-hint,
  .skip-link { display: none !important; }

  .masthead-top { padding-bottom: 5px; }
  .wordmark { font-size: 11px; }
  .doc-meta { font-size: 7.5px; }
  .masthead-main { padding-top: 8px; gap: 16px; }
  h1 { font-size: 19px; }
  .doc-sub { font-size: 9.5px; margin-top: 2px; }

  .diagram-section { margin-top: 7px; }
  .diagram-head { margin-bottom: 3px; min-height: 16px; }
  .legend { font-size: 7.8px; gap: 12px; }
  .legend svg { width: 28px; height: 7px; }
  .diagram-viewport {
    overflow: visible !important;
    padding: 0;
  }
  .canvas { margin: 0 auto; }

  .role-legend { margin-top: 5px; padding: 5px 10px 6px; }
  .role-legend-kicker { margin-bottom: 3px; font-size: 8.2px; }
  .role-legend-list { gap: 2px 24px; }
  .role-legend-item { font-size: 8.8px; line-height: 1.4; }

  .notes { margin-top: 5px; padding: 6px 10px; }
  .notes-body h2 { font-size: 8.4px; }
  .notes-body p { font-size: 8.8px; line-height: 1.4; }

  .doc-footer {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 6.8px;
  }

  .node,
  .module0,
  .client-panel { break-inside: avoid; page-break-inside: avoid; }

  a[href] { text-decoration: none; }
}
