/* Hypergraph: graph-paper precision, slanted bars, and measured color accents.
   This layer changes presentation. Routes, layouts and control states stay local. */
body.hg-site {
  --hg-grid: rgba(35,31,32,.025);
  --hg-rule: rgba(35,31,32,.13);
  --hg-accent: linear-gradient(110deg,#5300bb 0%,#ef2a83 54%,#ff993f 100%);
  --hg-paper: #faf9f7;
}

/* Shared navigation and surfaces */
.hg-site .topribbon {
  background: rgba(250,250,248,.96);
  border-bottom-color: var(--hg-rule);
  box-shadow: none;
}
.hg-site .nav-dropdown,
.hg-site .nav-dd-menu {
  border-radius: 10px;
  border-color: var(--hg-rule);
  box-shadow: 0 12px 32px #231f200c;
}
.hg-site .topribbon nav .nav-item.active>.nav-label {
  border-image: var(--hg-accent) 1;
}
.hg-site :is(.hm-footer,.footer) {
  border-top: 1px solid var(--hg-rule);
}

/* A fine coordinate field gives each page family the same visual origin. */
.hg-site :is(.hm-hero,.kst-hero,.v1-hero,.kb-hero,.jobs-hero,.trust-hero,.vac-hero,.phero,.cases-hero,.khg-hero) {
  background-color: var(--hg-paper);
  background-image: linear-gradient(var(--hg-grid) 1px,transparent 1px),linear-gradient(90deg,var(--hg-grid) 1px,transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  border-bottom: 1px solid var(--hg-rule);
}
.hg-site .hm-intro-right { min-width: 0; }
.hg-site .hg-learning-chart { width: 100%; margin: 0; padding-top: 8px; }
.hg-site .hg-learning-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 0 8.125% 22px; }
.hg-site .hg-learning-key { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--ink-3,#686365); white-space: nowrap; }
.hg-site .hg-learning-key::before { content: ""; width: 20px; height: 3px; border-radius: 2px; background: #5300bb; }
.hg-site .hg-learning-key--cost::before { background: #ef2a83; }
.hg-site .hg-learning-plot { aspect-ratio: 640/322; }
.hg-site .hg-learning-chart img { display: block; width: 100%; height: auto; }
.hg-site .hg-learning-axis { margin-top: 14px; text-align: center; color: var(--ink-3,#686365); font-size: 12px; line-height: 1.5; }
@media(max-width:639px) { .hg-site .hg-learning-legend { gap: 10px 20px; padding-bottom: 16px; } .hg-site .hg-learning-key { font-size: 12px; gap: 7px; } }
.hg-site .kst-hero::before,
.hg-site .kst-hero::after { background: none; }
.hg-site .vac-glow { opacity: .2; }
.hg-site :is(.eyebrow-big,.kst-eyebrow,.ic-eyebrow,.section-kicker) .bar {
  border-radius: 0;
  height: 3px;
  background: var(--hg-accent);
}

/* Precise edges replace floating, glowing cards. Existing color fills remain. */
.hg-site :is(.hm-work-card,.kb-card,.kb-featured,.job-card,.trust-cert-card,.trust-doc-card,.kst-panel,.kst-rel-card,.khg-rel-card,.roi-chart-card,.client-card,.sv-card,.ic-card,.pspot-card,.pvar-card,.hm-chat-mockup) {
  border: 1px solid var(--hg-rule);
  border-radius: 10px;
  box-shadow: none;
}
.hg-site :is(.hm-work-card,.kb-card,.kb-featured,.job-card,.trust-doc-card,.kst-rel-card,.khg-rel-card,.client-card,.sv-card,.pvar-card):hover {
  border-color: #5300bb55;
  box-shadow: 0 4px 16px #231f2005;
  transform: none;
}
.hg-site :is(.hm-work-card,.kb-card,.job-card,.trust-cert-card,.trust-doc-card) {
  background-image: radial-gradient(ellipse at 100% 0,#ff993f06,transparent 55%);
}
.hg-site :is(.hm-work-card,.job-card) :is(.wc-domain,.job-card-eyebrow) {
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}
.hg-site :is(.mag-row,.role-line,.kst-faq-item,.khg-faq-item,.flow-col,.ic-step) {
  border-color: var(--hg-rule);
}
.hg-site :is(.kst-panel,.roi-chart-card,.fvsb-frame,.pssb-frame,.sbsb-frame,.otsb-frame) {
  border-radius: 10px;
  box-shadow: none;
}
.hg-site :is(.c-card,.hm-integ-card,.hm-integ-pill,.ic-name) {
  border-color: var(--hg-rule);
  box-shadow: none;
}
.hg-site :is(.c-card,.hm-integ-card) { border-radius: 10px; }
.hg-site :is(.kb-card-arr,.wc-cta,.mag-row-arr,.trust-doc-link) { color: #5300bb; }

/* Portfolio: the same body/display pairing as the rest of Hypergraph. */
.hg-site .hg-portfolio {
  font-family: var(--font-body,'Graphik',sans-serif);
  background-color: var(--hg-paper);
}
.hg-site .hg-portfolio :is(h1,h2,.hg-agent-brand,.hg-video-brand,.hg-video-caption,summary,.hg-agent-category) {
  font-family: var(--font-display,'Gilroy',sans-serif);
}
.hg-site .hg-portfolio-button,
.hg-site .hg-saved-toggle {
  font-family: var(--font-display,'Gilroy',sans-serif);
  font-weight: 600;
}
.hg-site .hg-portfolio-hero {
  position: relative;
  isolation: isolate;
  color: var(--ink-1,#231f20);
  background: var(--hg-paper);
  border-bottom: 1px solid var(--hg-rule);
}
.hg-site .hg-portfolio-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--hg-grid) 1px,transparent 1px),linear-gradient(90deg,var(--hg-grid) 1px,transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg,#000 20%,#0005 100%);
}
.hg-site .hg-portfolio-hero::after {
  content: '';
  position: absolute;
  height: 3px;
  width: 96px;
  bottom: -2px;
  left: 88px;
  background: var(--hg-accent);
  pointer-events: none;
}
.hg-site .hg-portfolio-eyebrow {
  color: var(--ink-3,#686365);
  font: 600 12px/30px var(--font-display,'Gilroy',sans-serif);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hg-site .hg-portfolio-intro h1 {
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
}
.hg-site .hg-portfolio-title-accent {
  display: block;
  background: var(--hg-accent);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hg-site .hg-portfolio-intro>p {
  color: var(--ink-3,#686365);
  font-size: 22px;
  line-height: 1.6;
}
/* Agent tiles: clear boundaries and room for each application. */
.hg-site .hg-portfolio-list .hg-portfolio-hero>.hg-portfolio-wrap { padding-top: 48px; padding-bottom: 48px; }
.hg-site .hg-portfolio-list .hg-portfolio-intro h1 { font-size: clamp(36px,4.2vw,64px); }
.hg-site .hg-portfolio-list .hg-portfolio-intro>p { font-size: 19px; line-height: 1.65; }
.hg-site .hg-agent-browse { grid-template-columns: minmax(220px,260px) minmax(0,1fr); gap: 48px; padding-top: 40px; }
.hg-site .hg-agent-filters { position: sticky; top: 100px; }
.hg-site .hg-agent-count { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; font-size: 12px; color: var(--ink-3,#686365); padding-bottom: 18px; }
.hg-site .hg-agent-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; border: 0; }
.hg-site .hg-agent-card {
  display: flex; flex-direction: column; align-items: stretch;
  min-width: 0; min-height: 292px; padding: 26px 28px 68px;
  border: 1px solid #e6e1ea; border-radius: 14px;
  background: #fff; box-shadow: 0 3px 12px #231f2003; overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.hg-site .hg-agent-card::before { content: none; }
.hg-site .hg-agent-card::after {
  content: ""; position: absolute; inset: auto auto 28px 28px; width: 44px; height: 24px;
  background: linear-gradient(#5300bb,#5300bb) 0 18px/7px 6px no-repeat,
    linear-gradient(#ef2a83,#ef2a83) 12px 10px/7px 14px no-repeat,
    linear-gradient(#ff993f,#ff993f) 24px 0/7px 24px no-repeat;
  opacity: .65; pointer-events: none; z-index: 0;
}
.hg-site .hg-agent-card:hover,
.hg-site .hg-agent-card:focus-within { border-color: #b6a0d4; box-shadow: 0 9px 26px #5300bb09; transform: translateY(-2px); }
.hg-site .hg-agent-card-link { border-radius: 14px; }
.hg-site .hg-agent-card-link:focus-visible { outline: 2px solid #5300bb; outline-offset: -4px; }
.hg-site .hg-agent-card-link::after {
  content: "↗"; position: absolute; right: 24px; bottom: 22px;
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid #eae3f3; border-radius: 8px;
  color: #5300bb; font-size: 21px; line-height: 1; background: #fbf9fd;
}
.hg-site .hg-agent-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -5px -7px 22px 0; }
.hg-site .hg-agent-category { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hg-site .hg-agent-number { font: 11px/20px Menlo,monospace; color: #5300bb; border-right: 1px solid #e5dfed; padding-right: 11px; }
.hg-site .hg-agent-category>span:last-child { font-size: 12px; line-height: 20px; color: var(--ink-3,#686365); }
.hg-site .hg-agent-card h2 { min-width: 0; font-weight: 700; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: normal; }
.hg-site .hg-agent-card hr { display: none; }
.hg-site .hg-agent-card>p { display: block; overflow: visible; font-size: 15px; line-height: 1.65; margin: 18px 0 0; color: var(--ink-3,#686365); }
.hg-site .hg-agent-card .hg-agent-save { min-width: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; }
.hg-site .hg-agent-card .hg-agent-save:hover { background: #ef2a8308; }
.hg-site .hg-agent-card .hg-agent-save svg { width: 21px; height: 21px; }
@media(min-width:1900px) { .hg-site .hg-agent-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:1023px) {
  .hg-site .hg-agent-browse { grid-template-columns: 1fr; gap: 28px; }
  .hg-site .hg-agent-filters { position: static; }
}
@media(max-width:639px) {
  .hg-site .hg-portfolio-list .hg-portfolio-hero>.hg-portfolio-wrap { padding-top: 32px; padding-bottom: 32px; }
  .hg-site .hg-agent-grid { grid-template-columns: 1fr; gap: 16px; }
  .hg-site .hg-agent-card { min-height: 270px; padding: 22px 24px 66px; }
  .hg-site .hg-agent-card h2 { font-size: 23px; }
  .hg-site .hg-agent-card::after { left: 24px; bottom: 24px; }
}
@media(prefers-reduced-motion:reduce) { .hg-site .hg-agent-card:hover,.hg-site .hg-agent-card:focus-within { transform: none; } }
.hg-site .hg-agent-filter { border-bottom: 1px solid var(--hg-rule); }
.hg-site .hg-agent-filter-options { padding-bottom: 18px; }
.hg-site .hg-agent-filter summary { font-size: 19px; font-weight: 600; }
.hg-site .hg-agent-filter-options label { font-size: 14px; }
.hg-site .hg-agent-search input { font-size: 14px; }
.hg-site .hg-agent-search { border-bottom-color: var(--hg-rule); }
.hg-site .hg-agent-save { color: var(--ink-3,#686365); }
.hg-site .hg-agent-save.is-saved { color: #ef2a83; }
.hg-site .hg-agent-gradient { height: 3px; mask-image: none; }
.hg-site .hg-agent-intro {
  background-image: linear-gradient(var(--hg-grid) 1px,transparent 1px),linear-gradient(90deg,var(--hg-grid) 1px,transparent 1px);
  background-size: 44px 44px;
  border-bottom-color: var(--hg-rule);
}
.hg-site .hg-agent-intro h1 { font-weight: 700; letter-spacing: -.03em; line-height: 1.12; }
.hg-site .hg-agent-intro>p { color: var(--ink-3,#686365); font-size: 22px; line-height: 1.6; }
.hg-site .hg-agent-sidebar { border: 1px solid var(--hg-rule); border-radius: 10px; background: #fff; }
.hg-site .hg-agent-tag { border-color: var(--hg-rule); background: var(--hg-paper); }
.hg-site .hg-agent-copy h2 { font-weight: 700; letter-spacing: -.025em; }
.hg-site .hg-agent-copy :is(p,li) { font-size: 18px; line-height: 1.7; }
.hg-site .hg-portfolio-contact {
  color: var(--ink-1,#231f20);
  border-top: 1px solid var(--hg-rule);
  background: var(--hg-paper);
}
.hg-site .hg-portfolio-contact h2 { font-weight: 700; letter-spacing: -.03em; }
.hg-site .hg-portfolio-contact .hg-portfolio-button { background: var(--ink-1,#231f20); color: #fff; border-color: transparent; }
@media(max-width:1023px) {
  .hg-site .hg-agent-sidebar { border: 0; border-bottom: 1px solid var(--hg-rule); border-radius: 0; background: transparent; }
}
@media(max-width:879px) {
  .hg-site .hg-portfolio-hero::after { left: 36px; }
  .hg-site .hg-portfolio-intro>p { font-size: 18px; line-height: 1.6; }
  .hg-site .hg-agent-intro>p { font-size: 20px; line-height: 1.6; }
}
@media(prefers-reduced-motion:reduce) {
  .hg-site .hg-agent-card { transition: none; }
}

/* The four engineers share one team, with equal space for each member. */
.hg-site .hm-client--reforge .hm-client-logo { filter: none; width: 176px; height: auto; object-fit: contain; }
.hg-site .hm-client--reforge .hm-client-mark { height: 48px; }
.hg-site .hm-client--polpohire-ats .hm-client-mark { display: flex; align-items: center; justify-content: center; gap: 8px; width: 156px; max-width: 100%; height: 44px; overflow: visible; }
.hg-site .hm-client--polpohire-ats .hm-client-logo { flex: 0 0 30px; width: 30px; height: 40px; max-width: none; transform: none; filter: none; object-fit: contain; }
.hg-site .hm-client-polpo-word { font: 700 24px/1 Inter,system-ui,sans-serif; letter-spacing: -.02em; white-space: nowrap; color: #1b1830; }
.hg-site .hm-client-polpo-word>span { color: #4a3fd6; }
.hg-site .hm-team-inner { display: block; }
.hg-site .hm-team-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.hg-site .hm-team-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; width: 100%; max-width: none; padding-top: 0; border-top: 0; }
.hg-site .hm-team .hm-member {
  --member-accent: #5300bb;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 28px; padding: 30px 26px 24px; min-height: 290px;
  background: #fffafc; border: 1px solid rgba(83,0,187,.09);
  border-radius: 12px; text-align: left; box-shadow: none;
}
.hg-site .hm-team .hm-member:nth-child(2) { --member-accent: #a219a7; }
.hg-site .hm-team .hm-member:nth-child(3) { --member-accent: #ef2a83; }
.hg-site .hm-team .hm-member:nth-child(4) { --member-accent: #d65b27; }
.hg-site .hm-team .hm-member::before {
  content: ""; position: absolute; z-index: -1; top: 28px; right: 24px;
  width: 82px; height: 68px; opacity: .1; background: var(--member-accent);
  clip-path: polygon(0 75%,22% 75%,22% 100%,0 100%,0 75%,39% 75%,39% 40%,61% 40%,61% 100%,39% 100%,39% 75%,78% 75%,78% 0,100% 0,100% 100%,78% 100%,78% 75%);
  pointer-events: none;
}
.hg-site .hm-team .hm-member::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg,#5300bb,#ef2a83,#ff993f); pointer-events: none;
}
.hg-site .hm-team .portrait {
  width: 80px; height: 80px; min-width: 80px; border-radius: 12px;
  background: #fff !important; border: 1px solid rgba(83,0,187,.1);
  box-shadow: 0 3px 12px rgba(83,0,187,.04);
  color: var(--member-accent); font-size: 30px; font-weight: 600;
}
.hg-site .hm-team .portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hg-site .hm-team .portrait { position: relative; overflow: hidden; }
.hg-site .hm-team .portrait--mohammed img { position: absolute; width: 320%; height: 320%; max-width: none; left: -152%; top: -56%; border-radius: 0; }
.hg-site .hm-team .portrait--justin img { position: absolute; width: 160%; height: 160%; max-width: none; left: -20%; top: -9%; border-radius: 0; }
.hg-site .hm-team .m-meta { width: 100%; text-align: left; }
.hg-site .hm-team .name { font-size: 25px; line-height: 1.2; letter-spacing: -.025em; }
.hg-site .hm-team .role { margin-top: 8px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.hg-site .hm-team .m-status { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 15px; border-top: 1px solid rgba(83,0,187,.09); font-size: 12px; color: var(--ink-3,#686365); }
.hg-site .hm-team .m-status::before { content: ""; width: 5px; height: 5px; background: var(--member-accent); border-radius: 1px; }
.hg-site .hm-team .phone { display: block; margin-top: 12px; font-size: 14px; color: inherit; }
.hg-site .hm-team .m-profile { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; font-size: 13px; color: #5300bb; text-underline-offset: 3px; }
@media(max-width:1023px) {
  .hg-site .hm-team-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hg-site .hm-team-intro { grid-template-columns: 1fr; gap: 20px; }
}
@media(max-width:579px) {
  .hg-site .hm-team-grid { grid-template-columns: 1fr; }
  .hg-site .hm-team .hm-member { min-height: 0; flex-direction: row; gap: 20px; padding: 24px; }
  .hg-site .hm-team .hm-member::before { right: 16px; top: 18px; width: 52px; height: 44px; opacity: .06; }
  .hg-site .hm-team .portrait { width: 64px; height: 64px; min-width: 64px; }
  .hg-site .hm-team .name { font-size: 24px; }
}

.hg-info{max-width:1100px;margin:auto;padding:100px 24px 120px}.hg-info h1{font-size:clamp(38px,6vw,72px);line-height:1.07;letter-spacing:-.04em;margin:28px 0 42px}.hg-info h2{margin:40px 0 16px;font-size:26px}.hg-info p{max-width:740px;font-size:19px;line-height:1.7;color:#625e60}.hg-info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:24px}.hg-info-grid a{padding:28px;border:1px solid #e6e2e8;border-radius:12px;color:inherit;text-decoration:none}.hg-info-grid h2{margin:0 0 24px}
